Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Brian Gesiak
Oomph, how embarrassing. Thanks for pointing that out!

Would it be better if I rerolled the patches?

- Brian Gesiak

On Tue, May 27, 2014 at 12:25 PM, Eric Sunshine sunsh...@sunshineco.com wrote:
 On Mon, May 26, 2014 at 11:33 AM, Brian Gesiak modoca...@gmail.com wrote:
 xcalloc takes two arguments: the number of elements and their size.
 run_add_interactive passes the arguments in reverse order, passing the
 size of a char*, followed by the number of char* to be allocated.
 Rearrgange them so they are in the correct order.

 s/Rearrgange/Rearrange/

 Same misspelling afflicts the entire patch series.

 Signed-off-by: Brian Gesiak modoca...@gmail.com
 ---
  builtin/add.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/builtin/add.c b/builtin/add.c
 index 672adc0..488acf4 100644
 --- a/builtin/add.c
 +++ b/builtin/add.c
 @@ -248,7 +248,7 @@ int run_add_interactive(const char *revision, const char 
 *patch_mode,
 int status, ac, i;
 const char **args;

 -   args = xcalloc(sizeof(const char *), (pathspec-nr + 6));
 +   args = xcalloc((pathspec-nr + 6), sizeof(const char *));
 ac = 0;
 args[ac++] = add--interactive;
 if (patch_mode)
 --
 2.0.0.rc1.543.gc8042da
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Eric Sunshine
On Tue, May 27, 2014 at 7:32 AM, Brian Gesiak modoca...@gmail.com wrote:
 Oomph, how embarrassing. Thanks for pointing that out!

Etiquette on this list is to avoid top-posting [1].

[1]: https://lkml.org/lkml/2005/1/11/111

 Would it be better if I rerolled the patches?

Junio may or may not make small fixes himself when he picks up a patch
series. If you don't hear from him and your patches don't appear in
his 'pu' branch with that fix, re-rolling might be advisable.

 - Brian Gesiak

 On Tue, May 27, 2014 at 12:25 PM, Eric Sunshine sunsh...@sunshineco.com 
 wrote:
 On Mon, May 26, 2014 at 11:33 AM, Brian Gesiak modoca...@gmail.com wrote:
 xcalloc takes two arguments: the number of elements and their size.
 run_add_interactive passes the arguments in reverse order, passing the
 size of a char*, followed by the number of char* to be allocated.
 Rearrgange them so they are in the correct order.

If you do re-roll, perhaps consider simplifying the commit messages.
The patch itself states concisely and precisely what is being changed;
the lengthy prose description doesn't really add anything (and makes
more work for you and the reader of the message). It might be
sufficient to use a single-line (Subject:) commit message, like this:

builtin/add.c: fix order of xcalloc arguments

 s/Rearrgange/Rearrange/

 Same misspelling afflicts the entire patch series.

 Signed-off-by: Brian Gesiak modoca...@gmail.com
 ---
  builtin/add.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/builtin/add.c b/builtin/add.c
 index 672adc0..488acf4 100644
 --- a/builtin/add.c
 +++ b/builtin/add.c
 @@ -248,7 +248,7 @@ int run_add_interactive(const char *revision, const 
 char *patch_mode,
 int status, ac, i;
 const char **args;

 -   args = xcalloc(sizeof(const char *), (pathspec-nr + 6));
 +   args = xcalloc((pathspec-nr + 6), sizeof(const char *));
 ac = 0;
 args[ac++] = add--interactive;
 if (patch_mode)
 --
 2.0.0.rc1.543.gc8042da
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes:

 If you do re-roll, perhaps consider simplifying the commit messages.
 The patch itself states concisely and precisely what is being changed;
 the lengthy prose description doesn't really add anything (and makes
 more work for you and the reader of the message). It might be
 sufficient to use a single-line (Subject:) commit message, like this:

 builtin/add.c: fix order of xcalloc arguments

Yeah, I like that.

I do not think it is worth doing this change starting from maint, so
I've dropped this one and a few others that did not apply to master
and queued the remainder to 'pu'.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Jeremiah Mahler
On Tue, May 27, 2014 at 05:35:29PM -0400, Eric Sunshine wrote:
 On Tue, May 27, 2014 at 7:32 AM, Brian Gesiak modoca...@gmail.com wrote:
  Oomph, how embarrassing. Thanks for pointing that out!
 
 Etiquette on this list is to avoid top-posting [1].
 
 [1]: https://lkml.org/lkml/2005/1/11/111
 

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

That is the funniest post I have ever seen by Kroah.

-- 
Jeremiah Mahler
jmmah...@gmail.com
http://github.com/jmahler
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Brian Gesiak
On Wed, May 28, 2014 at 7:41 AM, Junio C Hamano gits...@pobox.com wrote:
 I do not think it is worth doing this change starting from maint, so
 I've dropped this one and a few others that did not apply to master
 and queued the remainder to 'pu'.

Thank you! I'll keep this in mind when choosing what to branch off of
in the future.

On Wed, May 28, 2014 at 6:35 AM, Eric Sunshine sunsh...@sunshineco.com wrote:
 Etiquette on this list is to avoid top-posting [1].
 ...
 If you do re-roll, perhaps consider simplifying the commit messages.

Thank you for the tips; very much appreciated.

- Brian Gesiak
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
xcalloc takes two arguments: the number of elements and their size.
run_add_interactive passes the arguments in reverse order, passing the
size of a char*, followed by the number of char* to be allocated.
Rearrgange them so they are in the correct order.

Signed-off-by: Brian Gesiak modoca...@gmail.com
---
 builtin/add.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/add.c b/builtin/add.c
