Skip to content

Commit be7651a

Browse files
mhaggergitster
authored andcommitted
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>
1 parent 17377b6 commit be7651a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

builtin/checkout.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ static int checkout_paths(const struct checkout_opts *opts,
242242
struct checkout state;
243243
static char *ps_matched;
244244
unsigned char rev[20];
245-
int flag;
246245
struct commit *head;
247246
int errs = 0;
248247
struct lock_file *lock_file;
@@ -375,7 +374,7 @@ static int checkout_paths(const struct checkout_opts *opts,
375374
if (write_locked_index(&the_index, lock_file, COMMIT_LOCK))
376375
die(_("unable to write new index file"));
377376

378-
read_ref_full("HEAD", 0, rev, &flag);
377+
read_ref_full("HEAD", 0, rev, NULL);
379378
head = lookup_commit_reference_gently(rev, 1);
380379

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

0 commit comments

Comments
 (0)