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>

Michael Haggerty committed Apr 7, 2016 at 15:03 UTC be7651a34727d847e150cea564357c37d8a334c9
1 file changed +1 -2
builtin/checkout.c
+1 -2
@@ -242,7 +242,6 @@ static int checkout_paths(const struct checkout_opts *opts,
242 struct checkout state;
243 static char *ps_matched;
244 unsigned char rev[20];
245 - int flag;
245 struct commit *head;
246 int errs = 0;
247 struct lock_file *lock_file;
@@ -375,7 +374,7 @@ static int checkout_paths(const struct checkout_opts *opts,
374 if (write_locked_index(&the_index, lock_file, COMMIT_LOCK))
375 die(_("unable to write new index file"));
376
378 - read_ref_full("HEAD", 0, rev, &flag);
377 + read_ref_full("HEAD", 0, rev, NULL);
378 head = lookup_commit_reference_gently(rev, 1);
379
380 errs |= post_checkout_hook(head, head, 0);