Re: Minor bug report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 2, 2015 at 11:20 PM, Jeff King <peff@xxxxxxxx> wrote:
>
> Here are some prior discussions:
>
>   http://thread.gmane.org/gmane.comp.version-control.git/75692
>
>   http://thread.gmane.org/gmane.comp.version-control.git/200504
>
> I just skimmed through them, but I expect the most desirable solution
> would involve:
>
>   1. We still die(), but just improve the error message (so we don't
>      have any regressions for people expecting "git log" to fail).
>
>   2. We use the message only when pointing to an unborn branch, and not
>      on other errors. The simplest way to do this is probably to make an
>      extra call to resolve_ref() in the error code-path.
>
> -Peff

I am kind of surprised after reading these two threads that my
take on this issue has changed over time, as my knee-jerk
reaction before reading them was the opposite, something
along the lines of "This is only immediately after 'git init'; why
bother?". Or depending on my mood, that "How stupid do you
have to be..." sounds exactly like a message I may advocate
for us to send. Perhaps I grew more bitter with age.

Jokes aside, I wonder why we did not pursue that "default to
HEAD only when HEAD points at a branch that exists"
approach, with the definition of "exists" being "either a file
exists under the $GIT_DIR/refs/heads directory with any
(including corrupt) contents, or an entry in the packed refs
file exists with any (including corrupt) contents". With or
without the error exit and warning, that sounds like a very
sensible way to set the default, at least to me.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]