Skip to content

Instantly share code, notes, and snippets.

@tiborvass
Created July 25, 2017 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiborvass/f9303e496644c77bd11ba08ec00d9fa0 to your computer and use it in GitHub Desktop.
Save tiborvass/f9303e496644c77bd11ba08ec00d9fa0 to your computer and use it in GitHub Desktop.
archive/tar changes between go1.8 and go1.9rc1
$ git log origin/release-branch.go1.8..origin/release-branch.go1.9 src/archive/tar
commit c991d2ab14496789146560608c5756d5d83b35f6
Author: Joe Tsai <joetsai@digital-static.net>
Date: Tue Jun 27 17:30:39 2017 -0700
archive/tar: use best effort at writing USTAR header
Prior to this change, if the Writer needed to use the PAX format, it would
output a USTAR header with an empty name. This should be okay since the PAX
specification dictates that the PAX record for "path" should override the
semantic meaning of any of the old USTAR fields.
Unfortunately, the implementation of tar on OpenBSD 6.1 is too strict with
their handling of PAX files such that they check for the validity of this
bogus field even though the PAX header is present.
To allow Go's Writer output be parsible by OpenBSD's tar utility,
we write a best-effort (ASCII-only and truncated) version of the original
file name. Note that this still fails in some edge-cases (for example,
a Chinese filename containing all non-ASCII characters). OpenBSD should really
relax their checking, as you honestly can't always expect a sensible path
to be generated when USTAR cannot handle the original path.
Fixes #20707
Change-Id: Id7d77349023d2152d7291d582cd050b6681760e4
Reviewed-on: https://go-review.googlesource.com/46914
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
commit 66b5a2f3f0b1d94f69763114a85a977f5bc0277a
Author: Lars Jeppesen <jeppesen.lars@gmail.com>
Date: Sat Apr 29 23:25:34 2017 +0200
archive/tar: remove file type bits from mode field
When writing tar files by using the FileInfoHeader
the type bits was set in the mode field of the header
This is not correct according to the standard (GNU/Posix) and
other implementations.
Fixed #20150
Change-Id: I3be7d946a1923ad5827cf45c696546a5e287ebba
Reviewed-on: https://go-review.googlesource.com/42093
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
commit 1989921aef60c83e6f9127a8448fb5ede10e9acc
Author: Alex Brainman <alex.brainman@gmail.com>
Date: Wed Apr 26 14:49:58 2017 +1000
os: do not report ModeDir for symlinks on windows
When using Lstat against symlinks that point to a directory,
the function returns FileInfo with both ModeDir and ModeSymlink set.
Change that to never set ModeDir if ModeSymlink is set.
Fixes #10424
Fixes #17540
Fixes #17541
Change-Id: Iba280888aad108360b8c1f18180a24493fe7ad2b
Reviewed-on: https://go-review.googlesource.com/41830
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
commit cf3a28124b199d15b7e968327ba07d45f2f24a88
Author: Alex Brainman <alex.brainman@gmail.com>
Date: Tue Apr 4 17:09:17 2017 +1000
archive/tar: extend TestFileInfoHeaderSymlink
For #17541.
Change-Id: I524ab194f32b8b061ce1c9c3e0cd34cc5539358e
Reviewed-on: https://go-review.googlesource.com/39410
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
commit 0e3355903d2ebcf5ee9e76096f51ac9a116a9dbb
Author: Russ Cox <rsc@golang.org>
Date: Thu Feb 2 16:20:58 2017 -0500
time: record monotonic clock reading in time.Now, for more accurate comparisons
See https://golang.org/design/12914-monotonic for details.
Fixes #12914.
Change-Id: I80edc2e6c012b4ace7161c84cf067d444381a009
Reviewed-on: https://go-review.googlesource.com/36255
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Caleb Spare <cespare@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment