all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: Stromeko@nexgo.de, emacs-devel@gnu.org
Subject: Re: git commit/push and VC
Date: Sat, 22 Nov 2014 10:35:26 +0200	[thread overview]
Message-ID: <837fyntyy9.fsf@gnu.org> (raw)
In-Reply-To: <87egsvu7iw.fsf@uwakimon.sk.tsukuba.ac.jp>

> From: "Stephen J. Turnbull" <stephen@xemacs.org>
> Cc: Stromeko@nexgo.de,
>     emacs-devel@gnu.org
> Date: Sat, 22 Nov 2014 14:30:15 +0900
> 
> Eli Zaretskii writes:
>  > > From: "Stephen J. Turnbull" <stephen@xemacs.org>
> 
>  > > 3) multiple clones, build per clone (I don't think it much matters
>  > >    whether it is in-tree or not, and people who use out-of-tree builds
>  > >    probably have other reasons for doing that already, and they'll
>  > >    know what they are doing).  Disadvantages: one of the clones will
>  > >    be used for "stable" -> trunk merges and reverse cherry-picking,
>  > >    and you need to keep track of which one.  You also need a lot more
>  > >    VCS operations to keep them in synch.
> 
>  > I tend to recommend 3), but I don't understand the disadvantages; can
>  > you elaborate?  I thought it was possible to merge between clones, are
>  > you saying that's not a good idea?
> 
> The disadvantages are relatively minor.  Technically speaking, it's
> not possible in git to merge between clones, you have to fetch and
> then merge (== pull).

So to do that inter-clone merge, one would need

  git fetch ../my-other-clone <probably some arguments here>
  git merge <more arguments here>
  # 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.

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 <commit-message> 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.

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.

> 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.

> 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.



  parent reply	other threads:[~2014-11-22  8:35 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 23:36 git commit/push and VC Stephen Berman
2014-11-20  2:07 ` Glenn Morris
2014-11-20 12:28   ` Stephen Berman
2014-11-20  3:29 ` Yuri Khan
2014-11-20 15:45   ` Eli Zaretskii
2014-11-20 18:17     ` Achim Gratz
2014-11-20 20:59       ` Eli Zaretskii
2014-11-21  0:31         ` Stephen J. Turnbull
2014-11-21  9:01           ` Eli Zaretskii
2014-11-22  5:30             ` Stephen J. Turnbull
2014-11-22  5:50               ` Yuri Khan
2014-11-22  7:17                 ` Stephen J. Turnbull
2014-11-22  6:50               ` Ivan Shmakov
2014-11-22  7:25                 ` Stephen J. Turnbull
2014-11-22  7:42                   ` Ivan Shmakov
2014-11-22  8:59                     ` Stephen J. Turnbull
2014-11-22  8:36                 ` Eli Zaretskii
2014-11-22  8:37                 ` Andreas Schwab
2014-11-22  8:50                   ` Ivan Shmakov
2014-11-22  8:35               ` Eli Zaretskii [this message]
2014-11-22  9:36                 ` Stephen J. Turnbull
2014-11-22 10:25                   ` Eli Zaretskii
2014-11-22 11:31                     ` Andreas Schwab
2014-11-22 12:37                       ` Eli Zaretskii
2014-11-22 13:00                         ` Andreas Schwab
2014-11-22 13:45                           ` Eli Zaretskii
2014-11-22 14:12                             ` Andreas Schwab
2014-11-22 15:20                               ` Eli Zaretskii
2014-11-21  8:23         ` martin rudalics
2014-11-21  9:06           ` Eli Zaretskii
2014-11-21  9:40             ` Dani Moncayo
2014-11-21 10:24             ` martin rudalics
2014-11-21 10:40               ` Eli Zaretskii
2014-11-21  8:49         ` Thien-Thi Nguyen
2014-11-21  9:12           ` Eli Zaretskii
2014-11-22 10:30       ` Eli Zaretskii
2014-11-22 10:43         ` David Kastrup
2014-11-22 11:01           ` Eli Zaretskii
2014-11-22 11:16             ` Eli Zaretskii
2014-11-22 11:22               ` David Kastrup
2014-11-21 10:34     ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837fyntyy9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=Stromeko@nexgo.de \
    --cc=emacs-devel@gnu.org \
    --cc=stephen@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.