Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-03 23:44:48 +0400
committerJunio C Hamano <junkio@cox.net>2005-10-05 04:04:44 +0400
commit4b12dae69a41471e7c8139de26c1135f7ecccbd8 (patch)
tree8843ecb5e7d40236047b1364ffbd65233f666769 /entry.c
parent64a2228b02594d5ccb7aaca293816f571fd1ea84 (diff)
Return error when not checking out an entry due to dirtiness.
Without -f flag, 'git-checkout-index foo.c' issued an error message when foo.c already existed in the working tree and did not match index. However it did not return an error from the underlying checkout_entry() function and resulted in a successful exit(0). Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'entry.c')
-rw-r--r--entry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/entry.c b/entry.c
index b8426dbd0d..15b34eb6f9 100644
--- a/entry.c
+++ b/entry.c
@@ -132,7 +132,7 @@ int checkout_entry(struct cache_entry *ce, struct checkout *state)
if (!state->force) {
if (!state->quiet)
fprintf(stderr, "git-checkout-index: %s already exists\n", path);
- return 0;
+ return -1;
}
/*