summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b1bfcae)
raw | patch | inline | side by side (parent: b1bfcae)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 17 Dec 2006 00:23:02 +0000 (16:23 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 17 Dec 2006 09:14:43 +0000 (01:14 -0800) |
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>
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>
read-cache.c | patch | blob | history |
diff --git a/read-cache.c b/read-cache.c
index eae4745d284e00e279b5b8f4b032bdb9ca433984..a602010a69352f774e9446d0106752c0127d917f 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
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;
}