[PATCH v5 1/2] refs.c: optimize check_refname_component()

2014-06-02 Thread David Turner
In a repository with many refs, check_refname_component can be a major contributor to the runtime of some git commands. One such command is git rev-parse HEAD Timings for one particular repo, with about 60k refs, almost all packed, are: Old: 35 ms New: 29 ms Many other commands which read refs

[PATCH v5 2/2] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-02 Thread David Turner
Optimize check_refname_component using SSE4.2, where available. git rev-parse HEAD is a good test-case for this, since it does almost nothing except parse refs. For one particular repo with about 60k refs, almost all packed, the timings are: Look up table: 29 ms SSE4.2:25 ms This is

Re: [PATCH] sideband.c: Get rid of ANSI sequences for non-terminal shell

2014-06-02 Thread Jeff King
On Fri, May 30, 2014 at 11:10:51PM +, Naumov, Michael (North Sydney) wrote: Some git tools such as GitExtensions for Windows use environment variable TERM=msys which causes the weird ANSI sequence shown for the messages returned from server-side hooks We add those ANSI sequences to help

Re: [ANNOUNCE] Git v2.0.0

2014-06-02 Thread Jeff King
On Sat, May 31, 2014 at 11:52:24AM +0200, David Kastrup wrote: Some mailing list filters and/or spam filters flag mails with too many recipients so that they need to pass through moderation first. The typical threads on this list are short and have few recipients while longer threads, due to

Re: [PATCH] Improve function dir.c:trim_trailing_spaces()

2014-06-02 Thread Jeff King
On Sat, May 31, 2014 at 08:21:31AM -0700, Pasha Bolokhov wrote: + char *p, *last_space = NULL; + + for (p = buf; *p; p++) + if (*p == ' ') { + if (!last_space) + last_space = p; + } else { +

Re: [ANNOUNCE] Git v2.0.0

2014-06-02 Thread Felipe Contreras
Jeff King wrote: On Sat, May 31, 2014 at 11:52:24AM +0200, David Kastrup wrote: And frankly, if I were a list moderator and software asked me through this sort of coincidence whether a mail should be delivered or not and a glance at it shows nothing but insults, wild accusations, threats

Re: feature request - implement a GIT_AUTHOR_EMAIL equivalent, but processed BEFORE .gitconfig

2014-06-02 Thread Jeff King
On Fri, May 30, 2014 at 02:35:37PM -0700, Junio C Hamano wrote: Nathan's installation can set a GIT_MYSELF and then have something like this in the shared $HOME/.gitconfig [include] path = /usr/local/users/$GIT_MYSELF/ident we could even make the whole thing fail when

Re: [PATCH] request-pull: resurrect for-linus - tags/for-linus DWIM

2014-06-02 Thread Johannes Sixt
Am 5/16/2014 19:57, schrieb Junio C Hamano: --- a/t/t5150-request-pull.sh +++ b/t/t5150-request-pull.sh @@ -223,7 +223,13 @@ test_expect_success 'pull request format' ' git request-pull initial $downstream_url tags/full:refs/tags/full ) request sed -nf fuzz.sed

[no subject]

2014-06-02 Thread Administrator System ®
-- Kedves felhasználók e-mailben; Túllépte 23432 box set Web Service / Admin, és akkor nem lesz probléma a küldő és fogadhat e-maileket, amíg újra ellenőrizni. Kérjük, frissítse kattintva linkre, és töltse ki az adatokat, hogy ellenőrizze a számla Kérjük, kövesse az alábbi linkre, és majd

Re: [PATCH] string-list.h: Add a value to string_list initializer lists

2014-06-02 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: Add a NULL value in the end of STRING_LIST_INIT_NODUP and STRING_LIST_DUP to initialize `compare_strings_fn`. Signed-off-by: Tanay Abhra tanay...@gmail.com --- When I used a malloced string_list to play around with string-list API and used the default

Re: [PATCH v3 0/9] replace signal() with sigaction()

2014-06-02 Thread Johannes Sixt
Am 6/1/2014 20:10, schrieb Jeremiah Mahler: This is version 3 of the patch set to convert signal(2) to sigaction(2) (previous discussion [1]). [1]: http://marc.info/?l=gitm=140148352416926w=2 Changes in this revision include: - Using NULL pointers instead of 0 as per the

[PATCH] config: Add documentation for writing config files

2014-06-02 Thread Tanay Abhra
Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Documentation/technical/api-config.txt b/Documentation/technical/api-config.txt index 230b3a0..df08385

Re: [PATCH v3 0/9] replace signal() with sigaction()

2014-06-02 Thread Jeremiah Mahler
Hannes, On Mon, Jun 02, 2014 at 01:28:25PM +0200, Johannes Sixt wrote: Am 6/1/2014 20:10, schrieb Jeremiah Mahler: This is version 3 of the patch set to convert signal(2) to sigaction(2) (previous discussion [1]). ... sigchain.c: replace signal() with sigaction() The series without

[RFC/PATCH v2 0/2] Git config cache special querying api utilizing the cache

2014-06-02 Thread Tanay Abhra
Hi, [V2]: Improved according to the suggestions by Eric Sunshine and Torsten Bogershausen. Added cache invalidation when config file is changed. I am using git_config_set_multivar_in_file() as an update hook. This is my first patch series for this year's GSoC. My project is Git

[RFC/PATCH v2 2/2] config: Add new query functions to the api docs

2014-06-02 Thread Tanay Abhra
Add explanations for `git_config_get_string_multi` and `git_config_get_string` which utilize the config hash table for querying in a non-callback manner for a specific variable. Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 18 ++ 1

[RFC/PATCH v2 1/2] config: Add hashtable for config parsing retrieval

2014-06-02 Thread Tanay Abhra
Add a hash table to cache all key-value pairs read from config files (repo specific .git/config, user wide ~/.gitconfig and the global /etc/gitconfig). Add two external functions `git_config_get_string` and `git_config_get_string_multi` for querying in a non-callback manner from the hash table.

Re: [PATCH nd/split-index] fixup! read-cache: new API write_locked_index instead of write_index/write_cache

2014-06-02 Thread Ramsay Jones
On 01/06/14 01:47, Nguyễn Thái Ngọc Duy wrote: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- I intended it resend the series after the comments I received, but it looks like Junio has picked up all comments except this one, so here's the fix. sequencer.c | 2 +- 1 file

[PATCH] fetch doc: Move FETCH_HEAD material, and add an example.

2014-06-02 Thread Marc Branchaud
Signed-off-by: Marc Branchaud marcn...@xiplink.com --- Documentation/git-fetch.txt | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) This patch applies on top of your 1/5. It: * De-emphasizes the FETCH_HEAD stuff by moving it to the end of the DESCRIPTION

