Git development
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Jeff King <peff@peff.net>
Cc: Charles Bailey <charles@hashpling.org>,
	Caleb Cushing <xenoterracide@gmail.com>,
	git@vger.kernel.org
Subject: Re: merge, keeping the remote as a new file?
Date: Mon, 2 Mar 2009 07:59:49 +0100	[thread overview]
Message-ID: <20090302065949.GD6289@atjola.homenet> (raw)
In-Reply-To: <20090302064519.GA5635@coredump.intra.peff.net>

On 2009.03.02 01:45:19 -0500, Jeff King wrote:
> On Mon, Mar 02, 2009 at 06:36:04AM +0000, Charles Bailey wrote:
> 
> > You can use git checkout-index --temp --stage=3 and then move it from
> > the auto-generated temporary name into its new place.
> 
> Hmm. I was hoping there was something that would use the name "--theirs"
> instead of the mysterious "stage level 3". But it's still nicer than the
> "git show" I gave because of:
> 
> > Using a checkout variant instead of a show or a cat-file might be
> > important if you are doing autocrlf or some other smudging.
> 
> Right. For some reason I was thinking that cat-file did not handle this
> but "git show" did, but I just tested and it clearly doesn't. So yes,
> you should definitely use checkout-index if you care about conversions.

Hm, how about this?
git checkout --theirs file
git mv file newname
git checkout HEAD file # Can't use --ours here due to the mv

Should work with the CRLF stuff, uses no plumbing, no stage numbers,
there's no messing with random temp file names and it's still just three
commands.

Björn

  reply	other threads:[~2009-03-02  7:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02  0:16 merge, keeping the remote as a new file? Caleb Cushing
2009-03-02  4:11 ` Jeff King
2009-03-02  6:36   ` Charles Bailey
2009-03-02  6:45     ` Jeff King
2009-03-02  6:59       ` Björn Steinbrink [this message]
2009-03-02  7:04         ` Jeff King
2009-03-02 13:05           ` Jay Soffian

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=20090302065949.GD6289@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=charles@hashpling.org \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=xenoterracide@gmail.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