From e7aac44ed276bc0de0253baa8e3f5ac247044a31 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Tue, 21 Jul 2015 17:01:02 -0700 Subject: contrib/subtree: ignore log.date configuration git-subtree's log format string uses "%ad" and "%cd", which respect the user's configured log.date value. This is problematic for git-subtree because it needs to use real dates so that copied commits come through unchanged. Add a test and tweak the format strings to use %aD and %cD so that the default date format is used instead. Reported-by: Bryan Jacobs Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- contrib/subtree/git-subtree.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/subtree/git-subtree.sh') diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index fa1a5839af..39c7d54ce8 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -298,7 +298,7 @@ copy_commit() # We're going to set some environment vars here, so # do it in a subshell to get rid of them safely later debug copy_commit "{$1}" "{$2}" "{$3}" - git log -1 --pretty=format:'%an%n%ae%n%ad%n%cn%n%ce%n%cd%n%B' "$1" | + git log -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' "$1" | ( read GIT_AUTHOR_NAME read GIT_AUTHOR_EMAIL -- cgit v1.2.3