[Top][All Lists]

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

Re: VC mode and git

From: Eli Zaretskii
Subject: Re: VC mode and git
Date: Thu, 26 Mar 2015 19:15:34 +0200

> Date: Thu, 26 Mar 2015 19:07:42 +0200
> From: Dmitry Gutov <address@hidden>
> CC: address@hidden, address@hidden, address@hidden,
>  address@hidden
> On 03/26/2015 06:59 PM, Eli Zaretskii wrote:
> >> in .git/hooks/post-commit/.
> >
> > What happens if the commit succeed, but the push in the hook fails?
> > Will Git roll back the commit?
> Nope, unless you ask it.

Thought so.  So the simplistic script posted here is really not a good
idea, IMO.  It needs to be smarter in order to be useful to people who
don't want to hear about pushing separately.

> > If not, then this isn't reallt a good emulation of bzr's bound
> > branches, because there a commit+push was an atomic operation: either
> > both succeeded, or none at all.
> Maybe you should try something like:
> git push || git reset HEAD^

Yes, and then somehow we should also emulate bzr's "commit --local",
so that you could commit without pushing should you need that (e.g.,
after a failed merge or whatnot).

Volunteers welcome to provide such a facility ;-)

reply via email to

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