On Wed, 29 Jul 2015 16:57:30 -0700
Ying Huang <huangyi...@gmail.com> wrote:
> > So... Could you just freaking try the suggested
> > git difftool commit2 commit2^1 "$1"
> I have changed to
> git difftool "$name^1" "$name" "$1"
> But some commits are still skipped.
> > approach and see if that works? Really, that would have saved a
> > lot of virtual trees already. ;-)
> > The next thing to try if that fails is to debug. Do not call
> > difftool, but rather read up on `git rev-parse` and call it instead
> > to see what the difftool (or, rather, Git calling it) would think
> > about what you submit to it. Make that printed to the console.
> > See what happens.
> What does git rev-parse do? Will it harm my current git
> repository? I have read the man page but it raised more questions
> than answers.
> Could you give me an example?
`git rev-parse` take a string you give it, tries to interpret it
as a revision or a set of revisions according to the rules specified in
the gitrevisions(7) manual page and then prints the result(s) of
interpreting your revision specification or errors out.
An example on one of my live repositories:
| % git rev-parse HEAD
| % git rev-parse HEAD^1
| % git rev-parse HEAD^!
> Currently I am using echo to see the commit, like bellowing:
> git log --oneline --format=%H --follow -- "$1" \
> | while read name; do
> echo "$name";git difftool "$name^1" "$name" "$1"
Echoing the commit name is now actually bad.
So, do you actually see your `echo` being run tree times?
I'm asking because to me, it's not now clear what do you mean by saying
"some commits are skipped". Do I understand correctly that you expect
your git difftool to be spawned three times in your case?
Now I'd convert the encancation to
git log --oneline --format=%H --follow -- "$1" \
| while read name; do
echo -n "This: "; git rev-parse "$name";
echo -n "Parent: "; git rev-parse "$name^1";
and see what happens.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.