Git Merge contributor summit notes

2018-03-09 Thread Alex Vandiver
It was great to meet some of you in person! Some notes from the Contributor Summit at Git Merge are below. Taken in haste, so my apologies if there are any mis-statements. - Alex "Does anyone think there's a

Re: [PATCH] Makefile: replace perl/Makefile.PL with simple make rules

2017-12-21 Thread Alex Vandiver
On Thu, 30 Nov 2017, Jeff King wrote: > On Wed, Nov 29, 2017 at 07:54:30PM +, Ævar Arnfjörð Bjarmason wrote: > > > Replace the perl/Makefile.PL and the fallback perl/Makefile used under > > NO_PERL_MAKEMAKER=NoThanks with a much simpler implementation heavily > > inspired by how the i18n

Re: [PATCH 4/6] fsmonitor: Add a trailing newline to test-dump-fsmonitor

2017-12-20 Thread Alex Vandiver
On Tue, 19 Dec 2017, Junio C Hamano wrote: > That (and existing) uses of printf() all feel a bit overkill ;-) > Perhaps putchar() would suffice. > > I am not sure if the above wants to become something like > > for (i = 0; i < istate->cache_nr; i++) { >

Re: [PATCH 3/6] fsmonitor: Update helper tool, now that flags are filled later

2017-12-20 Thread Alex Vandiver
On Mon, 18 Dec 2017, Alex Vandiver wrote: > dd9005a0a ("fsmonitor: delay updating state until after split index is > merged", 2017-10-27) began deferring the setting of the > CE_FSMONITOR_VALID flag until later, such that do_read_index() does > not perform those steps. Th

Re: [PATCH 2/6] fsmonitor: Add dir.h include, for untracked_cache_invalidate_path

2017-12-20 Thread Alex Vandiver
On Tue, 19 Dec 2017, Junio C Hamano wrote: > Alex Vandiver <ale...@dropbox.com> writes: > > > Subject: Re: [PATCH 2/6] fsmonitor: Add dir.h include, for > > untracked_cache_invalidate_path > > Perhaps > > "Subject: fsmonitor.h: include dir.h"

[PATCH 5/6] fsmonitor: Remove debugging lines from t/t7519-status-fsmonitor.sh

2017-12-18 Thread Alex Vandiver
These were mistakenly left in when the test was introduced, in 1487372d3 ("fsmonitor: store fsmonitor bitmap before splitting index", 2017-11-09) Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- t/t7519-status-fsmonitor.sh | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 6/6] fsmonitor: Use fsmonitor data in `git diff`

2017-12-18 Thread Alex Vandiver
it shell prompt when GIT_PS1_SHOWDIRTYSTATE is set. Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- builtin/add.c | 2 +- diff-lib.c| 6 ++ diff.h| 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/builtin/add.c b/builtin/add.c index bf01d89e2..bba20b46e 100644 --- a/b

Re: [PATCH 2/2] fsmonitor: Store fsmonitor bitmap before splitting index

2017-12-15 Thread Alex Vandiver
On Mon, 13 Nov 2017, Ben Peart wrote: > Why do you redirect stdout to stderr and then and perform an "echo" > afterwards? I don't understand what benefit that provides. I removed this > logic and the test still passes so am confused as to what its purpose is. Ah -- the "echo" was purely to

[PATCH 0/2] fsmonitor: Stop reading from PWD, write fsmonitor+split index right

2017-11-09 Thread Alex Vandiver
A couple further patches for the fsmonitor branch, which ideally I'd have noticed before my previous series landed. In the first patch I believe I've found the underlying reason for the PWD confusion in the previous go-around -- but I'm not sure I'm wholly convinced about my solution to it.

[PATCH 2/2] fsmonitor: Store fsmonitor bitmap before splitting index

2017-11-09 Thread Alex Vandiver
itor_dirty is kept from being leaked by being freed when the extension data is written -- which always happens precisely once, no matter the split index configuration. Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- fsmonitor.c | 20 fsmonitor.h

[PATCH 1/2] fsmonitor: Read from getcwd(), not the PWD environment variable

