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

2015-06-12 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy 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 parse_branchname_arg(

[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 Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c

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

2015-06-10 Thread Spencer Baugh
Duy Nguyen 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, sha1, &f

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 (h

[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 --- builtin/checkout.c | 1 + 1 file changed, 1 insertion(+) diff -