From 070648e9b7fcea628957a0aee0aae94a9c2967ec Mon Sep 17 00:00:00 2001 From: "Emilio G. Cota" Date: Mon, 8 Aug 2011 04:33:04 -0400 Subject: [PATCH 1/3] Documentation: ignore *.pdf files user-manual.pdf is generated by the build and therefore should be ignored by git. Signed-off-by: Emilio G. Cota Signed-off-by: Junio C Hamano --- Documentation/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/.gitignore b/Documentation/.gitignore index 1c3a9fead57..d62aebd848b 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -3,6 +3,7 @@ *.[1-8] *.made *.texi +*.pdf git.info gitman.info howto-index.txt From ae8044a2f542f5803c161ee510ac14492bc468d8 Mon Sep 17 00:00:00 2001 From: "Emilio G. Cota" Date: Mon, 8 Aug 2011 04:33:05 -0400 Subject: [PATCH 2/3] Documentation/Makefile: add *.pdf to `clean' target user-manual.pdf is not removed by `make clean'; fix it. Signed-off-by: Emilio G. Cota Signed-off-by: Junio C Hamano --- Documentation/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index 36989b7f654..18c71d763f4 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -232,6 +232,7 @@ cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT) clean: $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 $(RM) *.texi *.texi+ *.texi++ git.info gitman.info + $(RM) *.pdf $(RM) howto-index.txt howto/*.html doc.dep $(RM) technical/api-*.html technical/api-index.txt $(RM) $(cmds_txt) *.made From 0906f6e14e6e9df0c4ea4edb08ebe9f5d16c2391 Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Sun, 7 Aug 2011 02:44:43 +0000 Subject: [PATCH 3/3] filter-branch: Export variable `workdir' for --commit-filter According to `git help filter-branch': --commit-filter ... You can use the _map_ convenience function in this filter, and other convenience functions, too... ... However, it turns out that `map' hasn't been usable because it depends on the variable `workdir', which is not propogated to the environment of the shell that runs the commit-filter because the shell is created via a simple-command rather than a compound-command subshell: @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \ $(git write-tree) $parentstr < ../message > ../map/$commit || die "could not write rewritten commit" One solution is simply to export `workdir'. However, it seems rather heavy-handed to export `workdir' to the environments of all commands, so instead this commit exports `workdir' for only the duration of the shell command in question: workdir=$workdir @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \ $(git write-tree) $parentstr < ../message > ../map/$commit || die "could not write rewritten commit" Signed-off-by: Michael Witten Signed-off-by: Junio C Hamano --- git-filter-branch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 962a93b5865..6b5f2251b6b 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -363,7 +363,7 @@ while read commit parents; do sed -e '1,/^$/d' <../commit | \ eval "$filter_msg" > ../message || die "msg filter failed: $filter_msg" - @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \ + workdir=$workdir @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \ $(git write-tree) $parentstr < ../message > ../map/$commit || die "could not write rewritten commit" done <../revs