Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Olszewski <cxreg@pobox.com>2010-03-14 01:47:05 +0300
committerJunio C Hamano <gitster@pobox.com>2010-03-14 08:23:43 +0300
commit8fcaca3ff29a193f50a44bb3d5734a503e0539a6 (patch)
tree849aa7f164afc9cabbc523b9730c0f55a6ed7f7a /t/t1411-reflog-show.sh
parent8ca788035644f2aaf7a951272ae16a7bd319554c (diff)
don't use default revision if a rev was specified
If a revision is specified, it happens not to have any commits, don't use the default revision. By doing so, surprising and undesired behavior can happen, such as showing the reflog for HEAD when a branch was specified. [jc: squashed a test from René] Signed-off-by: Dave Olszewski <cxreg@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1411-reflog-show.sh')
-rwxr-xr-xt/t1411-reflog-show.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh
index c18ed8edf9..ba25ff354d 100755
--- a/t/t1411-reflog-show.sh
+++ b/t/t1411-reflog-show.sh
@@ -64,4 +64,13 @@ test_expect_success 'using --date= shows reflog date (oneline)' '
test_cmp expect actual
'
+: >expect
+test_expect_success 'empty reflog file' '
+ git branch empty &&
+ : >.git/logs/refs/heads/empty &&
+
+ git log -g empty >actual &&
+ test_cmp expect actual
+'
+
test_done