Skip to content

Commit

Permalink
worktree: improve worktree setup message
Browse files Browse the repository at this point in the history
When git-worktree creates a new worktree, it reports:

    Enter "<path>" (identifier <tag>)

which misleadingly implies that it is setting <path> as the working
directory (as if "cd <path>" had been invoked), whereas it's actually
preparing the new worktree by creating its administrative files, setting
HEAD, and populating it. Make this more clear by instead saying:

    Preparing "<path>" (identifier <tag>)

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
sunshineco authored and gitster committed Jul 20, 2015
1 parent ed89f84 commit cd2f471
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/worktree.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static int add_worktree(const char *path, const char **child_argv)
strbuf_addf(&sb, "%s/commondir", sb_repo.buf);
write_file(sb.buf, 1, "../..\n");

fprintf_ln(stderr, _("Enter %s (identifier %s)"), path, name);
fprintf_ln(stderr, _("Preparing %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 cd2f471

Please sign in to comment.