unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: David Engster <deng@randomsample.de>
Cc: emacs-devel@gnu.org
Subject: Re: merging emacs-24
Date: Fri, 28 Nov 2014 11:55:04 +0900	[thread overview]
Message-ID: <87fvd4niev.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <87r3woa6rd.fsf@engster.org>

David Engster writes:

 > > You have to either cherry-pick the ones you want instead of merging,
 > 
 > Which defies the point of merging, of course.
 > 
 > > or revert the ones you don't want after merging.
 > 
 > That's cumbersome when those commits have conflicts, which is very
 > common since it is often the reason they should be skipped in the first
 > place.

Sure, but *that is the choice*.  If you look at merge implementations
that claim to be able to skip commits, you will find that they amount
to "git rebase --interactive": ie, a sequence of *new* commits made
from diffs of the commits chosen.  If they're diligent, they may
identify an initial prefix of commits that can be merged unchanged,
but if they do, the resulting DAG will have two merges, which is
rarely what the user expects.

 > I think the easiest way to avoid this is to merge the remote branch
 > instead of the local tracking one.

It is mathematically impossible to merge a remote branch, at least if
you want a record of the history of commits in the local repo.[1]  A
merge always takes place in the repo being operated on, and the
relevant commits must be present there.  The difference between git
and other VCSes is that git leaves the copy of the remote branch and a
ref to it in the current repo, which is necessary if you want to
compare the actual history to the history constructed by a "merge"
which skips commits.  (Of course in the case of a true merge, the
tracking branch is only a ref -- there are no commits other than those
needed to complete the local branch in it.  In this case all of git,
hg, and bzr contain the complete remote branch in the local repo.)

Footnotes: 
[1]  That is, technically you could replace an actual commit with a
URL to a repo containing the needed commit and all dependent data, and
destroy all the corresponding data needed to construct conflicts after
the merge.  This is more or less a "shallow" repo in git, and it's
impossible to do operations on "sufficiently old" commits with a
shallow repo in git, and AFAIK it's not possible to deepen the repo --
you have reclone and then merge or even cherrypick new commits.






  parent reply	other threads:[~2014-11-28  2:55 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2h9xyzd45.fsf@jbm.io>
     [not found] ` <m2lhnamlnr.fsf@jbm.io>
     [not found]   ` <87a93eavwt.fsf@lifelogs.com>
     [not found]     ` <jwvd28ahs60.fsf-monnier+emacsbugs@gnu.org>
     [not found]       ` <87wq6hap7v.fsf@lifelogs.com>
2014-11-26 18:59         ` merging emacs-24 (was: bug#19074: Bug in auth-source.el's search of OS X Keychain) Stefan Monnier
2014-11-26 19:02           ` merging emacs-24 David Engster
2014-11-26 20:01             ` Ted Zlatanov
2014-11-26 22:16             ` Stefan Monnier
2014-11-27 17:27               ` David Engster
2014-11-27 17:55                 ` Eli Zaretskii
2014-11-27 18:31                   ` Andreas Schwab
2014-11-27 18:42                     ` Eli Zaretskii
2014-11-27 18:46                       ` David Engster
2014-11-27 18:55                         ` Eli Zaretskii
2014-11-27 19:21                           ` David Engster
2014-11-27 21:05                         ` Stefan Monnier
2014-11-27 22:24                           ` David Engster
2014-11-28  0:28                             ` Ted Zlatanov
2014-11-28  8:20                               ` Eli Zaretskii
2014-11-28 14:20                                 ` Michael Welsh Duggan
2014-11-28 14:59                                   ` Eli Zaretskii
2014-11-28 15:06                                     ` Michael Welsh Duggan
2014-11-28 14:37                                 ` David Kastrup
2014-11-28 15:14                                   ` Eli Zaretskii
2014-11-29 12:55                             ` Eli Zaretskii
2014-11-29 20:01                               ` Glenn Morris
2014-11-29 20:33                                 ` Eli Zaretskii
2014-11-27  1:54           ` Ted Zlatanov
2014-11-27  2:01             ` Óscar Fuentes
2014-11-27  2:32               ` Ted Zlatanov
2014-11-27  3:48                 ` Glenn Morris
2014-11-27  3:59                   ` Glenn Morris
2014-11-27 10:45                     ` Andreas Schwab
2014-11-27 13:02                   ` Ted Zlatanov
2014-11-27 16:23                     ` Eli Zaretskii
2014-11-27 17:11                       ` Andreas Schwab
2014-11-27 17:44                         ` Eli Zaretskii
2014-11-27 17:56                           ` Andreas Schwab
2014-11-27 18:04                             ` Eli Zaretskii
2014-11-28  8:33                               ` Andreas Schwab
2014-11-28  8:54                                 ` Eli Zaretskii
2014-11-28 15:44                                   ` Sergey Organov
2014-11-28 15:56                                     ` David Kastrup
2014-11-27 17:17                     ` Stefan Monnier
2014-11-27 17:32                     ` David Engster
2014-11-27 17:59                       ` Andreas Schwab
2014-11-28  0:30                       ` Ted Zlatanov
2014-11-28  2:55                       ` Stephen J. Turnbull [this message]
2014-11-28  3:29                         ` Stephen J. Turnbull
2014-11-28  8:27                           ` Eli Zaretskii
2014-11-28  0:31                     ` Ted Zlatanov
2014-11-29  7:20                       ` Paul Eggert
2014-11-29 21:27                         ` Glenn Morris
2014-11-29 22:28                           ` generating Chan(was: merging emacs-24) Paul Eggert
2014-11-28  0:33                     ` merging emacs-24 Ted Zlatanov
2014-11-28  8:22                       ` Andreas Schwab
2014-11-28  8:31                       ` Eli Zaretskii
2014-11-28 14:29                         ` Stefan Monnier
2014-11-29 20:02                           ` Glenn Morris
2014-11-27 16:10                   ` Eli Zaretskii
2014-11-29 20:13                     ` Glenn Morris
2015-02-25 21:17 Glenn Morris

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87fvd4niev.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=deng@randomsample.de \
    --cc=emacs-devel@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).