From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: git commit/push and VC Date: Sat, 22 Nov 2014 18:36:34 +0900 Message-ID: <87vbm7shjx.fsf@uwakimon.sk.tsukuba.ac.jp> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1416649033 15096 80.91.229.3 (22 Nov 2014 09:37:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2014 09:37:13 +0000 (UTC) Cc: Stromeko@nexgo.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 22 10:37:06 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 1Xs77n-0001F0-KQ for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2014 10:37:03 +0100 Original-Received: from localhost ([::1]:44535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xs77n-0003D8-2b for ged-emacs-devel@m.gmane.org; Sat, 22 Nov 2014 04:37:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xs77c-0003Cx-AS for emacs-devel@gnu.org; Sat, 22 Nov 2014 04:36:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xs77U-00045f-QM for emacs-devel@gnu.org; Sat, 22 Nov 2014 04:36:52 -0500 Original-Received: from shako.sk.tsukuba.ac.jp ([130.158.97.161]:52668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xs77M-000453-P8; Sat, 22 Nov 2014 04:36:37 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by shako.sk.tsukuba.ac.jp (Postfix) with ESMTPS id 44FC01C39D3; Sat, 22 Nov 2014 18:36:34 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 2C6921A2892; Sat, 22 Nov 2014 18:36:34 +0900 (JST) In-Reply-To: <837fyntyy9.fsf@gnu.org> X-Mailer: VM undefined under 21.5 (beta34) "kale" acf1c26e3019 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 130.158.97.161 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:177981 Archived-At: Eli Zaretskii writes: > So to do that inter-clone merge, one would need > > 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. I *think* that the worst thing that is likely to happen is that the user has emacs-24 checked out in this clone, does "git pull ../my-other-clone emacs-24", and gets a null update but think you've actually merged into trunk. The fix is trivial, check out trunk and redo. > How about the following alternative instead: we do NOT recommend > merging from the other clone. The other clone is to be used only for > committing to the release branch and, rarely (probably never) > branching off that release branch for doing something that is not a > trivial one-off fix. To merge to master, we recommend using the clone > that is normally used for working on master and on feature branches > (a.k.a. "master clone"). Specifically, when the time comes to merge > the changes on the release branch to master, we recommend this > sequence of commands in the "master clone": > > 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. The "-e" is unnecessary in more recent git. > The main point is to avoid "git checkout emacs-24" in the "master > clone" as much as possible, because once you switch back to master, > the build will most probably be annoyingly long. With this workflow, the user should *never* need to do that. > > Another issue is that I find it easy to do fixes to the "wrong" branch > > in the current repo, and that gets confusing. > > Does that happen with separate clones also? I thought separate clones > make this less likely, since they allow you to seldom, if ever, switch > between master and the release branch in the same repo. Yes -- as I say, it's possibly just me. I often end up with buffers from both workspaces open on the correponding files. > > Finally, I just find it more efficient to work in a single clone. > > I agree, but I think the Emacs use case is special in this respect, > especially for people who are not proficient enough with Git. I suppose so.