Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 7:38 PM Junio C Hamano wrote: > > Duy Nguyen writes: > > >> 4) eventually (in the very long run), we'd change the signature of > >> all commands from cmd_foo(int argc, char argv, char *prefix) > >> to cmd_foo(int argc, char argv, struct repository *repo) > >> > >> you

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Junio C Hamano
Duy Nguyen writes: >> 4) eventually (in the very long run), we'd change the signature of >> all commands from cmd_foo(int argc, char argv, char *prefix) >> to cmd_foo(int argc, char argv, struct repository *repo) >> >> you seem to be interested in removing the_repository from branch.c, >>

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 7:20 PM Junio C Hamano wrote: > I also do not think remove_branch_state() function belongs to > branch.c in the first place. The state it is clearing is not even > about a "branch". It is state left by the last command that stopped > in the middle; its only callers are

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Aug 15, 2018 at 6:48 PM Elijah Newren wrote: >> >> On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy >> wrote: >> >> The patch looks good, but since this touches multiple .c files, I >> think I'd s/branch.c/branch/ in the subject line. > > It is about removing

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 6:58 PM Stefan Beller wrote: > > On Wed, Aug 15, 2018 at 9:53 AM Duy Nguyen wrote: > > > > On Wed, Aug 15, 2018 at 6:48 PM Elijah Newren wrote: > > > > > > On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy > > > wrote: > > > > > > The patch looks good, but since

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Stefan Beller
On Wed, Aug 15, 2018 at 9:53 AM Duy Nguyen wrote: > > On Wed, Aug 15, 2018 at 6:48 PM Elijah Newren wrote: > > > > On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy > > wrote: > > > > The patch looks good, but since this touches multiple .c files, I > > think I'd s/branch.c/branch/ in the

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 6:48 PM Elijah Newren wrote: > > On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy > wrote: > > The patch looks good, but since this touches multiple .c files, I > think I'd s/branch.c/branch/ in the subject line. It is about removing the_repository from branch.c

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Elijah Newren
On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy wrote: The patch looks good, but since this touches multiple .c files, I think I'd s/branch.c/branch/ in the subject line. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > branch.c | 22 -- > branch.h

[PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- branch.c | 22 -- branch.h | 7 +-- builtin/am.c | 2 +- builtin/branch.c | 6 -- builtin/checkout.c | 5 +++-- builtin/reset.c| 2 +- 6 files changed, 26 insertions(+), 18 deletions(-) diff