[PATCH 4/5] fetch-pack: isolate sigpipe in demuxer thread

2016-04-19 Thread Jeff King
In commit 9ff18fa (fetch-pack: ignore SIGPIPE in sideband demuxer, 2016-02-24), we started using sigchain_push() to ignore SIGPIPE in the async demuxer thread. However, this is rather clumsy, as it ignores SIGPIPE for the entire process, including the main thread. At the time we didn't have any

Re: [PATCH 1/4] http.h: Add debug callback and helper routine for implementing the GIT_TRACE_CURL environment variable in http.c

2016-04-19 Thread Ramsay Jones
On 19/04/16 16:10, Elia Pinto wrote: > Add the debug callback and helper routine prototype used by > curl_easy_setopt CURLOPT_DEBUGFUNCTION in http.c > for implementing the GIT_TRACE_CURL environment variable > > > Helped-by: Torsten Bögershausen > Helped-by: Ramsay Jones

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 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

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)) { > +

Re: [PATCH v4 12/16] index-helper: kill mode

2016-04-19 Thread David Turner
On Sat, 2016-04-16 at 18:08 +0200, Ævar Arnfjörð Bjarmason wrote: > On Wed, Apr 13, 2016 at 2:33 AM, David Turner < > dtur...@twopensource.com> wrote: > > Add a new command (and command-line arg) to allow index-helpers to > > exit cleanly. > > > > This is mainly useful for tests. > > Both --kill

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 =

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

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

2016-04-19 Thread David Turner
On Fri, 2016-04-15 at 17:04 -0700, Stefan Beller wrote: > > +static int try_shm(struct index_state *istate) > > +{ > > + void *new_mmap = NULL; > > + size_t old_size = istate->mmap_size; > > + ssize_t new_size; > > + const unsigned char *sha1; > > + struct stat st; >

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

2016-04-19 Thread David Turner
On Fri, 2016-04-15 at 17:04 -0700, Stefan Beller wrote: > > +static int try_shm(struct index_state *istate) > > +{ > > + void *new_mmap = NULL; > > + size_t old_size = istate->mmap_size; > > + ssize_t new_size; > > + const unsigned char *sha1; > > + struct stat st; >

[PATCH 0/5] fix deadlock in git-push

2016-04-19 Thread Jeff King
I ran across a deadlock today while pushing from a corrupted repository where pack-objects fails. Obviously I don't expect this to succeed, but it should not hang indefinitely. The first patch below fixes the deadlock. Unfortunately, it turns it into a likely SIGPIPE death. Which is an

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

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

Re: [PATCH v4 15/16] index-helper: optionally automatically run

2016-04-19 Thread David Turner
On Sun, 2016-04-17 at 12:19 +0700, Duy Nguyen wrote: > On Wed, Apr 13, 2016 at 7:33 AM, David Turner < > dtur...@twopensource.com> wrote: > > @@ -536,8 +567,10 @@ static void handle_builtin(int argc, const > > char **argv) > > } > > > > builtin = get_builtin(cmd); > > - if

[PATCH 2/5] run-command: teach async threads to ignore SIGPIPE

2016-04-19 Thread Jeff King
Async processes can be implemented as separate forked processes, or as threads (depending on the NO_PTHREADS setting). In the latter case, if an async thread gets SIGPIPE, it takes down the whole process. This is obviously bad if the main process was not otherwise going to die, but even if we were

[PATCH 3/5] send-pack: isolate sigpipe in demuxer thread

2016-04-19 Thread Jeff King
If we get an error from pack-objects, we may exit send_pack() early, before reading the server's status response. In such a case, we may racily see SIGPIPE from our async demuxer (which is trying to write that status back to us), and we'd prefer to continue pushing the error up the call stack,

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 --

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 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 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,

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/RFC 6/6] clone: send refspec for single-branch clones

2016-04-19 Thread David Turner
On Sat, 2016-04-16 at 22:36 -0400, Eric Sunshine wrote: > On Fri, Apr 15, 2016 at 3:19 PM, David Turner < > dtur...@twopensource.com> wrote: > > For single-branch clones (when we know in advance what the remote > > branch name will be), send a refspec so that the server doesn't > > tell us about

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

2016-04-19 Thread Jan Durovec
There's a comment on PR itself (in addition to individual commits) so theoretically it could. It seems that for [PATCH ... n/m] e-mails the commit messages are used, so there's no reason why the PR comment couldn't be used for a cover letter. In this case the PR comment was the same as for one

Re: [PATCH/RFC 5/6] fetch: pass refspec to http server

2016-04-19 Thread David Turner
On Sat, 2016-04-16 at 22:33 -0400, Eric Sunshine wrote: > On Fri, Apr 15, 2016 at 3:19 PM, David Turner < > dtur...@twopensource.com> wrote: > > When fetching over http, send the requested refspec to the server. > > The server will then only send refs matching that refspec. It is > > permitted

Re: [PATCH v5 3/4] t0027: test cases for combined attributes

2016-04-19 Thread Junio C Hamano
tbo...@web.de writes: > From: Torsten Bögershausen > > Add more test cases for the not normalized files ("NNO"). The > "text" attribute is most important, use it as the first parameter. > "ident", if set, is the second paramater followed by the eol > attribute. The eol attribute

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

2016-04-19 Thread Junio C Hamano
Jan Durovec writes: > On Tue, Apr 19, 2016 at 11:09 PM, Junio C Hamano wrote: > >> For a series this small it does not matter, but anything longer it >> would be easier to review with a cover letter (i.e. [PATCH 0/N]). I >> do not know if submitGit

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

2016-04-19 Thread David Turner
On Tue, 2016-04-19 at 03:14 -0400, Jeff King wrote: > On Mon, Apr 18, 2016 at 11:45:54AM -0700, Junio C Hamano wrote: > > > David Turner writes: > > > > > Add parameters for a list of refspecs to > > > transport_get_remote_refs and > > > get_refs_list. These

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

2016-04-19 Thread Jan Durovec
> By the way, you may or may not have noticed that I've been > reordering the lines of your message quoted in my responses; around > here, top-posting is frowned upon. I haven't noticed. Thanks for pointing out. As for the submitGit cover letter I wanted to raise at least an issue (if not create

[PATCH resubmission] config.mak.uname: Cygwin: Use renames for creation

2016-04-19 Thread Adam Dinwoodie
When generating build options for Cygwin, enable OBJECT_CREATION_USES_RENAMES. This is necessary to use Git on Windows shared directories, and is already enabled for the MinGW and plain Windows builds. Reported-by: Peter Rosin Signed-off-by: Adam Dinwoodie

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

2016-04-19 Thread Stefan Beller
On Mon, Apr 18, 2016 at 10:03 PM, Jeff King wrote: > On Mon, Apr 18, 2016 at 02:12:30PM -0700, Stefan Beller wrote: > >> + >> + /* >> + * If a group can be moved back and forth, see if there is an >> + * blank line in the moving space. If there

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

2016-04-19 Thread Jeff King
On Mon, Apr 18, 2016 at 11:47:52PM -0700, Stefan Beller wrote: > I am convinced the better way to do it is like this: > > Calculate the entropy for each line and take the last line with the > lowest entropy as the last line of the hunk. I'll be curious to see the results, but I think

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

2016-04-19 Thread Lars Schneider
On 16 Apr 2016, at 21:58, Jan Durovec wrote: > When migrating from Perforce to git the information about P4 jobs > associated with P4 changelists is lost. > > Having these jobs listed on messages of related git commits enables smooth > migration for projects that take

Re: Binary grep t7008 known breakage vanished on Cygwin

2016-04-19 Thread Adam Dinwoodie
On Mon, Apr 18, 2016 at 06:08:15PM +0100, Ramsay Jones wrote: > On 18/04/16 16:21, Adam Dinwoodie wrote: > > t7008.12 is marked as an expected failure, but building Git on Cygwin > > including a `make configure && ./configure` step has the test > > unexpectedly passing. Building without the

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

2016-04-19 Thread Stefan Beller
On Tue, Apr 19, 2016 at 12:00 AM, Jeff King wrote: > On Mon, Apr 18, 2016 at 11:47:52PM -0700, Stefan Beller wrote: > >> I am convinced the better way to do it is like this: >> >> Calculate the entropy for each line and take the last line with the >> lowest entropy as the

Re: [PATCH 2/2] mv: allow moving nested submodules

2016-04-19 Thread Jacob Keller
On Mon, Apr 18, 2016 at 4:41 PM, Stefan Beller wrote: > When directories are moved using `git mv` all files in the directory > have been just moved, but no further action was taken on them. This > was done by assigning the mode = WORKING_DIRECTORY to the files > inside a moved

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

2016-04-19 Thread Jeff King
On Mon, Apr 18, 2016 at 11:45:54AM -0700, Junio C Hamano wrote: > David Turner writes: > > > Add parameters for a list of refspecs to transport_get_remote_refs and > > get_refs_list. These parameters are presently unused -- soon, we will > > use them to implement

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

2016-04-19 Thread Luke Diamand
On 19 April 2016 at 02:15, Junio C Hamano wrote: > Jan Durovec writes: > >> When migrating from Perforce to git the information about P4 jobs >> associated with P4 changelists is lost. >> >> Having these jobs listed on messages of related git commits

<    1   2