[BUG?] git log picks up bad commit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tilman Sauerbeck
Date: Saturday, February 2, 2008 - 5:21 am

Hi,
I think I either found a bug in git log, or I'm working with a broken
repository. I can reproduce this with current git master.

I'm trying to list the last n commits since a given commit on a given
branch like this:
  git log -n N commit.. branch
The problem is, if there are less than N commits that match the
criteria, git log also prints the very first commit of the repository.

I'm operating on a bare repository here. When I actually check out the
branch I'm interested in, git log behaves as expected.

I've uploaded the .git directory to
http://crux.nu/~tilman/broken_repo.tar.bz2 (use -C to extract!)

Reproduce like this:
mkdir /tmp/blah
cd /tmp/blah
tar xjf broken_repo.tar.bz2

git log -n 3 --abbrev-commit --pretty=3Doneline \
1dd567d596b072e3ce44ea5ad8c373871686b078.. 2.4

The output I'm getting is:

47f585a... syslinux: Updated 3.54 -> 3.60
b3444e1... lzma: 4.32.4 -> 4.32.5
d5d6fa1... Created repository

When I check out the "2.4" branch and run the git log command again, I
get the expected output:

47f585a... syslinux: Updated 3.54 -> 3.60
b3444e1... lzma: 4.32.4 -> 4.32.5

Any idea on what's going on there?

Thanks,
Tilman

--=20
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG?] git log picks up bad commit, Tilman Sauerbeck, (Sat Feb 2, 5:21 am)
Re: [BUG?] git log picks up bad commit, Jeff King, (Sat Feb 2, 8:00 pm)
[RFH] revision limiting sometimes ignored, Jeff King, (Sat Feb 2, 9:33 pm)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Sat Feb 2, 11:24 pm)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Sat Feb 2, 11:39 pm)
Re: [RFH] revision limiting sometimes ignored, Jeff King, (Sun Feb 3, 12:13 am)
Re: [RFH] revision limiting sometimes ignored, Jeff King, (Sun Feb 3, 12:18 am)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Sun Feb 3, 12:40 am)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Sun Feb 3, 12:47 am)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Sun Feb 3, 1:18 am)
Re: [RFH] revision limiting sometimes ignored, Linus Torvalds, (Mon Feb 4, 10:32 am)
Re: [RFH] revision limiting sometimes ignored, Linus Torvalds, (Mon Feb 4, 10:37 am)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Mon Feb 4, 12:08 pm)
Re: [RFH] revision limiting sometimes ignored, Linus Torvalds, (Mon Feb 4, 1:03 pm)
Re: [RFH] revision limiting sometimes ignored, Linus Torvalds, (Mon Feb 4, 1:06 pm)
Re: [RFH] revision limiting sometimes ignored, Linus Torvalds, (Mon Feb 4, 1:50 pm)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Tue Feb 5, 12:14 am)
Re: [RFH] revision limiting sometimes ignored, Linus Torvalds, (Tue Feb 5, 2:23 pm)
Re: [RFH] revision limiting sometimes ignored, Johannes Schindelin, (Tue Feb 5, 3:34 pm)
Re: [RFH] revision limiting sometimes ignored, Linus Torvalds, (Tue Feb 5, 4:59 pm)
Re: [RFH] revision limiting sometimes ignored, Nicolas Pitre, (Tue Feb 5, 6:22 pm)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Tue Feb 5, 6:51 pm)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Tue Feb 5, 11:05 pm)
Re: [RFH] revision limiting sometimes ignored, Junio C Hamano, (Tue Feb 5, 11:17 pm)
Re: [RFH] revision limiting sometimes ignored, Tilman Sauerbeck, (Wed Feb 6, 9:43 am)
Re: [RFH] revision limiting sometimes ignored, Nicolas Pitre, (Wed Feb 6, 10:28 am)
Re: [RFH] revision limiting sometimes ignored, Linus Torvalds, (Wed Feb 6, 10:42 am)
Re: [RFH] revision limiting sometimes ignored, Nicolas Pitre, (Wed Feb 6, 10:48 am)
Re: [RFH] revision limiting sometimes ignored, Linus Torvalds, (Wed Feb 6, 12:26 pm)