git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Smith <msmith@cbnco.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] user-manual: Talk about tracking third-party snapshots
Date: Tue, 13 Nov 2007 11:25:12 -0800	[thread overview]
Message-ID: <7vtznqrlrb.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <11949569992214-git-send-email-msmith@cbnco.com> (Michael Smith's message of "Tue, 13 Nov 2007 07:29:59 -0500")

Michael Smith <msmith@cbnco.com> writes:

> +You can fix situations like these by doing a merge that isn't really a
> +merge, using the "ours" merge strategy. Look through the history on the
> +third-party branch and try to find the exact commit that matches the
> +last snapshot you imported. Often there's a tag close to the commit, or
> +on the commit, if you're lucky--but don't trust it blindly; check the
> +diffs. Check out your local branch and tell Git about the relationship:
> +
> +------------------------------------------------
> +$ git remote add upstreamgit git://upstream.org/project.git
> +$ git fetch upstreamgit
> +$ git tag
> +v1.0
> +v1.1
> +v1.2
> +$ git checkout master
> +$ git merge --strategy=ours \
> +    -m "Tie old v1.1 into our history by merging with strategy=ours." \
> +    v1.1
> +------------------------------------------------
> +
> +You'll see the branches merge together in `gitk --all` or `git
> +show-branch master upstreamgit/master`.  Now you'll be able to merge any
> +changes from the remote branch since v1.1 with `git merge
> +upstreamgit/master`.
> +

This would work only when your 'master' happens to be at v1.1
(and identical to it) isn't it?  Which means that as an example
it will be of very limited scope.

People would want to know "But my 'master' is _not_ at v1.1 but
is _based_ on v1.1.  How would I handle that case?" and the
above does not answer that question.

Even worse, most people are probably not careful enough to ask
the above question, but just say "Heh, my 'master' is based on
v1.1, so I'll blindly follow that example to bind the histories
together".

I did not find any technical problem in the other parts of your
description, but I did not read the resulting document from
cover to cover, so I do not know if your change fits in the
entire organization of the document very well.

  parent reply	other threads:[~2007-11-13 19:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13 12:29 [PATCH] user-manual: Talk about tracking third-party snapshots Michael Smith
2007-11-13 14:07 ` Jakub Narebski
2007-11-13 15:30   ` Sergei Organov
2007-11-13 15:38     ` Jakub Narebski
2007-11-17 16:45   ` Jan Hudec
2007-11-17 18:18     ` Jakub Narebski
2007-11-17 19:18       ` Jan Hudec
2007-11-17 19:54         ` Jakub Narebski
2007-11-13 19:25 ` Junio C Hamano [this message]
2007-11-13 21:37   ` Michael Smith
2007-11-19  1:17   ` J. Bruce Fields
2007-11-19  0:48 ` J. Bruce Fields

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=7vtznqrlrb.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=msmith@cbnco.com \
    /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.
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 NNTP newsgroup(s).