summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2016-04-07 15:03:07 -0400
committerJunio C Hamano <gitster@pobox.com>2016-04-10 11:35:36 -0700
commitbe7651a34727d847e150cea564357c37d8a334c9 (patch)
tree5319cfb88683d0d804bd7e5f31dbb877bd0557d5
parent17377b62520fc12bd179514c8510d68e25dfb686 (diff)
downloadgit-be7651a34727d847e150cea564357c37d8a334c9.tar.gz
checkout_paths(): remove unneeded flag variable
It is never read, so we can pass NULL to resolve_ref_unsafe(). Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/checkout.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index efcbd8f6b5..ea2fe1cf3f 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -242,7 +242,6 @@ static int checkout_paths(const struct checkout_opts *opts,
struct checkout state;
static char *ps_matched;
unsigned char rev[20];
- int flag;
struct commit *head;
int errs = 0;
struct lock_file *lock_file;
@@ -375,7 +374,7 @@ static int checkout_paths(const struct checkout_opts *opts,
if (write_locked_index(&the_index, lock_file, COMMIT_LOCK))
die(_("unable to write new index file"));
- read_ref_full("HEAD", 0, rev, &flag);
+ read_ref_full("HEAD", 0, rev, NULL);
head = lookup_commit_reference_gently(rev, 1);
errs |= post_checkout_hook(head, head, 0);