Re: Git 2.13.0 segfaults on Solaris SPARC due to DC_SHA1=YesPlease being on by default

2017-05-15 Thread Michael Kebe
Hi Marc, works like a charm! Michael 2017-05-15 16:33 GMT+02:00 Marc Stevens : > Hi Michael, > > > > See the latest commit to the SHA1DC repo: > > https://github.com/cr-marcstevens/sha1collisiondetection/commit/33a694a9ee1b79c24be45f9eab5ac0e1aeeaf271 > > Just apply this

Re: [PATCH v1 1/5] dir: make lookup_untracked() available outside of dir.c

2017-05-15 Thread Junio C Hamano
Ben Peart writes: > Remove the static qualifier from lookup_untracked() and make it > available to other modules by exporting it from dir.h. Surely that is what you did in this patch, but leaves readers in suspense wondering why this helper needs to be available to others in

Re: [PATCH v1 0/5] Fast git status via a file system watcher

2017-05-15 Thread Junio C Hamano
Ben Peart writes: > Add documentation for the fsmonitor extension. This includes the > core.fsmonitor setting, the query-fsmonitor hook, and the fsmonitor > index extension. > Add a sample query-fsmonitor hook script that integrates with the > cross platform

Re: [PATCH v1 3/5] fsmonitor: add test cases for fsmonitor extension

2017-05-15 Thread Junio C Hamano
Ben Peart writes: > Add test cases that ensure status results are correct when using the new > fsmonitor extension. Test untracked, modified, and new files by > ensuring the results are identical to when not using the extension. > > Add a test to ensure updates to the index

What's cooking in git.git (May 2017, #05; Tue, 16)

2017-05-15 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. The tip of 'next' has been

Re: [PATCH v2 3/4] add--helper: implement interactive status command

2017-05-15 Thread Junio C Hamano
Daniel Ferreira writes: > + if (!q->nr) > + return; > + > + for (i = 0; i < q->nr; i++) { > + struct diff_filepair *p; > + p = q->queue[i]; > + diff_flush_stat(p, options, ); > + } Commenting just on the part that

Re: [PATCH 19/19] diff.c: color moved lines differently

2017-05-15 Thread Jonathan Tan
I expected there to be one main function that takes in a diff options and returns the appropriate output without much (if any) changes in other functions...but (as with the previous patch) maybe there are some complications that I didn't foresee. On Sat, May 13, 2017 at 9:01 PM, Stefan Beller

Re: [PATCH 18/19] diff: buffer all output if asked to

2017-05-15 Thread Jonathan Tan
Overall, this patch seems larger than it should to me, although there might be good reasons for that that I don't know. I'll remark on what I find unexpected. On Sat, May 13, 2017 at 9:01 PM, Stefan Beller wrote: > diff --git a/diff.c b/diff.c > index 08dcc56bb9..dbab7fb44e

Re: git rebase regression: cannot pass a shell expression directly to --exec

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 11:53:57PM -0400, Jeff King wrote: > My /bin/sh isn't bash, but I should be able to build with > SHELL_PATH=/bin/bash to reproduce. But I can't: > >$ bash >$ foo() { echo >&2 "in foo"; } >$ export -f foo >$ bash -c foo >in foo > >$ strace -f 2>&1

Implementation of sorted hashmap iteration

2017-05-15 Thread Daniel Ferreira
--- Hi there! When implementing a patch series to port git-add--interactive from Perl to C[1] I ended up implementing this quirk to iterate through a hashmap in the order elements were added to it. In the end, it did not make it into the series but I figured I'd share it anyway if it interests

[PATCH v2 3/4] add--helper: implement interactive status command

2017-05-15 Thread Daniel Ferreira
Implement add--interactive's status command in the add--helper builtin. It prints a numstat comparing changed files between a) the worktree and the index; b) the index and the HEAD. To do so, we use run_diff_index() and run_diff_files() to get changed files, use the diffstat API on them to get

[PATCH v2 4/4] add--interactive: use add-interactive--helper for status_cmd

2017-05-15 Thread Daniel Ferreira
Call the newly introduced git-add-interactive--helper builtin on status_cmd() instead of relying on git-add--interactive's Perl functions to build print the numstat. Signed-off-by: Daniel Ferreira --- git-add--interactive.perl | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH v2 1/4] diff: export diffstat interface

2017-05-15 Thread Daniel Ferreira
Make the diffstat interface (namely, the diffstat_t struct and diff_flush_stat) no longer be internal to diff.c and allow it to be used by other parts of git. This is helpful for code that may want to easily extract information from files using the diff machinery, while flushing it differently

