git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Kaarsemaker <dennis@kaarsemaker.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, Tummala Dhanvi <dhanvicse@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Minor bug report
Date: Wed, 03 Jun 2015 17:39:14 +0200	[thread overview]
Message-ID: <1433345954.21083.14.camel@kaarsemaker.net> (raw)
In-Reply-To: <CAPc5daU9VdndgkMFNmtiwhVdwyGQgDbFX3rrrsEEEUVewgs-dw@mail.gmail.com>

On di, 2015-06-02 at 23:48 -0700, Junio C Hamano wrote:
> 
> 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.

The "fatal: Failed to resolve 'HEAD' as a valid ref." message, closely
related to the "fatal: bad default revision 'HEAD'" message that started
this thread just came by in #git with the following situation:

$ git init
$ git add .
# Oops, didn't want to add foo.xyz
$ git reset foo.xyz
fatal: Failed to resolve 'HEAD' as a valid ref.

The solution there is simple, git rm --cached, but I think git could
produce more helpful messages when a repo is empty.

I think you are growing bitter with age ;)

-- 
Dennis Kaarsemaker
www.kaarsemaker.net

  parent reply	other threads:[~2015-06-03 15:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03  5:54 Minor bug report Tummala Dhanvi
2015-06-03  6:20 ` Jeff King
2015-06-03  6:48   ` Junio C Hamano
2015-06-03  8:14     ` [PATCH] log: diagnose empty HEAD more clearly Jeff King
2015-06-03 17:24       ` Junio C Hamano
2015-06-04  7:31         ` Stefan Näwe
2015-06-04  8:45           ` Jeff King
2015-06-04  8:34         ` Jeff King
2015-06-05 20:47           ` Junio C Hamano
2015-06-03 15:39     ` Dennis Kaarsemaker [this message]
2015-06-04  8:21       ` Minor bug report 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=1433345954.21083.14.camel@kaarsemaker.net \
    --to=dennis@kaarsemaker.net \
    --cc=dhanvicse@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.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).