From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Understanding a recent commit in emacs-25 branch [ed19f2] Date: Thu, 31 Mar 2016 23:43:14 -0700 Organization: UCLA Computer Science Department Message-ID: <56FE1882.9030904@cs.ucla.edu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1459493032 23586 80.91.229.3 (1 Apr 2016 06:43:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Apr 2016 06:43:52 +0000 (UTC) To: Kaushal Modi , Emacs developers , Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 01 08:43:42 2016 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 1also2-0003x8-GD for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2016 08:43:42 +0200 Original-Received: from localhost ([::1]:36251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1also1-0002c4-SE for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2016 02:43:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alsno-0002by-N0 for emacs-devel@gnu.org; Fri, 01 Apr 2016 02:43:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alsnk-0000Vb-MJ for emacs-devel@gnu.org; Fri, 01 Apr 2016 02:43:28 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alsnk-0000V9-Fq for emacs-devel@gnu.org; Fri, 01 Apr 2016 02:43:24 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 11304160D72; Thu, 31 Mar 2016 23:43:19 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 11EkSZcje8TU; Thu, 31 Mar 2016 23:43:17 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B45471611FF; Thu, 31 Mar 2016 23:43:17 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id j6u9RGo99sL2; Thu, 31 Mar 2016 23:43:17 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9059A160D72; Thu, 31 Mar 2016 23:43:17 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 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:202550 Archived-At: Kaushal Modi wrote: > OK, I think I need some git education. > > There was one section in your commit ( > http://git.savannah.gnu.org/cgit/emacs.git/diff/lisp/isearch.el?h=emacs-25&id=ed19f207449c43f7f08285ada87ae7a46c61c8d1 > ) which was already committed earlier ( > http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/isearch.el?h=emacs-25&id=91e667692ba1362ca1334b8d58fd16c305ad5e2a > ). As I am familiar with that single commit, I know that they are identical. > > Also I noted that your commit has a repeat of all the backquote/straight > quote changes in NEWS that happened recently. > > But without this prior knowledge, how can one separate these duplicate > commits from the commits that actually are new? > Also, what is the reason for such duplicate commits happening? There aren't any duplicate commits. When you visit http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=ed19f207449c43f7f08285ada87ae7a46c61c8d1 the website shows you the output of this command: git diff ed19f207449c43f7f08285ada87ae7a46c61c8d1^..ed19f207449c43f7f08285ada87ae7a46c61c8d1 The commit ed19f207449c43f7f08285ada87ae7a46c61c8d1 is a merge with two parents: commits eabd667a9584fe5bd2422e296d256dceea67debf (which is a single incomplete fix for cc-mode) and 7c1802f6ffc2704ba8042c7c1c6faa73dfa210d1 (which is the main thread of the emacs-25 branch). The way Alan merged, the former commit is the first parent, so the abovementioned diff output looks large -- it contains many emacs-25 changes all squashed together. It might have been nicer if Alan had merged the other way, so that that the main thread was the first parent, but that's water under the bridge now. (In this particular case I would have avoided a merge entirely, and would have rebased instead, as that makes such changes easier for others to follow later; but that's also water under the bridge.) Understanding what happened is somewhat complicated by the more-recent commit 22443312188ff097b69d9ff4b87c2b4f7bbbc263, which finished fixing the cc-mode patch and undid some of the effect of the incomplete fix. You can see all this more easily by running the shell command "gitk" in a directory containing a checked-out copy of the emacs-25 branch.