diff options
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/read-cache.c b/read-cache.c index 0382804e76..8b467f8f41 100644 --- a/read-cache.c +++ b/read-cache.c @@ -470,7 +470,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st, unsigned ce_option = CE_MATCH_IGNORE_VALID|CE_MATCH_RACY_IS_DIRTY; if (!S_ISREG(st_mode) && !S_ISLNK(st_mode) && !S_ISDIR(st_mode)) - die("%s: can only add regular files, symbolic links or git-directories", path); + return error("%s: can only add regular files, symbolic links or git-directories", path); namelen = strlen(path); if (S_ISDIR(st_mode)) { @@ -505,12 +505,12 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st, return 0; } if (index_path(ce->sha1, path, st, 1)) - die("unable to index file %s", path); + return error("unable to index file %s", path); if (ignore_case && alias && different_name(ce, alias)) ce = create_alias_ce(ce, alias); ce->ce_flags |= CE_ADDED; if (add_index_entry(istate, ce, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE)) - die("unable to add %s to index",path); + return error("unable to add %s to index",path); if (verbose) printf("add '%s'\n", path); return 0; |