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: git commit/push and VC Date: Sat, 22 Nov 2014 12:25:15 +0200 Message-ID: <83389bttv8.fsf@gnu.org> References: <871toysqyq.fsf@rosalinde.fritz.box> <838uj57u5b.fsf@gnu.org> <87ppchd9dk.fsf@Gertrud.fritz.box> <83fvdd612c.fsf@gnu.org> <87h9xttmwa.fsf@uwakimon.sk.tsukuba.ac.jp> <83oas13p1y.fsf@gnu.org> <87egsvu7iw.fsf@uwakimon.sk.tsukuba.ac.jp> <837fyntyy9.fsf@gnu.org> <87vbm7shjx.fsf@uwakimon.sk.tsukuba.ac.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1416651953 22410 80.91.229.3 (22 Nov 2014 10:25:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2014 10:25:53 +0000 (UTC) Cc: Stromeko@nexgo.de, emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 22 11:25:45 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 1Xs7su-0006No-MR for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2014 11:25:44 +0100 Original-Received: from localhost ([::1]:44892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xs7su-0000Fc-4Z for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2014 05:25:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xs7sU-0000EU-FZ for emacs-devel@gnu.org; Sat, 22 Nov 2014 05:25:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xs7sP-00079m-Pd for emacs-devel@gnu.org; Sat, 22 Nov 2014 05:25:18 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:42871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xs7sP-00079f-HE for emacs-devel@gnu.org; Sat, 22 Nov 2014 05:25:13 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NFF00900R3RG600@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sat, 22 Nov 2014 12:25:11 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFF009YXRLZAB30@a-mtaout22.012.net.il>; Sat, 22 Nov 2014 12:25:11 +0200 (IST) In-reply-to: <87vbm7shjx.fsf@uwakimon.sk.tsukuba.ac.jp> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 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:177984 Archived-At: > From: "Stephen J. Turnbull" > Cc: Stromeko@nexgo.de, > emacs-devel@gnu.org > Date: Sat, 22 Nov 2014 18:36:34 +0900 > > > git fetch ../my-other-clone > > git merge > > # fix conflicts, if any > > git commit -a # only if there were conflicts > > git push > > > > Is that right? Sounds a bot complicated and error-prone, I agree. > > Well, the first two commands can probably be reduced to "git pull > ../my-other-clone". > > But it seems reasonably likely that both branches exist in at least > one of the clones, because "git diff" requires that the commits being > compared be in the same repo, and referring to them via SHA1 is chancy > at best. Yes, so I think merging from another clone is unnecessary. > > git pull > > git merge -m remotes/origin/emacs-24 > > # fix conflicts, if any > > # run tests, fix bugs if any > > git commit -a # only if there were conflicts > > git push > > > > Is this correct? Because if it is, it's just like the "normal" merge > > workflow, just with the name of the merge source branch slightly > > special. So it's easier to remember and less error-prone, I think. > > I think just "git pull -e ../emacs-24" and edit the commit message is > clearer, instead of pull and merging. I don't think we need the "../" part, do we? It's the same repository, and emacs-24 is the name of a branch, not a directory. I wonder if it's a good idea to tell people to pull from a different branch, though. It could cause errors down the road (not in this scenario). FWIW, I'd be nervous to do that.