From: Junio C Hamano Date: Tue, 4 Oct 2005 19:41:35 +0000 (-0700) Subject: Record which tree the patch applies to. X-Git-Tag: v0.99.9~194 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=3ff8cbeda635422f4740d325d56288dfdea10179;p=git.git Record which tree the patch applies to. Also note which version of GIT produced the patch. Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index 0d3c2779..fd4e163b 100644 --- a/Makefile +++ b/Makefile @@ -306,19 +306,24 @@ git: git.sh Makefile $(filter-out git,$(patsubst %.sh,%,$(SCRIPT_SH))) : % : %.sh rm -f $@ - sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' $@.sh >$@ + sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + $@.sh >$@ chmod +x $@ $(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl rm -f $@ - sed -e '1s|#!.*perl|#!$(PERL_PATH)|' $@.perl >$@ + sed -e '1s|#!.*perl|#!$(PERL_PATH)|' \ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + $@.perl >$@ chmod +x $@ $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py rm -f $@ sed -e '1s|#!.*python|#!$(PYTHON_PATH)|' \ -e 's|@@GIT_PYTHON_PATH@@|$(GIT_PYTHON_DIR)|g' \ - $@.py >$@ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + $@.py >$@ chmod +x $@ %.o: %.c diff --git a/git-format-patch.sh b/git-format-patch.sh index 28447995..9378219d 100755 --- a/git-format-patch.sh +++ b/git-format-patch.sh @@ -212,7 +212,10 @@ Date: '"$ad" echo git-diff-tree -p $diff_opts "$commit" | git-apply --stat --summary echo + git-cat-file commit "$commit^" | sed -e 's/^tree /applies-to: /' -e q git-diff-tree -p $diff_opts "$commit" + echo "---" + echo "@@GIT_VERSION@@" case "$mbox" in t)