git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Chris Packham <judge.packham@gmail.com>
Cc: Markus Heidelberg <markus.heidelberg@web.de>, GIT <git@vger.kernel.org>
Subject: Re: re-running merge on a single file
Date: Thu, 11 Mar 2010 15:20:40 -0800 (PST)	[thread overview]
Message-ID: <m3hbomla3u.fsf@localhost.localdomain> (raw)
In-Reply-To: <a038bef51003111408g38698837ldcf1d0f5995f4f30@mail.gmail.com>

Chris Packham <judge.packham@gmail.com> writes:

> Hmm, having trouble with cat-file syntax
> 
> On Thu, Mar 11, 2010 at 12:29 PM, Markus Heidelberg
> <markus.heidelberg@web.de> wrote:
> > Not mergetool, but checkout:
> > git checkout --merge -- file
> 
> Ok.
> $ git checkout --merge -- cpu/mpc83xx/start.S
> 
> > git cat-file blob :1:file > file.base
> >
> 
> $ git cat-file blob :1:cpu/mpc83xx/start.S > cpu/mpc83xx/start.S.base
> fatal: Not a valid object name :1:cpu/mpc83xx/start.S
> 
> So I think I have figured out that I'm trying to get at stage 1, 2 and
> 3 of the file that git checkout --merge has just setup but I'm
> tripping over the syntax.

First, instead of 'git cat-file blob <blob-id>' you can simply use 
'git show <blob-id>'.

Second, while in

  $ git checkout --merge -- cpu/mpc83xx/start.S

the path cpu/mpc83xx/start.S is relative to your current directory,
in

  $ git show :1:cpu/mpc83xx/start.S > start.S.base

the path has to be "absolute path in repository", i.e. path relative
to top directory of the repository.

Try

  $ git show :1:$(git rev-parse --show-prefix)cpu/mpc83xx/start.S \
    > cpu/mpc83xx/start.S.base

HTH
-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2010-03-11 23:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-11 18:54 re-running merge on a single file Chris Packham
2010-03-11 19:09 ` Chris Packham
2010-03-11 20:29 ` Markus Heidelberg
2010-03-11 22:08   ` Chris Packham
2010-03-11 23:20     ` Jakub Narebski [this message]
     [not found]       ` <a038bef51003111631n38f7e50cp79d8335109f3ed0@mail.gmail.com>
2010-03-12  0:33         ` Chris Packham
2010-03-12  6:45           ` Johannes Sixt
2010-03-12  6:56             ` Junio C Hamano
2010-03-12 20:16               ` Chris Packham
2010-03-12 21:16                 ` Chris Packham
2010-03-12 23:07                 ` Junio C Hamano
2010-03-12 23:43                   ` Chris Packham
2010-03-14 12:24                     ` Kris Shannon
2010-03-12  9:00           ` Jakub Narebski

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=m3hbomla3u.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=judge.packham@gmail.com \
    --cc=markus.heidelberg@web.de \
    /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).