[PATCH v2 2/4] add--helper: create builtin helper for interactive add

2017-05-15 Thread Daniel Ferreira
Create a builtin helper for git-add--interactive, which right now is not able to do anything. This is the first step in an effort to convert git-add--interactive.perl to a C builtin, in search for better portability, expressibility and performance (specially on non-POSIX systems like Windows).

[PATCH v2 0/4] Port git-add--interactive.perl:status_cmd to C

2017-05-15 Thread Daniel Ferreira
This is the second version of a patch series to start porting git-add--interactive from Perl to C. Series: v1: https://public-inbox.org/git/1494009820-2090-1-git-send-email-bnm...@gmail.com/ Travis CI build: https://travis-ci.org/theiostream/git/builds/232669894 I have applied most of the

Re: git rebase regression: cannot pass a shell expression directly to --exec

2017-05-15 Thread Jeff King
On Tue, May 16, 2017 at 12:40:51PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Interesting. The "exec" string is still run with a shell. E.g.: > > ... > > I wonder if this is falling afoul of the optimization in run-command's > > prepare_shell_cmd() to skip shell

Re: How to force a pull to succeed?

2017-05-15 Thread Jeffrey Walton
On Mon, May 15, 2017 at 11:42 PM, Junio C Hamano wrote: > Jeffrey Walton writes: > >> On Mon, May 15, 2017 at 11:27 PM, Junio C Hamano wrote: >>> Jeffrey Walton writes: >>> I scp'd a file to another machine for

Re: How to force a pull to succeed?

2017-05-15 Thread Junio C Hamano
Jeffrey Walton writes: > On Mon, May 15, 2017 at 11:27 PM, Junio C Hamano wrote: >> Jeffrey Walton writes: >> >>> I scp'd a file to another machine for testing. The change tested OK, >>> so I checked it in on the original machine. >>>

Re: git rebase regression: cannot pass a shell expression directly to --exec

2017-05-15 Thread Junio C Hamano
Jeff King writes: > Interesting. The "exec" string is still run with a shell. E.g.: > ... > I wonder if this is falling afoul of the optimization in run-command's > prepare_shell_cmd() to skip shell invocations for "simple" commands. > ... > So I suspect if you added an extraneous

Re: git rebase regression: cannot pass a shell expression directly to --exec

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 11:25:03PM -0400, Jeff King wrote: > One hack would be to look for BASH_FUNC_* in the environment and disable > the optimization in that case. I think that would make your case Just > Work. It doesn't help other oddball cases, like: > > - you're trying to run a shell

Re: How to force a pull to succeed?

2017-05-15 Thread Jeffrey Walton
On Mon, May 15, 2017 at 11:27 PM, Junio C Hamano wrote: > Jeffrey Walton writes: > >> I scp'd a file to another machine for testing. The change tested OK, >> so I checked it in on the original machine. >> ... >> How do I force the pull to succeed? > > Git

Re: How to force a pull to succeed?

2017-05-15 Thread Junio C Hamano
Jeffrey Walton writes: > I scp'd a file to another machine for testing. The change tested OK, > so I checked it in on the original machine. > ... > How do I force the pull to succeed? Git doesn't know (or care) if you "scp"ed a file from a known to be good place, or if you

Re: git rebase regression: cannot pass a shell expression directly to --exec

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 11:08:39AM -0700, Eric Rannaud wrote: > It used to be possible to run a sequence like: > > foo() { echo X; } > export -f foo > git rebase --exec foo HEAD~10 > > Since upgrading to 2.13.0, I had to update my scripts to run: > > git rebase --exec "bash -c foo"

Re: [RFC PATCH v2 00/22] Add blame to libgit

2017-05-15 Thread Junio C Hamano
Jeffrey Smith writes: > On Mon, May 15, 2017 at 7:23 PM, Junio C Hamano wrote: >> Jeffrey Smith writes: >> >>> I did try to keep any unnecessary changes out of the big movement >>> patches (17-19). Would you prefer I break down 19

Re: [PATCH] usage: fix a sparse 'redeclared with different type' error

