Re: [PATCH][GSOC2014] add: Rewrite run_add_interactive to use struct argv_array

2014-03-18 Thread Junio C Hamano
Movchan Pavel writes: > Origin code are code with own realisation argv array editing. > It was changed, and code modified for using unified argv-array > realisation from argv-array.h. > Commit for Google Summer of Code 2014 > > Signed-off-by: Movchan Pavel > --- Thanks. "Commit for ..." is not

[PATCH][GSOC2014] add: Rewrite run_add_interactive to use struct argv_array

2014-03-18 Thread Movchan Pavel
Origin code are code with own realisation argv array editing. It was changed, and code modified for using unified argv-array realisation from argv-array.h. Commit for Google Summer of Code 2014 Signed-off-by: Movchan Pavel --- builtin/add.c | 21 ++--- 1 file changed, 10 insert

Re: [PATCH][GSOC2014] install_branch_config: change logical chain to lookup table

2014-03-16 Thread Eric Sunshine
bly be rejected. At any given time, there are many patch series in-flight which Junio has to juggle, and code churn increases possibility of conflict between them, which makes his job more difficult. > It appears that table-driven code might be more readable after all. > > [1]http://git.6

[PATCH][GSOC2014] install_branch_config: change logical chain to lookup table

2014-03-14 Thread TamerTas
e readable after all. [1]http://git.661346.n2.nabble.com/PATCH-GSOC2014-install-branch-config-change-logical-chain-to-lookup-table-tp7605550.html [2]http://git.661346.n2.nabble.com/PATCH-GSOC2014-install-branch-config-change-logical-chain-to-lookup-table-tp7605550p7605605.

Re: [PATCH][GSOC2014] install_branch_config: change logical chain to lookup table

2014-03-13 Thread Eric Sunshine
assuming you still do). > [1]: > http://git.661346.n2.nabble.com/PATCH-GSOC2014-changed-logical-chain-in-branch-c-to-lookup-tables-tp7605343p7605444.html > [2]: > http://git.661346.n2.nabble.com/PATCH-GSOC2014-changed-logical-chain-in-branch-c-to-lookup-tables-tp7605343p7605407.html &g

[PATCH][GSOC2014] install_branch_config: change logical chain to lookup table

2014-03-12 Thread TamerTas
making the format table-driven seems to be like an optional change. [1]: http://git.661346.n2.nabble.com/PATCH-GSOC2014-changed-logical-chain-in-branch-c-to-lookup-tables-tp7605343p7605444.html [2]: http://git.661346.n2.nabble.com/PATCH-GSOC2014-changed-logical-chain-in-branch-c-to-loo

Re: [PATCH][GSOC2014] changed logical chain in branch.c to lookup tables

2014-03-11 Thread Eric Sunshine
Thanks for the resubmission. Comments below. On Tue, Mar 11, 2014 at 7:33 AM, Tamer TAS wrote: > Subject: changed logical chain in branch.c to lookup tables Use imperative tone: "change" rather than "changed" Prefix the message with the part of the project you are touching. So, for instance, yo

Re: [PATCH][GSOC2014] changed logical chain in branch.c to lookup tables

2014-03-11 Thread Tamer TAS
ref %s."), - local, remote); - else - die("BUG: impossible combination of %d and %p", - remote_is_branch, origin); + printf_ln(setup_messages[msg_index], local, remote); } } -- 1.7.9.5 -

Re: [PATCH][GSOC2014] changed logical chain in branch.c to lookup tables

2014-03-10 Thread Eric Sunshine
On Mon, Mar 10, 2014 at 5:47 PM, Tamer TAS wrote: > Eric Sunshine wrote >> Even allowing internationalization of them (via N_() in the location[] >> and type[] tables) might not be sufficient since grammatical rules >> differ from language to language. > > I didn't fully understand what you meant

Re: [PATCH][GSOC2014] changed logical chain in branch.c to lookup tables

2014-03-10 Thread Tamer TAS
nalized before using _() in the if-else bodies, wouldn't it produce the same output if I were to use the same method for location[] and type[] tables? -- View this message in context: http://git.661346.n2.nabble.com/PATCH-GSOC2014-changed-logical-chain-in-branch-c-to-lookup-tables-tp760534

Re: [PATCH][GSOC2014] changed logical chain in branch.c to lookup tables

2014-03-10 Thread Eric Sunshine
On Mon, Mar 10, 2014 at 3:04 PM, TamerTas wrote: > Signed-off-by: TamerTas Thanks for the submission. It appears to be well executed. Read below for a concern about the approach taken. > --- > branch.c | 31 --- > 1 file changed, 8 insertions(+), 23 deletions(-) >

Re: [PATCH][GSOC2014] changed logical chain in branch.c to lookup tables

2014-03-10 Thread Stefan Beller
On 10.03.2014 20:04, TamerTas wrote: > > Signed-off-by: TamerTas > --- > branch.c | 31 --- > 1 file changed, 8 insertions(+), 23 deletions(-) > > diff --git a/branch.c b/branch.c > index 723a36b..397edd3 100644 > --- a/branch.c > +++ b/branch.c > @@ -50,6 +50,9 @@

[PATCH][GSOC2014]

2014-03-10 Thread TamerTas
I inspected branch.c:install_branch_config() and since the conditionals cover all the possibilities, I decided that making the code table-driven would be much cleaner and shorter. I've ran the tests and they all passed. Reimplementation using "git am" also didn't have any problems. Please let me k

