Merge branch 'nd/checkout-noisy'

"git checkout [<tree-ish>] path..." learned to report the number of
paths that have been checked out of the index or the tree-ish,
which gives it the same degree of noisy-ness as the case in which
the command checks out a branch.

* nd/checkout-noisy:
  t0027: squelch checkout path run outside test_expect_* block
  checkout: print something when checking out paths
This commit is contained in:
Junio C Hamano
2019-01-14 15:29:28 -08:00
8 changed files with 51 additions and 23 deletions

View File

@ -67,7 +67,8 @@ static int checkout_file(const char *name, const char *prefix)
continue;
did_checkout = 1;
if (checkout_entry(ce, &state,
to_tempfile ? topath[ce_stage(ce)] : NULL) < 0)
to_tempfile ? topath[ce_stage(ce)] : NULL,
NULL) < 0)
errs++;
}
@ -111,7 +112,8 @@ static void checkout_all(const char *prefix, int prefix_length)
write_tempfile_record(last_ce->name, prefix);
}
if (checkout_entry(ce, &state,
to_tempfile ? topath[ce_stage(ce)] : NULL) < 0)
to_tempfile ? topath[ce_stage(ce)] : NULL,
NULL) < 0)
errs++;
last_ce = ce;
}