[PATCH v13 15/20] index-helper: kill mode

2016-06-25 Thread David Turner
From: David Turner <dtur...@twopensource.com> 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 <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- Docum

[PATCH v13 18/20] index-helper: optionally automatically run

2016-06-25 Thread David Turner
From: David Turner <dtur...@twopensource.com> 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

[PATCH v13 14/20] watchman: add a config option to enable the extension

2016-06-25 Thread David Turner
From: David Turner <dtur...@twopensource.com> For installations that have centrally-managed configuration, it's easier to set a config once than to run update-index on every repository. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gi

[PATCH v13 16/20] index-helper: don't run if already running

2016-06-25 Thread David Turner
From: David Turner <dtur...@twopensource.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- index-helper.c | 7 +++ t/t7900-index-helper.sh | 9 + 2 files changed, 16 insertions(+) diff --git

[PATCH v13 05/20] index-helper: add --strict

2016-06-25 Thread David Turner
uot;this shm is ready") and before verify_shm() detects an error. Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- Documentation/git-index-helper.txt | 9

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

2016-06-25 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- read-cache.c | 2 +- 1 file changed, 1 insertion(+), 1

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

2016-06-25 Thread David Turner
gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- cache.h | 3 +++ read-cache.c | 13 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index b829410..4180e2b 10

[PATCH v13 04/20] index-helper: new daemon for caching index and related stuff

2016-06-25 Thread David Turner
on-control.git/247268/focus=248771 Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- .gitignore

[PATCH v13 03/20] pkt-line: add gentle version of packet_write

2016-06-25 Thread David Turner
From: David Turner <dtur...@twopensource.com> packet_write calls write_or_die, which dies with a sigpipe even if calling code has explicitly blocked that signal. Add packet_write_gently and packet_flush_gently, which don't. Soon, we will use this for communication with git index-helper,

[PATCH v13 07/20] index-helper: add --detach

2016-06-25 Thread David Turner
m> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 9 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation

Re: [PATCH v12 00/20] index-helper/watchman

