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 16:30:31 +0300 Message-ID: <83sicqa7pk.fsf@gnu.org> References: <20150324163714.GA27775@thyrsus.com> <83y4mmpb1n.fsf@gnu.org> <87lhim9sqp.fsf@igel.home> <87egoc56qg.fsf@gnu.org> <83egoanb8t.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1427463076 30219 80.91.229.3 (27 Mar 2015 13:31:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Mar 2015 13:31:16 +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 14:31:02 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 1YbULV-00007K-SA for ged-emacs-devel@m.gmane.org; Fri, 27 Mar 2015 14:30:46 +0100 Original-Received: from localhost ([::1]:50242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbULV-0003H4-5C for ged-emacs-devel@m.gmane.org; Fri, 27 Mar 2015 09:30:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbULO-0003Gz-TD for emacs-devel@gnu.org; Fri, 27 Mar 2015 09:30:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbULL-0008NV-Fo for emacs-devel@gnu.org; Fri, 27 Mar 2015 09:30:38 -0400 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:56043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbULL-0008NH-7T; Fri, 27 Mar 2015 09:30:35 -0400 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NLV00200H4V0600@mtaout24.012.net.il>; Fri, 27 Mar 2015 16:22:57 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLV00MYTH69HQ30@mtaout24.012.net.il>; Fri, 27 Mar 2015 16:22:57 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.180 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:184388 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 08:59:41 -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. I think "C-x v v" should pull before the push, and if there are conflicts, the next "C-x v v" should do what needs to be done in that case, probably an other commit. > > . it will be hard (or even impossible) to do a local commit without > > pushing, because the hook will always be run; you need the local > > commit for when you merge and resolve conflicts and in other > > situations > > 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. 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.