git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fatal error running status in new repo
@ 2010-02-16  4:19 Jacob Helwig
  2010-02-16  6:05 ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Jacob Helwig @ 2010-02-16  4:19 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-02-17  6:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-16  4:19 Fatal error running status in new repo Jacob Helwig
2010-02-16  6:05 ` 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

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).