From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: git commit/push and VC Date: Sat, 22 Nov 2014 11:43:16 +0100 Organization: Organization?!? Message-ID: <87egsvecsb.fsf@fencepost.gnu.org> References: <871toysqyq.fsf@rosalinde.fritz.box> <838uj57u5b.fsf@gnu.org> <87ppchd9dk.fsf@Gertrud.fritz.box> <831tovttmk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416653040 3641 80.91.229.3 (22 Nov 2014 10:44:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2014 10:44:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 22 11:43:53 2014 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 1Xs8AS-000319-Tv for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2014 11:43:53 +0100 Original-Received: from localhost ([::1]:44929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xs8AS-0002q8-7W for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2014 05:43:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xs8AA-0002q2-Pn for emacs-devel@gnu.org; Sat, 22 Nov 2014 05:43:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xs8A5-0003U2-MY for emacs-devel@gnu.org; Sat, 22 Nov 2014 05:43:34 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:33840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xs8A5-0003Ty-GB for emacs-devel@gnu.org; Sat, 22 Nov 2014 05:43:29 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xs8A4-0002tr-7L for emacs-devel@gnu.org; Sat, 22 Nov 2014 11:43:28 +0100 Original-Received: from x2f4dbb5.dyn.telefonica.de ([2.244.219.181]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Nov 2014 11:43:28 +0100 Original-Received: from dak by x2f4dbb5.dyn.telefonica.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Nov 2014 11:43:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: x2f4dbb5.dyn.telefonica.de X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:YnF5Ei+ahOEmA2rBNUz6Dp5jo/g= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:177987 Archived-At: Eli Zaretskii writes: >> From: Achim Gratz >> Date: Thu, 20 Nov 2014 19:17:43 +0100 >> >> Eli Zaretskii writes: >> > There are still issues that I'd like to be sure about before I fix >> > them. Would people please comment on these: >> > >> > . the instructions say that a "git commit" is necessary even when >> > the merge is without conflicts, which AFAIK is incorrect with Git >> >> In standard configuration a non-conflicted merge will be auto-committed, >> yes. As always, that default can be configured to instead stop before >> the commit. > > OK, so if we are going to recommend to use "commit -a" (and actually > we already do, see the Wiki), then I guess "git add" after resolving > merge conflicts is also not necessary, right? That is, instead of > this: > > git merge master > # resolve conflicts > git add file-you-changed > git commit -m "Merge from mainline." > > we should recommend this: > > git merge master > # resolve conflicts > git commit -a -m "Merge from mainline." > > Is that correct? I doubt that it works. At any rate, Git does not distinguish between a file with merge conflict markers and one without merge conflict markers (which are valid file contents, after all). It records unresolved conflicts in the index where they are overwritten when doing git-add. I haven't checked whether git commit -a will actually overwrite a conflicted index. If it does, we don't want to recommend that error-prone workflow which is likely to record files with unresolved conflicts as resolved. If it doesn't, git commit -a will not help. smerge-mode, incidentally, adds the file in question automatically anyway after all conflicts are resolved. So if "# resolve conflicts" implies use of smerge-mode, just git commit should be enough. -- David Kastrup