[PATCH] branch.c: simplify chain of if statements

2014-03-16 Thread Dragos Foianu
the same check in each of the four if statements. Signed-off-by: Dragos Foianu dragos.foi...@gmail.com --- branch.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/branch.c b/branch.c index 723a36b..e2fe455 100644 --- a/branch.c +++ b/branch.c

[GSoC 2014] git config API improvements

2014-03-16 Thread Dragos Foianu
Hello, My name is Dragos Foianu and I am an undergraduate student at University Politehnica of Bucharest in Romania. This is my final year and I'm planning on doing something more exciting than the simple assignments I get from the university. I have been working with git for quite some time

Re: [PATCH] branch.c: simplify chain of if statements

2014-03-17 Thread Dragos Foianu
Eric Sunshine sunshine at sunshineco.com writes: In fact, this change is not table-driven (emphasis on *driven*). It merely moves the strings into a table, but all the logic is still in the code. To be table-driven, the logic would be encoded in the table as well, and that logic would *drive*

Re: push fail

2014-03-17 Thread Dragos Foianu
shawn wilson ag4ve.us at gmail.com writes: How do I get more info here (and hopefully resolve this)? % git push To ssh://server/foo/repo.git ! [rejected]test - test (non-fast-forward) error: failed to push some refs to 'ssh://server/foo/repo.git' non-fast-forward means that

[PATCHv2] branch.c: simplify chain of if statements

2014-03-17 Thread Dragos Foianu
have a bug. Signed-off-by: Dragos Foianu dragos.foi...@gmail.com --- branch.c | 44 +--- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/branch.c b/branch.c index 723a36b..95645d5 100644 --- a/branch.c +++ b/branch.c @@ -54,6 +54,18 @@ void

Re: [BUG] Segfault on git describe

2014-03-19 Thread Dragos Foianu
Sylvestre Ledru sylvestre at mozilla.com writes: Hello, Trying to do some stats using the Firefox git repository (https://github.com/mozilla/gecko-dev), I found a bug on git describe. The following command will segfault: git describe --contains a9ff31aebd6dbda82a3c733a72eeeaa0b0525b96

Re: [PATCHv2] branch.c: simplify chain of if statements

2014-03-19 Thread Dragos Foianu
Eric Sunshine sunshine at sunshineco.com writes: Other submissions have computed this value mathematically without need for conditionals. For instance, we've seen: index = (!!origin 0) + (!!remote_is_branch 1) + (!!rebasing 2) as, well as the equivalent: index = !!origin +

[PATCH] diff: optimise parse_dirstat_params() to only compare strings when necessary

2014-03-19 Thread Dragos Foianu
the parameter is not a digit. Signed-off-by: Dragos Foianu dragos.foi...@gmail.com --- diff.c | 37 +++-- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/diff.c b/diff.c index e343191..733764e 100644 --- a/diff.c +++ b/diff.c @@ -84,20 +84,25 @@ static int

Re: [PATCH] diff: optimise parse_dirstat_params() to only compare strings when necessary

2014-03-19 Thread Dragos Foianu
I will send another version of this patch after review because there is an extra whitespace following the else statement. -- 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

Re: [BUG] Segfault on git describe

2014-03-22 Thread Dragos Foianu
Jeff King peff at peff.net writes: So I think we'd be happy to see it converted to an iterative process (probably with a stack on the heap). In addition to name-rev, I believe that tag --contains will recurse down the longest history path, too (I think there may have been experimental

[PATCH] describe: rewrite name_rev() iteratively

2014-04-06 Thread Dragos Foianu
on the heap, but the function no longer overflows the stack. Reported-by: Sylvestre Ledru sylves...@mozilla.com Signed-off-by: Dragos Foianu dragos.foi...@gmail.com --- builtin/name-rev.c | 176 ++-- 1 file changed, 128 insertions(+), 48 deletions(-) diff