X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=update-index.c;fp=update-index.c;h=184b2526da58b56b8e808faceb1efc6949d3c831;hb=22293b9c41778bb60f3b07355e1b8e421a503702;hp=5496d68ae9c556431c5f21c9ca703fe92482beca;hpb=83e77a25dc194933c0fb7908ab6d9fb84a5045e2;p=git.git diff --git a/update-index.c b/update-index.c index 5496d68a..184b2526 100644 --- a/update-index.c +++ b/update-index.c @@ -610,6 +610,7 @@ static int do_reupdate(int ac, const char **av, */ int pos; int has_head = 1; + char **pathspec = get_pathspec(prefix, av + 1); if (read_ref(git_path("HEAD"), head_sha1)) /* If there is no HEAD, that means it is an initial @@ -621,7 +622,8 @@ static int do_reupdate(int ac, const char **av, struct cache_entry *ce = active_cache[pos]; struct cache_entry *old = NULL; int save_nr; - if (ce_stage(ce)) + + if (ce_stage(ce) || !ce_path_match(ce, pathspec)) continue; if (has_head) old = read_one_ent(NULL, head_sha1,