All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org, dstolee@microsoft.com
Subject: Re: [PATCH 01/16] t7900: clean up some more broken refs
Date: Mon, 27 Sep 2021 15:49:46 -0400	[thread overview]
Message-ID: <YVIgWnsApPs35YUd@coredump.intra.peff.net> (raw)
In-Reply-To: <20210927173818.528679-1-jonathantanmy@google.com>

On Mon, Sep 27, 2021 at 10:38:18AM -0700, Jonathan Tan wrote:

> > @@ -277,7 +277,7 @@ test_expect_success 'incremental-repack task' '
> >  
> >  	# Delete refs that have not been repacked in these packs.
> >  	git for-each-ref --format="delete %(refname)" \
> > -		refs/prefetch refs/tags >refs &&
> > +		refs/prefetch refs/tags refs/remotes >refs &&
> >  	git update-ref --stdin <refs &&
> >  
> >  	# Replace the object directory with this pack layout.
> > @@ -286,6 +286,10 @@ test_expect_success 'incremental-repack task' '
> >  	ls $packDir/*.pack >packs-before &&
> >  	test_line_count = 3 packs-before &&
> >  
> > +	# make sure we do not have any broken refs that were
> > +	# missed in the deletion above
> > +	git for-each-ref &&
> 
> For what it's worth, I verified that a fatal error is indeed caused in
> "git for-each-ref" if refs/remotes was not deleted. This patch looks
> good.

Me too. :) It works because for-each-ref's default format will try to
show the type of the object, so it complains when the object is missing.

We could make this "git fsck" if that's less subtle, but this is a bit
cheaper.

-Peff

  reply	other threads:[~2021-09-27 19:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 18:30 [PATCH 0/16] enabling GIT_REF_PARANOIA by default Jeff King
2021-09-24 18:32 ` [PATCH 01/16] t7900: clean up some more broken refs Jeff King
2021-09-27 17:38   ` Jonathan Tan
2021-09-27 19:49     ` Jeff King [this message]
2021-09-24 18:33 ` [PATCH 02/16] t5516: don't use HEAD ref for invalid ref-deletion tests Jeff King
2021-09-24 18:34 ` [PATCH 03/16] t5600: provide detached HEAD for corruption failures Jeff King
2021-09-24 18:35 ` [PATCH 04/16] t5312: drop "verbose" helper Jeff King
2021-09-24 18:36 ` [PATCH 05/16] t5312: create bogus ref as necessary Jeff King
2021-09-24 18:36 ` [PATCH 06/16] t5312: test non-destructive repack Jeff King
2021-09-24 18:37 ` [PATCH 07/16] t5312: be more assertive about command failure Jeff King
2021-09-24 18:37 ` [PATCH 08/16] refs-internal.h: move DO_FOR_EACH_* flags next to each other Jeff King
2021-09-24 18:39 ` [PATCH 09/16] refs-internal.h: reorganize DO_FOR_EACH_* flag documentation Jeff King
2021-09-24 18:41 ` [PATCH 10/16] refs: add DO_FOR_EACH_OMIT_DANGLING_SYMREFS flag Jeff King
2021-09-24 18:42 ` [PATCH 11/16] refs: omit dangling symrefs when using GIT_REF_PARANOIA Jeff King
2021-09-24 18:46 ` [PATCH 12/16] refs: turn on GIT_REF_PARANOIA by default Jeff King
2021-09-27 17:42   ` Jonathan Tan
2021-09-24 18:46 ` [PATCH 13/16] repack, prune: drop GIT_REF_PARANOIA settings Jeff King
2021-09-24 18:48 ` [PATCH 14/16] ref-filter: stop setting FILTER_REFS_INCLUDE_BROKEN Jeff King
2021-09-24 18:48 ` [PATCH 15/16] ref-filter: drop broken-ref code entirely Jeff King
2021-09-24 18:48 ` [PATCH 16/16] refs: drop "broken" flag from for_each_fullref_in() Jeff King
2021-09-27 17:47   ` Jonathan Tan
2021-09-24 20:22 ` [PATCH 0/16] enabling GIT_REF_PARANOIA by default Junio C Hamano

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=YVIgWnsApPs35YUd@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.