Skip to content

Commit

Permalink
checkout: make --to unconditionally verbose
Browse files Browse the repository at this point in the history
prepare_linked_checkout() respects git-checkout's --quiet flag, however,
the plan is to relocate "git checkout --to" functionality to "git
worktree add", and git-worktree does not (yet) have a --quiet flag.
Consequently, make prepare_linked_checkout() unconditionally verbose to
ease eventual code movement to worktree.c.

(A --quiet flag can be added to git-worktree later if there is demand
for it.)

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Eric Sunshine authored and Junio C Hamano committed Jul 6, 2015
1 parent 3c3e7f5 commit 338dfd0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions builtin/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,7 @@ static int prepare_linked_checkout(const struct checkout_opts *opts)
strbuf_addf(&sb, "%s/commondir", sb_repo.buf);
write_file(sb.buf, 1, "../..\n");

if (!opts->quiet)
fprintf_ln(stderr, _("Enter %s (identifier %s)"), path, name);
fprintf_ln(stderr, _("Enter %s (identifier %s)"), path, name);

setenv("GIT_CHECKOUT_NEW_WORKTREE", "1", 1);
setenv(GIT_DIR_ENVIRONMENT, sb_git.buf, 1);
Expand Down

0 comments on commit 338dfd0

Please sign in to comment.