From: Junio C Hamano <gitster@pobox•com>
To: Michael Haggerty <mhagger@alum•mit.edu>
Cc: Jeff King <peff@peff•net>,
Dmitry Neverov <dmitry.neverov@gmail•com>,
git@vger•kernel.org
Subject: Re: Git gc removes all packs
Date: Tue, 17 Feb 2015 23:13:05 -0800 [thread overview]
Message-ID: <xmqqoaor4rr2.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <54E3BE8B.2040403@alum.mit.edu> (Michael Haggerty's message of "Tue, 17 Feb 2015 23:19:55 +0100")
Michael Haggerty <mhagger@alum•mit.edu> writes:
> On 02/17/2015 10:57 PM, Junio C Hamano wrote:
> ...
>> Do you mean that we would end up reading refs/heads/hold if the user
>> did this:
>>
>> git rev-parse --verify HEAD -- >precious
>> ln -s ../../../precious .git/refs/heads/hold
>>
>> because that symbolic link does not begin with "refs/",
>
> Correct, you can do exactly that. The "hold" reference is resolvable and
> listable using "for-each-ref". But if I try to update it, the contents
> of the "precious" file are overwritten. On the other hand, if I run
> "pack-refs", then the current value of the "hold" reference is moved to
> "packed-refs" and the symlink is removed. This behavior is not sane.
>
>> and is an
>> accident waiting to happen so we should forbid it in the longer
>> term and warning when we see it would be the first step?
>
> Yes, I am proposing that approach, though if somebody can suggest a use
> case I'm willing to be convinced otherwise.
Thanks. I agree the proposed tightening is probably harmless, but I
too would want to see if somebody comes up with a valid use case. I
do not think of anything offhand.
next prev parent reply other threads:[~2015-02-18 7:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 15:13 Git gc removes all packs Dmitry Neverov
2015-02-05 20:03 ` Jeff King
2015-02-17 16:39 ` Michael Haggerty
2015-02-17 16:55 ` Jeff King
2015-02-17 20:37 ` Michael Haggerty
2015-02-17 21:57 ` Junio C Hamano
2015-02-17 22:19 ` Michael Haggerty
2015-02-18 7:13 ` Junio C Hamano [this message]
2015-02-27 10:16 ` Dmitry Neverov
2015-02-27 13:14 ` Jeff King
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=xmqqoaor4rr2.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=dmitry.neverov@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=mhagger@alum$(echo .)mit.edu \
--cc=peff@peff$(echo .)net \
/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