This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Action stamps

Jason Merrill <>:
> 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.

This is a corner of git of which I knew not.  How does one set this sort of
alias?  I Google...

Will git config --global alias.stamp = show -s --format='%cI!%ce

and analogous command lines work?

I think I understand what most of these are doing, would be doing
a service to the world if you wrote a little shellscript that set these up,
with short explanatory comments reveraling what each is to be used for, like

# sco - check out most recent commit with specified action stamp

I'd add that to the reposurgeon distribution in a heartbeat.
		<a href="";>Eric S. Raymond</a>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]