Re: multiple source file extensions

2015-05-01 Thread Jeff King
On Sat, May 02, 2015 at 09:11:16AM +0700, Duy Nguyen wrote: > On Sat, May 2, 2015 at 9:04 AM, Duy Nguyen wrote: > > On Fri, May 01, 2015 at 09:11:01PM -0400, Jeff King wrote: > >> Unfortunately there is no way to use curly braces with git's pathspec, > >> so you have to write out three separate `

[PATCH 11/12] for-each-ref: use skip_prefix instead of starts_with

2015-05-01 Thread Jeff King
This saves us having to maintain a magic number to skip past the matched prefix. Signed-off-by: Jeff King --- Noticed because I'm adding similar code in the next patch... builtin/for-each-ref.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builtin/for-each-ref.c b/bu

[PATCH 09/12] sha1_name: refactor interpret_upstream_mark

2015-05-01 Thread Jeff King
Now that most of the logic for our local get_upstream_branch has been pushed into the generic branch_get_upstream, we can fold the remainder into interpret_upstream_mark. Furthermore, what remains is generic to any branch-related "@{foo}" we might add in the future, and there's enough boilerplate

[PATCH v2 0/12] implement @{push} shorthand

2015-05-01 Thread Jeff King
This is a re-roll of the series at: http://thread.gmane.org/gmane.comp.version-control.git/266532 There were some minor fixes in response to review, but the main change here is support for "git for-each-ref --format=%(push)". To do that, I pulled the push logic into remote.[ch], where it can be

Re: [PATCH] checkout-index.c: Unconditionally free memory

2015-05-01 Thread Jeff King
On Fri, May 01, 2015 at 03:33:13PM -0700, Stefan Beller wrote: > > Probably all of the other sites touched by be65e7d could use the same > > treatment. > > I looked around, just as Eric suggested as well and found those too. > I don't think I'll track down the history of when this change became p

Re: Diffing submodule does not yield complete logs for merge commits

2015-05-01 Thread Heiko Voigt
Hi, On Wed, Apr 29, 2015 at 03:53:11PM -0500, Robert Dailey wrote: > I am attempting to diff a submodule modified in my working copy and > the only difference is a merge commit. However, I do not get the > "full" range of commits introduced by the merge commit when I diff it: > > $ git diff --sub

Re: Patch that modifies git usage message

2015-05-01 Thread Stefan Beller
On Fri, May 1, 2015 at 9:38 AM, Alangi Derick wrote: > Can't i change the "cannot" to "Cannot"? Or is there a problem with > that one too? Well maybe you can make a strong argument for changing it like you'd find it inconsistencies in different spots. If you're in the game just to change a thing

Re: Patch that modifies git usage message

2015-05-01 Thread Junio C Hamano
Stefan Beller writes: > For the patch itself: > > $ grep -r usage *.c builtin/*.c |wc -l > 551 > $ grep -r Usage *.c builtin/*.c |wc -l > 3 > > The community agreed (maybe subconciously) to prefer lower case > for the 'usage' string, so I don't think this is an improvement. I tend to agree with

Re: Patch that modifies git usage message

2015-05-01 Thread Alangi Derick
I am saying so because there are some strings with upper case letters and others with lower case letters. So there is no consistency. That is why i wanted to keep the consistency by correcting the letters which are to be corrected and allow the once which are to be allowed. Regards Alangi Derick Nd

[PATCH v1] Improving code base readability

2015-05-01 Thread Alangi Derick
This is an example of what i am talking about or what i am trying to demonstrate. This is the patch: --- archive-tar.c | 10 +- archive-zip.c | 12 ++-- base85.c| 14 +++--- builtin/mv.c| 4 ++-- builtin/notes.c | 36 ++-- b

[PATCH 15/18] rename_ref(): integrate lock_ref_sha1_basic() errors into ours

2015-05-01 Thread Michael Haggerty
Now that lock_ref_sha1_basic() gives us back its error messages via a strbuf, incorporate its error message into our error message rather than emitting two separate error messages. Signed-off-by: Michael Haggerty --- refs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH 17/18] ref_transaction_commit(): delete extra "the" from error message

2015-05-01 Thread Michael Haggerty
While we are in the area, let's remove a superfluous definite article from the error message that is emitted when the reference cannot be locked. This improves how it reads and makes it a bit shorter. Signed-off-by: Michael Haggerty --- refs.c| 2 +- t/t1400-update-ref.sh | 14 +

[PATCH 06/18] report_refname_conflict(): inline function

2015-05-01 Thread Michael Haggerty
It wasn't pulling its weight. And we are about to need code similar to this where no ref_entry is available and with more diverse error messages. Rather than try to generalize the function, just inline it. Signed-off-by: Michael Haggerty --- refs.c | 10 ++ 1 file changed, 2 insertions(+

[PATCH 14/18] lock_ref_sha1_basic(): improve diagnostics for D/F conflicts

2015-05-01 Thread Michael Haggerty
If there is a failure to lock that is likely caused by a D/F conflict, invoke verify_refname_available() to try to generate a more helpful error message. If that function doesn't detect an error (which could happen if, for example, some non-reference file is blocking the deletion of an otherwise-em

Patch that modifies git usage message

2015-05-01 Thread Alangi Derick
This patch just modifies the "usage" word to "Usage" which enhances readability. Below is the patch Regards Alangi Derick Ndimnain diff --git a/git.c b/git.c index 42a4ee5..481aa74 100644 --- a/git.c +++ b/git.c @@ -667,7 +667,7 @@ int main(int argc, char **av) } else { /* The user didn't spe