Suggestion: better error reporting when setting HEAD

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

 



(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
--
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]

  Powered by Linux