git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Suggestion: better error reporting when setting HEAD
@ 2008-12-18  5:58 Francois Marier
  2008-12-18  8:25 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Francois Marier @ 2008-12-18  5:58 UTC (permalink / raw)
  To: git; +Cc: sam.vilain

(Please CC me on your replies, thanks)

If you take any valid git repo and then do the following:

  git symbolic-ref HEAD master
  (instead of "git symbolic-ref HEAD refs/heads/master")

then other git commands (e.g. "git log") will return this error message:

  fatal: Not a git repository

I'd like to suggest two "usability" improvements:

1- changing the error message to explain why the directory is no longer
   considered a git repo. Maybe something along the lines of:

     fatal: Invalid reference in .git/HEAD

2- To prevent this error from happening in the first place, git-symbolic-ref
   could refuse to change HEAD to a non-existent ref.

Cheers,
Francois

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

end of thread, other threads:[~2008-12-18  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-18  5:58 Suggestion: better error reporting when setting HEAD Francois Marier
2008-12-18  8:25 ` 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).