提交 44b85e89 编写于 作者: J Junio C Hamano

t7003: add test to filter a branch with a commit at epoch

Running filter-branch on a history that has a commit with timestamp
at epoch used to fail, but it should have been fixed.  Add test to
make sure it won't break again.
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 be21d167
......@@ -5,7 +5,8 @@ test_description='git filter-branch'
test_expect_success 'setup' '
test_commit A &&
test_commit B &&
GIT_COMMITTER_DATE="@0 +0000" GIT_AUTHOR_DATE="@0 +0000" &&
test_commit --notick B &&
git checkout -b branch B &&
test_commit D &&
mkdir dir &&
......
......@@ -335,10 +335,19 @@ test_tick () {
# Both <file> and <contents> default to <message>.
test_commit () {
file=${2:-"$1.t"}
notick= &&
if test "z$1" = "z--notick"
then
notick=yes
shift
fi &&
file=${2:-"$1.t"} &&
echo "${3-$1}" > "$file" &&
git add "$file" &&
test_tick &&
if test -z "$notick"
then
test_tick
fi &&
git commit -m "$1" &&
git tag "$1"
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册