diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-16 16:23:02 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-17 01:14:43 -0800 |
commit | 790fa0e297b41b9e8c98a77b58004c58408e5f7a (patch) | |
tree | 6b70cd5b7619edad8b56d1fb5db158c91da0b66e | |
parent | merge: give a bit prettier merge message to "merge branch~$n" (diff) | |
download | tgif-790fa0e297b41b9e8c98a77b58004c58408e5f7a.tar.xz |
update-index: make D/F conflict error a bit more verbose.
When you remove a directory D that has a tracked file D/F out of the
way to create a file D and try to "git update-index --add D", it used
to say "cannot add" which was not very helpful. This issues an extra
error message to explain the situation before the final "fatal" message.
Since D/F conflicts are relatively rare event, extra verbosity would
not make things too noisy.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | read-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c index eae4745d28..a602010a69 100644 --- a/read-cache.c +++ b/read-cache.c @@ -609,7 +609,7 @@ int add_cache_entry(struct cache_entry *ce, int option) if (!skip_df_check && check_file_directory_conflict(ce, pos, ok_to_replace)) { if (!ok_to_replace) - return -1; + return error("'%s' appears as both a file and as a directory", ce->name); pos = cache_name_pos(ce->name, ntohs(ce->ce_flags)); pos = -pos-1; } |