git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Johan Herland <johan@herland.net>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Daniel Barkalow <barkalow@iabervon.org>
Subject: Re: [PATCH 3/4] Prepare testsuite for a "git clone" that packs refs
Date: Sun, 15 Jun 2008 11:04:07 -0700 (PDT)	[thread overview]
Message-ID: <m3bq22poby.fsf@localhost.localdomain> (raw)
In-Reply-To: <20080615175418.GB6127@sigill.intra.peff.net>

Jeff King <peff@peff.net> writes:

> On Sun, Jun 15, 2008 at 04:05:47PM +0200, Johan Herland wrote:
> 
> > .git/packed-refs. This patch therefore teaches t5515-fetch-merge-logic
> > to also remove the refs in question from the packed-refs file.
> > [...]
> > +			cat .git/packed-refs | \
> > +			while read sha1 refname
> > +			do
> > +				case "$sha1" in
> > +				^*) # remove peeled tags
> > +					;;
> > +				*)
> > +					case "$refname" in
> > +					refs/heads/*|\
> > +					refs/remotes/rem/*|\
> > +					refs/tags/*) # remove same as above
> > +						;;
> > +					*) # keep everything else
> > +						echo "$sha1 $refname"
> > +						;;
> > +					esac
> > +				esac
> > +			done > .git/packed-refs.new
> > +			mv .git/packed-refs.new .git/packed-refs
> 
> Might it not be simpler to just convert it to use plumbing to delete the
> refs? Something like piping for-each-ref into update-ref -d?

Or use git-for-each-ref with --shell option to generate code for
deleting refs?

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2008-06-15 18:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-15 14:02 [PATCH 0/4] Teach "git clone" to pack refs Johan Herland
2008-06-15 14:04 ` [PATCH 1/4] Incorporate fetched packs in future object traversal Johan Herland
2008-06-15 14:05 ` [PATCH 2/4] Move pack_refs() and friends into libgit Johan Herland
2008-06-15 17:52   ` Jeff King
2008-06-15 21:27     ` [PATCH 2/4 v2] " Johan Herland
2008-06-15 14:05 ` [PATCH 3/4] Prepare testsuite for a "git clone" that packs refs Johan Herland
2008-06-15 17:54   ` Jeff King
2008-06-15 18:04     ` Jakub Narebski [this message]
2008-06-15 23:16       ` [PATCH 3/4 v2] " Johan Herland
2008-06-15 14:06 ` [PATCH 4/4] Teach "git clone" to pack refs Johan Herland
2008-06-15 17:56   ` Jeff King
2008-06-15 22:03     ` Johan Herland
2008-06-16  9:57       ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2008-03-22  1:10 [RFC/PATCH 0/3] Teach builtin-clone " Johan Herland
2008-04-14  6:10 ` [RFC/PATCH 2/3] Prepare testsuite for a "git clone" that packs refs Daniel Barkalow
2008-04-14  8:00   ` Johan Herland
2008-04-14  8:03     ` [PATCH 3/4] " Johan Herland

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=m3bq22poby.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johan@herland.net \
    --cc=peff@peff.net \
    /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).