[PATCH] checkout: don't check worktrees when not necessary

2015-06-12 Thread Nguyễn Thái Ngọc Duy
When --patch or pathspecs are passed to git checkout, the working tree will not be switching branch, so there's no need to check if the branch that we are running checkout on is already checked out. Original-patch-by: Spencer Baugh sba...@catern.com Signed-off-by: Nguyễn Thái Ngọc Duy

Re: [PATCH] checkout: don't check worktrees when not necessary

2015-06-12 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: When --patch or pathspecs are passed to git checkout, the working tree will not be switching branch, so there's no need to check if the branch that we are running checkout on is already checked out. Yeah, I agree that having this check in

Re: [PATCH] checkout: don't check worktrees when not necessary

2015-06-10 Thread Spencer Baugh
Duy Nguyen pclo...@gmail.com writes: On Sun, May 31, 2015 at 07:16:29PM -0400, Spencer Baugh wrote: --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1237,6 +1237,7 @@ static int parse_branchname_arg(int argc, const char **argv, char *head_ref = resolve_refdup(HEAD, 0,

Re: [PATCH] checkout: don't check worktrees when not necessary

2015-06-01 Thread Duy Nguyen
On Sun, May 31, 2015 at 07:16:29PM -0400, Spencer Baugh wrote: --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1237,6 +1237,7 @@ static int parse_branchname_arg(int argc, const char **argv, char *head_ref = resolve_refdup(HEAD, 0, sha1, flag); if (head_ref

[PATCH] checkout: don't check worktrees when not necessary

2015-05-31 Thread Spencer Baugh
When --patch or pathspecs are passed to git checkout, the working tree will not be switching branch, so there's no need to check if the branch that we are running checkout on is already checked out. Signed-off-by: Spencer Baugh sba...@catern.com --- builtin/checkout.c | 1 + 1 file changed, 1