Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
rm: do not set a variable twice without intermediate reading.
author
Stefan Beller
<stefanbeller@googlemail.com>
Tue, 23 Jul 2013 09:19:22 +0000
(11:19 +0200)
committer
Junio 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
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
db6a6ad
)
diff --git
a/builtin/rm.c
b/builtin/rm.c
index f08561d5fa22284415f681a54abb6d9dd1a3f8b9..fe3faad15835fcd2e0ce50e89cbdc9a564599dbe 100644
(file)
--- a/
builtin/rm.c
+++ b/
builtin/rm.c
@@
-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++) {