All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Max Kirillov <max@max630.net>,
	Eric Sunshine <sunshine@sunshineco.com>,
	git@drmicha.warpmail.net
Subject: Re: [PATCH v2 7/8] checkout: prefix --to argument properly when cwd is moved
Date: Tue, 29 Jul 2014 13:51:25 -0700	[thread overview]
Message-ID: <xmqq8unb3n3m.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1406641831-2390-8-git-send-email-pclouds@gmail.com> ("Nguyễn	Thái Ngọc Duy"'s message of "Tue, 29 Jul 2014 20:50:30 +0700")

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  builtin/checkout.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index 173aab1..4fbb9c1 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -1342,7 +1342,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
>  			 N_("do not limit pathspecs to sparse entries only")),
>  		OPT_HIDDEN_BOOL(0, "guess", &dwim_new_local_branch,
>  				N_("second guess 'git checkout no-such-branch'")),
> -		OPT_STRING(0, "to", &opts.new_worktree, N_("path"),
> +		OPT_FILENAME(0, "to", &opts.new_worktree,
>  			   N_("check a branch out in a separate working directory")),
>  		OPT_END(),
>  	};

Good thinking.  Otherwise this would not work from within a
subdirectory.  Perhaps you would want a test for it?

An unrelated tangent, but would we want to further enhance
OPT_FILENAME() to understand ~/path and ~user/path perhaps?
It is easy to rely on users' shells to do so, so it is not a big
deal and it certainly is unrelated to this particular topic.

  reply	other threads:[~2014-07-29 20:51 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 11:43 [PATCH 0/5] nd/multiple-work-trees follow-ups Nguyễn Thái Ngọc Duy
2014-07-23 11:43 ` [PATCH 1/5] gitrepository-layout.txt: s/ignored/ignored if/ Nguyễn Thái Ngọc Duy
2014-07-23 11:43 ` [PATCH 2/5] prune --repos: fix uninitialized access Nguyễn Thái Ngọc Duy
2014-07-23 19:59   ` Junio C Hamano
2014-07-24 10:14     ` Duy Nguyen
2014-07-23 11:43 ` [PATCH 3/5] checkout --to: no auto-detach if the ref is already checked out Nguyễn Thái Ngọc Duy
2014-07-23 13:48   ` Michael J Gruber
2014-07-23 17:46     ` Junio C Hamano
2014-07-24  9:58     ` Duy Nguyen
2014-07-24 21:30       ` Junio C Hamano
2014-07-25  6:51         ` Michael J Gruber
2014-07-30 18:03           ` Junio C Hamano
2014-07-30 18:52             ` Junio C Hamano
2014-08-27 11:58             ` Duy Nguyen
2014-08-27 16:08               ` Junio C Hamano
2014-07-23 21:16   ` Junio C Hamano
2014-07-24 10:09     ` Duy Nguyen
2014-07-24 16:39       ` Junio C Hamano
2014-07-24 18:13         ` Junio C Hamano
2014-07-23 11:43 ` [PATCH 4/5] checkout --to: fix dangling pointers in remove_junk() Nguyễn Thái Ngọc Duy
2014-07-23 11:43 ` [PATCH 5/5] environment.c: fix incorrect git_graft_file initialization Nguyễn Thái Ngọc Duy
2014-07-23 21:22   ` Junio C Hamano
2014-07-29 13:50 ` [PATCH v2 0/8] nd/multiple-work-trees follow-ups Nguyễn Thái Ngọc Duy
2014-07-29 13:50   ` [PATCH v2 1/8] gitrepository-layout.txt: s/ignored/ignored if/ Nguyễn Thái Ngọc Duy
2014-07-29 13:50   ` [PATCH v2 2/8] checkout: no need to call check_linked_checkouts if head_ref is NULL Nguyễn Thái Ngọc Duy
2014-07-29 13:50   ` [PATCH v2 3/8] prune --repos: fix uninitialized access Nguyễn Thái Ngọc Duy
2014-07-29 13:50   ` [PATCH v2 4/8] checkout: no auto-detach if the ref is already checked out Nguyễn Thái Ngọc Duy
2014-07-29 13:50   ` [PATCH v2 5/8] checkout --to: fix dangling pointers in remove_junk() Nguyễn Thái Ngọc Duy
2014-07-29 13:50   ` [PATCH v2 6/8] environment.c: fix incorrect git_graft_file initialization Nguyễn Thái Ngọc Duy
2014-07-29 13:50   ` [PATCH v2 7/8] checkout: prefix --to argument properly when cwd is moved Nguyễn Thái Ngọc Duy
2014-07-29 20:51     ` Junio C Hamano [this message]
2014-07-30 10:32       ` Duy Nguyen
2014-07-29 13:50   ` [PATCH v2 8/8] checkout --to: do not touch existing target directory Nguyễn Thái Ngọc Duy
2014-07-30 17:51 ` [PATCH 0/5] nd/multiple-work-trees follow-ups Junio C Hamano
2014-07-31 10:13   ` Duy Nguyen
2014-07-31 17:00     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8unb3n3m.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=max@max630.net \
    --cc=pclouds@gmail.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.