summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2005-07-29 22:50:30 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-07-30 00:21:46 (GMT)
commit6c3b84c81c39a1751545cd3fb70d57249d37e9d7 (patch)
treea51d17f68888e490459b336c3998ad2898f7dab0 /sha1_file.c
parenta05ed8cb0c0179c732cfd7f99437e0a8ed9a8b39 (diff)
downloadgit-6c3b84c81c39a1751545cd3fb70d57249d37e9d7.zip
git-6c3b84c81c39a1751545cd3fb70d57249d37e9d7.tar.gz
git-6c3b84c81c39a1751545cd3fb70d57249d37e9d7.tar.bz2
[PATCH] Fix interesting git-rev-list corner case
This corner-case was triggered by a kernel commit that was not in date order, due to a misconfigured time zone that made the commit appear three hours older than it was. That caused git-rev-list to traverse the commit tree in a non-obvious order, and made it parse several of the _parents_ of the misplaced commit before it actually parsed the commit itself. That's fine, but it meant that the grandparents of the commit didn't get marked uninteresting, because they had been reached through an "interesting" branch. The reason was that "mark_parents_uninteresting()" (which is supposed to mark all existing parents as being uninteresting - duh) didn't actually traverse more than one level down the parent chain. NORMALLY this is fine, since with the date-based traversal order, grandparents won't ever even have been looked at before their parents (so traversing the chain down isn't needed, because the next time around when we pick out the parent we'll mark _its_ parents uninteresting), but since we'd gotten out of order, we'd already seen the parent and thus never got around to mark the grandparents. Anyway, the fix is simple. Just traverse parent chains recursively. Normally the chain won't even exist (since the parent hasn't been parsed yet), so this is not actually going to trigger except in this strange corner-case. Add a comment to the simple one-liner, since this was a bit subtle, and I had to really think things through to understand how it could happen. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
0 files changed, 0 insertions, 0 deletions