[PATCH][GSOC2014] changed logical chain in branch.c to lookup tables

2014-03-10 Thread TamerTas
Signed-off-by: TamerTas --- branch.c | 31 --- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/branch.c b/branch.c index 723a36b..397edd3 100644 --- a/branch.c +++ b/branch.c @@ -50,6 +50,9 @@ static int should_setup_rebase(const char *origin) void i

Re: [PATCH] GSoC2014 Microproject rewrite finish_bulk_checkin()

2014-02-27 Thread Faiz Kothari
Hi, Thanks for the remarks. I'll stick to this micro project and follow the guidelines. Yes, the strbuf API is perfectly OK. I was not getting to work it properly, so I used malloc() / free() instead. My bad. I'll resubmit the patch. Thanks. On Fri, Feb 28, 2014 at 3:47 AM, Michael Haggerty wrote

Re: [PATCH] GSoC2014 Microproject rewrite finish_bulk_checkin()

2014-02-27 Thread Michael Haggerty
On 02/27/2014 08:02 PM, Faiz Kothari wrote: > Signed-off-by: Faiz Kothari > --- > bulk-checkin.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/bulk-checkin.c b/bulk-checkin.c > index 118c625..feeff9f 100644 > --- a/bulk-checkin.c > +++ b/bulk-checkin.c >

Re: [PATCH] GSoC2014 microprojects #6 Change bundle.c:add_to_ref_list() to use ALLOC_GROW()

2014-02-27 Thread Michael Haggerty
On 02/27/2014 05:18 PM, Sun He wrote: > Signed-off-by: Sun He > --- > bundle.c |6 +- > 1 files changed, 1 insertions(+), 5 deletions(-) > > diff --git a/bundle.c b/bundle.c > index 7809fbb..1a7b7eb 100644 > --- a/bundle.c > +++ b/bundle.c > @@ -14,11 +14,7 @@ static const char bundle_si

Re: [PATCH] GSoC2014 microprojects #5 Change bundle.c:add_to_ref_list() to use hashcpy()

2014-02-27 Thread Michael Haggerty
On 02/27/2014 03:58 PM, Sun He wrote: > Signed-off-by: Sun He > --- > bundle.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/bundle.c b/bundle.c > index e99065c..7809fbb 100644 > --- a/bundle.c > +++ b/bundle.c > @@ -19,7 +19,7 @@ static void add_to_ref_list(cons

Re: [PATCH] GSoC2014 microprojects Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packname

2014-02-27 Thread Michael Haggerty
On 02/27/2014 03:20 PM, Sun He wrote: > Signed-off-by: Sun He > --- > bulk-checkin.c | 10 +- > 1 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/bulk-checkin.c b/bulk-checkin.c > index 118c625..e3c7fb2 100644 > --- a/bulk-checkin.c > +++ b/bulk-checkin.c > @@ -23,7 +23

Re: [PATCH] GSoC2014 microprojects #6 Change bundle.c:add_to_ref_list() to use ALLOC_GROW()

2014-02-27 Thread Junio C Hamano
Sun He writes: > Signed-off-by: Sun He > --- The subject reads: >> Subject: [PATCH] GSoC2014 microprojects #6 Change bundle.c:add_to_ref_list() >> to use ALLOC_GROW() I do not think we want to see the leading part of it in our "git shortlog" outp

[PATCH] GSoC2014 Microproject rewrite finish_bulk_checkin()

2014-02-27 Thread Faiz Kothari
Signed-off-by: Faiz Kothari --- bulk-checkin.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bulk-checkin.c b/bulk-checkin.c index 118c625..feeff9f 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -23,7 +23,7 @@ static struct bulk_checkin_state { static vo

Re: [PATCH] GSoC2014 microprojects #6 Change bundle.c:add_to_ref_list() to use ALLOC_GROW()

2014-02-27 Thread Philip Oakley
From: "Sun He" Signed-off-by: Sun He --- bundle.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/bundle.c b/bundle.c index 7809fbb..1a7b7eb 100644 --- a/bundle.c +++ b/bundle.c @@ -14,11 +14,7 @@ static const char bundle_signature[] = "# v2 git bundle\n"; static

[PATCH] GSoC2014 microprojects #6 Change bundle.c:add_to_ref_list() to use ALLOC_GROW()

2014-02-27 Thread Sun He
Signed-off-by: Sun He --- bundle.c |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/bundle.c b/bundle.c index 7809fbb..1a7b7eb 100644 --- a/bundle.c +++ b/bundle.c @@ -14,11 +14,7 @@ static const char bundle_signature[] = "# v2 git bundle\n"; static void add_to_ref_

[PATCH] GSoC2014 microprojects #5 Change bundle.c:add_to_ref_list() to use hashcpy()

2014-02-27 Thread Sun He
Signed-off-by: Sun He --- bundle.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bundle.c b/bundle.c index e99065c..7809fbb 100644 --- a/bundle.c +++ b/bundle.c @@ -19,7 +19,7 @@ static void add_to_ref_list(const unsigned char *sha1, const char *name,

[PATCH] GSoC2014 microprojects Rewrite bulk-checkin.c:finish_bulk_checkin() to use a strbuf for handling packname

2014-02-27 Thread Sun He
Signed-off-by: Sun He --- bulk-checkin.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/bulk-checkin.c b/bulk-checkin.c index 118c625..e3c7fb2 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -23,7 +23,8 @@ static struct bulk_checkin_state { static void fin