Re: [PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-05-30 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: There you have it: Look the other way for a while, and people start using exotic stuff... ;) Is it exotic to have random/srandom? Both are in POSIX and 4BSD; admittedly rand/srand are written down in C89 and later, so they might be more portable, but I

[WIP/PATCH v4 4/8] for-each-ref: introduce new structures for better organisation

2015-05-30 Thread Karthik Nayak
Intoduce 'ref_filter_cbdata' which will hold 'ref_filter' (Conditions to filter the refs on) and 'ref_array' (The array of ref_array_items). Modify the code to use these new structures. This is a preparatory patch to eventually move code from 'for-each-ref' to 'ref-filter' and making it

[WIP/PATCH v4 3/8] for-each-ref: rename 'refinfo' to 'ref_array_item'

2015-05-30 Thread Karthik Nayak
Rename 'refinfo' to 'ref_array_item' as a preparatory step for introduction of new structures in the forthcoming patch. Re-order the fields in 'ref_array_item' so that refname can be eventually converted to a FLEX_ARRAY. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by:

[WIP/PATCH v4 2/8] for-each-ref: simplify code

2015-05-30 Thread Karthik Nayak
In 'grab_single_ref()' remove the extra count variable 'cnt' and use the variable 'grab_cnt' of structure 'grab_ref_cbdata' directly instead. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak

[WIP/PATCH v4 1/8] for-each-ref: extract helper functions out of grab_single_ref()

2015-05-30 Thread Karthik Nayak
Extract two helper functions out of grab_single_ref(). Firstly, new_refinfo() which is used to allocate memory for a new refinfo structure and copy the objectname, refname and flag to it. Secondly, match_name_as_path() which when given an array of patterns and the refname checks if the refname

[WIP/PATCH v4 5/8] for-each-ref: introduce 'ref_filter_clear_data()'

2015-05-30 Thread Karthik Nayak
Introduce and implement 'ref_filter_clear_data()' which will free all allocated memory for 'ref_filter_cbdata' and its underlying array of 'ref_array_item'. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak

[WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-30 Thread Karthik Nayak
Rename some of the functions and make them publically available. This is a preparatory step for moving code from 'for-each-ref' to 'ref-filter' to make meaningful, targeted services available to other commands via public APIs. Based-on-patch-by: Jeff King p...@peff.net Mentored-by: Christian

[WIP/PATCH v4 8/8] ref-filter: add 'ref-filter.h'

2015-05-30 Thread Karthik Nayak
Create 'ref-filter.h', also add ref-filter to the Makefile. This completes movement of creation of 'ref-filter' from 'for-each-ref'. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com

[WIP/PATCH v4 7/8] ref-filter: move code from 'for-each-ref'

2015-05-30 Thread Karthik Nayak
Move most of the code from 'for-each-ref' to 'ref-filter' to make it publicly available to other commands, this is to unify the code of 'tag -l', 'branch -l' and 'for-each-ref' so that they can share their implementations with each other. Mentored-by: Christian Couder christian.cou...@gmail.com

Re: [PATCH v2 1/2] completion: Add sequencer function

2015-05-30 Thread SZEDER Gábor
Quoting Thomas Braun thomas.br...@virtuell-zuhause.de: Signed-off-by: Thomas Braun thomas.br...@virtuell-zuhause.de --- contrib/completion/git-completion.bash | 48 +++--- 1 file changed, 33 insertions(+), 15 deletions(-) I don't see the benefits of this

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

2015-05-30 Thread Robert Dailey
On Sat, May 30, 2015 at 2:19 PM, Robert Dailey rcdailey.li...@gmail.com wrote: On Sat, May 30, 2015 at 12:04 PM, Junio C Hamano gits...@pobox.com wrote: Robert Dailey rcdailey.li...@gmail.com writes: In the meantime I'd like to ask, do we even need to add an option for this? What if we just

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

2015-05-30 Thread Junio C Hamano
Robert Dailey rcdailey.li...@gmail.com writes: On Sat, May 30, 2015 at 12:04 PM, Junio C Hamano gits...@pobox.com wrote: Robert Dailey rcdailey.li...@gmail.com writes: In the meantime I'd like to ask, do we even need to add an option for this? What if we just make `diff.submodule log` not

Re: [PATCH] blame: add blame.showemail config option

2015-05-30 Thread Quentin Neill
On Fri, May 29, 2015 at 2:40 PM, Junio C Hamano gits...@pobox.com wrote: Quentin Neill quentin.ne...@gmail.com writes: Thanks for the thorough review! I have adjusted the commit messages and updated the documentation changes. I'm in trying to add tests, I'll probably have some issues but

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-30 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: On Fri, May 29, 2015 at 4:17 PM, Junio C Hamano gits...@pobox.com wrote: By default, we should run clean-up after the editor we spawned gives us the edited result. Not adding one more LF after the template when it already ends with LF would not

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

2015-05-30 Thread Junio C Hamano
Robert Dailey rcdailey.li...@gmail.com writes: In the meantime I'd like to ask, do we even need to add an option for this? What if we just make `diff.submodule log` not use --first-parent? This seems like a backward compatible change in of itself. Why? People have relied on submodule-log

[WIP/PATCH v4 0/8] ref-filter: move code from for-each-ref

2015-05-30 Thread Karthik Nayak
Hello, After the third iteration of this WIP/PATCH series ($gmane/270164). This is a follow up. Changes, * Subdivided some patches. * Spelling corrections. * Small changes. Thanks all for suggestions. -- Regards, Karthik -- To unsubscribe from this list: send the line

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

2015-05-30 Thread Robert Dailey
On Sat, May 30, 2015 at 12:04 PM, Junio C Hamano gits...@pobox.com wrote: Robert Dailey rcdailey.li...@gmail.com writes: In the meantime I'd like to ask, do we even need to add an option for this? What if we just make `diff.submodule log` not use --first-parent? This seems like a backward

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

2015-05-30 Thread Robert Dailey
On Sat, May 30, 2015 at 2:54 PM, Junio C Hamano gits...@pobox.com wrote: Robert Dailey rcdailey.li...@gmail.com writes: On Sat, May 30, 2015 at 12:04 PM, Junio C Hamano gits...@pobox.com wrote: Robert Dailey rcdailey.li...@gmail.com writes: In the meantime I'd like to ask, do we even need to

[PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-05-30 Thread Johannes Sixt
On Windows, we do not have functions srandom() and random(). Use srand() and rand(). These functions produce random numbers of lesser quality, but for the purpose (a retry time-out) they are still good enough. Signed-off-by: Johannes Sixt j...@kdbg.org --- There you have it: Look the other way

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-30 Thread Eric Sunshine
On Sat, May 30, 2015 at 7:29 AM, Patryk Obara patryk.ob...@gmail.com wrote: On Thu, May 28, 2015 at 4:29 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Did you consider the alternate approach of handling newline processing immediately upon loading 'logfile' and 'template_file', rather than

[PATCH v2] blame: add blame.showEmail configuration

2015-05-30 Thread Quentin Neill
From: Quentin Neill quentin.ne...@gmail.com Complement existing --show-email option with fallback configuration variable, with tests. --- Documentation/git-blame.txt | 2 ++ builtin/blame.c | 10 +++- t/t8002-blame.sh| 62 +

Re: [WIP/PATCH v4 8/8] ref-filter: add 'ref-filter.h'

2015-05-30 Thread Eric Sunshine
On Sat, May 30, 2015 at 1:53 PM, Karthik Nayak karthik@gmail.com wrote: Create 'ref-filter.h', also add ref-filter to the Makefile. This completes movement of creation of 'ref-filter' from 'for-each-ref'. It's important that the project can be built successfully and function correctly at

Re: [WIP/PATCH v4 4/8] for-each-ref: introduce new structures for better organisation

2015-05-30 Thread Eric Sunshine
On Sat, May 30, 2015 at 1:53 PM, Karthik Nayak karthik@gmail.com wrote: Intoduce 'ref_filter_cbdata' which will hold 'ref_filter' s/Intoduce/Introduce/ (Conditions to filter the refs on) and 'ref_array' (The array s/Conditions/conditions/ s/The/the/ of ref_array_items). Modify the code

Re: [WIP/PATCH v4 1/8] for-each-ref: extract helper functions out of grab_single_ref()

2015-05-30 Thread Eric Sunshine
On Sat, May 30, 2015 at 1:53 PM, Karthik Nayak karthik@gmail.com wrote: Extract two helper functions out of grab_single_ref(). Firstly, new_refinfo() which is used to allocate memory for a new refinfo structure and copy the objectname, refname and flag to it. Secondly, match_name_as_path()

Re: Staging commits with visual diff tools?

2015-05-30 Thread David Aguilar
On Tue, May 26, 2015 at 09:50:49PM +0100, John Lee wrote: Hi Does anybody have code to stage commits using a the visual diff/merge tools supported by git-difftool? Is there support in git itself somewhere, even? I'm looking for something functionally similar to git add -p Looking at

Re: [WIP/PATCH v4 6/8] for-each-ref: rename some functions and make them public

2015-05-30 Thread Eric Sunshine
On Sat, May 30, 2015 at 1:53 PM, Karthik Nayak karthik@gmail.com wrote: Rename some of the functions and make them publically available. s/publically/publicly/ This is a preparatory step for moving code from 'for-each-ref' to 'ref-filter' to make meaningful, targeted services available to

Re: [PATCH 00/14] Make git-pull a builtin

2015-05-30 Thread Paul Tan
Hi, On Tue, May 19, 2015 at 3:21 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: This series rewrites git-pull.sh into a C builtin, thus improving its performance and portability. It is part of my GSoC project to rewrite git-pull and git-am into builtins[2].

Re: [PATCH 00/14] Make git-pull a builtin

2015-05-30 Thread Paul Tan
On Sat, May 30, 2015 at 3:29 PM, Paul Tan pyoka...@gmail.com wrote: Hi, Okay, I'm trying this out in the next re-roll. I do agree that this patch series should not touch anything in t/ at all. One problem(?) is that putting builtins/pull.o in the BUILTIN_OBJS and leaving git-pull.sh in

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

2015-05-30 Thread Heiko Voigt
On Fri, May 29, 2015 at 09:18:11PM -0500, Robert Dailey wrote: So I am working on trying to setup my environment (VM through Virtual Box) to do some testing on this. You all have encouraged me to try the mailing list review model. So I won't give up yet. I am not sure you need a VM or Linux

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-30 Thread Patryk Obara
@Eric, Junio Thank you a lot for feedback - should I post new set of patches as new thread with new cover letter, or reply to first mail in this thread? On Thu, May 28, 2015 at 4:29 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Did you consider the alternate approach of handling newline

Re: [PATCH] clean: remove unused variable buf

2015-05-30 Thread Jiang Xin
2015-05-20 6:13 GMT+08:00 René Scharfe l@web.de: It had never been used. Confirmed. The unused buf should be removed. Signed-off-by: Rene Scharfe l@web.de --- builtin/clean.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c index

[PATCH v2 2/2] completion: suggest sequencer commands for revert

2015-05-30 Thread Thomas Braun
Signed-off-by: Thomas Braun thomas.br...@virtuell-zuhause.de --- contrib/completion/git-completion.bash | 8 1 file changed, 8 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index f6e5bf6..486c61b 100644 ---

[PATCH v2 0/2] completion: sequencer commands

2015-05-30 Thread Thomas Braun
Ramkumar Ramachandra wrote: Junio C Hamano wrote: contrib/completion/git-completion.bash | 5 + 1 file changed, 5 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index bfc74e9..3c00acd 100644 ---

[PATCH v2 1/2] completion: Add sequencer function

2015-05-30 Thread Thomas Braun
Signed-off-by: Thomas Braun thomas.br...@virtuell-zuhause.de --- contrib/completion/git-completion.bash | 48 +++--- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index

[PATCH v2 1/2] completion: Add sequencer function

2015-05-30 Thread Thomas Braun
Signed-off-by: Thomas Braun thomas.br...@virtuell-zuhause.de --- contrib/completion/git-completion.bash | 48 +++--- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index