Revision 5d1a5c02e8ac1c16688ea4a44512245f25a49f8a authored by Linus Torvalds on 01 October 2005, 20:24:27 UTC, committed by Junio C Hamano on 02 October 2005, 06:55:47 UTC
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>
1 parent 455a7f3
Raw File
blob.h
#ifndef BLOB_H
#define BLOB_H

#include "object.h"

extern const char *blob_type;

struct blob {
	struct object object;
};

struct blob *lookup_blob(const unsigned char *sha1);

int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size);

int parse_blob(struct blob *item);

#endif /* BLOB_H */
back to top