X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=update-cache.c;h=63815ed658e9c2007938309458444b218c330d68;hb=6e7722e6f88c049f43a1c00c45c502542d1a5752;hp=1fcc59a9c005e154c09731f25b7a99389dca2733;hpb=e8c80638abc99928dba9ac832589749a531e2e21;p=git.git diff --git a/update-cache.c b/update-cache.c index 1fcc59a9..63815ed6 100644 --- a/update-cache.c +++ b/update-cache.c @@ -321,6 +321,7 @@ int main(int argc, char **argv) { int i, newfd, entries, has_errors = 0; int allow_options = 1; + const char *prefix = setup_git_directory(); newfd = hold_index_file_for_update(&cache_file, get_index_file()); if (newfd < 0) @@ -381,6 +382,7 @@ int main(int argc, char **argv) } die("unknown option %s", path); } + path = prefix_path(prefix, prefix ? strlen(prefix) : 0, path); if (!verify_path(path)) { fprintf(stderr, "Ignoring path %s\n", argv[i]); continue;