2017-11-09 Thread Alex Vandiver
through a shell. Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- t/t7519/fsmonitor-watchman | 3 ++- templates/hooks--fsmonitor-watchman.sample | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t7519/fsmonitor-watchman b/t/t7519/fsmonitor-watchman

Re: [PATCH v3 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-31 Thread Alex Vandiver
On Tue, 31 Oct 2017, Junio C Hamano wrote: > This makes local variable "int i;" in this function unused and gets > compiler warning. Apologies for leaving that detritus -- I saw you added a 'SQUASH??' commit to deal with it, which LGTM. On Tue, 31 Oct 2017, Johannes Schindelin wrote: > ... to

Re: [PATCH v2] read_index_from(): Skip verification of the cache entry order to speed index loading

2017-10-30 Thread Alex Vandiver
On Mon, 30 Oct 2017, Jeff King wrote: > On Mon, Oct 30, 2017 at 08:48:48AM -0400, Ben Peart wrote: > > > Any updates or thoughts on this one? While the patch has become quite > > trivial, it does results in a savings of 5%-15% in index load time. > > I like the general direction of avoiding the

[PATCH v3 1/4] fsmonitor: Set the PWD to the top of the working tree

2017-10-27 Thread Alex Vandiver
the CWD to the top of the working directory, for consistency. Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- fsmonitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fsmonitor.c b/fsmonitor.c index 7c1540c05..4ea44dcc6 100644 --- a/fsmonitor.c +++ b/fsmonitor.c @@ -121,6 +121,7 @@

[PATCH v3] 0/4 fsmonitor fixes

2017-10-27 Thread Alex Vandiver
Updates since v2: - Fix tab which crept into 1/4 - Fixed the benchmarking code in the commit message in 2/4 to just always load JSON::XS -- the previous version was the version where I'd broken that to force loading of JSON::PP. - Remove the --no-pretty from the t/ version of

[PATCH v3 3/4] fsmonitor: Document GIT_TRACE_FSMONITOR

2017-10-27 Thread Alex Vandiver
Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- Documentation/git.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/git.txt b/Documentation/git.txt index 1fca63634..720db196e 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -594,6 +

[PATCH v3 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-27 Thread Alex Vandiver
tmap until after tweak_split_index has been called to merge in the base index as well. The new fsmonitor_dirty is kept from being leaked by dint of being cleaned up in post_read_index_from, which is guaranteed to be called after do_read_index in read_index_from. Signed-off-by: Alex Van

[PATCH v3 2/4] fsmonitor: Don't bother pretty-printing JSON from watchman

2017-10-27 Thread Alex Vandiver
, "$ENV{PWD}", {}]|; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; JSON::XS->new->utf8->decode($response); Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- templates/hooks--fsmonitor-watchman.sample | 2 +- 1 file changed,

Re: [PATCH v2 1/4] fsmonitor: Set the PWD to the top of the working tree

2017-10-27 Thread Alex Vandiver
On Thu, 26 Oct 2017, Ben Peart wrote: > I saw your response but actually can't replicate it locally. I've been > running with Watchman integration on all my repos for months and my "watchman > watch-list" command only shows the root of the various working directories - > no subdirectories.

Re: [PATCH v2 2/4] fsmonitor: Don't bother pretty-printing JSON from watchman

2017-10-26 Thread Alex Vandiver
On Thu, 26 Oct 2017, Ben Peart wrote: > On 10/25/2017 9:31 PM, Alex Vandiver wrote: > > diff --git a/t/t7519/fsmonitor-watchman b/t/t7519/fsmonitor-watchman > > index a3e30bf54..79f24325c 100755 > > --- a/t/t7519/fsmonitor-watchman > > +++ b/t/t7519/fsmonitor-

Re: [PATCH v2 1/4] fsmonitor: Set the PWD to the top of the working tree

2017-10-26 Thread Alex Vandiver
On Thu, 26 Oct 2017, Ben Peart wrote: > On 10/25/2017 9:31 PM, Alex Vandiver wrote: > > diff --git a/fsmonitor.c b/fsmonitor.c > > index 7c1540c05..0d26ff34f 100644 > > --- a/fsmonitor.c > > +++ b/fsmonitor.c > > @@ -121,6 +121,7 @@ static int query_fsmonitor(int

Re: [PATCH v2 1/4] fsmonitor: Set the PWD to the top of the working tree

2017-10-25 Thread Alex Vandiver
On Wed, 25 Oct 2017, Alex Vandiver wrote: > The fsmonitor command inherits the PWD of its caller, which may be > anywhere in the working copy. This makes is difficult for the > fsmonitor command to operate on the whole repository. Specifically, > for the watchman integration, this

[PATCH v2 1/4] fsmonitor: Set the PWD to the top of the working tree

2017-10-25 Thread Alex Vandiver
the CWD to the top of the working directory, for consistency. Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- fsmonitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fsmonitor.c b/fsmonitor.c index 7c1540c05..0d26ff34f 100644 --- a/fsmonitor.c +++ b/fsmonitor.c @@ -121,6 +121,7 @@

[PATCH v2 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-25 Thread Alex Vandiver
tmap until after tweak_split_index has been called to merge in the base index as well. The new fsmonitor_dirty is kept from being leaked by dint of being cleaned up in post_read_index_from, which is guaranteed to be called after do_read_index in read_index_from. Signed-off-by: Alex Van

[PATCH v2 3/4] fsmonitor: Document GIT_TRACE_FSMONITOR

2017-10-25 Thread Alex Vandiver
Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- Documentation/git.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/git.txt b/Documentation/git.txt index 1fca63634..720db196e 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -594,6 +

[PATCH v2 2/4] fsmonitor: Don't bother pretty-printing JSON from watchman

2017-10-25 Thread Alex Vandiver
]|; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; }; my $json_pkg; eval { require JSON::XSomething; $json_pkg = "JSON::XSomething"; 1; } or do { require JSON::PP; $json_pkg = "JSON::PP"; }

[PATCH v2 0/4] fsmonitor fixes

2017-10-25 Thread Alex Vandiver
Updated based on comments from Dscho and Ben. Thanks for those! - Alex

Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-25 Thread Alex Vandiver
On Fri, 20 Oct 2017, Johannes Schindelin wrote: > From the diff, it is not immediately clear that fsmonitor_dirty is not > leaked in any code path. > > Could you clarify this in the commit message, please? Will do! > > @@ -238,6 +225,29 @@ void remove_fsmonitor(struct index_state *istate) > >

Re: [PATCH 2/4] fsmonitor: Don't bother pretty-printing JSON from watchman

2017-10-25 Thread Alex Vandiver
On Fri, 20 Oct 2017, Ben Peart wrote: > > While I am very much infavor of this change (I was not aware of the > > --no-pretty option), I would like to see some statistics on that. Could > > you measure the impact, please, and include the results in the commit > > message? > > > > Ciao, > >

Re: [PATCH 1/4] fsmonitor: Watch, and ask about, the top of the repo, not the CWD

2017-10-25 Thread Alex Vandiver
On Fri, 20 Oct 2017, Johannes Schindelin wrote: > This is super expensive, as it means a full-blown new process instead of > just a simple environment variable expansion. > > The idea behind using `PWD` instead was that Git will already have done > all of the work of figuring out the top-level

[PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-19 Thread Alex Vandiver
tmap until after tweak_split_index has been called to merge in the base index as well. Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- cache.h | 1 + fsmonitor.c | 38 -- read-cache.c | 4 3 files changed, 29 insertions(+), 14 deletion

[PATCH 1/4] fsmonitor: Watch, and ask about, the top of the repo, not the CWD

2017-10-19 Thread Alex Vandiver
Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- t/t7519/fsmonitor-watchman | 3 ++- templates/hooks--fsmonitor-watchman.sample | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t7519/fsmonitor-watchman b/t/t7519/fsmonitor-watchman index a3e

[PATCH 0/4] fsmonitor fixes

2017-10-19 Thread Alex Vandiver
A few fixes found from playing around with the fsmonitor branch in next. - Alex

[PATCH 3/4] fsmonitor: Document GIT_TRACE_FSMONITOR

2017-10-19 Thread Alex Vandiver
Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- Documentation/git.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/git.txt b/Documentation/git.txt index 1fca63634..720db196e 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -594,6 +

[PATCH 2/4] fsmonitor: Don't bother pretty-printing JSON from watchman

2017-10-19 Thread Alex Vandiver
This provides small performance savings. Signed-off-by: Alex Vandiver <ale...@dropbox.com> --- t/t7519/fsmonitor-watchman | 2 +- templates/hooks--fsmonitor-watchman.sample | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t7519/fsmonitor-watchman b/t

Re: [RFC] Reporting index properties

2017-10-06 Thread Alex Vandiver
On Fri, 6 Oct 2017, Junio C Hamano wrote: > Yes, and I am saying that such logic should not live in standard > install outside developer tools ;-) Fair enough. It seems a little odd to me that git provides logic for _altering_ those bits, but not to report on the state that can be so altered.

Re: [RFC] Reporting index properties

2017-10-05 Thread Alex Vandiver
On Fri, 6 Oct 2017, Junio C Hamano wrote: > > Do folks have feelings about surfacing this information, and where such > > logic should live? > > Probably one of the t/helper/test-dump-*.c programs, if we already > do not have one. The goal would be to be able to extract this information from

[RFC] Reporting index properties

2017-10-05 Thread Alex Vandiver
Heya, As part of gathering some automated performance statistics of git, it would be useful to be able to extract some vital properties of the index. While `git update-index` has ways to _set_ the index version, and enable/disable various extensions, AFAICT there is no method by which one can

Re: [PATCH v8 00/12] Fast git status via a file system watcher

2017-10-04 Thread Alex Vandiver
-- >From 445d45027bb5b7823338cf111910d2884af6318b Mon Sep 17 00:00:00 2001 From: Alex Vandiver <ale...@dropbox.com> Date: Tue, 3 Oct 2017 23:27:46 -0700 Subject: [PATCH] fsmonitor: Read entirety of watchman output In perl, setting $/ sets the string that is used as the "record separator," which sets the boun

Re: Race condition in git push --mirror can cause silent ref rewinding

2014-07-13 Thread Alex Vandiver
On 07/02/2014 07:10 PM, Alex Vandiver wrote: On 07/02/2014 06:20 PM, Junio C Hamano wrote: Alex Vandiver a...@chmrr.net writes: [remote github] url = g...@github.com:bestpractical/rt.git fetch = +refs/*:refs/* mirror = yes git push github master^:master must

Race condition in git push --mirror can cause silent ref rewinding

2014-07-02 Thread Alex Vandiver
Heya, We recently ran into a particularly troubling race condition, discovered in git 2.0.0. The setup for it is as follows: The repository is a bare repository, which developers push to via ssh; it mirrors its changes out onto github. In its config: [remote github] url =

Re: Race condition in git push --mirror can cause silent ref rewinding

2014-07-02 Thread Alex Vandiver
On 07/02/2014 06:20 PM, Junio C Hamano wrote: Alex Vandiver a...@chmrr.net writes: [remote github] url = g...@github.com:bestpractical/rt.git fetch = +refs/*:refs/* mirror = yes git push github master^:master must stay a usable way to update the published

fatal: git-write-tree: error building trees from `git stash`

2012-12-27 Thread Alex Vandiver
Heya, I just ran into the following with `git stash`. The set-up: git init echo Initial foo git add . git commit -m 'Initial commit' echo Rewrite foo git commit -am 'Second commit, rewrites content' echo Stashed changes foo git

Re: fatal: git-write-tree: error building trees from `git stash`

2012-12-27 Thread Alex Vandiver
On Thu, 2012-12-27 at 10:51 -0800, Junio C Hamano wrote: $ git stash foo: needs merge foo: needs merge foo: unmerged (aeaa7e5e87cf309a7368d5d92a71c1f9e6a8c9e7) foo: unmerged (a77fa514de2720c72c1a861de098595959a2c97a) foo: unmerged (4a622d2b991f1a19ba7be313a46dc6f03692cd0a) fatal:

Re: [PATCH] cvsimport: strip all inappropriate tag strings

2012-09-05 Thread Alex Vandiver
On Tue, 2012-09-04 at 22:26 -0600, Ken Dreyer wrote: When importing CVS tags, strip all the inappropriate strings from the tag names as we translate them to git tag names. [snip] diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 8d41610..0dc598d 100755 --- a/git-cvsimport.perl +++