From: Yuri Khan <yuri.v.khan@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Recording the date at which a change was pushed to Savannah
Date: Tue, 2 Dec 2014 11:55:27 +0700 [thread overview]
Message-ID: <CAP_d_8UPcCYujE64gTR89ZOgVJDVCWs0W6-JrJ-P6owCat=dPQ@mail.gmail.com> (raw)
In-Reply-To: <nk8uiqyd3s.fsf@fencepost.gnu.org>
On Tue, Dec 2, 2014 at 8:55 AM, Glenn Morris <rgm@gnu.org> 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.
next prev parent reply other threads:[~2014-12-02 4:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 2:55 Recording the date at which a change was pushed to Savannah Glenn Morris
2014-12-02 4:55 ` Yuri Khan [this message]
2014-12-02 5:05 ` Stephen J. Turnbull
2014-12-02 13:48 ` Stefan Monnier
2014-12-03 6:22 ` Glenn Morris
2014-12-03 6:47 ` David Kastrup
2014-12-03 7:51 ` Stephen J. Turnbull
2014-12-03 8:35 ` David Kastrup
2014-12-03 9:50 ` Stephen J. Turnbull
2014-12-03 10:04 ` David Kastrup
2014-12-03 14:18 ` Stefan Monnier
2014-12-03 16:19 ` Yuri Khan
2014-12-03 18:59 ` Stefan Monnier
2014-12-03 18:02 ` Eli Zaretskii
2014-12-03 19:00 ` Stefan Monnier
2014-12-03 19:06 ` Eli Zaretskii
2014-12-03 19:34 ` Stefan Monnier
2014-12-03 20:24 ` Eli Zaretskii
2014-12-03 21:10 ` Stefan Monnier
2014-12-04 2:52 ` Yuri Khan
2014-12-04 6:17 ` Eli Zaretskii
2014-12-04 2:58 ` Glenn Morris
2014-12-04 3:57 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP_d_8UPcCYujE64gTR89ZOgVJDVCWs0W6-JrJ-P6owCat=dPQ@mail.gmail.com' \
--to=yuri.v.khan@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.