Added a test for fetching remote tags when there is not tags.
authorVäinö Järvelä <v@pp.inet.fi>
Tue, 9 Oct 2007 08:51:07 +0000 (11:51 +0300)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 16 Oct 2007 00:40:51 +0000 (20:40 -0400)
When a user runs "git fetch -t", git crashes when it doesn't find any
tags on the remote repository.

Signed-off-by: Väinö Järvelä <v@pp.inet.fi>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
t/t5510-fetch.sh

index 73a4e3cbc3ac72d4aa2c1ffeab05edb3d16eabb5..40ebf2e2bf705888795c7ff8f40e5e27203c4e3f 100755 (executable)
@@ -67,6 +67,18 @@ test_expect_success "fetch test for-merge" '
        cut -f -2 .git/FETCH_HEAD >actual &&
        diff expected actual'
 
+test_expect_success 'fetch tags when there is no tags' '
+
+    cd "$D" &&
+
+    mkdir notags &&
+    cd notags &&
+    git init &&
+
+    git fetch -t ..
+
+'
+
 test_expect_success 'fetch following tags' '
 
        cd "$D" &&