diff options
author | Jeff King <peff@peff.net> | 2019-03-20 04:15:27 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-03-20 18:34:09 +0900 |
commit | df351c6e676e8eea0defa00ea919ad7da6bd03f1 (patch) | |
tree | b70c098b7ffde24e7fbd9653bb95b4bbefe4a57c /unpack-trees.c | |
parent | 664296985c2f05df83da9b859c258d97e6a11ba3 (diff) | |
download | git-df351c6e676e8eea0defa00ea919ad7da6bd03f1.tar.gz |
unpack-trees: drop unused error_type parameters
The verify_clean_subdirectory() helper takes an error_type parameter
from the caller, but doesn't actually use it. Instead, when it calls
add_rejected_path() it passes NOT_UPTODATE_DIR, its own custom error
type which is more specific than what the caller provides. Likewise for
verify_clean_submodule(), which always passes WOULD_LOSE_SUBMODULE.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 79551ab9cc..5f65ff5804 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -1758,7 +1758,6 @@ static void invalidate_ce_path(const struct cache_entry *ce, */ static int verify_clean_submodule(const char *old_sha1, const struct cache_entry *ce, - enum unpack_trees_error_types error_type, struct unpack_trees_options *o) { if (!submodule_from_ce(ce)) @@ -1769,7 +1768,6 @@ static int verify_clean_submodule(const char *old_sha1, } static int verify_clean_subdirectory(const struct cache_entry *ce, - enum unpack_trees_error_types error_type, struct unpack_trees_options *o) { /* @@ -1792,7 +1790,7 @@ static int verify_clean_subdirectory(const struct cache_entry *ce, if (!sub_head && oideq(&oid, &ce->oid)) return 0; return verify_clean_submodule(sub_head ? NULL : oid_to_hex(&oid), - ce, error_type, o); + ce, o); } /* @@ -1888,7 +1886,7 @@ static int check_ok_to_remove(const char *name, int len, int dtype, * files that are in "foo/" we would lose * them. */ - if (verify_clean_subdirectory(ce, error_type, o) < 0) + if (verify_clean_subdirectory(ce, o) < 0) return -1; return 0; } |