From: Michael Haggerty <mhagger@alum.mit.edu>
To: Sitaram Chamarty <sitaramc@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>, Elijah Newren <newren@gmail.com>
Subject: Re: can we prevent reflog deletion when branch is deleted?
Date: Sat, 01 Jun 2013 05:00:07 +0200 [thread overview]
Message-ID: <51A963B7.6060002@alum.mit.edu> (raw)
In-Reply-To: <CAMK1S_jY1tDCkyOamX8XNW9g8Dzf6yN9znwN6he-EVcOkBM1fQ@mail.gmail.com>
On 06/01/2013 03:31 AM, Sitaram Chamarty wrote:
> Is there a way to prevent reflog deletion when the branch is deleted?
> The last entry could simply be a line where the second SHA is all 0's.
This is a known problem. The technical reason that this is not trivial
to solve is the possibility of a directory/file conflict between old
reflog files and references that might be created subsequently (which in
turn is a limitation of how loose references and reflogs are mapped to
filenames):
git branch foo
git branch -d foo
git branch foo/bar
Under your proposal, the second line would retain the reflog file for
foo, which is named ".git/logs/refs/heads/foo". But the third line
wants to create a file ".git/logs/refs/heads/foo/bar". The existence of
the "foo" file prevents the creation of a "foo" directory.
A similar problem exists if "foo" and "foo/bar" are exchanged in the
above example.
Peff proposed a solution to this problem [1], but AFAIK it is not making
progress.
Michael
[1]
http://thread.gmane.org/gmane.comp.version-control.git/201715/focus=201752
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
next prev parent reply other threads:[~2013-06-01 3:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 1:31 can we prevent reflog deletion when branch is deleted? Sitaram Chamarty
2013-06-01 3:00 ` Michael Haggerty [this message]
2013-06-01 5:03 ` Jeff King
2013-06-01 7:59 ` Ramkumar Ramachandra
2013-06-01 9:09 ` Jeff King
2013-06-01 9:47 ` Ramkumar Ramachandra
2013-06-01 17:25 ` Sitaram Chamarty
2013-06-01 17:56 ` Ramkumar Ramachandra
2013-06-02 10:20 ` Sitaram Chamarty
2013-11-14 0:18 ` Sitaram Chamarty
2013-11-14 7:56 ` Thomas Rast
2013-11-14 8:07 ` Jeff King
2013-11-14 10:56 ` Sitaram Chamarty
2013-11-14 11:09 ` Jeff King
2013-11-14 11:17 ` Luca Milanesio
2013-11-14 13:48 ` Sitaram Chamarty
2013-11-14 13:47 ` Sitaram Chamarty
2013-11-14 8:14 ` Jeff King
2013-11-14 14:42 ` Stephen Bash
2013-11-14 16:20 ` Sitaram Chamarty
2013-11-14 16:06 ` Sitaram Chamarty
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=51A963B7.6060002@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=sitaramc@gmail.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).