On Sat, Feb 02, 2008 at 10:00:54PM -0500, Jeff King wrote:OK, there is definitely a bug here, but I'm having some trouble figuring out the correct fix. It's in the revision walker, so I have cc'd those who are more clueful than I. You can recreate a problematic repo using this script: -- >8 -- mkdir repo && cd repo git init touch file && git add file commit() { echo $1 >file && git commit -a -m $1 && git tag $1 } commit one commit two commit three git checkout -b other two commit alt-three git checkout master git merge other || true commit merged commit four -- 8< -- So a fairly simple repo, but with the key element that it contains a merge. Now try this: git log one --not four You get the 'one' commit, even though it should be removed by "--not four". But if you try this: git log one --not two you correctly get no output. It seems that in limit_list, we do two things: - first add the 'one' commit to the new list (since we process it before it gets marked uninteresting) - then traverse from 'four', marking commits and their parents as uninteresting as we go However, the traversal seems to have trouble going over the merge. We add the parents, but we end up marking them all as uninteresting, and the everybody_uninteresting() optimization triggers, quitting the limit before we have a chance to reach back to 'one' and mark it. The patch below fixes it, but I'm very uncertain whether there is something else going on that I'm missing that should be handling this case. --- diff --git a/revision.c b/revision.c index 6e85aaa..7d91ca1 100644 --- a/revision.c +++ b/revision.c @@ -579,8 +579,6 @@ static int limit_list(struct rev_info *revs) return -1; if (obj->flags & UNINTERESTING) { mark_parents_uninteresting(commit); - if (everybody_uninteresting(list)) - break; continue; } if (revs->min_age != -1 && (commit->date > revs->min_age)) - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| David Woodhouse | [PATCH 1/3] firmware: allow firmware files to be built into kernel image |
| Linus Torvalds | Linux 2.6.21 |
| Parag Warudkar | BUG: soft lockup - CPU#1 stuck for 15s! [swapper:0] |
git: | |
| David Miller | [GIT]: Networking |
| Rick Jones | Re: Network latency regressions from 2.6.22 to 2.6.29 |
| Gerrit Renker | [PATCH 18/37] dccp: Support for Mandatory options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
