Merge branch 'jk/write-broken-index-with-nul-sha1'
[gitweb.git] / builtin / update-index.c
index c3179815164c1ba2b39f3f57690c607dfc3ea0b6..e3a10d706d406845b74b2cc0c9e9a120be6adce0 100644 (file)
@@ -11,6 +11,7 @@
 #include "refs.h"
 #include "resolve-undo.h"
 #include "parse-options.h"
+#include "pathspec.h"
 
 /*
  * Default to not allowing changes to the list of files. The
@@ -546,10 +547,11 @@ static int do_reupdate(int ac, const char **av,
         */
        int pos;
        int has_head = 1;
-       const char **paths = get_pathspec(prefix, av + 1);
        struct pathspec pathspec;
 
-       init_pathspec(&pathspec, paths);
+       parse_pathspec(&pathspec, 0,
+                      PATHSPEC_PREFER_CWD,
+                      prefix, av + 1);
 
        if (read_ref("HEAD", head_sha1))
                /* If there is no HEAD, that means it is an initial