[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets
From: |
Stephen J. Turnbull |
Subject: |
Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets |
Date: |
Mon, 02 Feb 2015 12:45:34 +0900 |
Dmitry Gutov writes:
> On 02/02/2015 04:12 AM, Stephen J. Turnbull wrote:
> > > Why do we need to fetch first? Just check against
> > > origin/master. If it's outdated, the push will most likely
> > > fail anyway.
> >
> > It didn't this time.
>
> That means origin/master on Joakim's machine wasn't outdated. Which,
> without someone implementing the actual check, doesn't give us anything.
The check isn't hard, it's just
current=$(git rev-parse origin/master)
base=$(git rev-list --first-parent origin/master^..HEAD | tail -1)
test "$current" = "$base"
(untested). Probably we should be a little more careful about
specifying what is proposed for push on the user side than just
"HEAD", but that gives the basic computation.
Turning that into a hook for receive-pack is something that may be
equally trivial, but I don't have the time (or the interest) to
investigate hook-writing.
In any case, the point of doing the check locally is to avoid a failed
push which is annoying and upsetting, especially to users who are used
to a different workflow or VCS. If you're doing the check offline or
otherwise the fetch of the branch you want to push to fails, sure,
fall back to the current state.
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, (continued)
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, Dmitry Gutov, 2015/02/01
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, Eli Zaretskii, 2015/02/01
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, David Engster, 2015/02/02
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, Ulrich Mueller, 2015/02/02
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, Eli Zaretskii, 2015/02/02
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, Stefan Monnier, 2015/02/02
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, Stephen J. Turnbull, 2015/02/01
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, Dmitry Gutov, 2015/02/01
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, Stephen J. Turnbull, 2015/02/01
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets, Dmitry Gutov, 2015/02/01
- Re: [Emacs-diffs] xwidget 9fe732a 2/2: Better changelog for xwidgets,
Stephen J. Turnbull <=