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: Fri, 27 Mar 2015 22:10:12 +0300 Message-ID: <83r3sa1ckr.fsf@gnu.org> References: <20150324163714.GA27775@thyrsus.com> <83y4mmpb1n.fsf@gnu.org> <87lhim9sqp.fsf@igel.home> <87egoc56qg.fsf@gnu.org> <83egoanb8t.fsf@gnu.org> <83sicqa7pk.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1427483443 5037 80.91.229.3 (27 Mar 2015 19:10:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Mar 2015 19:10:43 +0000 (UTC) Cc: esr@thyrsus.com, tsdh@gnu.org, schwab@linux-m68k.org, rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 27 20:10:34 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 1YbZeJ-0004vw-0I for ged-emacs-devel@m.gmane.org; Fri, 27 Mar 2015 20:10:31 +0100 Original-Received: from localhost ([::1]:51396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbZeH-0000nI-Nv for ged-emacs-devel@m.gmane.org; Fri, 27 Mar 2015 15:10:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbZe8-0000n9-VQ for emacs-devel@gnu.org; Fri, 27 Mar 2015 15:10:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbZe3-0004HZ-H5 for emacs-devel@gnu.org; Fri, 27 Mar 2015 15:10:20 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:41959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbZe3-0004G8-9j; Fri, 27 Mar 2015 15:10:15 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NLV00C00WMWDZ00@a-mtaout23.012.net.il>; Fri, 27 Mar 2015 22:10:13 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLV00CN4X91EN00@a-mtaout23.012.net.il>; Fri, 27 Mar 2015 22:10:13 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 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:184419 Archived-At: > From: Stefan Monnier > Cc: rms@gnu.org, esr@thyrsus.com, emacs-devel@gnu.org, schwab@linux-m68k.org, tsdh@gnu.org > Date: Fri, 27 Mar 2015 13:58:54 -0400 > > >> > . using the script, the commit+push are not an atomic operation, so > >> > the commit could succeed, but the following push could fail, > >> > leaving your repository out of sync > >> That's true: we need to uncommit if the push fails. > >> BTW, we could/should make this case very rare by adding a pre-commit > >> hook which makes sure that we're up-to-date before we can commit. > > That's not a job for a pre-commit hook, IMO. > > Why not? The explanation was in the part that you elided. > That would avoid the kind of state Richard go into, IIUC. Not if there are merge conflicts when pulling. > That's also what Bzr would do on a bound branch. Git ain't no bzr. > >> I don't see why Richard (or someone in his situation) would ever need to > >> do a local commit. > > I think you forget commits after a conflict resolution, e.g. after a > > merge from another branch. > > No I don't (you had already mentioned it in the text I quoted). > There's no reason why these commits should be local. IMO, it makes no sense to push them right away. It would violate the "commit complete changesets" rule. > > I'm sure there are more situations like that. I don't think we can > > assume that absolutely _every_ commit can do a push upstream. > > Bzr bound branches did just that and it's never been a problem > (i.e. --local was only ever needed for offline operation). Git ain't no bzr.