Re: [PATCH 2/5] fetch doc: update note on '+' in front of the refspec

2014-06-02 Thread Marc Branchaud
On 14-05-30 01:54 PM, Junio C Hamano wrote: Marc Branchaud marcn...@xiplink.com writes: Then start the next sentence with In this case, you would want I somehow find that in this case redundant, given that for such branches already limits the scope of the suggestion. I dunno.

[PATCH] environment: enable core.preloadindex by default

2014-06-02 Thread Steve Hoelzer
There is consensus that the default should change because it will benefit nearly all users (some just a little, but some a lot). See [1] and replies. [1]: http://git.661346.n2.nabble.com/git-status-takes-30-seconds-on-Windows-7-Why-tp7580816p7580853.html Signed-off-by: Steve Hoelzer

[PATCH alt-v2] Improve function dir.c:trim_trailing_spaces()

2014-06-02 Thread Pasha Bolokhov
Discard the unnecessary 'nr_spaces' variable, remove 'strlen()' and improve the 'if' structure. Switch to pointers instead of integers Slightly more rare occurrences of 'text \' with a backslash in between spaces are handled correctly. Namely, the code in 8ba87adad6 does not reset

Re: [PATCH] sideband.c: Get rid of ANSI sequences for non-terminal shell

2014-06-02 Thread Junio C Hamano
Naumov, Michael (North Sydney) michael.nau...@fiserv.com writes: You either want to correct the From: header that appears in e-mails from you, or want to start your body of your patch message like this: From: Michael Naumov mnaou...@gmail.com Some git tools such as

Re: [PATCH] request-pull: resurrect for-linus - tags/for-linus DWIM

2014-06-02 Thread Junio C Hamano
Johannes Sixt j.s...@viscovery.net writes: Am 5/16/2014 19:57, schrieb Junio C Hamano: --- a/t/t5150-request-pull.sh +++ b/t/t5150-request-pull.sh @@ -223,7 +223,13 @@ test_expect_success 'pull request format' ' git request-pull initial $downstream_url tags/full:refs/tags/full

