From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.devel Subject: Suggestion to enable git rerere by default Date: Tue, 10 Nov 2015 10:35:29 +0100 Message-ID: <87io5a19jy.fsf_-_@members.fsf.org> References: <871tc315y3.fsf@lifelogs.com> <83611eqk9w.fsf@gnu.org> <878u6ax7c7.fsf@lifelogs.com> <83k2ptq5t3.fsf@gnu.org> <87h9kxx60e.fsf@lifelogs.com> <877flswse5.fsf@lifelogs.com> <8737wgw7kf.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1447148295 30166 80.91.229.3 (10 Nov 2015 09:38:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Nov 2015 09:38:15 +0000 (UTC) Cc: Emacs development discussions To: =?utf-8?Q?Aur=C3=A9lien?= Aptel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 10 10:37:55 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 1Zw5NC-0004Yj-Oc for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2015 10:37:54 +0100 Original-Received: from localhost ([::1]:58447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw5NC-0003ZM-7U for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2015 04:37:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw5Mx-0003ZH-RJ for emacs-devel@gnu.org; Tue, 10 Nov 2015 04:37:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw5Mu-0008OU-GK for emacs-devel@gnu.org; Tue, 10 Nov 2015 04:37:39 -0500 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:16686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw5Mu-0008OQ-Ab for emacs-devel@gnu.org; Tue, 10 Nov 2015 04:37:36 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao0GAIq6QVakD4Xx/2dsb2JhbABegmmCFKtHBpRphhACggYBAQEBAQGBC0ETAYNgAQEBAwEjVgULCBsCAiYCAhAEDTwTiBkDCgixSIwKDYRJAQshgQGFDIgYhSKBRAWWSHyKNoNQhECCcotlg2GDcmOCER2BVz00gWCDTgEBAQ Original-Received: from mathsrv4.ulb.ac.be (HELO localhost) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 10 Nov 2015 10:35:23 +0100 In-Reply-To: (=?utf-8?Q?=22Aur=C3=A9lien?= Aptel"'s message of "Mon, 9 Nov 2015 11:40:06 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 164.15.128.112 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:193829 Archived-At: Aur=C3=A9lien Aptel writes: > On Sun, Nov 8, 2015 at 9:38 PM, Ted Zlatanov wrote: >>>> Agreed. Aur=C3=A9lien, the diff is huge and there are many conflicts. = It >>>> looks like the fork from master happened in February 2015 and you're >>>> simply out of date. Can you please rebase against the emacs.git >>>> origin/master? Last push... > > I already merged master in my branch at some point, and did so with > `merge --squash` IIRC, note to self: never do that again. I agree with that conclusion. However I want to mention... > made any subsequent master merge a lot harder, sorry for that. The > weird thing is most conflicting changes where actually identical but > git couldn't tell. The diff were the same on both side but git couldnt > tell they were from the same commits since they were squashed. ...did you enable git rerere ? (you can check with: git config --get rerere.enabled). If not, I suggest that you do it: git config --global rerere.enabled 1 I'm not 100% sure that would have helped in your usecase, but it's useful anyway. Excerpt from `git help rerere' : In a workflow employing relatively long lived topic branches, the developer sometimes needs to resolve the same conflicts over and over again until the topic branches are done (either merged to the "release" branch, or sent out and accepted upstream). This command assists the developer in this process by recording conflicted automerge results and corresponding hand resolve results on the initial manual merge, and applying previously recorded hand resolutions to their corresponding automerge results. Perhaps we could add that as a suggestion in admin/notes/git-workflow : modified admin/notes/git-workflow @@ -124,6 +124,11 @@ the resulting merge, but if you really want to, feel f= ree to do that. Note you can also resume gitmerge in a new Emacs session, since the current state will be saved to disk. =20 +The following is helpful if you're going to merge the same set of +changes multiple times : + + git config --global rerere.enabled 1 + When everything's done, look hard at the resulting merge. Skipping commits requires separate merges, so don't be surprised to see more than one merge commit. If you're happy, push. =20 --=20 Nicolas Richard