From: Nazri Ramliy <ayiehere@gmail.com>
To: git@vger.kernel.org
Subject: [Bug?] Problem with git show when not in repository's root dir
Date: Tue, 10 Feb 2009 07:23:08 +0800 [thread overview]
Message-ID: <544dda350902091523i2989318bq3ee0f120ca77b7dd@mail.gmail.com> (raw)
Repository structure:
a/ - repository's root dir (.git is in here)
a/a.txt
a/b/b.txt
After merging with conflict:
% git status
a.txt: needs merge
# On branch b1
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# unmerged: ../a.txt
#
no changes added to commit (use "git add" and/or "git commit -a")
% git show :1:a.txt
Hello
Good World
Bye
% git show :2:a.txt
Hello
This is where it conflicts
Bye
% cd b
% git status
a.txt: needs merge
# On branch b1
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# unmerged: ../a.txt
#
no changes added to commit (use "git add" and/or "git commit -a")
% git show :2:../a.txt # here's the problem
fatal: ambiguous argument ':2:../a.txt': unknown revision or path not
in the working tree.
Use '--' to separate paths from revisions
Should "git show" be taught with the "--ours" and "--theirs" options?
git checkout knows them, but git show doesn't. At least to me, "--ours"
and "--theirs" are easier to understand than :1: and :2:
nazri.
reply other threads:[~2009-02-09 23:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=544dda350902091523i2989318bq3ee0f120ca77b7dd@mail.gmail.com \
--to=ayiehere@gmail.com \
--cc=git@vger.kernel.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.
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).