Re: [PATCH] refs.c: change read_ref_at to use the reflog iterators

2014-06-02 Thread Ronnie Sahlberg
On Fri, May 30, 2014 at 2:59 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: read_ref_at has its own parsing of the reflog file for no really good reason so lets change this to use the existing reflog iterators. This removes one instance where we

[PATCH] refs.c: change read_ref_at to use the reflog iterators

2014-06-02 Thread Ronnie Sahlberg
read_ref_at has its own parsing of the reflog file for no really good reason so lets change this to use the existing reflog iterators. This removes one instance where we manually unmarshall the reflog file format. Log messages for errors are changed slightly. We no longer print the file name for

Re: [PATCH] fetch doc: Move FETCH_HEAD material, and add an example.

2014-06-02 Thread Junio C Hamano
Marc Branchaud marcn...@xiplink.com writes: Signed-off-by: Marc Branchaud marcn...@xiplink.com --- Documentation/git-fetch.txt | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) This patch applies on top of your 1/5. It: * De-emphasizes the FETCH_HEAD

Re: [PATCH] Makefile: don't hardcode HEAD in dist target

2014-06-02 Thread Junio C Hamano
Dennis Kaarsemaker den...@kaarsemaker.net writes: Instead of calling git-archive HEAD^{tree}, use $(GIT_VERSION)^{tree}. This makes sure the archive name and contents are consistent, if HEAD has moved, but GIT-VERSION-FILE hasn't been regenerated yet. Signed-off-by: Dennis Kaarsemaker

Re: [PATCH v3 0/9] replace signal() with sigaction()

2014-06-02 Thread Junio C Hamano
Johannes Sixt j.s...@viscovery.net writes: Jeremiah Mahler (9): compat/mingw.c: expand MinGW support for sigaction connect.c: replace signal() with sigaction() progress.c: replace signal() with sigaction() write_or_die.c: replace signal() with sigaction() daemon.c: replace

