Re: [PATCH v2 7/8] checkout: prefix --to argument properly when cwd is moved

2014-07-30 Thread Duy Nguyen
On Wed, Jul 30, 2014 at 3:51 AM, Junio C Hamano gits...@pobox.com wrote:
 Nguyễn Thái Ngọc Duy  pclo...@gmail.com writes:

 Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@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?

Will do at the next round.

 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.

Yeah, the only user group that probably wants this is cmd.exe users.
We already have expand_user_path for this, all needed is some glue.
I'll let Windows users do this if they really want to.
-- 
Duy
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 7/8] checkout: prefix --to argument properly when cwd is moved

2014-07-29 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy  pclo...@gmail.com writes:

 Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@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.



--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html