2016-06-25 Thread David Turner
On 06/25/2016 09:28 AM, Duy Nguyen wrote: On Thu, May 19, 2016 at 11:45 PM, David Turner <dtur...@twopensource.com> wrote: Of course, as soon as I pinged on the previous version, I noticed an issue. ... A bit off-topic, but you may want to cut a release for libwatchman (even 0.1.0 wo

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-25 Thread David Turner
On 06/25/2016 10:33 AM, Duy Nguyen wrote: + /* +* Our connection to the client is blocking since a client +* can always be killed by SIGINT or similar. +*/ + set_socket_blocking_flag(client_fd, 0); Out of curiosity, do

Re: [PATCH v12 11/20] index-helper: use watchman to avoid refreshing, index with lstat()

2016-06-23 Thread David Turner
On 06/19/2016 01:07 AM, David Turner wrote: Duy Nguyen <pclo...@gmail.com> wrote: > On Fri, May 20, 2016 at 4:45 AM, David Turner <dtur...@twopensource.com> wrote: > > diff --git a/read-cache.c b/read-cache.c > > index 1719f5a..8ec4be3 100644 > > --- a/read

Re: [PATCH v12 11/20] index-helper: use watchman to avoid refreshing, index with lstat()

2016-06-18 Thread David Turner
Duy Nguyen <pclo...@gmail.com> wrote: > On Fri, May 20, 2016 at 4:45 AM, David Turner <dtur...@twopensource.com> wrote: > > diff --git a/read-cache.c b/read-cache.c > > index 1719f5a..8ec4be3 100644 > > --- a/read-cache.c > > +++ b/read-cache.c >

Re: [PATCH] pathspec: prevent empty strings as pathspecs

2016-06-18 Thread David Turner
On 06/18/2016 11:10 PM, Junio C Hamano wrote: Emily Xie writes: For any command that takes a pathspec, passing an empty string will execute the command on all files in the current directory. This results in unexpected behavior. For example, git add "" adds all files to

Re: [PATCH] pathspec: prevent empty strings as pathspecs

2016-06-18 Thread David Turner
ging, while git rm -rf "" recursively removes all files > from the working tree and index. This patch prevents such cases by > throwing an error message whenever an empty string is detected as a > pathspec. > > Signed-off-by: Emily Xie <emilyx...@gmail.com> > Re

Re: [PATCH v12 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-06-17 Thread David Turner
> > - if (really && cache_errno == EINVAL) { > > + if (really || cache_errno == EINVAL) { > > /* If we are doing --really-refresh that > > * means the index is not valid anymore. > >

Re: [PATCH v2 5/6] lock_ref_for_update(): make error handling more uniform

2016-06-10 Thread David Turner
On Fri, 2016-06-10 at 10:14 +0200, Michael Haggerty wrote: > /* > + * Check whether the REF_HAVE_OLD and old_oid values stored in update > + * are consistent with the result read for the reference. error is > + * true iff there was an error reading the reference; otherwise, oid "error" is not a

Re: Signing off, for now

2016-06-03 Thread David Turner
On Tue, 2016-05-24 at 15:22 -0400, David Turner wrote: > - Protocol v2: I would like to get a new draft of Stefan's series out > before I leave, but no promises. It's turned out to be a bit more > complicated than I expected to support HTTP. At worst, I'll toss my > WIP on github and

Re: [PATCH v2 00/13] Reference iterators

2016-06-03 Thread David Turner
On Fri, 2016-06-03 at 14:33 +0200, Michael Haggerty wrote: > This is v2 of a patch series to implement iteration over references > via iterators. Thanks to Ramsay, Eric, Junio, and David for their > feedback about v1 [1]. I think I have addressed all of the points > that > were raised. In case I

Re: [PATCH 0/2] strbuf: improve API

2016-06-01 Thread David Turner
On Wed, 2016-06-01 at 16:09 -0400, Jeff King wrote: > On Wed, Jun 01, 2016 at 03:50:29PM -0400, David Turner wrote: > > > On Wed, 2016-06-01 at 03:42 -0400, Jeff King wrote: > > > 2. Do caching tricks for strbufs used in tight loops. For > > > example, > > &g

Re: [PATCH 0/2] strbuf: improve API

2016-06-01 Thread David Turner
On Wed, 2016-06-01 at 03:42 -0400, Jeff King wrote: > 2. Do caching tricks for strbufs used in tight loops. For example, > have strbuf_release() throw its buffer into a last-used cache, > and > let the next strbuf_grow() use that cache entry. This cuts > malloc() > out of the

Re: [PATCH 2/4] reachable.c: mark reachable objects in index from all worktrees

2016-06-01 Thread David Turner
On Wed, 2016-06-01 at 17:45 +0700, Nguyễn Thái Ngọc Duy wrote: > Current mark_reachable_objects() only marks objects from index from > _current_ worktree as reachable instead of all worktrees. Because > this > function is used for pruning, there is a chance that objects > referenced > by other

Re: [PATCH 12/13] dir_iterator: new API for iterating over a directory tree

2016-05-31 Thread David Turner
On Mon, 2016-05-30 at 09:55 +0200, Michael Haggerty wrote: > +struct dir_iterator_level { > + int initialized; > + > + DIR *dir; > + > + /* > + * The length of the directory part of refname at this level "refname"? Isn't this was for directories? > + if

Re: [WIP PATCH 00/14] Protocol v2 patches

2016-05-25 Thread David Turner
On Wed, 2016-05-25 at 09:23 -0700, Junio C Hamano wrote: > David Turner <dtur...@twopensource.com> writes: > > > I was looking at this again today, and noticed that it doesn't > > really > > address the HTTP case. > > > > The central problem is that prot

Re: [WIP PATCH 00/14] Protocol v2 patches

2016-05-25 Thread David Turner
On Wed, 2016-05-25 at 06:03 +0700, Duy Nguyen wrote: > On Wed, May 25, 2016 at 5:46 AM, David Turner < > dtur...@twopensource.com> wrote: > > I was looking at this again today, and noticed that it doesn't > > really > > address the HTTP case. > > > > Th

Re: [WIP PATCH 00/14] Protocol v2 patches

2016-05-24 Thread David Turner
I was looking at this again today, and noticed that it doesn't really address the HTTP case. The central problem is that protocol v2 goes like this: server: I have capabilities w,x,y, and z client: I want capabilities x and z. But HTTP goes like this: client: [request] server: [response] I

Signing off, for now

2016-05-24 Thread David Turner
June 3rd will be my last day at Twitter. I hope that my new job (starting in July after a month of vacation) will give me time to work on Git, but I don't know exactly what parts I'll be working on, or on what schedule. As a result, some of my patchsets may get significantly less of my

[PATCH v12 18/20] index-helper: optionally automatically run

2016-05-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 <dtur...@twopensource.com> --- Documentation/conf

[PATCH v12 19/20] trace: measure where the time is spent in the index-heavy operations

2016-05-19 Thread David Turner
c:2565 performance: 0.004052343 s: write index, changed mask = 2 trace.c:420 performance: 0.048365509 s: git command: './git' 'status' Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- diff-lib.c

[PATCH v12 14/20] watchman: add a config option to enable the extension

2016-05-19 Thread David Turner
For installations that have centrally-managed configuration, it's easier to set a config once than to run update-index on every repository. Signed-off-by: David Turner <dtur...@twopensource.com> --- .gitignore| 1 + Documentation/config.txt | 4 Ma

[PATCH v12 08/20] index-helper: log warnings

2016-05-19 Thread David Turner
Instead of writing warnings to stderr, write them to a log. Later, we'll probably be daemonized, so writing to stderr will be pointless. Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c

[PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-05-19 Thread David Turner
on-control.git/247268/focus=248771 Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- .gitignore | 1

[PATCH v12 17/20] index-helper: autorun mode

2016-05-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 <dtur...@twopensource.com> --- Documentation/git-index-helper.tx

[PATCH v12 12/20] update-index: enable/disable watchman support

2016-05-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ Documentation/git-update-index.txt | 6 ++ builtin/update-index.

[PATCH v12 10/20] watchman: support watchman to reduce index refresh cost

2016-05-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> 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 f

[PATCH v12 09/20] read-cache: add watchman 'WAMA' extension

2016-05-19 Thread David Turner
ed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/technical/index-format.txt | 22 ++ cache.h | 4 ++ dir.h| 3 + read-cache.c

[PATCH v12 20/20] index-helper: indexhelper.exitafter config

2016-05-19 Thread David Turner
to a high value. Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/config.txt | 4 index-helper.c | 2 ++ t/t7900-index-helper.sh | 8 3 files changed, 14 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 3

[PATCH v12 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-19 Thread David Turner
-helper. Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 6 + cache.h| 2 + dir.c

[PATCH v12 16/20] index-helper: don't run if already running

2016-05-19 Thread David Turner
Signed-off-by: David Turner <dtur...@twopensource.com> --- 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 4a171e6..ddc641a 100644 --- a/index-helper.c +++ b/index-helper.c @@

[PATCH v12 15/20] index-helper: kill mode

2016-05-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 <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 31

[PATCH v12 05/20] index-helper: add --strict

2016-05-19 Thread David Turner
uot;this shm is ready") and before verify_shm() detects an error. Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 9 +++ cache.h| 1 + i

[PATCH v12 13/20] unpack-trees: preserve index extensions

2016-05-19 Thread David Turner
if the untracked cache were entirely invalidated by such an operation, the user has signaled their intention to have such a cache, and we don't want to throw it away. The same logic applies to the watchman state. Signed-off-by: David Turner <dtur...@twopensource.com> --- c

[PATCH v12 06/20] daemonize(): set a flag before exiting the main process

2016-05-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> 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 <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- builtin/gc.c | 2 +-

[PATCH v12 03/20] pkt-line: add gentle version of packet_write

2016-05-19 Thread David Turner
be permitted to die without disrupting clients. Signed-off-by: David Turner <dtur...@twopensource.com> --- pkt-line.c | 18 ++ pkt-line.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/pkt-line.c b/pkt-line.c index 62fdb37..f964446 100644 --- a/pkt-line.c +++ b/pkt-line.c @@

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

2016-05-19 Thread David Turner
gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- cache.h | 3 +++ read-cache.c | 13 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index b829410..4180e2b 100644 --- a/cache.h +++ b/cache.h @@ -333,11 +333,14 @@

[PATCH v12 07/20] index-helper: add --detach

2016-05-19 Thread David Turner
m> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 9 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/git-index-helper.txt b/Documentation/git-index-helper

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

2016-05-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- read-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/read-cache.c b/read-cache.c inde

[PATCH v12 00/20] index-helper/watchman

2016-05-19 Thread David Turner
on automatically-run index-helpers, so I fixed that (with a new patch at the end of the series). Everything else is the same as the updated version of v11. David Turner (9): pkt-line: add gentle version of packet_write index-helper: log warnings unpack-trees: preserve index extensions watchman

Re: [PATCH v10 00/20] index-helper/watchman

2016-05-19 Thread David Turner
On Thu, 2016-05-19 at 13:11 -0700, Junio C Hamano wrote: > David Turner <dtur...@twopensource.com> writes: > > > Do folks have any more comments on this version? > > Not from me at the moment. > > > Do I need to re-roll > > to replace 11/20 as I propose

Re: [PATCH v10 00/20] index-helper/watchman

2016-05-19 Thread David Turner
Do folks have any more comments on this version? Do I need to re-roll to replace 11/20 as I proposed and drop 20/20? Thanks. On Thu, 2016-05-12 at 16:19 -0400, David Turner wrote: > packet_write was causing the sigpipes (by calling write_or_die, which > intentionally overrides the ca

Re: [PATCH 04/14] connect: rewrite feature parsing to work on string_list

2016-05-17 Thread David Turner
On Wed, 2016-05-04 at 13:13 -0700, Junio C Hamano wrote: > Stefan Beller writes: > > > Later on when we introduce the version 2 transport protocol, the > > capabilities will not be transported in one lone string but each > > s/lone/long/, I think. > > > capability will be

Re: [RFD PATCH 0/3] Free all the memory!

2016-05-16 Thread David Turner
On Mon, 2016-05-16 at 20:22 -0700, Stefan Beller wrote: > When using automated tools to find memory leaks, it is hard to > distinguish > between actual leaks and intentional non-cleanups at the end of the > program, > such that the actual leaks hide in the noise. valgrind on git rev-parse HEAD

Re: [PATCH v10 20/20] untracked-cache: config option

2016-05-16 Thread David Turner
On Sun, 2016-05-15 at 16:43 +0700, Duy Nguyen wrote: > On Fri, May 13, 2016 at 3:20 AM, David Turner < > dtur...@twopensource.com> wrote: > > Add a config option to populate the untracked cache. > > > > For installations that have centrally-managed configuration, i

[PATCH v10 ter] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-13 Thread David Turner
-helper. Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Right, let's try this one instead. The actual segfault that Ramsay points out will not happen in ord

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

2016-05-13 Thread David Turner
per. Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Can we just replace this one patch? Documentation/git-index-helper.txt | 6 + cache.h| 2 + dir.c

Re: [PATCH v10 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-13 Thread David Turner
On Fri, 2016-05-13 at 00:10 +0100, Ramsay Jones wrote: > > On 12/05/16 21:20, David Turner wrote: > > From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> > [snip] > > > > > +/* in ms */ > > +#define WATCHMAN_TIMEOUT 1000 > > + > > +static int

[PATCH v10 16/20] index-helper: don't run if already running

2016-05-12 Thread David Turner
Signed-off-by: David Turner <dtur...@twopensource.com> --- 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 a1b33e4..7b893a0 100644 --- a/index-helper.c +++ b/index-helper.c @@

[PATCH v10 04/20] index-helper: new daemon for caching index and related stuff

2016-05-12 Thread David Turner
on-control.git/247268/focus=248771 Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- .gitignore | 1

[PATCH v10 12/20] update-index: enable/disable watchman support

2016-05-12 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ Documentation/git-update-index.txt | 6 ++ builtin/update-index.

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

2016-05-12 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- read-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/read-cache.c b/read-cache.c inde

[PATCH v10 08/20] index-helper: log warnings

2016-05-12 Thread David Turner
Instead of writing warnings to stderr, write them to a log. Later, we'll probably be daemonized, so writing to stderr will be pointless. Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c

[PATCH v10 00/20] index-helper/watchman

2016-05-12 Thread David Turner
packet_write was causing the sigpipes (by calling write_or_die, which intentionally overrides the caller's preferences about signal handling). This version fixes that. I didn't test on a virtual machine, but I did test by adding a sleep(). David Turner (9): pkt-line: add gentle version

[PATCH v10 17/20] index-helper: autorun mode

2016-05-12 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 <dtur...@twopensource.com> --- Documentation/git-index-helper.tx

[PATCH v10 13/20] unpack-trees: preserve index extensions

2016-05-12 Thread David Turner
if the untracked cache were entirely invalidated by such an operation, the user has signaled their intention to have such a cache, and we don't want to throw it away. The same logic applies to the watchman state. Signed-off-by: David Turner <dtur...@twopensource.com> --- c

[PATCH v10 19/20] trace: measure where the time is spent in the index-heavy operations

2016-05-12 Thread David Turner
c:2565 performance: 0.004052343 s: write index, changed mask = 2 trace.c:420 performance: 0.048365509 s: git command: './git' 'status' Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- diff-lib.c

[PATCH v10 14/20] watchman: add a config option to enable the extension

2016-05-12 Thread David Turner
For installations that have centrally-managed configuration, it's easier to set a config once than to run update-index on every repository. Signed-off-by: David Turner <dtur...@twopensource.com> --- .gitignore| 1 + Documentation/config.txt | 4 Ma

[PATCH v10 06/20] daemonize(): set a flag before exiting the main process

2016-05-12 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> 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 <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- builtin/gc.c | 2 +-

[PATCH v10 07/20] index-helper: add --detach

2016-05-12 Thread David Turner
m> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 9 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/git-index-helper.txt b/Documentation/git-index-helper

[PATCH v10 20/20] untracked-cache: config option

2016-05-12 Thread David Turner
Add a config option to populate the untracked cache. For installations that have centrally-managed configuration, it's easier to set a config once than to run update-index on every repository. Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/config.txt | 4

[PATCH v10 05/20] index-helper: add --strict

2016-05-12 Thread David Turner
uot;this shm is ready") and before verify_shm() detects an error. Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 9 +++ cache.h| 1 + i

[PATCH v10 18/20] index-helper: optionally automatically run

2016-05-12 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 <dtur...@twopensource.com> --- Documentation/conf

[PATCH v10 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-12 Thread David Turner
per. Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 6 + cache.h| 2 + dir.c | 23 +++- dir.h

[PATCH v10 03/20] pkt-line: add gentle version of packet_write

2016-05-12 Thread David Turner
be permitted to die without disrupting clients. Signed-off-by: David Turner <dtur...@twopensource.com> --- pkt-line.c | 18 ++ pkt-line.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/pkt-line.c b/pkt-line.c index 62fdb37..f964446 100644 --- a/pkt-line.c +++ b/pkt-line.c @@

[PATCH v10 15/20] index-helper: kill mode

2016-05-12 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 <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 31

[PATCH v10 10/20] watchman: support watchman to reduce index refresh cost

2016-05-12 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> 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 f

[PATCH v10 09/20] read-cache: add watchman 'WAMA' extension

2016-05-12 Thread David Turner
ed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/technical/index-format.txt | 22 ++ cache.h | 4 ++ dir.h| 3 + read-cache.c

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

2016-05-12 Thread David Turner
gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- cache.h | 3 +++ read-cache.c | 13 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index b829410..4180e2b 100644 --- a/cache.h +++ b/cache.h @@ -333,11 +333,14 @@

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

2016-05-10 Thread David Turner
Will do, thanks. On Tue, 2016-05-10 at 12:13 +0200, SZEDER Gábor wrote: > This patch adds a new plumbing command, which then will show up in > completion after 'git '. Could you please squash in this > oneliner to exclude index-helper from porcelain commands in the > completion script? > > >

Re: [PATCH v9 00/19] index-helper/watchman

2016-05-09 Thread David Turner
On Mon, 2016-05-09 at 15:32 -0700, Junio C Hamano wrote: > Junio C Hamano <gits...@pobox.com> writes: > > > David Turner <dtur...@twopensource.com> writes: > > > > > On Mon, 2016-05-09 at 14:40 -0700, Junio C Hamano wrote: > > > > Hmmm, I se

Re: [PATCH v9 00/19] index-helper/watchman

2016-05-09 Thread David Turner
On Mon, 2016-05-09 at 14:40 -0700, Junio C Hamano wrote: > Hmmm, I seem to be getting > > $ cat t/trash*7900*/err > fatal: Already running > > after running t7900 and it fails at #5, after applying > "index-helper: optionally automatically run" It still passes for me (with or without

[PATCH v9 05/19] index-helper: log warnings

2016-05-09 Thread David Turner
Instead of writing warnings to stderr, write them to a log. Later, we'll probably be daemonized, so writing to stderr will be pointless. Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c

[PATCH v9 19/19] untracked-cache: config option

2016-05-09 Thread David Turner
Add a config option to populate the untracked cache. For installations that have centrally-managed configuration, it's easier to set a config once than to run update-index on every repository. Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/config.txt | 4

[PATCH v9 17/19] index-helper: optionally automatically run

2016-05-09 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 <dtur...@twopensource.com> --- Documentation/conf

[PATCH v9 18/19] trace: measure where the time is spent in the index-heavy operations

2016-05-09 Thread David Turner
c:2565 performance: 0.004052343 s: write index, changed mask = 2 trace.c:420 performance: 0.048365509 s: git command: './git' 'status' Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- diff-lib.c

[PATCH v9 04/19] index-helper: add --strict

2016-05-09 Thread David Turner
uot;this shm is ready") and before verify_shm() detects an error. Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 9 +++ cache.h| 1 + i

[PATCH v9 11/19] update-index: enable/disable watchman support

2016-05-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ Documentation/git-update-index.txt | 6 ++ builtin/update-index.

[PATCH v9 13/19] watchman: add a config option to enable the extension

2016-05-09 Thread David Turner
For installations that have centrally-managed configuration, it's easier to set a config once than to run update-index on every repository. Signed-off-by: David Turner <dtur...@twopensource.com> --- .gitignore| 1 + Documentation/config.txt | 4 Ma

[PATCH v9 10/19] index-helper: use watchman to avoid refreshing index with lstat()

2016-05-09 Thread David Turner
per. Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 6 + cache.h| 2 + dir.c | 23 +++- dir.h

[PATCH v9 16/19] index-helper: autorun mode

2016-05-09 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 <dtur...@twopensource.com> --- Documentation/git-index-helper.tx

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

2016-05-09 Thread David Turner
on-control.git/247268/focus=248771 Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> --- .gitignore | 1 + Documentation/git-index-he

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

2016-05-09 Thread David Turner
Signed-off-by: David Turner <dtur...@twopensource.com> --- 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 4ed1610..b275f6e 100644 --- a/index-helper.c +++ b/index-helper.c @@

[PATCH v9 09/19] watchman: support watchman to reduce index refresh cost

2016-05-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> 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 f

[PATCH v9 14/19] index-helper: kill mode

2016-05-09 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 <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 31

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

2016-05-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- read-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/read-cache.c b/read-cache.c inde

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

2016-05-09 Thread David Turner
gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- cache.h | 3 +++ read-cache.c | 13 - 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index b829410..4180e2b 100644 --- a/cache.h +++ b/cache.h @@ -333,11 +333,14 @@

[PATCH v9 08/19] read-cache: add watchman 'WAMA' extension

2016-05-09 Thread David Turner
ed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/technical/index-format.txt | 22 ++ cache.h | 4 ++ dir.h| 3 + read-cache.c

[PATCH v9 12/19] unpack-trees: preserve index extensions

2016-05-09 Thread David Turner
if the untracked cache were entirely invalidated by such an operation, the user has signaled their intention to have such a cache, and we don't want to throw it away. The same logic applies to the watchman state. Signed-off-by: David Turner <dtur...@twopensource.com> --- c

[PATCH v9 07/19] index-helper: add --detach

2016-05-09 Thread David Turner
m> Signed-off-by: David Turner <dtur...@twopensource.com> --- Documentation/git-index-helper.txt | 3 +++ index-helper.c | 15 +-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Documentation/git-index-helper.txt b/Documentation/git-inde

[PATCH v9 06/19] daemonize(): set a flag before exiting the main process

2016-05-09 Thread David Turner
From: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> 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 <pclo...@gmail.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- builtin/gc.c | 2 +-

<    1   2   3   4   5   6   7   8   9   10   >