rm: do not set a variable twice without intermediate reading.
authorStefan Beller <stefanbeller@googlemail.com>
Tue, 23 Jul 2013 09:19:22 +0000 (11:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 Jul 2013 18:33:03 +0000 (11:33 -0700)
Just the next line assigns a non-null value to seen.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rm.c
index f08561d5fa22284415f681a54abb6d9dd1a3f8b9..fe3faad15835fcd2e0ce50e89cbdc9a564599dbe 100644 (file)
@@ -316,7 +316,6 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
        parse_pathspec(&pathspec, 0, PATHSPEC_PREFER_CWD, prefix, argv);
        refresh_index(&the_index, REFRESH_QUIET, &pathspec, NULL, NULL);
 
-       seen = NULL;
        seen = xcalloc(pathspec.nr, 1);
 
        for (i = 0; i < active_nr; i++) {