git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Karl Hasselström" <kha@treskal.com>
Cc: Catalin Marinas <catalin.marinas@gmail.com>, git@vger.kernel.org
Subject: Re: [StGit PATCH] Remove broken branch creation subtest
Date: Sat, 12 Apr 2008 11:06:13 -0700	[thread overview]
Message-ID: <7vabjzhrsa.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080412124212.27748.21332.stgit@yoghurt> (Karl Hasselström's message of "Sat, 12 Apr 2008 14:44:15 +0200")

Karl Hasselström <kha@treskal.com> writes:

> 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.

With an additional "git branch -D foo" perhaps upfront before you manually
"corrupt" the repository, this can be resurrected without disabling the
test, can't it?

>   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!

You got me worried here.

 * "git show-ref" issues "error: refs/heads/foo points nowhere!" in all
   cases, which is not bad.

 * broken foo does not prevent "git show-ref" (no patterns) from carrying
   out its primary task.  It goes on showing others.  There is no bad here
   either.

 * "git show-ref refs/heads/foo" errors out with 1, which is Ok.

 * "git show-ref master" shows all the ones ending with "master", exits
   with 0, which is Ok.

>   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.

It may be worth fixing the test than working it around, if only cleaning
up is the issue.

  reply	other threads:[~2008-04-12 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-12 12:44 [StGit PATCH] Remove broken branch creation subtest Karl Hasselström
2008-04-12 18:06 ` Junio C Hamano [this message]
2008-04-13  6:02   ` Karl Hasselström
2008-04-13 13:43     ` [StGit PATCH] Fix problems in t1000-branch-create Karl Hasselström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vabjzhrsa.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).