Re: [PATCH v2 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-02 Thread Christian Couder
From: Eric Sunshine sunsh...@sunshineco.com On Sun, Jun 1, 2014 at 11:10 AM, Christian Couder chrisc...@tuxfamily.org wrote: +test -f $GRAFTS_FILE || die Could not find graft file: '$GRAFTS_FILE' + +grep '^[^# ]' $GRAFTS_FILE | while read definition +do + test -n $definition { +

Re: [RFC/PATCH v2 1/2] config: Add hashtable for config parsing retrieval

2014-06-02 Thread Torsten Bögershausen
On 2014-06-02 16.47, Tanay Abhra wrote: [] Please see 3 minor remarks inline. --- a/config.c +++ b/config.c @@ -9,6 +9,8 @@ #include exec_cmd.h #include strbuf.h #include quote.h +#include hashmap.h +#include string-list.h struct config_source { struct config_source *prev;

Re: [PATCH] Makefile: don't hardcode HEAD in dist target

2014-06-02 Thread Dennis Kaarsemaker
On Mon, Jun 02, 2014 at 11:53:36AM -0700, Junio C Hamano wrote: Dennis Kaarsemaker den...@kaarsemaker.net writes: Instead of calling git-archive HEAD^{tree}, use $(GIT_VERSION)^{tree}. This makes sure the archive name and contents are consistent, if HEAD has moved, but GIT-VERSION-FILE

Re: [PATCH] mailinfo: use strcmp() for string comparison

2014-06-02 Thread Jeff King
On Sun, Jun 01, 2014 at 11:00:40AM +0200, René Scharfe wrote: The array header is defined as: static const char *header[MAX_HDR_PARSED] = { From,Subject,Date, }; When looking for the index of a specfic string in that array, simply use strcmp() instead of memcmp().

Re: [PATCH] config: Add documentation for writing config files

2014-06-02 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) Even though the reason to replace a TODO with real stuff is rather

Re: [PATCH] pack-objects: use free()+xcalloc() instead of xrealloc()+memset()

2014-06-02 Thread Jeff King
On Sun, Jun 01, 2014 at 01:07:21PM +0200, René Scharfe wrote: Whenever the hash table becomes too small then its size is increased, the original part (and the added space) is zerod out using memset(), and the table is rebuilt from scratch. Simplify this proceess by returning the old memory

Re: [PATCH] string-list.h: Add a value to string_list initializer lists

2014-06-02 Thread Junio C Hamano
Tanay Abhra tanay...@gmail.com writes: Add a NULL value in the end of STRING_LIST_INIT_NODUP and STRING_LIST_DUP to initialize `compare_strings_fn`. Hmph. That is what change is proposed, which we can read from the patch text itself below. We would want to see why is this change a good thing

Re: [PATCH] environment: enable core.preloadindex by default

2014-06-02 Thread Karsten Blees
Am 02.06.2014 18:43, schrieb Steve Hoelzer: There is consensus that the default should change because it will benefit nearly all users (some just a little, but some a lot). See [1] and replies. Git for Windows users may want to try core.fscache=true as well [1]. This eliminates the UAC

Re: [PATCH alt-v2] Improve function dir.c:trim_trailing_spaces()

2014-06-02 Thread Junio C Hamano
Pasha Bolokhov pasha.bolok...@gmail.com writes: Discard the unnecessary 'nr_spaces' variable, remove 'strlen()' and improve the 'if' structure. Switch to pointers instead of integers Slightly more rare occurrences of 'text \' with a backslash in between spaces are handled correctly.

Re: [PATCH v3 0/9] replace signal() with sigaction()

2014-06-02 Thread Jeremiah Mahler
On Mon, Jun 02, 2014 at 12:05:29PM -0700, Junio C Hamano wrote: Johannes Sixt j.s...@viscovery.net writes: Jeremiah Mahler (9): compat/mingw.c: expand MinGW support for sigaction connect.c: replace signal() with sigaction() progress.c: replace signal() with sigaction()

Re: [PATCH] Makefile: don't hardcode HEAD in dist target

2014-06-02 Thread Junio C Hamano
Dennis Kaarsemaker den...@kaarsemaker.net writes: I'd say it would make the consistency better, because now both look at what is checked out instead of at HEAD. The version with your patch does not even look at HEAD; it looks at whatever GIT_VERSION points at, which could be a very different

Re: [PATCH] pack-objects: use free()+xcalloc() instead of xrealloc()+memset()

2014-06-02 Thread David Kastrup
Jeff King p...@peff.net writes: On Sun, Jun 01, 2014 at 01:07:21PM +0200, René Scharfe wrote: Whenever the hash table becomes too small then its size is increased, the original part (and the added space) is zerod out using memset(), and the table is rebuilt from scratch. Simplify this

2.0.0 regression? request pull does not seem to find head

2014-06-02 Thread Michael S. Tsirkin
Looks like pull requests no longer work for me on linux. Some other trees (non-linux) work fine but I didn't yet check whether it's the local or the remote tree that's at issue. Or maybe it's a configuration change that I missed? Note: I have [push] default = matching configured in

Re: [PATCH] refs.c: change read_ref_at to use the reflog iterators

2014-06-02 Thread Junio C Hamano
Ronnie Sahlberg sahlb...@google.com writes: read_ref_at has its own parsing of the reflog file for no really good reason so lets change this to use the existing reflog iterators. This removes one instance where we manually unmarshall the reflog file format. Log messages for errors are

Re: 2.0.0 regression? request pull does not seem to find head

2014-06-02 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: Looks like pull requests no longer work for me on linux. Wasn't does not seem to find head was very much deliberate? Linus's patch wanted the users to explicitly tell the tool, without tool trying to be too helpful and risking to guess incorrectly.

Re: Reset by checkout?

2014-06-02 Thread Junio C Hamano
Atsushi Nakagawa at...@chejz.com writes: One of the more underrepresented command I use in git use on a regular basis is this reset by checkout. It's what's currently achieved by this convoluted expression: `git checkout -B current-branch-name tree-ish` This is such an useful notion

Re: Reset by checkout?

2014-06-02 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Atsushi Nakagawa at...@chejz.com writes: One of the more underrepresented command I use in git use on a regular basis is this reset by checkout. It's what's currently achieved by this convoluted expression: `git checkout -B current-branch-name

Re: 2.0.0 regression? request pull does not seem to find head

2014-06-02 Thread Michael S. Tsirkin
On Mon, Jun 02, 2014 at 02:27:25PM -0700, Junio C Hamano wrote: Michael S. Tsirkin m...@redhat.com writes: Looks like pull requests no longer work for me on linux. Wasn't does not seem to find head was very much deliberate? I'm sorry I don't understand what you are asking here. Same thing

Re: 2.0.0 regression? request pull does not seem to find head

2014-06-02 Thread Linus Torvalds
On Mon, Jun 2, 2014 at 2:01 PM, Michael S. Tsirkin m...@redhat.com wrote: [mst@robin linux]$ git request-pull net-next/master git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next warn: No match for commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc found at

Re: Reset by checkout?

2014-06-02 Thread Junio C Hamano
Kevin Bracey ke...@bracey.fi writes: Maybe something like this: I like the overall direction to re-organize the description by operations, but the new description seem to introduce a bit of new confusion. All modes move the current branch pointer so that HEAD now points to the specified

Re: [PATCH] pack-objects: use free()+xcalloc() instead of xrealloc()+memset()

2014-06-02 Thread Jeff King
On Mon, Jun 02, 2014 at 10:40:44PM +0200, David Kastrup wrote: BTW, the code does git-blame to Vicent's 2834bc2 (which I also worked on), but actually originated in 7a979d9 (Thin pack - create packfile with missing delta base., 2006-02-19). Not that it matters, but I was just surprised

Re: 2.0.0 regression? request pull does not seem to find head

2014-06-02 Thread James Spencer
Linus Torvalds torvalds at linux-foundation.org writes: On Mon, Jun 2, 2014 at 2:01 PM, Michael S. Tsirkin mst at redhat.com wrote: [mst at robin linux]$ git request-pull net-next/master git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next warn: No match for commit

[PATCH alt-v3] Improve function dir.c:trim_trailing_spaces()

2014-06-02 Thread Pasha Bolokhov
Discard the unnecessary 'nr_spaces' variable, remove 'strlen()' and improve the 'if' structure. Switch to pointers instead of integers Slightly more rare occurrences of 'text \' with a backslash in between spaces are handled correctly. Namely, the code in 8ba87adad6 does not reset

Re: [PATCH alt-v3] Improve function dir.c:trim_trailing_spaces()

2014-06-02 Thread Junio C Hamano
Pasha Bolokhov pasha.bolok...@gmail.com writes: Discard the unnecessary 'nr_spaces' variable, remove 'strlen()' and improve the 'if' structure. Switch to pointers instead of integers Slightly more rare occurrences of 'text \' with a backslash in between spaces are handled correctly.

Re: [PATCH] pack-objects: use free()+xcalloc() instead of xrealloc()+memset()

2014-06-02 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Jun 02, 2014 at 10:40:44PM +0200, David Kastrup wrote: BTW, the code does git-blame to Vicent's 2834bc2 (which I also worked on), but actually originated in 7a979d9 (Thin pack - create packfile with missing delta base., 2006-02-19). Not that it

[PATCH] sideband.c: Get rid of ANSI sequences for non-terminal shell

2014-06-02 Thread Naumov, Michael (North Sydney)
From: Michael Naumov mnaou...@gmail.com Diagnostic messages received on the sideband #2 from the server side are sent to the standard error with ANSI terminal control sequence \033[K that erases to the end of line appended at the end of each line. However, some programs (e.g. GitExtensions for

Re: [ANNOUNCE] Git v2.0.0

2014-06-02 Thread NeilBrown
On Wed, 28 May 2014 15:31:13 -0700 Junio C Hamano gits...@pobox.com wrote: The latest feature release Git v2.0.0 is now available at the usual places. git request-pull lost a few heuristics that often led to mistakes. I've installed git 2.0.0 and now when I git request-pull master

Re: [ANNOUNCE] Git v2.0.0

2014-06-02 Thread Linus Torvalds
On Mon, Jun 2, 2014 at 7:08 PM, NeilBrown ne...@suse.de wrote: git request-pull master git://neil.brown.name/md after tagging the current commit as md/3.15-fixes and pushing out the tag You should *tell* git request-pull what you're actually requesting to pull. The old let's guess based on

Re: [BUG REPORT] Git log pretty date

2014-06-02 Thread Jeff King
On Fri, May 30, 2014 at 09:08:57AM +0100, Rodrigo Fernandes wrote: Do you have any idea how does github understand that is a bug and fixes it automatically? (I'm saying this because on Github the date is correct). I looked into this. The dates you see on GitHub's web UI are actually parsed by