index 672adc0..488acf4 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -248,7 +248,7 @@ int run_add_interactive(const char *revision, const char 
*patch_mode,
int status, ac, i;
const char **args;
 
-   args = xcalloc(sizeof(const char *), (pathspec-nr + 6));
+   args = xcalloc((pathspec-nr + 6), sizeof(const char *));
ac = 0;
args[ac++] = add--interactive;
if (patch_mode)
-- 
2.0.0.rc1.543.gc8042da

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-26 Thread Jeremiah Mahler
Brian,

On Tue, May 27, 2014 at 12:33:42AM +0900, Brian Gesiak wrote:
 xcalloc takes two arguments: the number of elements and their size.
 run_add_interactive passes the arguments in reverse order, passing the
 size of a char*, followed by the number of char* to be allocated.
 Rearrgange them so they are in the correct order.
 
 Signed-off-by: Brian Gesiak modoca...@gmail.com
 ---
  builtin/add.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/builtin/add.c b/builtin/add.c
 index 672adc0..488acf4 100644
 --- a/builtin/add.c
 +++ b/builtin/add.c
 @@ -248,7 +248,7 @@ int run_add_interactive(const char *revision, const char 
 *patch_mode,
   int status, ac, i;
   const char **args;
  
 - args = xcalloc(sizeof(const char *), (pathspec-nr + 6));
 + args = xcalloc((pathspec-nr + 6), sizeof(const char *));
   ac = 0;
   args[ac++] = add--interactive;
   if (patch_mode)
 

This patch doesn't apply to any of the branches I have available
(master, pu, next).  And there is no line containing pathspec-nr + 6
anywhere in my builtin/add.c.  Which branch is your work based off?

-- 
Jeremiah Mahler
jmmah...@gmail.com
http://github.com/jmahler
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-26 Thread Brian Gesiak
My apologies! I based my work off of maint, branching off of eea591.

My reasoning was that Documentation/SubmittingPatches states that a
bugfix should be based on 'maint'. [1] Now that I think about it,
this is probably not the kind of bug that statement had in mind.

Should I reroll the patch based on master?

- Brian Gesiak

[1] 
https://github.com/git/git/blob/4a28f169ad29ba452e0e7bea2583914c10c58322/Documentation/SubmittingPatches#L9

On Tue, May 27, 2014 at 8:11 AM, Jeremiah Mahler jmmah...@gmail.com wrote:
 Brian,

 On Tue, May 27, 2014 at 12:33:42AM +0900, Brian Gesiak wrote:
 xcalloc takes two arguments: the number of elements and their size.
 run_add_interactive passes the arguments in reverse order, passing the
 size of a char*, followed by the number of char* to be allocated.
 Rearrgange them so they are in the correct order.

 Signed-off-by: Brian Gesiak modoca...@gmail.com
 ---
  builtin/add.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/builtin/add.c b/builtin/add.c
 index 672adc0..488acf4 100644
 --- a/builtin/add.c
 +++ b/builtin/add.c
 @@ -248,7 +248,7 @@ int run_add_interactive(const char *revision, const char 
 *patch_mode,
   int status, ac, i;
   const char **args;

 - args = xcalloc(sizeof(const char *), (pathspec-nr + 6));
 + args = xcalloc((pathspec-nr + 6), sizeof(const char *));
   ac = 0;
   args[ac++] = add--interactive;
   if (patch_mode)


 This patch doesn't apply to any of the branches I have available
 (master, pu, next).  And there is no line containing pathspec-nr + 6
 anywhere in my builtin/add.c.  Which branch is your work based off?

 --
 Jeremiah Mahler
 jmmah...@gmail.com
 http://github.com/jmahler
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-26 Thread Jeremiah Mahler
On Tue, May 27, 2014 at 11:22:00AM +0900, Brian Gesiak wrote:
 My apologies! I based my work off of maint, branching off of eea591.
 
 My reasoning was that Documentation/SubmittingPatches states that a
 bugfix should be based on 'maint'. [1] Now that I think about it,
 this is probably not the kind of bug that statement had in mind.
 
 Should I reroll the patch based on master?
 
 - Brian Gesiak
 
 [1] 
 https://github.com/git/git/blob/4a28f169ad29ba452e0e7bea2583914c10c58322/Documentation/SubmittingPatches#L9
 

OK, got it.  I should have read Documentation/SubmittingPatches more
closely like you did :-)  No need to reroll I can just use the maint
branch to test it out.  Thanks!

-- 
Jeremiah Mahler
jmmah...@gmail.com
http://github.com/jmahler
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-26 Thread Eric Sunshine
On Mon, May 26, 2014 at 11:33 AM, Brian Gesiak modoca...@gmail.com wrote:
 xcalloc takes two arguments: the number of elements and their size.
 run_add_interactive passes the arguments in reverse order, passing the
 size of a char*, followed by the number of char* to be allocated.
 Rearrgange them so they are in the correct order.

s/Rearrgange/Rearrange/

Same misspelling afflicts the entire patch series.

 Signed-off-by: Brian Gesiak modoca...@gmail.com
 ---
  builtin/add.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/builtin/add.c b/builtin/add.c
 index 672adc0..488acf4 100644
 --- a/builtin/add.c
 +++ b/builtin/add.c
 @@ -248,7 +248,7 @@ int run_add_interactive(const char *revision, const char 
 *patch_mode,
 int status, ac, i;
 const char **args;

 -   args = xcalloc(sizeof(const char *), (pathspec-nr + 6));
 +   args = xcalloc((pathspec-nr + 6), sizeof(const char *));
 ac = 0;
 args[ac++] = add--interactive;
 if (patch_mode)
 --
 2.0.0.rc1.543.gc8042da
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html