public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jonathan Nieder <jrnieder@gmail•com>
Cc: Tim Chase <git@tim•thechases.com>, git@vger•kernel.org
Subject: Re: Archiving off old branches
Date: Wed, 23 Apr 2014 11:15:01 -0700	[thread overview]
Message-ID: <xmqqvbtzzzdm.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140423175820.GE15516@google.com> (Jonathan Nieder's message of "Wed, 23 Apr 2014 10:58:20 -0700")

Jonathan Nieder <jrnieder@gmail•com> writes:

> Tim Chase wrote:
>
>>   cd .git/refs
>>   mkdir -p closed
>>   mv heads/BUG-123 closed
>
> That breaks with packed refs (see git-pack-refs(1)), which are a normal
> thing to encounter after garbage collection.

Specifically,

 - if BUG-123 branch was placed in packed-refs file in the past
   (which may be older than what you have right now at heads/BUG-123
   as a loose ref), the above procedure will still make it appear in
   your "git branch --list" output, pointing at a possibly old
   commit that may even have been pruned away.

 - if BUG-123 branch was placed in packed-refs file and you haven't
   touched that branch since then, heads/BUG-123 file would not
   exist, "mv" will fail, and you won't see closed/BUG-123 at the
   end of the procedure.

      parent reply	other threads:[~2014-04-23 18:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 17:08 Archiving off old branches Tim Chase
2014-04-23 17:43 ` Junio C Hamano
2014-04-23 17:58 ` Jonathan Nieder
2014-04-23 18:06   ` Tim Chase
2014-04-23 18:15   ` Junio C Hamano [this message]

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=xmqqvbtzzzdm.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@tim$(echo .)thechases.com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jrnieder@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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