[PATCH] array index mixup
- From
- Matthias Lederhofer <matled@gmx.net>
- Date
- Jul 15, 2006, 12:59 UTC
- Message-ID
- <E1G1jje-0007ey-OA@moooo.ath.cx>
- In-Reply-To
- <e9aff7$nk1$1@sea.gmane.org>
--- Jakub Narebski <jnareb@gmail.com> wrote:
Show 12 quoted lines
> git diff output for files specified by revision is somewhat unexpected. > > $ git diff <revision_1>:<file> <revision_2>:<file> > > outputs the following diff metainfo > > diff --git a/<revision_2>:<file> b/<revision_2>:<file> > index 5eabe06..2e87de4 100644 > --- a/<revision_2>:<file> > +++ b/<revision_2>:<file> > > Is it intended, or is it a bug? Looks like a bug to me...
I dunno if this is really an index mixup or was intended. If this is intended please add a comment what it's for. (Without this you get rename information, perhaps this is the reason.) --- builtin-diff.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-diff.c b/builtin-diff.c index cb38f44..4d43a5c 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -136,7 +136,7 @@ static int builtin_diff_blobs(struct rev stuff_change(&revs->diffopt, mode, mode, blob[1].sha1, blob[0].sha1, - blob[0].name, blob[0].name); + blob[1].name, blob[0].name); diffcore_std(&revs->diffopt); diff_flush(&revs->diffopt); return 0;
-- 1.4.1.ga3e6