2017-05-15 Thread Jeff King
On Tue, May 16, 2017 at 02:11:40AM +0100, Ramsay Jones wrote: > > If you need to re-roll your 'jk/bug-to-abort' branch, could you please > squash this into the relevant patch (commit d8193743e0 "usage.c: add > BUG() function", 12-05-2017). > > [Just FYI, sparse complains thus: >

Re: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 09:55:12PM -0400, Ben Peart wrote: > > > > + istate->last_update = (time_t)ntohll(*(uint64_t *)index); > [...] > > (I note also that time_t is not necessarily 64-bits in the first place, > > but David said something about this not really being a time_t). > > The in

Re: [RFC PATCH v2 00/22] Add blame to libgit

2017-05-15 Thread Jeffrey Smith
Hm, I really thought I had split some of those out. Patches 4, 5, 17, and 19 could all be reasonably split into rename vs move patches. Patch 18 only does moving. I do not see much benefit to splitting up the 'move xyz to scoreboard' subset (6-12) that way as moving an item to scoreboard is

How to force a pull to succeed?

2017-05-15 Thread Jeffrey Walton
I scp'd a file to another machine for testing. The change tested OK, so I checked it in on the original machine. I'm now on the remote machine, and I'm trying to pull the same exact file that exists on both local and remote. Git won't allow me to do it, even with -f. I'd really like -f (or

Re: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-15 Thread Ben Peart
On 5/15/2017 8:34 PM, Jeff King wrote: On Tue, May 16, 2017 at 12:22:14AM +, brian m. carlson wrote: On Mon, May 15, 2017 at 03:13:44PM -0400, Ben Peart wrote: + istate->last_update = (time_t)ntohll(*(uint64_t *)index); + index += sizeof(uint64_t); + + ewah_size =

Re: [PATCH] config: match both symlink & realpath versions in IncludeIf.gitdir:*

2017-05-15 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Change the conditional inclusion mechanism to support > e.g. gitdir:~/git_tree/repo where ~/git_tree is a symlink to to s/to to/to/; > /mnt/stuff/repo. > > This worked in the initial version of this facility[1], but regressed > later in the

Re: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-15 Thread Ben Peart
On 5/15/2017 5:21 PM, David Turner wrote: -Original Message- From: Ben Peart [mailto:peart...@gmail.com] Sent: Monday, May 15, 2017 3:14 PM To: git@vger.kernel.org Cc: gits...@pobox.com; benpe...@microsoft.com; pclo...@gmail.com; johannes.schinde...@gmx.de; David Turner

[PATCH] usage: fix a sparse 'redeclared with different type' error

2017-05-15 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Jeff, If you need to re-roll your 'jk/bug-to-abort' branch, could you please squash this into the relevant patch (commit d8193743e0 "usage.c: add BUG() function", 12-05-2017). [Just FYI, sparse complains thus: usage.c:212:6:

Re: [PATCH 07/19] diff.c: convert fn_out_consume to use emit_line_*

2017-05-15 Thread Junio C Hamano
Junio C Hamano writes: >> -fprintf(o->file, "%s%s--- %s%s%s\n", >> -line_prefix, meta, ecbdata->label_path[0], reset, >> name_a_tab); >> -fprintf(o->file, "%s%s+++ %s%s%s\n", >> -line_prefix, meta,

Re: [PATCH 07/19] diff.c: convert fn_out_consume to use emit_line_*

2017-05-15 Thread Junio C Hamano
Stefan Beller writes: > In a later patch, I want to propose an option to detect > moved lines in a diff, which cannot be done in a one-pass over > the diff. Instead we need to go over the whole diff twice, > because we cannot detect the first line of the two corresponding >

Re: [PATCH v2 04/29] log: add exhaustive tests for pattern style options & config

2017-05-15 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Mon, May 15, 2017 at 6:57 AM, Junio C Hamano wrote: >> Ævar Arnfjörð Bjarmason writes: >>> + if test_have_prereq PCRE >>> + then >>> + # Only PCRE would

Re: [PATCH] fixup! log: add exhaustive tests for pattern style options & config

2017-05-15 Thread Junio C Hamano
Johannes Schindelin writes: > On Mon, 15 May 2017, Junio C Hamano wrote: > >> My knee-jerk reaction matched Dscho's, but grep is about contents, >> and we should be able to test this if we used a sensible tagnames or >> didn't use any. Glad to see somebody can step

Re: [PATCH 00/11] Start retiring .git/remotes/ and .git/branches/ for good

2017-05-15 Thread Junio C Hamano
Johannes Schindelin writes: > On Fri, 12 May 2017, Junio C Hamano wrote: > >> Is it really hurting us having to support these old information >> sources we treat as read-only? > > Well, you frequently complain about my patches, claiming that they place > unnecessary

Re: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-15 Thread Jeff King
On Tue, May 16, 2017 at 12:22:14AM +, brian m. carlson wrote: > On Mon, May 15, 2017 at 03:13:44PM -0400, Ben Peart wrote: > > + istate->last_update = (time_t)ntohll(*(uint64_t *)index); > > + index += sizeof(uint64_t); > > + > > + ewah_size = ntohl(*(uint32_t *)index); > > + index +=

Re: [RFC PATCH v2 00/22] Add blame to libgit

2017-05-15 Thread Junio C Hamano
Jeffrey Smith writes: > On Mon, May 15, 2017 at 4:24 AM, Junio C Hamano wrote: >> Jeff Smith writes: >> >>> Rather than duplicate large portions of builtin/blame.c in cgit, it >>> would be better to shift its core functionality into

Re: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-15 Thread brian m. carlson
On Mon, May 15, 2017 at 03:13:44PM -0400, Ben Peart wrote: > + istate->last_update = (time_t)ntohll(*(uint64_t *)index); > + index += sizeof(uint64_t); > + > + ewah_size = ntohl(*(uint32_t *)index); > + index += sizeof(uint32_t); To answer the question you asked in your cover

Re: [PATCH 14/19] diff.c: convert word diffing to use emit_line_*

2017-05-15 Thread Stefan Beller
On Mon, May 15, 2017 at 3:40 PM, Jonathan Tan wrote: > > I suspect that this will need to be refactored more thoroughly. Here, for > example, emit_line (which prints the prefix) is printed nearly > unconditionally, whereas in the original version, "fputs(line_prefix,

Re: [PATCHv3 4/4] clone: use free_refspec() to free refspec list

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 01:29:07PM +0200, SZEDER Gábor wrote: > On Mon, May 15, 2017 at 1:05 PM, SZEDER Gábor wrote: > > From: Jeff King > > > > Using free() on a refspec was always leaky, as its string > > fields also need freed. But it became more so when

Re: [PATCH] pull: optionally rebase submodules

2017-05-15 Thread Brandon Williams
On 05/11, Stefan Beller wrote: > On Thu, May 11, 2017 at 10:24 AM, Brandon Williams wrote: > > Teach pull to optionally update submodules when '--recurse-submodules' > > is provided. This will teach pull to run 'submodule update --rebase' > > when the '--recurse-submodules'

Re: [PATCHv3 1/4] clone: respect additional configured fetch refspecs during initial fetch

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 01:05:54PM +0200, SZEDER Gábor wrote: > The initial fetch during a clone doesn't transfer refs matching > additional fetch refspecs given on the command line as configuration > variables. This contradicts to the documentation stating that Minor gramm-o: s/to the/the/ >

Re: [PATCHv3 0/4] clone: respect configured fetch respecs during initial fetch

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 01:05:53PM +0200, SZEDER Gábor wrote: > This is a reroll of sg/clone-refspec-from-command-line-config. > Sorry for the delay, family visit. No problem. Thanks for letting us know before it went to 'next'. ;) > The first patch is the updated version of what is now the

Re: git worktrees must exist even if locked

2017-05-15 Thread Junio C Hamano
"taylor, david" writes: > The original report was against Git v2.12.2. I have since tried v2.12.3, > v2.13.0, > and the next branch. All exhibit the same symptoms. > > Even if you ignore the original scenario for creating the problem, if I do a > 'rm -rf' or 'mv' > of

Re: [PATCH 19/19] diff.c: color moved lines differently

2017-05-15 Thread Brandon Williams
On 05/13, Stefan Beller wrote: > When there is a lot of code moved around such as in 11979b9 (2005-11-18, > "http.c: reorder to avoid compilation failure.") for example, the review > process is quite hard, as it is not mentally challenging. It is a rather > tedious process, that gets boring

Re: [PATCH 14/19] diff.c: convert word diffing to use emit_line_*

2017-05-15 Thread Jonathan Tan
On 05/13/2017 09:01 PM, Stefan Beller wrote: In a later patch, I want to propose an option to detect moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+

Re: t5400 failure on Windows

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 10:05:29PM +0200, Johannes Sixt wrote: > I observe the following failure on Windws with origin/next, in > t5400-send-pack.sh > > +++ diff -u expect refs > --- expect Mon May 15 06:54:59 2017 > +++ refsMon May 15 06:54:59 2017 > @@ -1,4 +1,3 @@ >

Re: [PATCH 05/19] diff.c: emit_line_0 can handle no color setting

2017-05-15 Thread Stefan Beller
On Mon, May 15, 2017 at 11:31 AM, Jonathan Tan wrote: > On 05/13/2017 09:01 PM, Stefan Beller wrote: >> >> In a later patch, I want to propose an option to detect >> moved lines in a diff, which cannot be done in a one-pass over >> the diff. Instead we need to go over

Re: [PATCH v7] fetch-pack: always allow fetching of literal SHA1s

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 10:32:20AM -0700, Jonathan Tan wrote: > OK, one combined function (for lazy initialization and checking > containment in the oidset) with comment it is. > > Change from v6: changed back to "tip_oids_contain", and included Peff's > comment. Thanks, looks good to me.

Re: Git 2.13.0 segfaults on Solaris SPARC due to DC_SHA1=YesPlease being on by default

2017-05-15 Thread Jeff King
On Mon, May 15, 2017 at 04:13:58PM +0200, Ævar Arnfjörð Bjarmason wrote: > On Mon, May 15, 2017 at 3:58 PM, Marc Stevens wrote: > > Hi Aevar, > > > > Thank you for notifying us of this issue. > > Big endianness is a tricky issue, also since I don't have access or > >

Re: [PATCH 15/19] diff.c: convert diff_flush to use emit_line_*

2017-05-15 Thread Stefan Beller
On Mon, May 15, 2017 at 1:21 PM, Jonathan Tan wrote: > On 05/13/2017 09:01 PM, Stefan Beller wrote: >> >> In a later patch, I want to propose an option to detect >> moved lines in a diff, which cannot be done in a one-pass over >> the diff. Instead we need to go over the

Re: clone vs submodule operation with HTTP cURL

2017-05-15 Thread Jean-Francois Bouchard
Hello, Follow-up to this post. I seems that setting GIT_HTTP_PROXY_AUTHMETHOD=anyauth is a workaround to this issue. So now the issue is : git is not setting AUTHMETHOD correctly when doing a submodule update Note that a user is needed in the URL string. :@ does not work, empty.auth variable

RE: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-15 Thread David Turner
> -Original Message- > From: Ben Peart [mailto:peart...@gmail.com] > Sent: Monday, May 15, 2017 3:14 PM > To: git@vger.kernel.org > Cc: gits...@pobox.com; benpe...@microsoft.com; pclo...@gmail.com; > johannes.schinde...@gmx.de; David Turner ; > p...@peff.net >

Re: Is it possible to use new conditional includes outside of git dir?

2017-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 8:09 PM, Mihails Strasuns wrote: > I was very excited to try out new conditional include feature but have > quickly found out that it doesn't work with some of my custom scripts > because of the following behaviour: > > # .gitconfig > [includeIf

Re: Git just passed Subversion on openhub.net

2017-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 5:54 PM, Øyvind A. Holm wrote: > openhub.net has a comparion of the number of public repositories on the > net, based on searching public hosting services on the net. Git just > passed Subversion after the number of Git repositories has exploded >

[GSoC] Update: Week 0 (Community Bonding Period)

2017-05-15 Thread Prathamesh Chavan
SUMMARY OF MY PROJECT: Git submodule subcommands are currently implemented by using shell script 'git-submodule.sh'. There are several reasons why we'll prefer not to use the shell script. My project intends to convert the subcommands into C code, thus making them builtins. This will increase

Re: [PATCH 15/19] diff.c: convert diff_flush to use emit_line_*

2017-05-15 Thread Jonathan Tan
On 05/13/2017 09:01 PM, Stefan Beller wrote: In a later patch, I want to propose an option to detect moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+

Re: [PATCH v1 5/5] Add a sample query-fsmonitor hook script that integrates with the cross platform Watchman file watching service.

2017-05-15 Thread Ben Peart
On 5/15/2017 3:50 PM, David Turner wrote: -Original Message- From: Ben Peart [mailto:peart...@gmail.com] Sent: Monday, May 15, 2017 3:14 PM To: git@vger.kernel.org Cc: gits...@pobox.com; benpe...@microsoft.com; pclo...@gmail.com; johannes.schinde...@gmx.de; David Turner

t5400 failure on Windows

2017-05-15 Thread Johannes Sixt
I observe the following failure on Windws with origin/next, in t5400-send-pack.sh +++ diff -u expect refs --- expect Mon May 15 06:54:59 2017 +++ refsMon May 15 06:54:59 2017 @@ -1,4 +1,3 @@ 5285e1710002a06a379056b0d21357a999f3c642 refs/heads/master

RE: [PATCH v1 5/5] Add a sample query-fsmonitor hook script that integrates with the cross platform Watchman file watching service.

2017-05-15 Thread David Turner
> -Original Message- > From: Ben Peart [mailto:peart...@gmail.com] > Sent: Monday, May 15, 2017 3:14 PM > To: git@vger.kernel.org > Cc: gits...@pobox.com; benpe...@microsoft.com; pclo...@gmail.com; > johannes.schinde...@gmx.de; David Turner ; > p...@peff.net >

Re: [PATCH 03/19] diff.c: drop 'nofirst' from emit_line_0

2017-05-15 Thread Brandon Williams
On 05/15, Stefan Beller wrote: > On Mon, May 15, 2017 at 12:22 PM, Brandon Williams wrote: > > > Does the order of newline/carriage return always the same? > > https://en.wikipedia.org/wiki/Newline > > There are operating systems that like it the other way round. > The BBC

Re: [PATCH 03/19] diff.c: drop 'nofirst' from emit_line_0

2017-05-15 Thread Stefan Beller
On Mon, May 15, 2017 at 12:22 PM, Brandon Williams wrote: > Does the order of newline/carriage return always the same? https://en.wikipedia.org/wiki/Newline There are operating systems that like it the other way round. The BBC micro is no longer relevant (IMHO), but RISC OS

Re: [PATCH 06/19] diff: add emit_line_fmt

2017-05-15 Thread Brandon Williams
On 05/13, Stefan Beller wrote: > In the following patches we'll convert all printing functions to use > the emit_line_* family of functions. > > Many of the printing functions to be converted are formatted. So offer > a formatted function in the emit_line function family as well. > >

Re: [PATCH 10/19] diff.c: convert emit_rewrite_lines to use emit_line_*

2017-05-15 Thread Stefan Beller
On Mon, May 15, 2017 at 12:09 PM, Jonathan Tan wrote: > > > On 05/13/2017 09:01 PM, Stefan Beller wrote: >> >> In a later patch, I want to propose an option to detect >> moved lines in a diff, which cannot be done in a one-pass over >> the diff. Instead we need to go

Re: [PATCH 03/19] diff.c: drop 'nofirst' from emit_line_0

2017-05-15 Thread Brandon Williams
On 05/13, Stefan Beller wrote: > In 250f79930d (diff.c: split emit_line() from the first char and the rest > of the line, 2009-09-14) we introduced the local variable 'nofirst' that > indicates if we have no first sign character. With the given implementation > we had to use an extra variable

[PATCH] config: match both symlink & realpath versions in IncludeIf.gitdir:*

2017-05-15 Thread Ævar Arnfjörð Bjarmason
Change the conditional inclusion mechanism to support e.g. gitdir:~/git_tree/repo where ~/git_tree is a symlink to to /mnt/stuff/repo. This worked in the initial version of this facility[1], but regressed later in the series while solving a related bug[2]. Now gitdir: will match against the

[PATCH v1 3/5] fsmonitor: add test cases for fsmonitor extension

2017-05-15 Thread Ben Peart
Add test cases that ensure status results are correct when using the new fsmonitor extension. Test untracked, modified, and new files by ensuring the results are identical to when not using the extension. Add a test to ensure updates to the index properly mark corresponding entries in the index

[PATCH v1 5/5] Add a sample query-fsmonitor hook script that integrates with the cross platform Watchman file watching service.

2017-05-15 Thread Ben Peart
To use the script: Download and install Watchman from https://facebook.github.io/watchman/ and instruct Watchman to watch your working directory for changes ('watchman watch-project /usr/src/git'). Rename the sample integration hook from query-fsmonitor.sample to query-fsmonitor. Configure git

[PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-15 Thread Ben Peart
When the index is read from disk, the query-fsmonitor index extension is used to flag the last known potentially dirty index and untracked cach entries. If git finds out some entries are 'fsmonitor-dirty', but are really unchanged (e.g. the file was changed, then reverted back), then Git will

[PATCH v1 4/5] Add documentation for the fsmonitor extension. This includes the core.fsmonitor setting, the query-fsmonitor hook, and the fsmonitor index extension.

2017-05-15 Thread Ben Peart
Signed-off-by: Ben Peart --- Documentation/config.txt | 7 +++ Documentation/githooks.txt | 23 +++ Documentation/technical/index-format.txt | 18 ++ 3 files changed, 48 insertions(+) diff --git

[PATCH v1 1/5] dir: make lookup_untracked() available outside of dir.c

2017-05-15 Thread Ben Peart
Remove the static qualifier from lookup_untracked() and make it available to other modules by exporting it from dir.h. Signed-off-by: Ben Peart --- dir.c | 2 +- dir.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dir.c b/dir.c index

[PATCH v1 0/5] Fast git status via a file system watcher

2017-05-15 Thread Ben Peart
Goal ? Today, git must check existing files to see if there have been changes and scan the working directory looking for new, untracked files. As the number of files and folders in the working directory increases, the time to perform these checks can become very expensive O(# files in

Re: [PATCH 10/19] diff.c: convert emit_rewrite_lines to use emit_line_*

2017-05-15 Thread Jonathan Tan
On 05/13/2017 09:01 PM, Stefan Beller wrote: In a later patch, I want to propose an option to detect moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines

Re: [PATCH] fixup! log: add exhaustive tests for pattern style options & config

2017-05-15 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: > On Fri, 12 May 2017, Jonathan Nieder wrote: >> Would something like >> >> test PIPE_IN_FILENAME ' >> >"a|b" && >> test -f "a|b" >> ' >> >> work? [...] > Back to the subject: The MSYS2 emulation layer inherits a neat trick from

Re: [PATCH 08/19] diff.c: convert builtin_diff to use emit_line_*

2017-05-15 Thread Jonathan Tan
On 05/13/2017 09:01 PM, Stefan Beller wrote: In a later patch, I want to propose an option to detect moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+

Re: [GSoC][RFC/PATCH v3 2/2] submodule: port subcommand foreach from shell to C

2017-05-15 Thread Brandon Williams
On 05/12, Prathamesh Chavan wrote: > This aims to make git-submodule foreach a builtin. This is the very > first step taken in this direction. Hence, 'foreach' is ported to > submodule--helper, and submodule--helper is called from git-submodule.sh. > The code is split up to have one function to

Re: [PATCH 03/19] diff.c: drop 'nofirst' from emit_line_0

2017-05-15 Thread Stefan Beller
On Mon, May 15, 2017 at 11:26 AM, Jonathan Tan wrote: > "erroneous"? yep, words are hard. > > I also don't understand the meaning of this paragraph - if you mean that > this patch teaches other callers to hardcode the sign, I don't see any such > changes in the diff

Re: [PATCH 05/19] diff.c: emit_line_0 can handle no color setting

2017-05-15 Thread Jonathan Tan
On 05/13/2017 09:01 PM, Stefan Beller wrote: In a later patch, I want to propose an option to detect moved lines in a diff, which cannot be done in a one-pass over the diff. Instead we need to go over the whole diff twice, because we cannot detect the first line of the two corresponding lines (+

Re: [PATCH/RFC] The new IncludeIf facility doesn't DWIM when the repo is symlinked

2017-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 5:20 PM, Ævar Arnfjörð Bjarmason wrote: > I have a ~/git_tree in my homedir that's symlinked to an external > drive, and doing "gitdir:~/git_tree/" doesn't work, because instead of > matching against ~/git_tree it's matched against >

Re: [PATCH 03/19] diff.c: drop 'nofirst' from emit_line_0

2017-05-15 Thread Jonathan Tan
On 05/13/2017 09:01 PM, Stefan Beller wrote: In 250f79930d (diff.c: split emit_line() from the first char and the rest of the line, 2009-09-14) we introduced the local variable 'nofirst' that indicates if we have no first sign character. With the given implementation we had to use an extra

Re: [PATCH v2] send-email: support validate hook

2017-05-15 Thread Jonathan Tan
On 05/14/2017 06:55 PM, Junio C Hamano wrote: Jonathan Tan writes: diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index 706091a56..b2514f4d4 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -447,6 +447,14 @@ rebase::

git rebase regression: cannot pass a shell expression directly to --exec

2017-05-15 Thread Eric Rannaud
Hi all, It used to be possible to run a sequence like: foo() { echo X; } export -f foo git rebase --exec foo HEAD~10 Since upgrading to 2.13.0, I had to update my scripts to run: git rebase --exec "bash -c foo" HEAD~10 I'm not sure if this was an intended change. Bisecting with the

Re: [PATCH v2 21/29] grep: factor test for \0 in grep patterns into a function

2017-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 8:24 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Factor the test for \0 in grep patterns into a function. Since commit >> 9eceddeec6 ("Use kwset in grep", 2011-08-21) any pattern containing a >> \0 is considered

Re: [PATCH v7] fetch-pack: always allow fetching of literal SHA1s

2017-05-15 Thread Jonathan Nieder
Jonathan Tan wrote: > fetch-pack, when fetching a literal SHA-1 from a server that is not > configured with uploadpack.allowtipsha1inwant (or similar), always > returns an error message of the form "Server does not allow request for > unadvertised object %s". However, it is sometimes the case

Re: [PATCH v2 20/29] grep: remove redundant `regflags &= ~REG_EXTENDED` assignments

2017-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 8:14 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Remove redundant assignments to the "regflags" variable. There are no >> code paths that have previously set the regflags to anything, and >> certainly not to `|=

Re: [PATCH v2 18/29] grep: catch a missing enum in switch statement

2017-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 7:50 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Add a die(...) to a default case for the switch statement selecting >> between grep pattern types under --recurse-submodules. >> >> Normally this would be caught by

Re: [PATCH v2 04/29] log: add exhaustive tests for pattern style options & config

2017-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 6:57 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> + echo 2e >expect && >> + # In PCRE \d in [\d] is like saying "0-9", and matches the 2 >> + # in 2e... >> + git -C num_commits log -1

[PATCH v7] fetch-pack: always allow fetching of literal SHA1s

2017-05-15 Thread Jonathan Tan
fetch-pack, when fetching a literal SHA-1 from a server that is not configured with uploadpack.allowtipsha1inwant (or similar), always returns an error message of the form "Server does not allow request for unadvertised object %s". However, it is sometimes the case that such object is advertised.

Re: [GSoC][RFC/PATCH v3 2/2] submodule: port subcommand foreach from shell to C

2017-05-15 Thread Stefan Beller
So we're looking for more reviewers for this patch, one way to do it is e.g. via $ git shortlog --since 12.month -sne -- ./git-submodule.sh (so I cc'd Brandon) Another way to find reviewers is $ git blame ./git-submodule.sh (so I cc'd Anders and Johan) > It can been seen that the patch fails in

Re: [PATCH v2 27/29] pack-objects: fix buggy warning about threads

2017-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 10:59 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Fix a buggy warning about threads under NO_PTHREADS=YesPlease. Due to >> re-using the delta_search_threads variable for both the state of the >> "pack.threads"

Is it possible to use new conditional includes outside of git dir?

2017-05-15 Thread Mihails Strasuns
Hello, I was very excited to try out new conditional include feature but have quickly found out that it doesn't work with some of my custom scripts because of the following behaviour: # .gitconfig [includeIf "gitdir:~/work/"] path = ~/.gitconfig.work [user] name1 = Someone # .gitconfig.work

Re: [RFC PATCH 00/19] Diff machine: highlight moved lines.

2017-05-15 Thread Stefan Beller
On Mon, May 15, 2017 at 5:43 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> For details on *why* see the commit message of the last commit. > > Luckily, we have a good test case to see how effective this approach > is in the flight. Running > > $

Git just passed Subversion on openhub.net

2017-05-15 Thread Øyvind A . Holm
openhub.net has a comparion of the number of public repositories on the net, based on searching public hosting services on the net. Git just passed Subversion after the number of Git repositories has exploded lately. It seems as lots of new repositories were created after cpython changed to

Re: [PATCH v3] builtin/log: honor log.decorate

2017-05-15 Thread Jonathan Nieder
Junio C Hamano wrote: > "brian m. carlson" writes: >> The recent change that introduced autodecorating of refs accidentally >> broke the ability of users to set log.decorate = false to override it. >> When the git_log_config was traversed a second time with an

Re: [PATCH 02/19] diff: move line ending check into emit_hunk_header

2017-05-15 Thread Stefan Beller
On Sun, May 14, 2017 at 11:48 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> In a later patch, I want to propose an option to detect >> moved lines in a diff, which cannot be done in a one-pass over >> the diff. Instead we need to go over the whole

Re: [PATCH] tag: duplicate mention of --contains should mention --no-contains

2017-05-15 Thread Marc Branchaud
On 2017-05-15 11:01 AM, Ævar Arnfjörð Bjarmason wrote: On Mon, May 15, 2017 at 4:20 PM, Marc Branchaud wrote: On 2017-05-15 08:23 AM, Ævar Arnfjörð Bjarmason wrote: Fix a duplicate mention of --contains in the SYNOPSIS to mention --no-contains. This fixes an error

[PATCH 2/2] mingw: Suppress warning that :.gitattributes does not exist

2017-05-15 Thread Johannes Schindelin
On Windows, a file name containing a colon is illegal. We should therefore expect the corresponding errno when `fopen()` is called for a path of the form :.gitattributes. This fixes the symptom reported in https://github.com/git-for-windows/git/issues/255 Signed-off-by: Johannes

[PATCH 1/2] gitattributes: demonstrate that Git tries to read a bogus file

2017-05-15 Thread Johannes Schindelin
This problem has been reported originally in August 2015, as https://github.com/git-for-windows/git/issues/255 The symptom: when passing :/ style arguments to `git diff`, Git tries to read the attributes from a file called :/.gitattributes. This symptom is more prominent on Windows

  1   2   >