From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: VC mode and git Date: Thu, 26 Mar 2015 19:15:34 +0200 Message-ID: <83sicrn0i1.fsf@gnu.org> References: <20150324163714.GA27775@thyrsus.com> <83y4mmpb1n.fsf@gnu.org> <87lhim9sqp.fsf@igel.home> <87egoc56qg.fsf@gnu.org> <83y4mjn196.fsf@gnu.org> <55143CDE.20200@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1427390214 19125 80.91.229.3 (26 Mar 2015 17:16:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Mar 2015 17:16:54 +0000 (UTC) Cc: esr@thyrsus.com, emacs-devel@gnu.org, schwab@linux-m68k.org, rms@gnu.org, tsdh@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 26 18:16:47 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YbBOa-0004aj-7P for ged-emacs-devel@m.gmane.org; Thu, 26 Mar 2015 18:16:40 +0100 Original-Received: from localhost ([::1]:45715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbBOZ-0005Y8-EQ for ged-emacs-devel@m.gmane.org; Thu, 26 Mar 2015 13:16:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbBOW-0005Vk-Es for emacs-devel@gnu.org; Thu, 26 Mar 2015 13:16:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbBOT-0001gC-Q1 for emacs-devel@gnu.org; Thu, 26 Mar 2015 13:16:36 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:43257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbBOT-0001fw-IP; Thu, 26 Mar 2015 13:16:33 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NLT00B00X0YTG00@a-mtaout20.012.net.il>; Thu, 26 Mar 2015 19:15:38 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLT00BPFXA2LQ90@a-mtaout20.012.net.il>; Thu, 26 Mar 2015 19:15:38 +0200 (IST) In-reply-to: <55143CDE.20200@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:184344 Archived-At: > Date: Thu, 26 Mar 2015 19:07:42 +0200 > From: Dmitry Gutov > CC: esr@thyrsus.com, schwab@linux-m68k.org, rms@gnu.org, > emacs-devel@gnu.org > > 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 ;-)