Action stamps
Jason Merrill
jason@redhat.com
Tue Sep 1 06:27:00 GMT 2015
On 08/29/2015 10:58 AM, Dominique d'Humières wrote:
>> For Jakub or anyone else wanting a key to associate a file with a commit, they can decide for themselves
>> what date format they want to use and whether to bother with the user id. I would think that if he is only
>> interested in commits on the trunk (and so should use log --first-parent), the timestamp is sufficient.
>
> I share Jakub’s concern about having access to an increasing labeling of the revisions. What would be the replacement of « svn update -r xxxx »?
Given git aliases:
> stamp = show -s --format='%cI!%ce'
> scommit = "!f(){ d=${1%%!*}; a=${1##*!}; arg=\"--until=$d -1\"; if [ $a != $1 ]; then arg=\"$arg --committer=$a\"; fi; shift; git rev-list $arg ${1:+\"$@\"}; }; f"
> smaster = "!f(){ git scommit \"$1\" trunk --first-parent; }; f"
> shs = "!f(){ git show $(git smaster $1); }; f"
> slog = "!f(){ s=$1; shift; git log $(git smaster $s) $*; }; f"
> sco = "!f(){ git checkout $(git smaster $1); }; f"
and an action stamp 2015-08-20T20:55:15Z!jason, then
git sco 2015-08-20T20:55:15Z\!jason
will check out the (most recent) commit with that stamp. It also works
with just the timestamp.
A timestamp gives you a simple increasing (though sparse) label, though
it might not always be unique; when I locally rebase several patches I
sometimes get two or three with the same timestamp, which I expect to be
preserved if I push them upstream.
Jason
More information about the Gcc
mailing list