summaryrefslogtreecommitdiff
path: root/t/t4202-log.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-31 22:49:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-08-31 22:49:52 (GMT)
commitcacab0c8566084901cd0f8ed6c9e1c4a5dc63677 (patch)
tree416f3e9c8881652ce29ae6bd03d6fa83a165e693 /t/t4202-log.sh
parente9bd00ab2dad0148c8643a773ea2e68d624f5624 (diff)
parent04a0e98515a7b6e2e43eddea239aacd2a5a71632 (diff)
downloadgit-cacab0c8566084901cd0f8ed6c9e1c4a5dc63677.zip
git-cacab0c8566084901cd0f8ed6c9e1c4a5dc63677.tar.gz
git-cacab0c8566084901cd0f8ed6c9e1c4a5dc63677.tar.bz2
Merge branch 'jk/rev-input-given-fix'
Feeding "$ZERO_OID" to "git log --ignore-missing --stdin", and running "git log --ignore-missing $ZERO_OID" fell back to start digging from HEAD; it has been corrected to become a no-op, like "git log --tags=no-tag-matches-this-pattern" does. * jk/rev-input-given-fix: revision: set rev_input_given in handle_revision_arg()
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-xt/t4202-log.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index a093059..56d34ed 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -1850,6 +1850,16 @@ test_expect_success 'log does not default to HEAD when rev input is given' '
test_must_be_empty actual
'
+test_expect_success 'do not default to HEAD with ignored object on cmdline' '
+ git log --ignore-missing $ZERO_OID >actual &&
+ test_must_be_empty actual
+'
+
+test_expect_success 'do not default to HEAD with ignored object on stdin' '
+ echo $ZERO_OID | git log --ignore-missing --stdin >actual &&
+ test_must_be_empty actual
+'
+
test_expect_success 'set up --source tests' '
git checkout --orphan source-a &&
test_commit one &&