git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [StGit PATCH] Remove broken branch creation subtest
@ 2008-04-12 12:44 Karl Hasselström
  2008-04-12 18:06 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Hasselström @ 2008-04-12 12:44 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: git

This subtest has started to cause subsequent subtests to fail with
recent versions of git. And I don't think we can blame this one on
git. What the subtest does is:

  1. Remove all files or directories called "foo" under .git/. This is
     supposed to delete the "foo" branch and associated StGit files,
     but what about packed refs? This isn't actually malfunctioning
     yet as far as I can tell, but it's a ticking bomb.

  2. Create an empty file .git/refs/heads/foo. This is supposed to be
     a "broken branch", and indeed it is -- for example, git show-ref
     barfs on such a repository even if asked to only show a branch
     other than foo!

  3. Makes sure that stg branch won't successfully create a "foo"
     branch. I'm pretty sure this fails because git thinks the repo is
     broken, not because stg handles it gracefully. This is what the
     test is supposed to be testing, but if we wanted that, we'd need
     a more detailed test.

  4. Doesn't clean up the broken ref, which causes some subsequent
     subtests to fail.

What probably happened is that git got ever so slightly fussier about
broken refs, so that (4) became a problem.

Signed-off-by: Karl Hasselström <kha@treskal.com>

---

This should go to the stable branch. (master is affected too, but a
merge will fix that.)

 t/t1000-branch-create.sh |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)


diff --git a/t/t1000-branch-create.sh b/t/t1000-branch-create.sh
index d6cf34a..298eb1a 100755
--- a/t/t1000-branch-create.sh
+++ b/t/t1000-branch-create.sh
@@ -54,13 +54,6 @@ test_expect_success \
 '
 
 test_expect_success \
-    'Create an invalid refs/heads/ entry' '
-    find .git -name foo | xargs rm -rf &&
-    touch .git/refs/heads/foo &&
-    ! stg branch -c foo
-'
-
-test_expect_success \
     'Setup two commits including removal of generated files' '
     git init &&
     touch a.c a.o &&

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-13 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-12 12:44 [StGit PATCH] Remove broken branch creation subtest Karl Hasselström
2008-04-12 18:06 ` Junio C Hamano
2008-04-13  6:02   ` Karl Hasselström
2008-04-13 13:43     ` [StGit PATCH] Fix problems in t1000-branch-create Karl Hasselström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).