sha1-name.c: add repo_for_each_abbrev()
[gitweb.git] / apply.c
diff --git a/apply.c b/apply.c
index f489a56f39c9a5f9541e5709d883c9d41d629193..f15afa9f6af98ae41af60eb2296ee35d38ccc7fd 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -56,6 +56,10 @@ static int parse_whitespace_option(struct apply_state *state, const char *option
                state->ws_error_action = correct_ws_error;
                return 0;
        }
+       /*
+        * Please update $__git_whitespacelist in git-completion.bash
+        * when you add new options.
+        */
        return error(_("unrecognized whitespace option '%s'"), option);
 }
 
@@ -467,7 +471,6 @@ static char *squash_slash(char *name)
 
 static char *find_name_gnu(struct apply_state *state,
                           const char *line,
-                          const char *def,
                           int p_value)
 {
        struct strbuf name = STRBUF_INIT;
@@ -714,7 +717,7 @@ static char *find_name(struct apply_state *state,
                       int terminate)
 {
        if (*line == '"') {
-               char *name = find_name_gnu(state, line, def, p_value);
+               char *name = find_name_gnu(state, line, p_value);
                if (name)
                        return name;
        }
@@ -731,7 +734,7 @@ static char *find_name_traditional(struct apply_state *state,
        size_t date_len;
 
        if (*line == '"') {
-               char *name = find_name_gnu(state, line, def, p_value);
+               char *name = find_name_gnu(state, line, p_value);
                if (name)
                        return name;
        }
@@ -3183,7 +3186,7 @@ static int apply_binary(struct apply_state *state,
                return 0; /* deletion patch */
        }
 
-       if (has_sha1_file(oid.hash)) {
+       if (has_object_file(&oid)) {
                /* We already have the postimage */
                enum object_type type;
                unsigned long size;