summaryrefslogtreecommitdiff
path: root/usage.c
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] Better error reporting for "git status"Linus Torvalds2005-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | Instead of "git status" ignoring (and hiding) potential errors from the "git-update-index" call, make it exit if it fails, and show the error. In order to do this, use the "-q" flag (to ignore not-up-to-date files) and add a new "--unmerged" flag that allows unmerged entries in the index without any errors. This also avoids marking the index "changed" if an entry isn't actually modified, and makes sure that we exit with an understandable error message if the index is corrupt or unreadable. "read_cache()" no longer returns an error for the caller to check. Finally, make die() and usage() exit with recognizable error codes, if we ever want to check the failure reason in scripts. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Include file cleanups..Linus Torvalds2005-05-221-1/+0
| | | | | | | Add <limits.h> to the include files handled by "cache.h", and remove extraneous #include directives from various .c files. The rule is that "cache.h" gets all the basic stuff, so that we'll have as few system dependencies as possible.
* Split up read-cache.c into more logical clumps.Linus Torvalds2005-04-181-0/+40
Do the usage and error reporting in "usage.c", and the sha1 file accesses in "sha1_file.c". Small, nice, easily separated parts. Good.