Compare commits

...

6 Commits

Author SHA1 Message Date
Alexander Neumann
594f155eb6 Add version for 0.13.1 2022-04-10 10:58:55 +02:00
Alexander Neumann
90f1a9b5f5 Generate CHANGELOG.md for 0.13.1 2022-04-10 10:58:22 +02:00
Alexander Neumann
2ad3d50535 Prepare changelog for 0.13.1 2022-04-10 10:58:22 +02:00
Charlie Jiang
59fd21e30e Fix rclone (scoop shim) and sftp issue due to detached console on Windows 2022-04-10 10:56:55 +02:00
greatroar
c31f1e797b Cast unix.Statfs_t.Type to int64 when checking for btrfs
Fixes #3687. Uses the cast suggested by @MichaelEischer, except that the
contant isn't cast along, because it's untyped and will be converted by
the compiler as necessary.
2022-04-10 10:56:37 +02:00
Alexander Neumann
53ac0bfe85 Fix diff
Nodes in trees were always printed with a `+` in diff, regardless of
whether or not a dir was added or removed. Let's use the mode we were
passed in printDir().

Closes #3685
2022-04-10 10:56:19 +02:00
8 changed files with 68 additions and 9 deletions

View File

@@ -1,3 +1,39 @@
Changelog for restic 0.13.1 (2022-04-10)
=======================================
The following sections list the changes in restic 0.13.1 relevant to
restic users. The changes are ordered by importance.
Summary
-------
* Fix #3685: Fix the diff command
* Fix #3681: Fix rclone (shimmed by Scoop) and sftp stopped working on Windows
Details
-------
* Bugfix #3685: Fix the diff command
There was a bug in the `diff` command, it would always show files in a removed directory as added.
We've fixed that.
https://github.com/restic/restic/issues/3685
https://github.com/restic/restic/pull/3686
* Bugfix #3681: Fix rclone (shimmed by Scoop) and sftp stopped working on Windows
In #3602 a fix was introduced to fix the problem that rclone prematurely exits when Ctrl+C is
pressed on Windows. The solution was to create the subprocess with its console detached from
the restic console. However, such solution fails when using rclone install by scoop or using
sftp with a passphrase- protected private key. We've fixed that by using a different approach
to prevent Ctrl-C from passing down too early.
https://github.com/restic/restic/issues/3681
https://github.com/restic/restic/issues/3692
https://github.com/restic/restic/pull/3696
Changelog for restic 0.13.0 (2022-03-26)
=======================================

View File

@@ -1 +1 @@
0.13.0
0.13.1

View File

@@ -0,0 +1,7 @@
Bugfix: Fix the diff command
There was a bug in the `diff` command, it would always show files in a removed
directory as added. We've fixed that.
https://github.com/restic/restic/issues/3685
https://github.com/restic/restic/pull/3686

View File

@@ -0,0 +1,12 @@
Bugfix: Fix rclone (shimmed by Scoop) and sftp stopped working on Windows
In #3602 a fix was introduced to fix the problem that rclone prematurely exits
when Ctrl+C is pressed on Windows. The solution was to create the subprocess
with its console detached from the restic console. However, such solution
fails when using rclone install by scoop or using sftp with a passphrase-
protected private key. We've fixed that by using a different approach to prevent
Ctrl-C from passing down too early.
https://github.com/restic/restic/issues/3681
https://github.com/restic/restic/issues/3692
https://github.com/restic/restic/pull/3696

View File

@@ -170,7 +170,7 @@ func (c *Comparer) printDir(ctx context.Context, mode string, stats *DiffStat, b
if node.Type == "dir" {
name += "/"
}
c.printChange(NewChange(name, "+"))
c.printChange(NewChange(name, mode))
stats.Add(node)
addBlobs(blobs, node)

View File

@@ -40,7 +40,7 @@ import (
"golang.org/x/crypto/ssh/terminal"
)
var version = "0.13.0"
var version = "0.13.1"
// TimeFormat is the format used for all timestamps printed by restic.
const TimeFormat = "2006-01-02 15:04:05"

View File

@@ -11,7 +11,7 @@ import (
func startForeground(cmd *exec.Cmd) (bg func() error, err error) {
// just start the process and hope for the best
cmd.SysProcAttr = &syscall.SysProcAttr{}
cmd.SysProcAttr.CreationFlags = windows.DETACHED_PROCESS
cmd.SysProcAttr.CreationFlags = windows.CREATE_NEW_PROCESS_GROUP
err = cmd.Start()
if err != nil {
return nil, errors.Wrap(err, "cmd.Start")

View File

@@ -59,9 +59,13 @@ func supportsNoatime(t *testing.T, f *os.File) bool {
err := unix.Fstatfs(int(f.Fd()), &fsinfo)
rtest.OK(t, err)
return fsinfo.Type == unix.BTRFS_SUPER_MAGIC ||
fsinfo.Type == unix.EXT2_SUPER_MAGIC ||
fsinfo.Type == unix.EXT3_SUPER_MAGIC ||
fsinfo.Type == unix.EXT4_SUPER_MAGIC ||
fsinfo.Type == unix.TMPFS_MAGIC
// The funky cast works around a compiler error on 32-bit archs:
// "unix.BTRFS_SUPER_MAGIC (untyped int constant 2435016766) overflows int32".
// https://github.com/golang/go/issues/52061
typ := int64(uint(fsinfo.Type))
return typ == unix.BTRFS_SUPER_MAGIC ||
typ == unix.EXT2_SUPER_MAGIC ||
typ == unix.EXT3_SUPER_MAGIC ||
typ == unix.EXT4_SUPER_MAGIC ||
typ == unix.TMPFS_MAGIC
}