[PATCH 5/5] t5504: drop sigpipe=ok from push tests

2016-04-19 Thread Jeff King
These were added by 8bf4bec (add "ok=sigpipe" to test_must_fail and use it to fix flaky tests, 2015-11-27) because we would racily die via SIGPIPE when the pack was rejected by the other side. But since we have recently de-flaked send-pack, we should be able to tighten up these tests (including re

Re: [PATCH 4/6] Convert struct name_entry to use struct object_id.

2016-04-19 Thread Junio C Hamano
"brian m. carlson" writes: > @@ -314,7 +314,7 @@ static int threeway_callback(int n, unsigned long mask, > unsigned long dirmask, s > } > > if (same_entry(entry+0, entry+1)) { > - if (entry[2].sha1 && !S_ISDIR(entry[2].mode)) { > + if (entry[2].oid->hash &&

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-19 Thread Jacob Keller
On Tue, Apr 19, 2016 at 10:06 AM, Jeff King wrote: > On Tue, Apr 19, 2016 at 08:17:38AM -0700, Stefan Beller wrote: > >> On Mon, Apr 18, 2016 at 10:03 PM, Jeff King wrote: >> >> > I guess this will invalidate old patch-ids, but there's not much to be >> > done about that. >> >> What do you mean b

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-19 Thread Junio C Hamano
Jacob Keller writes: > On Tue, Apr 19, 2016 at 10:06 AM, Jeff King wrote: >> On Tue, Apr 19, 2016 at 08:17:38AM -0700, Stefan Beller wrote: >> >>> On Mon, Apr 18, 2016 at 10:03 PM, Jeff King wrote: >>> >>> > I guess this will invalidate old patch-ids, but there's not much to be >>> > done about

Re: [PATCH 4/6] Convert struct name_entry to use struct object_id.

2016-04-19 Thread brian m. carlson
On Tue, Apr 19, 2016 at 04:02:22PM -0700, Junio C Hamano wrote: > "brian m. carlson" writes: > > > @@ -314,7 +314,7 @@ static int threeway_callback(int n, unsigned long mask, > > unsigned long dirmask, s > > } > > > > if (same_entry(entry+0, entry+1)) { > > - if (entry[2].sha

Re: [PATCH/RFC 4/6] transport: add refspec list parameters to functions

2016-04-19 Thread Jeff King
On Tue, Apr 19, 2016 at 05:40:01PM -0400, David Turner wrote: > > I dunno, I am a bit negative on bringing new features to Git-over > > -HTTP > > (which is already less efficient than the other protocols!) without > > any > > plan for supporting them in the other protocols. > > Interesting -- can

[PATCH v5 00/15] index-helper/watchman

2016-04-19 Thread David Turner
This version includes the following changes since v4: 1. The last patch has been removed; it's pretty much always a good idea to wait for the index-helper 2. Documentation for index-helper --kill and --autorun. Documentation for update-index --watchman. Documentation for index-format for WAMA. D

[PATCH v5 01/15] read-cache.c: fix constness of verify_hdr()

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Turner --- read-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/read-cache.c b/read-cache.c index d9fb78b..16cc487 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1345,7 +1345,7 @@

[PATCH v5 12/15] index-helper: kill mode

2016-04-19 Thread David Turner
Add a new command (and command-line arg) to allow index-helpers to exit cleanly. This is mainly useful for tests. Signed-off-by: David Turner --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 31 ++- t/t7900-index-helper.sh

[PATCH v5 09/15] index-helper: use watchman to avoid refreshing index with lstat()

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy Watchman is hidden behind index-helper. Before git tries to read the index from shm, it notifies index-helper through the socket and waits for index-helper to prepare a file for sharing memory (with MAP_SHARED). index-helper then contacts watchman, updates 'WAMA' extens

[PATCH v5 04/15] index-helper: add --strict

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy There are "holes" in the index-helper approach because the shared memory is not verified again by git. If $USER is compromised, shared memory could be modified. But anyone who could do this could already modify $GIT_DIR/index. A more realistic risk is some bugs in index

[PATCH v5 10/15] update-index: enable/disable watchman support

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Turner --- Documentation/git-index-helper.txt | 3 +++ Documentation/git-update-index.txt | 6 ++ builtin/update-index.c | 11 +++ 3 files changed, 20 insertions(+) diff --git a/Docum

[PATCH v5 03/15] index-helper: new daemon for caching index and related stuff

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy Instead of reading the index from disk and worrying about disk corruption, the index is cached in memory (memory bit-flips happen too, but hopefully less often). The result is faster read. Read time is reduced by 70%. The biggest gain is not having to verify the traili

[PATCH v5 07/15] read-cache: add watchman 'WAMA' extension

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy The extension contains a bitmap, one bit for each entry in the index. If the n-th bit is zero, the n-th entry is considered unchanged, we can ce_mark_uptodate() it without refreshing. If the bit is non-zero and we found out the corresponding file is clean after refresh,

[PATCH v5 02/15] read-cache: allow to keep mmap'd memory after reading

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy Later, we will introduce git index-helper to share this memory with other git processes. Since the memory will be shared, it will never be unmapped (although the kernel may of course choose to page it out). Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Tur

[PATCH v5 08/15] Add watchman support to reduce index refresh cost

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy The previous patch has the logic to clear bits in 'WAMA' bitmap. This patch has logic to set bits as told by watchman. The missing bit, _using_ these bits, are not here yet. A lot of this code is written by David Turner originally, mostly from [1]. I'm just copying and

[PATCH v5 05/15] daemonize(): set a flag before exiting the main process

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy This allows signal handlers and atexit functions to realize this situation and not clean up. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Turner --- builtin/gc.c | 2 +- cache.h | 2 +- daemon.c | 2 +- setup.c | 4 +++- 4 files changed, 6

[PATCH v5 13/15] index-helper: don't run if already running

2016-04-19 Thread David Turner
Signed-off-by: David Turner --- index-helper.c | 7 +++ t/t7900-index-helper.sh | 9 + 2 files changed, 16 insertions(+) diff --git a/index-helper.c b/index-helper.c index 6af01c9..8fcb76e 100644 --- a/index-helper.c +++ b/index-helper.c @@ -412,6 +412,13 @@ int main(int arg

[PATCH v5 15/15] index-helper: optionally automatically run

2016-04-19 Thread David Turner
Introduce a new config option, indexhelper.autorun, to automatically run git index-helper before starting up a builtin git command. This enables users to keep index-helper running without manual intervention. Signed-off-by: David Turner --- Documentation/config.txt | 4 read-cache.c

[PATCH v5 11/15] unpack-trees: preserve index extensions

2016-04-19 Thread David Turner
Make git checkout (and other unpack_tree operations) preserve the untracked cache and watchman status. This is valuable for two reasons: 1. Often, an unpack_tree operation will not touch large parts of the working tree, and thus most of the untracked cache will continue to be valid. 2. Even if th

[PATCH v5 14/15] index-helper: autorun mode

2016-04-19 Thread David Turner
Soon, we'll want to automatically start index-helper, so we need a mode that silently exits if it can't start up (either because it's not in a git dir, or because another one is already running). Signed-off-by: David Turner --- Documentation/git-index-helper.txt | 4 index-helper.c

[PATCH v5 06/15] index-helper: add --detach

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy We detach after creating and opening the socket, because otherwise we might return control to the shell before index-helper is ready to accept commands. This might lead to flaky tests. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: David Turner --- Documentatio

Re: [PATCH/RFC 4/6] transport: add refspec list parameters to functions

2016-04-19 Thread David Turner
On Tue, 2016-04-19 at 19:22 -0400, Jeff King wrote: > You can find previous discussion on the list, but I think the options > basically are: > > 1. Something like v2, where the client gets a chance to speak > before > the advertisement. > > 2. Some out-of-band way of getting values from

Re: [PATCH v5 10/15] update-index: enable/disable watchman support

2016-04-19 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 6:28 AM, David Turner wrote: > + if (use_watchman > 0) { > + the_index.last_update= xstrdup(""); > + the_index.cache_changed |= WATCHMAN_CHANGED; > + } else if (!use_watchman) { > + the_index.last_update= NULL; >

Re: [PATCH v5 06/15] index-helper: add --detach

2016-04-19 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 6:28 AM, David Turner wrote: > @@ -317,6 +320,8 @@ int main(int argc, char **argv) > if (fd < 0) > die_errno(_("could not set up index-helper socket")); > > + if (detach && daemonize(&daemonized)) > + die_errno(_("unable to detach

Re: [PATCH v5 09/15] index-helper: use watchman to avoid refreshing index with lstat()

2016-04-19 Thread Duy Nguyen
Continuing my comment from the --use-watchman patch about watchman not being supported... On Wed, Apr 20, 2016 at 6:28 AM, David Turner wrote: > +static int poke_and_wait_for_reply(int fd) > +{ > + struct strbuf buf = STRBUF_INIT; > + struct strbuf reply = STRBUF_INIT; > + int r

Re: [PATCH 4/6] Convert struct name_entry to use struct object_id.

2016-04-19 Thread Junio C Hamano
"brian m. carlson" writes: > On Tue, Apr 19, 2016 at 04:02:22PM -0700, Junio C Hamano wrote: >> "brian m. carlson" writes: >> >> > @@ -314,7 +314,7 @@ static int threeway_callback(int n, unsigned long >> > mask, unsigned long dirmask, s >> >} >> > >> >if (same_entry(entry+0, entry+1)

Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff

2016-04-19 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 6:27 AM, David Turner wrote: > Shared memory is done by storing files in a per-repository temporary > directory. This is more portable than shm (which requires > posix-realtime and has various quirks on OS X). It might even work on > Windows, although this has not been te

Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff

2016-04-19 Thread David Turner
On Wed, 2016-04-20 at 07:31 +0700, Duy Nguyen wrote: > On Wed, Apr 20, 2016 at 6:27 AM, David Turner < > dtur...@twopensource.com> wrote: > > Shared memory is done by storing files in a per-repository > > temporary > > directory. This is more portable than shm (which requires > > posix-realtime an

Re: [PATCH v5 09/15] index-helper: use watchman to avoid refreshing index with lstat()

2016-04-19 Thread David Turner
On Wed, 2016-04-20 at 07:15 +0700, Duy Nguyen wrote: > Continuing my comment from the --use-watchman patch about watchman > not > being supported... > > On Wed, Apr 20, 2016 at 6:28 AM, David Turner < > dtur...@twopensource.com> wrote: > > +static int poke_and_wait_for_reply(int fd) > > +{ > > +

Re: [PATCH v5 06/15] index-helper: add --detach

2016-04-19 Thread David Turner
On Wed, 2016-04-20 at 06:50 +0700, Duy Nguyen wrote: > On Wed, Apr 20, 2016 at 6:28 AM, David Turner < > dtur...@twopensource.com> wrote: > > @@ -317,6 +320,8 @@ int main(int argc, char **argv) > > if (fd < 0) > > die_errno(_("could not set up index-helper > > socket")); > >

Re: [PATCH/RFC 4/6] transport: add refspec list parameters to functions

2016-04-19 Thread Jeff King
On Tue, Apr 19, 2016 at 07:43:11PM -0400, David Turner wrote: > On Tue, 2016-04-19 at 19:22 -0400, Jeff King wrote: > > You can find previous discussion on the list, but I think the options > > basically are: > > > > 1. Something like v2, where the client gets a chance to speak > > before > >

Re: [PATCH] replace --edit: respect core.editor

2016-04-19 Thread Jeff King
On Tue, Apr 19, 2016 at 09:22:37AM -0700, Junio C Hamano wrote: > Johannes Schindelin writes: > > > We simply need to read the config, is all. > > > > This fixes https://github.com/git-for-windows/git/issues/733 > > > > Signed-off-by: Johannes Schindelin > > --- > > builtin/replace.c | 1 + > >

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-19 Thread Jeff King
[your original probably didn't make it to the list because of its 5MB attachment; the list has a 100K limit; I'll try to quote liberally] On Tue, Apr 19, 2016 at 04:17:50PM -0700, Jacob Keller wrote: > I ran this version of the patch against the entire Linux kernel > history, as I figured this h

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-19 Thread Jeff King
On Wed, Apr 20, 2016 at 12:18:27AM -0400, Jeff King wrote: > My earlier tests with the perl script were all done with "git log -p", > which will not show anything at all for merges (and my script wouldn't > know how to deal with combined diffs anyway). But I think this new patch > _will_ kick in f

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-19 Thread Stefan Beller
On Tue, Apr 19, 2016 at 9:18 PM, Jeff King wrote: > [your original probably didn't make it to the list because of its 5MB > attachment; the list has a 100K limit; I'll try to quote liberally] > > On Tue, Apr 19, 2016 at 04:17:50PM -0700, Jacob Keller wrote: > >> I ran this version of the patch ag

Re: [PATCH] replace --edit: respect core.editor

2016-04-19 Thread Christian Couder
On Wed, Apr 20, 2016 at 5:53 AM, Jeff King wrote: > On Tue, Apr 19, 2016 at 09:22:37AM -0700, Junio C Hamano wrote: > >> I can understand "we only know edit mode needs config, and we know >> it will never affect other modes to have the new call here", and it >> would be good for an emergency patch

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-19 Thread Junio C Hamano
Jeff King writes: > I mean that if you save any old patch-ids from "git patch-id", they > won't match up when compared with new versions of git. We can probably > ignore it, though. This isn't the first time that patch-ids might have > changed, and I think the advice is already that one should no

Re: [PATCH] replace --edit: respect core.editor

2016-04-19 Thread Johannes Schindelin
Hi Junio, On Tue, 19 Apr 2016, Junio C Hamano wrote: > "git blame -L475,6 builtin/replace.c" points at b892bb45 (replace: add > --edit option, 2014-04-26) and the commit log message names two people > who can review this change, so that is what I am doing here. D'oh. Sorry. Dscho -- To unsubscri

Re: [PATCH] replace --edit: respect core.editor

2016-04-19 Thread Johannes Schindelin
Hi Christian & Peff, On Wed, 20 Apr 2016, Christian Couder wrote: > On Wed, Apr 20, 2016 at 5:53 AM, Jeff King wrote: > > On Tue, Apr 19, 2016 at 09:22:37AM -0700, Junio C Hamano wrote: > > > >> I can understand "we only know edit mode needs config, and we know it > >> will never affect other mo

[PATCH v2] replace --edit: respect core.editor

2016-04-19 Thread Johannes Schindelin
We simply need to read the config, is all. This fixes https://github.com/git-for-windows/git/issues/733 Signed-off-by: Johannes Schindelin --- builtin/replace.c | 1 + 1 file changed, 1 insertion(+) Interdiff vs v1: diff --git a/builtin/replace.c b/builtin/replace.c index 02b13f6..b58c714 10

Re: [PATCH v2] replace --edit: respect core.editor

2016-04-19 Thread Jeff King
On Wed, Apr 20, 2016 at 08:38:03AM +0200, Johannes Schindelin wrote: > We simply need to read the config, is all. > > This fixes https://github.com/git-for-windows/git/issues/733 > > Signed-off-by: Johannes Schindelin Looks good to me. Thanks. -Peff -- To unsubscribe from this list: send the

<    1   2