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

2014-03-16 Thread Dragos Foianu
same check in each of the four if statements. Signed-off-by: Dragos Foianu --- 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 @@ -54,6 +54,14 @@ void

[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

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

2014-03-17 Thread Dragos Foianu
Eric Sunshine 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* the co

Re: push fail

2014-03-17 Thread Dragos Foianu
shawn wilson 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 --- 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 install_branch_config(int

Re: [BUG] Segfault on git describe

2014-03-19 Thread Dragos Foianu
Sylvestre Ledru 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 > > Pl

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

2014-03-19 Thread Dragos Foianu
Eric Sunshine 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 = !!orig

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

2014-03-19 Thread Dragos Foianu
parameter is not a digit. Signed-off-by: Dragos Foianu --- 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 parse_dirstat_params

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 http://vger.kernel.org/majordomo

Re: [BUG] Segfault on git describe

2014-03-22 Thread Dragos Foianu
Jeff King 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

[PATCH] describe: rewrite name_rev() iteratively

2014-04-06 Thread Dragos Foianu
ons on the heap, but the function no longer overflows the stack. Reported-by: Sylvestre Ledru Signed-off-by: Dragos Foianu --- builtin/name-rev.c | 176 ++-- 1 file changed, 128 insertions(+), 48 deletions(-) diff --git a/builtin/name-rev.c b/bu