2011/10/5 Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx>: > Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes: > >> This series adds --exclude that uses .gitignore mechanism remove >> commits whose changes that are _entirely_ excluded. > > I'd see this --exclude as the opposite of specifying files, i.e. in a > repository containing directories A, B and C, > > git log --exclude=B > > would be the same as > > git log A C I think I emphasized it too much. "git log --exclude=B/ A B C" should be equivalent to "git log A C". If changes touch A or C, then no matter they touch B, the commit will always be in. If changes only touch B, neither A nor B, then the commit is removed, exactly the same case with "git log A C". >> Because it uses .gitignore mechanism, beware that these patterns do >> not behave exactly like pathspecs if you specify --exclude=B, then A/.../B, C/.../B are all removed. A subtle difference between pathspec and .gitignore. > and because "git log --stat A C" (or --patch) will show the diff only > for A and C for commits touching all directories. I'll take care of --patch and friends later. They both (--patch and commit pruning) use the same diff mechanism, if we get it right for for commit pruning, --patch will come nicely. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html