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

[PATCH] Add test for symlinked .git/packed-refs

From
PBPeter Baumann <waste.manager@gmx.de>
Date
Apr 19, 2007, 05:35 UTC
Message-ID
<20070419053518.GK5913@xp.machine.xx>
In-Reply-To
<7v4pndfjym.fsf@assigned-by-dhcp.cox.net>
Signed-off-by: Peter Baumann <waste.manager@gmx.de>
---
On Wed, Apr 18, 2007 at 02:31:29PM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> 
> Oh, I never questioned that you made that basic case work.  I
> was worried about not making sure the symlink we are looking at
> really is the case we are willing to handle, and not erroring
> out if that is not the case, perhaps like the attached patch on
> top of yours.
> 
> An additional test or two in t/t3210 would be nice to accompany
> this change.
> 
Something like this?
 t/t3210-pack-refs.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index f0c7e22..bf63954 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -105,4 +105,12 @@ test_expect_success 'pack, prune and repack' '
 	diff all-of-them again
 '
 
+test_expect_success \
+	'derefence symlinks for packed-refs' \
+	'mv -f .git/packed-refs .git/real_packed-refs &&
+	ln -s real_packed-refs .git/packed-refs &&
+	git-tag z &&
+	git-pack-refs --all --prune &&
+	diff .git/real_packed-refs .git/packed-refs'
+
 test_done
-- 
1.5.1
Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 22 in “[BUG] git-new-workdir doesn't understand packed refs”
  1. Peter BaumannApr 17, 2007
  2. Julian PhillipsApr 17, 2007
  3. Peter BaumannApr 18, 2007
  4. Julian PhillipsApr 18, 2007
  5. Junio C HamanoApr 18, 2007
  6. Peter BaumannApr 18, 2007
  7. Julian PhillipsApr 18, 2007
  8. Junio C HamanoApr 18, 2007
  9. Peter BaumannApr 18, 2007
  10. Junio C HamanoApr 18, 2007
  11. Peter BaumannApr 18, 2007
  12. Junio C HamanoApr 18, 2007
  13. Peter BaumannApr 18, 2007
  14. Junio C HamanoApr 18, 2007
  15. Add test for symlinked .git/packed-refsPeter Baumann, Apr 19, 2007
  16. Junio C HamanoApr 19, 2007
  17. pack-refs: dereference .git/packed-refs if it is a symlinkPeter Baumann, Apr 20, 2007
  18. Junio C HamanoApr 21, 2007
  19. Julian PhillipsApr 18, 2007
  20. pack-refs: dereference .git/packed-refs if it is a symlinkPeter Baumann, Apr 18, 2007
  21. Linus TorvaldsApr 18, 2007
  22. Peter BaumannApr 18, 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.