emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recording the date at which a change was pushed to Savannah


From: Yuri Khan
Subject: Re: Recording the date at which a change was pushed to Savannah
Date: Tue, 2 Dec 2014 11:55:27 +0700

On Tue, Dec 2, 2014 at 8:55 AM, Glenn Morris <address@hidden> wrote:
>
> If I've understood correctly, "the date that a change was applied to the
> Emacs repository on Savannah" is not something that is recorded.
> Neither of the two dates that git does record correspond to that
> (neither of those dates seems especially useful to me).

If a single commit is made on a release branch or on master and
immediately pushed, then both its Author and Committer dates are
reasonably close to the push.

If a feature branch is rebased to the current state of a release
branch or master and then immediately pushed, then the Committer date
of each commit that changed during rebase is reasonably close to the
push.

If a feature branch is merged into a release branch or master and the
merge is immediately pushed, then both dates of the merge commit are
reasonably close to the push.

The only case when you don’t know the date some commit was pushed is
if it is one in a long series of commits which was pushed as a
fast-forward:

A:
o---o origin/master
     \
      o---o---o---o master

$ git push origin master

B:
o---o---o---o---o---o origin/master, master


To avoid this situation, you can adopt a convention that pushes to
release branches and master SHOULD be either single commits made or
non-trivially rebased immediately before the push, or explicit merges
of other branches.


To get from local state A to the desired pre-push state, one does

$ git branch my-feature
$ git reset --hard origin/master
$ git merge --no-ff my-feature
$ git push origin master
$ git branch -d my-feature

o---o---------------o origin/master, master
     \             /
      o---o---o---o


> I've seen it suggested that enabling the reflog on the server (and
> disabling expiry), plus a post-receive hook to add the information to a
> note, will do it. E.g.:
>
> http://mnaoumov.wordpress.com/2013/01/31/git-get-push-date/

In normal circumstances, reflogs are highly volatile. It looks like a
bad idea to rely on them.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]