Merge branch 'sg/t4051-fix'
[gitweb.git] / builtin / checkout.c
index 516136a23a3d6962703186ca825e416cb653e677..29ef50013dccbd118093af0b4dc08eb907953cc2 100644 (file)
@@ -318,7 +318,7 @@ static int checkout_paths(const struct checkout_opts *opts,
                 * match_pathspec() for _all_ entries when
                 * opts->source_tree != NULL.
                 */
-               if (ce_path_match(ce, &opts->pathspec, ps_matched))
+               if (ce_path_match(&the_index, ce, &opts->pathspec, ps_matched))
                        ce->ce_flags |= CE_MATCHED;
        }
 
@@ -1198,12 +1198,12 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
        if (opts.track != BRANCH_TRACK_UNSPECIFIED && !opts.new_branch) {
                const char *argv0 = argv[0];
                if (!argc || !strcmp(argv0, "--"))
-                       die (_("--track needs a branch name"));
+                       die(_("--track needs a branch name"));
                skip_prefix(argv0, "refs/", &argv0);
                skip_prefix(argv0, "remotes/", &argv0);
                argv0 = strchr(argv0, '/');
                if (!argv0 || !argv0[1])
-                       die (_("Missing branch name; try -b"));
+                       die(_("missing branch name; try -b"));
                opts.new_branch = argv0 + 1;
        }