Hi, On Tue, 10 Jul 2007, Alex Riesen wrote: > I have a Debian system where git-filter-branch exits immediately after > "unset CDPATH" in git-sh-setup (the command exits with 1, as CDPATH is > not defined). The system still has bash-2.05a. > > git-filter-branch has "set -e", which is why the script finishes > prematurely. If this is not really needed, maybe it can be removed? > > I'll see if the system can be upgraded, but I suspect someone can get > a similar problem. I do not really understand why "unset CDPATH" should trigger an error. I guess that this is one of the nice braindamages in dash, right? Anyway, "set -e" was one thing I wanted to fix. But I'm not sure I want to work on filter-branch now, what with skimo (possibly? hopefully?) working on my wishlist for rewrite-commits. If rewrite-commits gets the features I wished for, IMHO filter-branch is obsolete. Using rewrite-commits would have a couple of advantages: - the name is much better, - since we have reflogs enabled by default now, there is really no good reason why you should have to copy the rewritten branches back to their original name (we would need a way to redirect that, though, for example for subdirectory filters), - it is faster, - since it is a C program, it should be more stable, eventually, than a shell script, where you have to work around limitations all the time, - with the trick I described in the mail to skimo, you can have convenience functions (think "map") in the commit filter, too, - and it would be less work for me. Your case is a really good illustration for why C is a better language than shell in the long run. Oh, BTW, if the index filter gets the current (original) commit SHA1 as an environment variable, like it does in filter-branch, it can act as a the first half of a subdirectory filter: --index-filter "git read-tree $COMMIT_SHA1:sub/directory/" The second half of it is to add "-- sub/directory/" to the command line. Ciao, Dscho - 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