Skip to content

Commit 5a30374

Browse files
committed
Merge branch 'da/subtree-date-confusion' into maint
"git subtree" (in contrib/) depended on "git log" output to be stable, which was a no-no. Apply a workaround to force a particular date format. * da/subtree-date-confusion: contrib/subtree: ignore log.date configuration
2 parents e88b858 + e7aac44 commit 5a30374

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

contrib/subtree/git-subtree.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ copy_commit()
305305
# We're going to set some environment vars here, so
306306
# do it in a subshell to get rid of them safely later
307307
debug copy_commit "{$1}" "{$2}" "{$3}"
308-
git log -1 --pretty=format:'%an%n%ae%n%ad%n%cn%n%ce%n%cd%n%B' "$1" |
308+
git log -1 --pretty=format:'%an%n%ae%n%aD%n%cn%n%ce%n%cD%n%B' "$1" |
309309
(
310310
read GIT_AUTHOR_NAME
311311
read GIT_AUTHOR_EMAIL

contrib/subtree/t/t7900-subtree.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ test_expect_success 'add sub3' '
9494
# Back to mainline
9595
cd ..
9696

97+
test_expect_success 'enable log.date=relative to catch errors' '
98+
git config log.date relative
99+
'
100+
97101
test_expect_success 'add main4' '
98102
create main4 &&
99103
git commit -m "main4" &&

0 commit comments

Comments
 (0)