From: Jacob Helwig <jacob.helwig@gmail.com>
To: git@vger.kernel.org
Subject: Fatal error running status in new repo
Date: Mon, 15 Feb 2010 20:19:45 -0800 [thread overview]
Message-ID: <20100216041945.GB10296@vfb-9.home> (raw)
I just noticed this when creating a new repo for a project.
$ mkdir tmp
$ cd tmp
$ git init
Initialized empty shared Git repository in /home/jhe/projects/tmp/.git/
$ git status
# On branch master
#
# Initial commit
#
warning: ignoring dangling symref HEAD.
fatal: bad revision 'HEAD'
nothing to commit (create/copy files and use "git add" to track)
$ echo $?
0
$ git --version
git version 1.7.0
Seems a bit silly that "git status" should be issuing warnings, and
fatal errors (especially when the exit code is still 0), when run before
the first commit has been created in a brand new repository.
The warnings make sense if you know what's going on behind the scenes,
but seem like the kind of thing that could scare someone new to git when
they haven't actually done anything wrong at this point.
--
Jacob Helwig
next reply other threads:[~2010-02-16 4:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-16 4:19 Jacob Helwig [this message]
2010-02-16 6:05 ` Fatal error running status in new repo Jeff King
2010-02-16 6:24 ` Jacob Helwig
2010-02-16 6:47 ` Jeff King
2010-02-16 7:03 ` [PATCH] dwim_ref: fix dangling symref warning Jeff King
2010-02-16 7:21 ` Fatal error running status in new repo Jeff King
2010-02-16 10:21 ` [PATCH] submodule summary: Don't barf when invoked in an empty repo Johan Herland
2010-02-17 6:10 ` 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=20100216041945.GB10296@vfb-9.home \
--to=jacob.helwig@gmail.com \
--cc=git@vger.kernel.org \
/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).