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

[StGIT PATCH 1/2] New test: make sure that StGIT can handle packed refs

From
Karl Hasselström <kha@treskal.com>
Date
Aug 10, 2007, 03:23 UTC
Message-ID
<20070810032312.19791.68367.stgit@yoghurt>
In-Reply-To
<20070810031949.19791.54562.stgit@yoghurt>

It currently can't, which is why this test is needed. The situation has recently taken a turn for the worse, since git-gc nowadays packs refs by default.

---
 t/t1004-pack-ref.sh |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/t/t1004-pack-ref.sh b/t/t1004-pack-ref.sh
new file mode 100755
index 0000000..a5eb17c
--- /dev/null
+++ b/t/t1004-pack-ref.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Karl Hasselström
+#
+
+test_description='Test that StGIT can handle packed refs'
+
+. ./test-lib.sh
+stg init
+
+test_expect_success \
+    'Pack refs and make sure that we can still see them' '
+    stg branch -c foo &&
+    [ $(stg branch -l | tee /dev/stderr | wc -l) -eq 2 ] &&
+    git pack-refs --all &&
+    [ $(stg branch -l | tee /dev/stderr | wc -l) -eq 2 ]
+'
+
+test_expect_success \
+    'Try to delete a branch whose ref has been packed' '
+    stg branch -d master
+'
+
+test_done
Previous: Karl HasselströmNext: Karl Hasselström
Message 2 of 11 in “Teach StGIT to survive git-gc”
  1. 0/2 Teach StGIT to survive git-gcKarl Hasselström, Aug 10, 2007
  2. 1/2 New test: make sure that StGIT can handle packed refsKarl Hasselström, Aug 10, 2007
  3. 2/2 Don't touch ref files manuallyKarl Hasselström, Aug 10, 2007
  4. Catalin MarinasAug 21, 2007
  5. Karl HasselströmAug 21, 2007
  6. Karl HasselströmAug 21, 2007
  7. Johannes SixtAug 21, 2007
  8. Karl HasselströmAug 21, 2007
  9. Karl HasselströmAug 21, 2007
  10. Karl HasselströmAug 21, 2007
  11. Catalin MarinasAug 23, 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.