git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Remove branch by putting a null sha1 into the ref file.
Date: Sat, 23 Sep 2006 13:22:30 +0200	[thread overview]
Message-ID: <200609231322.30214.chriscool@tuxfamily.org> (raw)
In-Reply-To: <7vu02zuhya.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> Christian Couder <chriscool@tuxfamily.org> writes:
> > If we move ".git/refs/heads/frotz/nitfol"
> > to ".git/deleted-refs/heads/frotz/nitfol" when we remove this ref, we
> > only need to try to rmdir all subdirectories under
> > ".git/refs/heads/frotz/" and then ".git/refs/heads/frotz/" to see if we
> > can
> > create ".git/refs/heads/frotz", and if we can, we won't
> > resurect "frotz/nitfol" because ".git/deleted-refs/heads/frotz/nitfol"
> > still exists.
>
> I am not sure if that would be workable.  I suspect that you
> would need to do quite an involved sequence in "git branch" to
> make this sequence to work with .git/deleted-refs/ scheme:
>
> 	git branch frotz/nitfol
>         git pack-refs --prune
>         git branch -d frotz/nitfol
>         git branch frotz
>         git pack-refs
>         git branch -d frotz
>
> After deleting frotz/nitfol you would create frotz/nitfol in
> deleted hierarchy.  Then when you delete frotz you would need to
> create frotz in deleted hierarchy, but you cannot, without
> losing frotz/nitfol.

You are right, so what about moving ".git/refs/heads/frotz" 
to ".git/deleted-refs/heads/frotz.ref" 
or ".git/deleted-refs/heads/frotz~ref" (because "~" is forbidden in ref 
names).

Christian. 

  reply	other threads:[~2006-09-23 11:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-18  4:54 [PATCH] Remove branch by putting a null sha1 into the ref file Christian Couder
2006-09-18  5:47 ` Junio C Hamano
2006-09-18 16:31 ` Linus Torvalds
2006-09-18 18:43   ` Junio C Hamano
2006-09-20  2:56   ` Christian Couder
2006-09-22 22:09   ` Junio C Hamano
2006-09-23  4:45     ` Christian Couder
2006-09-23  8:04       ` Junio C Hamano
2006-09-23 11:22         ` Christian Couder [this message]
2006-09-23 21:49           ` Junio C Hamano
2006-09-24  4:45             ` Christian Couder
2006-09-25  9:26               ` On ref locking Junio C Hamano
2006-09-25 17:05                 ` Daniel Barkalow
2006-09-26  4:11                   ` Junio C Hamano
2006-09-26  4:13                 ` [PATCH 1/3] Clean-up lock-ref implementation Junio C Hamano
2006-09-26  4:13                 ` [PATCH 2/3] update-ref: -d flag and ref creation safety Junio C Hamano
2006-09-26 18:05                 ` [PATCH 3/3] update a few Porcelain-ish for ref lock safety Junio C Hamano
2006-09-26 18:08                   ` Andy Whitcroft
2006-09-27  7:25                     ` 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=200609231322.30214.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.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).