Browse Source

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>
maint
Michael Haggerty 9 years ago committed by Junio C Hamano
parent
commit
be7651a347
  1. 3
      builtin/checkout.c

3
builtin/checkout.c

@ -242,7 +242,6 @@ static int checkout_paths(const struct checkout_opts *opts,
struct checkout state; struct checkout state;
static char *ps_matched; static char *ps_matched;
unsigned char rev[20]; unsigned char rev[20];
int flag;
struct commit *head; struct commit *head;
int errs = 0; int errs = 0;
struct lock_file *lock_file; 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)) if (write_locked_index(&the_index, lock_file, COMMIT_LOCK))
die(_("unable to write new index file")); 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); head = lookup_commit_reference_gently(rev, 1);


errs |= post_checkout_hook(head, head, 0); errs |= post_checkout_hook(head, head, 0);

Loading…
Cancel
Save