Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Junio C Hamano
Jeff King writes: > To me, the benefit is that you don't have to care about ignore_case. You > have asked to compare two paths, and any system-appropriate magic should > be applied. That may be icase, or it may be weird unicode normalization. > > I think the key thing missing is

Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Jeff King
On Thu, Apr 21, 2016 at 08:37:32AM -0700, Junio C Hamano wrote: > >> > While we're at it, how about renaming it to pathcmp (and its friend > >> > strncmp_icase to pathncmp)? > >> > >> Yes, that seems like a good idea. For anyone familiar with > >> strcasecmp() or stricmp(), having "icase" in the

Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Junio C Hamano
Jeff King writes: > On Thu, Apr 21, 2016 at 10:23:09AM -0400, Eric Sunshine wrote: > >> > While we're at it, how about renaming it to pathcmp (and its friend >> > strncmp_icase to pathncmp)? >> >> Yes, that seems like a good idea. For anyone familiar with >> strcasecmp() or

Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Jeff King
On Thu, Apr 21, 2016 at 10:23:09AM -0400, Eric Sunshine wrote: > > While we're at it, how about renaming it to pathcmp (and its friend > > strncmp_icase to pathncmp)? > > Yes, that seems like a good idea. For anyone familiar with > strcasecmp() or stricmp(), having "icase" in the name makes it

Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Eric Sunshine
On Thu, Apr 21, 2016 at 5:33 AM, Duy Nguyen wrote: > On Thu, Apr 21, 2016 at 3:19 PM, Duy Nguyen wrote: >> On Thu, Apr 21, 2016 at 2:20 PM, Eric Sunshine >> wrote: >>> On Wed, Apr 20, 2016 at 9:24 AM, Nguyễn Thái Ngọc Duy

Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Duy Nguyen
On Thu, Apr 21, 2016 at 3:19 PM, Duy Nguyen wrote: > On Thu, Apr 21, 2016 at 2:20 PM, Eric Sunshine > wrote: >> On Wed, Apr 20, 2016 at 9:24 AM, Nguyễn Thái Ngọc Duy >> wrote: >>> Signed-off-by: Nguyễn Thái Ngọc Duy

Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Duy Nguyen
On Thu, Apr 21, 2016 at 2:20 PM, Eric Sunshine wrote: > On Wed, Apr 20, 2016 at 9:24 AM, Nguyễn Thái Ngọc Duy > wrote: >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- >> diff --git a/worktree.c b/worktree.c >> @@ -178,6 +182,18 @@

Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Eric Sunshine
On Wed, Apr 20, 2016 at 9:24 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/worktree.c b/worktree.c > @@ -178,6 +182,18 @@ struct worktree **get_worktrees(void) > } > ALLOC_GROW(list, counter + 1,

[PATCH v2 04/12] worktree.c: mark current worktree

2016-04-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- worktree.c | 18 +- worktree.h | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/worktree.c b/worktree.c index 360ba41..452f64a 100644 --- a/worktree.c +++ b/worktree.c @@ -2,6 +2,7 @@ #include