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

2014-06-09 Thread Eric Sunshine
In addition to the valuable review comments by Torsten and Peff, find more below... On Mon, Jun 2, 2014 at 10:47 AM, Tanay Abhra tanay...@gmail.com wrote: Add a hash table to cache all key-value pairs read from config files (repo specific .git/config, user wide ~/.gitconfig and the global

[PATCH/RFC v1 4/5] fast-import.c: cleanup using strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Simplified cases where a strbuf_reset was immediately followed by a strbuf_add using the new strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- fast-import.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/fast-import.c

[PATCH/RFC v1 1/5] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Currently, the data in a strbuf is modified using add operations. To set the buffer to some data a reset must be performed before an add. strbuf_reset(buf); strbuf_add(buf, cb.buf.buf, cb.buf.len); And this is a common sequence of operations with 70 occurrences found in the current source

[PATCH/RFC v1 3/5] sha1_name.c: cleanup using strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Simplified cases where a strbuf_reset was immediately followed by a strbuf_add using the new strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- sha1_name.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sha1_name.c b/sha1_name.c

[PATCH/RFC v1 5/5] builtin/remote.c: cleanup using strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Simplified cases where a strbuf_reset was immediately followed by a strbuf_add using the new strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/remote.c | 51 +-- 1 file changed, 17 insertions(+), 34 deletions(-)

[PATCH/RFC v1 2/5] add strbuf_set operations documentation

2014-06-09 Thread Jeremiah Mahler
Add documentation of the strbuf_set operations to technical/api-strbuf.txt. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/technical/api-strbuf.txt | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/technical/api-strbuf.txt

[PATCH/RFC v1 0/5] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Currently, the data in a strbuf is modified using add operations. To set the buffer to some data a reset must be performed before an add. strbuf_reset(buf); strbuf_add(buf, cb.buf.buf, cb.buf.len); And this is a common sequence of operations with 70 occurrences found in the current

Re: [PATCH/RFC v1 2/5] add strbuf_set operations documentation

2014-06-09 Thread Eric Sunshine
On Mon, Jun 9, 2014 at 4:36 AM, Jeremiah Mahler jmmah...@gmail.com wrote: Add documentation of the strbuf_set operations to technical/api-strbuf.txt. Since this patch is concise and so closely related to patch 1/5, it probably should be squashed into that one. More below. Signed-off-by:

Re: [PATCH/RFC v1 4/5] fast-import.c: cleanup using strbuf_set operations

2014-06-09 Thread Eric Sunshine
On Mon, Jun 9, 2014 at 4:36 AM, Jeremiah Mahler jmmah...@gmail.com wrote: Subject: fast-import.c: cleanup using strbuf_set operations This might read more clearly if written: fast-import: simplify via strbuf_set() Simplified cases where a strbuf_reset was immediately followed by a

filmware

2014-06-09 Thread le860905
answer call but after cannot end, bcoz no effect light and sensitive.my phone is voyager dg300.but root is cwm.N�r��yb�X��ǧv�^�)޺{.n�+ا���ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf

Re: [PATCH/RFC v1 0/5] add strbuf_set operations

2014-06-09 Thread Duy Nguyen
On Mon, Jun 9, 2014 at 3:36 PM, Jeremiah Mahler jmmah...@gmail.com wrote: Currently, the data in a strbuf is modified using add operations. To set the buffer to some data a reset must be performed before an add. strbuf_reset(buf); strbuf_add(buf, cb.buf.buf, cb.buf.len); And this is a

Kedves felhasználók e-mailben;

2014-06-09 Thread Webmail update
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 másolja és

Kedves felhasználók e-mailben;

2014-06-09 Thread Webmail update
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 másolja és

Re: Git reset --hard with staged changes

2014-06-09 Thread Pierre-François CLEMENT
Hi all, Someone pointed out on the Git for human beings Google group (https://groups.google.com/d/topic/git-users/27_FxIV_100/discussion) that using git-reset's hard mode when having staged untracked files simply deletes them from the working dir. Since git-reset specifically doesn't touch

[PATCH v1] Git config cache special querying api utilizing the cache

2014-06-09 Thread Tanay Abhra
Hi, I am taking this patch out of RFC. [PATCH V1]:Most of the invaluable suggestions by Eric Sunshine, Torsten Bogershausen and Jeff King has been implemented[1]. Complete rewrite of config_cache*() family using git_config() as hook as suggested by Jeff. Thanks for the review.

[PATCH v1] config: Add hashtable for config parsing retrival

2014-06-09 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.

[PATCH v2] completion: Handle '!f() { ... }; f' aliases

2014-06-09 Thread Steffen Prohaska
'!f() { ... }; f' is a recommended pattern to declare more complex aliases (see git wiki [1]). This commit teaches the completion to handle them. When determining which completion to use for an alias, the opening brace is now ignored in order to continue the search for a git command inside the

Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-09 Thread Jens Lehmann
Am 06.06.2014 07:54, schrieb Heiko Voigt: On Thu, Jun 05, 2014 at 07:48:33PM +1200, Chris Packham wrote: On 05/06/14 07:42, Heiko Voigt wrote: So either we do this magically and all valid boolean values are forbidden as tags or we would need a different config option. Further thinking about

Re: [PATCH 00/20] avoid test cond -a/-o cond

2014-06-09 Thread Matthieu Moy
Elia Pinto gitter.spi...@gmail.com writes: These patch series convert test -a/-o to and ||. Reviewed-by: Matthieu Moy matthieu@imag.fr -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: Git reset --hard with staged changes

2014-06-09 Thread David Kastrup
Pierre-François CLEMENT lik...@gmail.com writes: Hi all, Someone pointed out on the Git for human beings Google group (https://groups.google.com/d/topic/git-users/27_FxIV_100/discussion) that using git-reset's hard mode when having staged untracked files simply deletes them from the working

Re: [PATCH v1] config: Add hashtable for config parsing retrival

2014-06-09 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: +the highest priority(i.e. for the same variable value in the repo config ^ missing space. +struct config_cache_entry { + struct hashmap_entry ent; + char *key; + struct string_list *value_list; +}; I guess this

Re: [RFC 1/3] sequencer: Signal failed ff as an aborted, not a conflicted merge

2014-06-09 Thread Fabian Ruch
Hi Junio, On 05/27/2014 08:42 PM, Junio C Hamano wrote: Fabian Ruch baf...@gmail.com writes: [..] In order to signal the three possible situations (not only success and failure to complete) after a pick through porcelain commands such as `cherry-pick`, exit with a return value that is

Re: [PATCH 1/2] refs.c: write updates to packed refs when a transaction has more than one ref

2014-06-09 Thread Ronnie Sahlberg
thanks On Sun, Jun 8, 2014 at 2:03 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Thu, Jun 5, 2014 at 7:26 PM, Ronnie Sahlberg sahlb...@google.com wrote: When we are updating more than one single ref, i.e. not a commit, then write the updated refs directly to the packed refs file instead

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-09 Thread Junio C Hamano
Jeff King p...@peff.net writes: I think it would make sense to actually take this one step further, though, and move commit-buffer into the slab, as well. That has two advantages: 1. It further decreases the size of struct commit for callers who do not use save_commit_buffer. 2.

Webmail E-mail frissítések

2014-06-09 Thread MUDr . Mačalová Jitka
Kedves Email felhasználói; Ön túllépte a tárolási határt 23.432 az e-postafiók beállítva a WEB SERVICE / Administrator, és akkor problémái küldés és a bejövő üzenetek, amíg meg újból érvényesíti az e-mail címét. A szükséges eljárások nyújtottak be az alábbi a véleménye, ellenőrizze kattintva az

Kedves Email felhasználói;

2014-06-09 Thread webmail administrator®2014
-- Kedves Email felhasználói; Ön túllépte a tárolási határt 23.432 az e-postafiók beállítva a WEB SERVICE / Administrator, és akkor problémái küldés és a bejövő üzenetek, amíg meg újból érvényesíti az e-mail címét. A szükséges eljárások nyújtottak be az alábbi a véleménye, ellenőrizze

[PATCH 0/15] store length of commit-buffer

2014-06-09 Thread Jeff King
Here's my series to drop buffer from struct commit in favor of a slab, and then add in a length field. It's a lot of commits, but I tried to break it down into readable chunks. [01/15]: alloc: include any-object allocations in alloc_report [02/15]: commit: push commit_index update into

[PATCH 01/15] alloc: include any-object allocations in alloc_report

2014-06-09 Thread Jeff King
When 2c1cbec (Use proper object allocators for unknown object nodes too, 2007-04-16), added a special any_object allocator, it never taught alloc_report to report on it. To do so we need to add an extra type argument to the REPORT macro, as that commit did for DEFINE_ALLOCATOR. Signed-off-by:

[PATCH 02/15] commit: push commit_index update into alloc_commit_node

2014-06-09 Thread Jeff King
Whenever we create a commit object via lookup_commit, we give it a unique index to be used with the commit-slab API. The theory is that any struct commit we create would follow this code path, so any such struct would get an index. However, callers could use alloc_commit_node() directly (and get

[PATCH 03/15] do not create struct commit with xcalloc

2014-06-09 Thread Jeff King
In both blame and merge-recursive, we sometimes create a fake commit struct for convenience (e.g., to represent the HEAD state as if we would commit it). By allocating ourselves rather than using alloc_commit_node, we do not properly set the index field of the commit. This can produce subtle bugs

[PATCH 05/15] sequencer: use logmsg_reencode in get_message

2014-06-09 Thread Jeff King
This simplifies the code, as logmsg_reencode handles the reencoding for us in a single call. It also means we learn logmsg_reencode's trick of pulling the buffer from disk when commit-buffer is NULL (we currently just silently return!). It is doubtful this matters in practice, though, as sequencer

[PATCH 04/15] logmsg_reencode: return const buffer

2014-06-09 Thread Jeff King
The return value from logmsg_reencode may be either a newly allocated buffer or a pointer to the existing commit-buffer. We would not want the caller to accidentally free() or modify the latter, so let's mark it as const. We can cast away the constness in logmsg_free, but only once we have

[PATCH 06/15] provide a helper to free commit buffer

2014-06-09 Thread Jeff King
This converts two lines into one at each caller. But more importantly, it abstracts the concept of freeing the buffer, which will make it easier to change later. Note that we also need to provide a detach mechanism for the weird case in fsck which passes the buffer back to be freed.

[PATCH 07/15] provide a helper to set the commit buffer

2014-06-09 Thread Jeff King
Right now this is just a one-liner, but abstracting it will make it easier to change later. Signed-off-by: Jeff King p...@peff.net --- builtin/blame.c | 2 +- commit.c| 7 ++- commit.h| 6 ++ object.c| 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff

[PATCH 08/15] provide helpers to access the commit buffer

2014-06-09 Thread Jeff King
Many sites look at commit-buffer to get more detailed information than what is in the parsed commit struct. However, we sometimes drop commit-buffer to save memory, in which case the caller would need to read the object afresh. Some callers do this (leading to duplicated code), and others do not

[PATCH 10/15] use get_commit_buffer to avoid duplicate code

2014-06-09 Thread Jeff King
For both of these sites, we already do the fallback to read_sha1_file trick. But we can shorten the code by just using get_commit_buffer. Note that the error cases are slightly different when read_sha1_file fails. get_commit_buffer will die() if the object cannot be loaded, or is a non-commit.

[PATCH 09/15] use get_cached_commit_buffer where appropriate

2014-06-09 Thread Jeff King
Some call sites check commit-buffer to see whether we have a cached buffer, and if so, do some work with it. In the long run we may want to switch these code paths to make their decision on a different boolean flag (because checking the cache may get a little more expensive in the future). But for

[PATCH 12/15] use get_commit_buffer everywhere

2014-06-09 Thread Jeff King
Each of these sites assumes that commit-buffer is valid. Since they would segfault if this was not the case, they are likely to be correct in practice. However, we can future-proof them by using get_commit_buffer. And as a side effect, we abstract away the final bare uses of commit-buffer.

[PATCH 11/15] convert logmsg_reencode to get_commit_buffer

2014-06-09 Thread Jeff King
Like the callsites in the previous commit, logmsg_reencode already falls back to read_sha1_file when necessary. However, I split its conversion out into its own commit because it's a bit more complex. We return either: 1. The original commit-buffer 2. A newly allocated buffer from

[PATCH 13/15] commit-slab: provide a static initializer

2014-06-09 Thread Jeff King
Callers currently must use init_foo_slab() at runtime before accessing a slab. For global slabs, it's much nicer if we can initialize them in BSS, so that each user does not have to add code to check-and-initialize. Signed-off-by: Jeff King p...@peff.net --- The calling convention is kind of

[PATCH 14/15] commit: convert commit-buffer to a slab

2014-06-09 Thread Jeff King
This will make it easier to manage the buffer cache independently of the struct commit objects. It also shrinks struct commit by one pointer, which may be helpful. Unfortunately it does not reduce the max memory size of something like rev-list, because rev-list uses get_cached_commit_buffer() to

[PATCH 15/15] commit: record buffer length in cache

2014-06-09 Thread Jeff King
Most callsites which use the commit buffer try to use the cached version attached to the commit, rather than re-reading from disk. Unfortunately, that interface provides only a pointer to the NUL-terminated buffer, with no indication of the original length. For the most part, this doesn't matter.

Re: What's cooking in git.git (Jun 2014, #02; Fri, 6)

2014-06-09 Thread Junio C Hamano
David Kastrup d...@gnu.org writes: Junio C Hamano gits...@pobox.com writes: git blame has been optimized greatly by reorganising the data structure that is used to keep track of the work to be done, thanks to David Karstrup d...@gnu.org. I guess that reorganising the data structure for

Re: [PATCH] t5551: fix the 50,000 tag test

2014-06-09 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: The first version of test 23 did simply check that no output was send to stderr. Commit 5e2c7cd2 verified that the expected tags were actually cloned. Since the day git clone printed Cloning into 'too-many-refs' to stderr, Thanks. It is 68b939b2

Re: [PATCH/RFC v1 2/5] add strbuf_set operations documentation

2014-06-09 Thread Jeremiah Mahler
Eric, On Mon, Jun 09, 2014 at 05:53:49AM -0400, Eric Sunshine wrote: On Mon, Jun 9, 2014 at 4:36 AM, Jeremiah Mahler jmmah...@gmail.com wrote: Add documentation of the strbuf_set operations to technical/api-strbuf.txt. Since this patch is concise and so closely related to patch 1/5, it

Re: [PATCH/RFC v1 4/5] fast-import.c: cleanup using strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Eric, On Mon, Jun 09, 2014 at 06:12:12AM -0400, Eric Sunshine wrote: On Mon, Jun 9, 2014 at 4:36 AM, Jeremiah Mahler jmmah...@gmail.com wrote: Subject: fast-import.c: cleanup using strbuf_set operations ... Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- fast-import.c | 19

Re: [PATCH/RFC v1 0/5] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Duy, On Mon, Jun 09, 2014 at 05:39:12PM +0700, Duy Nguyen wrote: On Mon, Jun 9, 2014 at 3:36 PM, Jeremiah Mahler jmmah...@gmail.com wrote: Currently, the data in a strbuf is modified using add operations. To set the buffer to some data a reset must be performed before an add.

Re: [PATCH v7 0/1] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-09 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Since Junio has picked up the first patch from previous versions of this series, I'm just going to send the second (SSE) one. I decided not to s/NO_SSE42/!HAVE_SSE42/ because it looks like git mostly uses the former convention (for instance,

[PATCH v2 00/19] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Version 2 of the patch set to add strbuf_set operations. Includes suggestions from Eric Sunshine [1]: - New operations and their documentation placed in one patch. - Less ambiguous documentation: Replace the buffer content with [...] - Use imperative mood in log messages. - Don't use

[PATCH v2 01/19] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Currently, the data in a strbuf is modified using add operations. To set the buffer to some data a reset must be performed before an add. strbuf_reset(buf); strbuf_add(buf, cb.buf.buf, cb.buf.len); And this is a common sequence of operations with 70 occurrences found in the current source

[PATCH v2 07/19] builtin/checkout: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/checkout.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/builtin/checkout.c

[PATCH v2 05/19] branch: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- branch.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/branch.c b/branch.c index 660097b..bc7cc7e 100644

[PATCH v2 06/19] builtin/branch: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/branch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index

[PATCH v2 02/19] sha1_name: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- sha1_name.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sha1_name.c b/sha1_name.c index

[PATCH v2 04/19] builtin/remote: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/remote.c | 59 1 file changed, 21 insertions(+), 38 deletions(-)

[PATCH v2 03/19] fast-import: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- fast-import.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fast-import.c b/fast-import.c index

[PATCH v2 10/19] date: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- date.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/date.c b/date.c index 782de95..0b723a4 100644 ---

[PATCH v2 12/19] http-backend: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- http-backend.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/http-backend.c b/http-backend.c index

[PATCH v2 11/19] diffcore-order: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- diffcore-order.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/diffcore-order.c b/diffcore-order.c index

[PATCH v2 13/19] http: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- http.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/http.c b/http.c index 2b4f6a3..626fed7 100644 ---

[PATCH v2 08/19] builtin/mailinfo: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/mailinfo.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/builtin/mailinfo.c

[PATCH v2 09/19] builtin/tag: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/tag.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index

[PATCH v2 19/19] wt-status: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- wt-status.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wt-status.c b/wt-status.c index 318a191..a89cd73

[PATCH v2 14/19] ident: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- ident.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ident.c b/ident.c index 1d9b6e7..523e249 100644 ---

[PATCH v2 16/19] submodule: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- submodule.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/submodule.c b/submodule.c index 3402af6..878cc48

[PATCH v2 18/19] vcs-svn/svndump: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- vcs-svn/svndump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c index

[PATCH v2 15/19] remote-curl: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- remote-curl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/remote-curl.c b/remote-curl.c index

[PATCH v2 17/19] transport: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- transport.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/transport.c b/transport.c index 172b3d8..e8f5dfa

Re: [PATCH v7 0/1] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-09 Thread David Turner
On Mon, 2014-06-09 at 15:16 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: Since Junio has picked up the first patch from previous versions of this series, I'm just going to send the second (SSE) one. I decided not to s/NO_SSE42/!HAVE_SSE42/ because it looks

Re: [PATCH 12/15] use get_commit_buffer everywhere

2014-06-09 Thread Junio C Hamano
Jeff King p...@peff.net writes: diff --git a/notes-merge.c b/notes-merge.c index 94a1a8a..7885ab2 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -671,7 +671,8 @@ int notes_merge_commit(struct notes_merge_options *o, DIR *dir; struct dirent *e; struct strbuf path =

Re: [PATCH v7 0/1] refs.c: SSE4.2 optimizations for check_refname_component

2014-06-09 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: David Turner dtur...@twopensource.com writes: Since Junio has picked up the first patch from previous versions of this series, I'm just going to send the second (SSE) one. I decided not to s/NO_SSE42/!HAVE_SSE42/ because it looks like git mostly uses

Re: Reset by checkout?

2014-06-09 Thread Kevin Bracey
On 07/06/2014 17:52, Philip Oakley wrote: Just to say there has been a similar confusion about 'git reset' reported on the Git Users group for the case of reset with added (staged), but uncommitted changes being wiped out, which simlarly reports on the difficulty of explaining some of the

Re: Git reset --hard with staged changes

2014-06-09 Thread Pierre-François CLEMENT
2014-06-09 16:04 GMT+02:00 David Kastrup d...@gnu.org: Pierre-François CLEMENT lik...@gmail.com writes: Hi all, Someone pointed out on the Git for human beings Google group (https://groups.google.com/d/topic/git-users/27_FxIV_100/discussion) that using git-reset's hard mode when having

[PATCH 2/7] test: turn USR_BIN_TIME into a lazy prerequisite

2014-06-09 Thread Junio C Hamano
Two test scripts (t3302 and t3419) had copy paste code to set USR_BIN_TIME prerequisite. Use the test_lazy_prereq helper to define them in the common t/test-lib.sh. Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t3302-notes-index-expensive.sh | 1 - t/t3419-rebase-patch-id.sh | 1

[PATCH 5/7] t3302: drop unnecessary NOT_EXPENSIVE pseudo-prerequisite

2014-06-09 Thread Junio C Hamano
This was only necessary because do_tests helper the script defines took its parameters in a wrong order. Just pass an empty string (or not passing the optional EXPENSIVE prerequisite) when running the test with a light-weight set of parameters and have the shell do the right thing when parsing

[PATCH 3/7] t3302: coding style updates

2014-06-09 Thread Junio C Hamano
Use -END_OF_HERE_TEXT to push the contents of here-text to the right in order to show the loop structure better. Use write_script when writing a script to be run. Use test (not [ ... ]) and avoid unnecessary ; in the middle of a line. Signed-off-by: Junio C Hamano gits...@pobox.com ---

[PATCH 1/7] test: turn EXPENSIVE into a lazy prerequisite

2014-06-09 Thread Junio C Hamano
Two test scripts (t0021 and t5551) had copy paste code to set EXPENSIVE prerequisite. Use the test_lazy_prereq helper to define them in the common t/test-lib.sh. Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t0021-conversion.sh | 2 -- t/t5551-http-fetch.sh | 2 -- t/test-lib.sh

[PATCH 4/7] t3302: do not chdir around in the primary test process

2014-06-09 Thread Junio C Hamano
These days^Wyears we strive to do stuff in subdirectories inside subshells to avoid mistakes. Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t3302-notes-index-expensive.sh | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git

[PATCH 6/7] t3419: drop unnecessary NOT_EXPENSIVE pseudo-prerequisite

2014-06-09 Thread Junio C Hamano
This was only necessary because do_tests helper the script defines took its parameters in a wrong order. Just pass an empty string (or not passing the optional EXPENSIVE prerequisite) when running the test with a light-weight set of parameters and have the shell do the right thing when parsing

Re: [PATCH 10/20] git-submodule.sh: avoid test cond -a/-o cond

2014-06-09 Thread Junio C Hamano
Elia Pinto gitter.spi...@gmail.com writes: @@ -1059,13 +1059,17 @@ cmd_summary() { while read mod_src mod_dst sha1_src sha1_dst status sm_path do # Always show modules deleted or type-changed (blob-module) - test $status

[PATCH 0/7] A few minor test-prereq updates

2014-06-09 Thread Junio C Hamano
While reviewing somebody's patch, I noticed that individual test scripts set EXPENSIVE test prerequisite with copied-and-pasted lines. Here is a bit to update them, while fixing styles in old test scripts that had these copied-and-pasted lines. The last step discards support for

Re: [PATCH 02/20] contrib/examples/git-clone.sh: avoid test cond -a/-o cond

2014-06-09 Thread Junio C Hamano
Elia Pinto gitter.spi...@gmail.com writes: The construct is error-prone; test being built-in in most modern shells, the reason to avoid test cond test cond spawning one extra process by using a single test cond -a cond no longer exists. Signed-off-by: Elia Pinto gitter.spi...@gmail.com

[PATCH 7/7] tests: drop GIT_*_TIMING_TESTS environment variable support

2014-06-09 Thread Junio C Hamano
Two tests (t3302 and t3419) used to have their own environment variable to trigger expensive tests without enabling expensive tests in other scripts; a user could set GIT_NOTES_TIMING_TESTS but not GIT_TEST_LONG and run the whole test suite and trigger expensive tests only in t3302 but not other

Re: [PATCH] send-email: do not insert third header

2014-06-09 Thread Junio C Hamano
Stepan Kasal ka...@ucw.cz writes: It is sometimes desirable to insert several header lines at the top of the body, e.g., if From or Date differs from the mail header. (Linus even recommends to use this second header for all kernel submissions.) send-email has a minimal support for this;

Re: [git] Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2014-06-09 Thread W. Trevor King
On Mon, Jun 09, 2014 at 03:17:07PM +0200, Jens Lehmann wrote: And by the way: wouldn't it make more sense to tell the user /what/ we do automatically? So maybe 'submodule.autoupdate' is a better name for the new switch? Or autocheckout? No need to preserve submodule-specific jargon when we

Re: Git reset --hard with staged changes

2014-06-09 Thread Junio C Hamano
Pierre-François CLEMENT lik...@gmail.com writes: Hm, I didn't think of git apply --index... Makes sense for this special use, but I'm not sure about the other use cases. Try merging another branch that tracks a file your current branch does not know about and ending up with conflicts during

Re: [PATCH 12/15] use get_commit_buffer everywhere

2014-06-09 Thread Jeff King
On Mon, Jun 09, 2014 at 03:40:57PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: diff --git a/notes-merge.c b/notes-merge.c index 94a1a8a..7885ab2 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -671,7 +671,8 @@ int notes_merge_commit(struct notes_merge_options *o,

[PATCH] rebase -i: Remember merge options beyond continue actions

2014-06-09 Thread Fabian Ruch
If the user explicitly specified a merge strategy or strategy options, rebase --interactive started using the default merge strategy again after rebase --continue. This problem gets fixed by this commit. Add test. Since the rebase options -s and -X imply --merge, we can simply remove the

Re: [PATCH] rebase -i: Remember merge options beyond continue actions

2014-06-09 Thread Eric Sunshine
On Mon, Jun 9, 2014 at 8:02 PM, Fabian Ruch baf...@gmail.com wrote: If the user explicitly specified a merge strategy or strategy options, rebase --interactive started using the default merge strategy again after rebase --continue. For reference, this problem was reported as far back as

Re: [PATCH] rebase -i: Remember merge options beyond continue actions

2014-06-09 Thread Fabian Ruch
Hi Eric, thanks a lot for the reference. I added the Reported-by: and Signed-off-by: lines to the commit message. Fabian -- 8 -- Subject: rebase -i: Remember merge options beyond continue actions If the user explicitly specified a merge strategy or strategy options, rebase --interactive

Re: [PATCH 12/15] use get_commit_buffer everywhere

2014-06-09 Thread Jeff King
On Mon, Jun 09, 2014 at 08:02:24PM -0400, Jeff King wrote: I'm still confused and disturbed that my gcc is not noticing this obvious const violation. Hmm, shutting off ccache seems to make it work. Doubly disturbing. Ah, mystery solved. It's a gcc bug:

Re: Git reset --hard with staged changes

2014-06-09 Thread Dale Worley
From: Pierre-François CLEMENT likeyn at gmail.com You create a new (untracked) file. You use git-reset's hard mode to go one commit back, the new (untracked) file's still there. You add/stage that new file. You use git-reset's hard mode again to go one commit back, and the new untracked file

Re: [PATCH 04/15] logmsg_reencode: return const buffer

2014-06-09 Thread Eric Sunshine
On Mon, Jun 9, 2014 at 2:10 PM, Jeff King p...@peff.net wrote: The return value from logmsg_reencode may be either a newly allocated buffer or a pointer to the existing commit-buffer. We would not want the caller to accidentally free() or modify the latter, so let's mark it as const. We can

Re: [PATCH v5] Add an explicit GIT_DIR to the list of excludes

2014-06-09 Thread Pasha Bolokhov
On Thu, Jun 5, 2014 at 3:15 AM, Pasha Bolokhov pasha.bolok...@gmail.com wrote: + /* only add it if GIT_DIR does not end with '.git' or '/.git' */ + if (len 4 || strcmp(n_git + len - 4, .git) || + (len 4 n_git[len - 5] != '/')) { Hmm.. should we exclude foobar.git

Re: [PATCH] t5551: fix the 50,000 tag test

2014-06-09 Thread Torsten Bögershausen
On 2014-06-09 21.16, Junio C Hamano wrote: Since the day git clone printed Cloning into 'too-many-refs' to stderr, Thanks. It is 68b939b2 (clone: send diagnostic messages to stderr, 2013-09-18); before it we showed the message to the standard output stream instead. Will queue. Thanks

[PATCH v3] t9001: avoid not portable '\n' with sed

2014-06-09 Thread Torsten Bögershausen
t9001 used a '\n' in a sed expression to split one line into two lines, but the usage of '\n' in the replacement string is not portable. The '\n' can be used to match a newline in the pattern space, but otherwise the meaning of '\n' is unspecified in POSIX. - Gnu versions of sed will treat '\n'

Re: [PATCH v3] t9001: avoid not portable '\n' with sed

2014-06-09 Thread Eric Sunshine
On Tue, Jun 10, 2014 at 12:07 AM, Torsten Bögershausen tbo...@web.de wrote: t9001 used a '\n' in a sed expression to split one line into two lines, but the usage of '\n' in the replacement string is not portable. The '\n' can be used to match a newline in the pattern space, but otherwise the

Re: [PATCH 15/15] commit: record buffer length in cache

2014-06-09 Thread Christian Couder
From: Jeff King p...@peff.net --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2313,7 +2313,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt, ident, ident, path, (!contents_from ? path :

Re: [PATCH 15/15] commit: record buffer length in cache

2014-06-09 Thread Jeff King
On Tue, Jun 10, 2014 at 07:12:37AM +0200, Christian Couder wrote: From: Jeff King p...@peff.net --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2313,7 +2313,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt, ident, ident, path,

Re: [PATCH v2] completion: Handle '!f() { ... }; f' aliases

2014-06-09 Thread Junio C Hamano
Steffen Prohaska proha...@zib.de writes: '!f() { ... }; f' is a recommended pattern to declare more complex aliases (see git wiki [1]). This commit teaches the completion to handle them. Hmm, I've never endorsed nor recommended such a notation myself ;-) I tend to prefer writing it like so

  1   2   >