Towards removal of gcc/DATESTAMP

Joseph Myers
Tue Jan 14 17:41:00 GMT 2020

On Tue, 14 Jan 2020, Jakub Jelinek wrote:

> o=$(git config --get gcc-config.upstream); test -z "$o" && o=origin; r=$(cat BASE-VER | cut -d. -f 1); b=; if git rev-parse --verify --quiet $o/releases/gcc-$r >/dev/null; then b=origin/releases/gcc-$r; elif git rev-parse --verify --quiet $o/releases/gcc-9 >/dev/null; then b=$o/master; fi; test -n "$b" && TZ=UTC LC_ALL=C git log --date=iso -1 $(git merge-base HEAD $b) | sed -n 's/^Date:[[:blank:]]*//p' | sed 's/ .*$//;s/-//g'

That looks like it would use the author date, when the committer date is 
more likely to be monotonic and closer to what's relevant here.  
(Actually I think you want --date=iso-local --pretty=format:%cd or similar 
to print just the committer date, in the UTC timezone that you've set 
rather than the committer's timezone which is the default for printing the 

> 1) some trees will not be git repositories, e.g. release tarballs, snapshot
>    tarballs or e.g. vendor gcc tarball snapshots; for release

Or they may be git repositories that don't have origin/releases/gcc-9 (for 
example) - a vendor repository with its own branch structure, say.

Joseph S. Myers

More information about the Gcc mailing list