Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fsck: cleanup unused variable
author
Jonathan Tan
<jonathantanmy@google.com>
Wed, 26 Jul 2017 01:34:56 +0000
(18:34 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 26 Jul 2017 18:36:14 +0000
(11:36 -0700)
Remove the unused variable "heads" from cmd_fsck().
This variable was made unused in commit
c3271a0
("fsck: do not fallback
"git fsck <bogus>" to "git fsck"", 2017-01-17).
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
092c55d
)
diff --git
a/builtin/fsck.c
b/builtin/fsck.c
index 462b8643bce445776d0fa3689768aecb963bfe8c..64542ac3dea48e3a92901319233aa3a1e0c4cb9a 100644
(file)
--- a/
builtin/fsck.c
+++ b/
builtin/fsck.c
@@
-660,7
+660,7
@@
static struct option fsck_opts[] = {
int cmd_fsck(int argc, const char **argv, const char *prefix)
{
int cmd_fsck(int argc, const char **argv, const char *prefix)
{
- int i
, heads
;
+ int i;
struct alternate_object_database *alt;
errors_found = 0;
struct alternate_object_database *alt;
errors_found = 0;
@@
-728,7
+728,6
@@
int cmd_fsck(int argc, const char **argv, const char *prefix)
}
}
}
}
- heads = 0;
for (i = 0; i < argc; i++) {
const char *arg = argv[i];
unsigned char sha1[20];
for (i = 0; i < argc; i++) {
const char *arg = argv[i];
unsigned char sha1[20];
@@
-746,7
+745,6
@@
int cmd_fsck(int argc, const char **argv, const char *prefix)
add_decoration(fsck_walk_options.object_names,
obj, xstrdup(arg));
mark_object_reachable(obj);
add_decoration(fsck_walk_options.object_names,
obj, xstrdup(arg));
mark_object_reachable(obj);
- heads++;
continue;
}
error("invalid parameter: expected sha1, got '%s'", arg);
continue;
}
error("invalid parameter: expected sha1, got '%s'", arg);