git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Added a test for fetching remote tags when there is not tags.

From
VJVäinö Järvelä <v@pp.inet.fi>
Date
Oct 9, 2007, 08:51 UTC
Message-ID
<1191919868-4963-1-git-send-email-v@pp.inet.fi>

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>
---
 t/t5510-fetch.sh |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 73a4e3c..40ebf2e 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -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" &&
-- 
1.5.3.4.1156.g5407-dirty
Next: Väinö Järvelä
Message 1 of 10 in “Added a test for fetching remote tags when there is not tags.”
  1. Added a test for fetching remote tags when there is not tags.Väinö Järvelä, Oct 9, 2007
  2. Fixed crash in fetching remote tags when there is not tags.Väinö Järvelä, Oct 9, 2007
  3. Väinö JärveläOct 9, 2007
  4. Alex RiesenOct 9, 2007
  5. Jeff KingOct 10, 2007
  6. Alex RiesenOct 10, 2007
  7. Jeff KingOct 10, 2007
  8. Shawn O. PearceOct 12, 2007
  9. Fix a crash in ls-remote when refspec expands into nothingAlex Riesen, Oct 12, 2007
  10. Lars HjemliOct 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.