Re: [PATCH] diff: reuse diff setup for --no-index case

2019-02-15 Thread Jeff King
On Thu, Feb 14, 2019 at 11:47:02AM -0800, Junio C Hamano wrote: > > + if (no_index) > > + /* If this is a no-index diff, just run it and exit there. */ > > + diff_no_index(&rev, argc, argv); > > + > > if (nongit) > > die(_("Not a git repository")); > > arg

Re: 2.21: Change in ref advertisement handling?

2019-02-15 Thread Jeff King
On Fri, Feb 15, 2019 at 06:45:42PM -0800, Bryan Turner wrote: > In Bitbucket Server's Git test suite, we have some lazy tests that use > a stub HTTP server with mocked payloads to feed a Git client, to test > its behavior. > > For some of those tests, we have the server configured to send a > res

Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-15 Thread Christian Couder
On Fri, Feb 15, 2019 at 5:39 PM Matheus Tavares wrote: > > Replace usage of opendir/readdir/closedir API to traverse directories > recursively, at copy_or_link_directory function, by the dir-iterator > API. You may want to add that this simplifies the code and avoid recursive calls of copy_or_lin

Re: [GSoC][PATCH 1/2] clone: extract function from copy_or_link_directory

2019-02-15 Thread Christian Couder
On Fri, Feb 15, 2019 at 5:39 PM Matheus Tavares wrote: > > Extract dir creation code snippet from copy_or_link_directory to its own > function named mkdir_if_missing. This change will help removing > copy_or_link_directory's explicit recursion, which will be done in patch > "clone: use dir-iterato

deal

2019-02-15 Thread Jean Kabore
-- Dear Friend, Greetings and how are you today? I'm sorry if this message is found in the spam of your email box as that will certainly be a network misharp and I want us to discuss about the sum of Fourty Million Dollars discovered in my office and I'll give you more details when I hear

[PATCH] git-gui: Implement color configuration

2019-02-15 Thread Ismael Luceno
Signed-off-by: Ismael Luceno --- git-gui.sh | 33 ++--- lib/option.tcl | 16 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/git-gui.sh b/git-gui.sh index e00d9a345294..3d7a2217f00c 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -903,

[PATCH v2] git-gui: Handle Ctrl + BS/Del in the commit msg

2019-02-15 Thread Ismael Luceno
- Control+BackSpace: Delete word to the left of the cursor. - Control+Delete : Delete word to the right of the cursor. Originally introduced by BRIEF and Turbo Vision between 1985 and 1992, they were adopted by most CUA-Compliant UIs, including those of: OS/2, Windows, Mac OS, Qt, GTK, Open/Libr

2.21: Change in ref advertisement handling?

2019-02-15 Thread Bryan Turner
In Bitbucket Server's Git test suite, we have some lazy tests that use a stub HTTP server with mocked payloads to feed a Git client, to test its behavior. For some of those tests, we have the server configured to send a response body like this for a ref advertisement: 76d28b849be7fb3301e4bd14fb283

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-02-15 Thread Dan McGregor
On February 12, 2019 7:45:37 a.m. CST, Duy Nguyen wrote: >On Fri, Feb 08, 2019 at 08:36:21PM -0600, Dan McGregor wrote: >> Commit 8dd2e88a92 ("http: support file handles for HTTP_KEEP_ERROR", >> 2019-01-10) introduced an implicit assumption that rewind, fileno, >and >> fflush are functions. At l

Re: [PATCH 1/2] worktree: fix worktree add race.

2019-02-15 Thread Michal Suchánek
On Fri, 15 Feb 2019 10:59:33 -0800 Junio C Hamano wrote: > Michal Suchanek writes: > > > Git runs a stat loop to find a worktree name that's available and then does > > mkdir on the found name. Turn it to mkdir loop to avoid another invocation > > of > > worktree add finding the same free name

Re: [PATCH v5 1/8] technical doc: add a design doc for the evolve command

2019-02-15 Thread Junio C Hamano
Stefan Xenos writes: >> saw a few comments that say "needs further work". > > Could you clarify where you saw those comments? Were they something I > wrote ... Yeah, e.g. /* TODO: This causes a crash. It sets one of the atom_value handlers to * something invalid, which causes a c

Re: [Bug report] git diff stat shows unrelated diff

2019-02-15 Thread Junio C Hamano
Philip Oakley writes: > On 15/02/2019 20:12, Junio C Hamano wrote: >> >> Historically, it was a mistake to allow A..B to be used for two >> endpoints, which was made back when we haven't thought things >> through. That is why I stopped "warn to deprecate and then >> completely remove", as I do n

Re: [Bug report] git diff stat shows unrelated diff

2019-02-15 Thread Philip Oakley
On 15/02/2019 20:12, Junio C Hamano wrote: Elijah Newren writes: Instead of outright deprecating it, would it make sense to include a configuration option, say "diff.sensibleDots", that would enable a user to set the dots to the other form if they desire? I think Junio's suggested steps would

Re: [PATCH v2 06/19] checkout: move 'confict_style' and 'dwim_..' to checkout_opts

2019-02-15 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > These local variables are referenced by struct option[]. This struct > will soon be broken down, moved away and we can't rely on local > variables anymore. Move these two to struct checkout_opts in > preparation for that. > > Signed-off-by: Nguyễn Thái Ngọc Duy >

Re: [PATCH v5 1/8] technical doc: add a design doc for the evolve command

2019-02-15 Thread Stefan Xenos
> It would really need a summary of what changed Sure! In this iteration, I made some minor changes to the technical doc: - Fixed a number of typos and inconsistent language. - Removed the "replace" subcommand from the "changes" command since the "update" command is sufficient for this purpose. -

Re: [Bug report] git diff stat shows unrelated diff

2019-02-15 Thread Denton Liu
On Thu, Feb 14, 2019 at 02:10:53PM -0800, Junio C Hamano wrote: > Elijah Newren writes: > > > The only thing I seem to be able to retain is the following: "git > > diff D..E is totally useless and should be an error because (1) it > > doesn't do what I expect and (2) for folks that want the beha

More on t5562 Hang (was RE: [ANNOUNCE] Git v2.21.0-rc1 (NonStop Results))

2019-02-15 Thread Randall S. Becker
On February 15, 2019 8:50, I wrote: > On February 15, 2019 8:02, SZEDER Gábor wrote: > > To: Johannes Schindelin > > Cc: Randall S. Becker ; 'Junio C Hamano' > > ; git@vger.kernel.org; 'Max Kirillov' > > > > Subject: Re: [ANNOUNCE] Git v2.21.0-rc1 (NonStop Results) > > > > On Thu, Feb 14, 2019 at

Re: [PATCH] t5562: do not depend on /dev/zero

2019-02-15 Thread Junio C Hamano
"Randall S. Becker" writes: > On February 15, 2019 13:01, Junio C Hamano wrote: >> To: Randall S. Becker >> Cc: 'Max Kirillov' ; git@vger.kernel.org; 'Johannes >> Schindelin' >> Subject: Re: [PATCH] t5562: do not depend on /dev/zero >> >> "Randall S. Becker" writes: >> >> > FTR, this particu

RE: [ANNOUNCE] Git v2.21.0-rc1 (NonStop Results)

2019-02-15 Thread Randall S. Becker
On February 15, 2019 15:37, Max Kirillov wrote: > On Fri, Feb 15, 2019 at 02:02:13PM +0100, SZEDER Gábor wrote: > > I haven't yet seen that hang in the wild and couldn't reproduce it on > > purpose, but there is definitely something fishy with t5562 even on > > Linux and even without that perl gene

Re: [ANNOUNCE] Git v2.21.0-rc1 (NonStop Results)

2019-02-15 Thread Max Kirillov
On Fri, Feb 15, 2019 at 02:02:13PM +0100, SZEDER Gábor wrote: > I haven't yet seen that hang in the wild and couldn't reproduce it on > purpose, but there is definitely something fishy with t5562 even on > Linux and even without that perl generate_zero_bytes helper. > > It won't show most of the p

Re: [PATCH] read-cache.c: index format v5 -- 30% smaller/faster than v4

2019-02-15 Thread Ben Peart
On 2/14/2019 5:14 AM, Duy Nguyen wrote: On Thu, Feb 14, 2019 at 5:02 PM Ævar Arnfjörð Bjarmason wrote: Take a look at stat data, st_dev, st_uid, st_gid and st_mode are the same most of the time. ctime should often be the same (or differs just slightly). And sometimes mtime is the same as wel

Re: [Bug report] git diff stat shows unrelated diff

2019-02-15 Thread Junio C Hamano
Elijah Newren writes: >> Instead of outright deprecating it, would it make sense to include a >> configuration option, say "diff.sensibleDots", that would enable a user >> to set the dots to the other form if they desire? > > I think Junio's suggested steps would still have to come first, and > t

Re: [Bug report] git diff stat shows unrelated diff

2019-02-15 Thread Junio C Hamano
Denton Liu writes: > On Thu, Feb 14, 2019 at 02:10:53PM -0800, Junio C Hamano wrote: > >> It might be _possible_ to spend a year (i.e. 4 cycles) to start >> warning when two-dot notation is used for "git diff" (only, not any >> plumbing like "git diff-files") and tell the user to use the more >>

Re: [Bug report] git diff stat shows unrelated diff

2019-02-15 Thread Elijah Newren
On Fri, Feb 15, 2019 at 10:52 AM Denton Liu wrote: > > On Thu, Feb 14, 2019 at 02:10:53PM -0800, Junio C Hamano wrote: > > Elijah Newren writes: > > > > > The only thing I seem to be able to retain is the following: "git > > > diff D..E is totally useless and should be an error because (1) it >

Re: Am a newby and I cannot compile git

2019-02-15 Thread Fabio Aiuto
Thank you so much Santiago!!! Sorry for late, lot of work these days!!! See you soon. Fabio. Il giorno mar, 12/02/2019 alle 16.54 -0500, Santiago Torres ha scritto: > Awesome, > > Do consider reading the files under Documentation (as other people > suggested) to make it easier to contribute. There

Re: [PATCH 1/2] worktree: fix worktree add race.

2019-02-15 Thread Junio C Hamano
Michal Suchanek writes: > Git runs a stat loop to find a worktree name that's available and then does > mkdir on the found name. Turn it to mkdir loop to avoid another invocation of > worktree add finding the same free name and creating the directory first. Yeah, relying on the atomicity of mkdi

Re: [PATCH 1/1] mingw: safe-guard a bit more against getenv() problems

2019-02-15 Thread Junio C Hamano
Jeff Hostetler writes: >> diff --git a/compat/mingw.c b/compat/mingw.c >> index 4276297595..8141f77189 100644 >> --- a/compat/mingw.c >> +++ b/compat/mingw.c >> @@ -1632,7 +1632,7 @@ int mingw_kill(pid_t pid, int sig) >>*/ >> char *mingw_getenv(const char *name) >> { >> -#define GETENV_MA

Re: [PATCH v5 1/8] technical doc: add a design doc for the evolve command

2019-02-15 Thread Junio C Hamano
sxe...@google.com writes: > From: Stefan Xenos > > This document describes what a change graph for > git would look like, the behavior of the evolve command, > and the changes planned for other commands. > > Signed-off-by: Stefan Xenos > --- It would really need a summary of what changed since

[PATCH 1/2] worktree: fix worktree add race.

2019-02-15 Thread Michal Suchanek
Git runs a stat loop to find a worktree name that's available and then does mkdir on the found name. Turn it to mkdir loop to avoid another invocation of worktree add finding the same free name and creating the directory first. Signed-off-by: Michal Suchanek --- builtin/worktree.c | 11 ++---

[PATCH 2/2] setup: don't fail if commondir is deleted.

2019-02-15 Thread Michal Suchanek
When adding wotktrees git can die in get_common_dir_noenv while examining existing worktrees because the commondir file does not exist. Handle ENOENT so adding a worktree does not fail because of incompletely set-up other worktree. Signed-off-by: Michal Suchanek --- setup.c | 33

RE: [PATCH] t5562: do not depend on /dev/zero

2019-02-15 Thread Randall S. Becker
On February 15, 2019 13:01, Junio C Hamano wrote: > To: Randall S. Becker > Cc: 'Max Kirillov' ; git@vger.kernel.org; 'Johannes > Schindelin' > Subject: Re: [PATCH] t5562: do not depend on /dev/zero > > "Randall S. Becker" writes: > > > FTR, this particular subtest is not the one that is hangi

Re: [PATCH] t5562: do not depend on /dev/zero

2019-02-15 Thread Junio C Hamano
"Randall S. Becker" writes: > FTR, this particular subtest is not the one that is hanging. This subtest > passes on NonStop with any and all (now) 4 solutions that have been floating > around. One thing I'd like to know more is if this test passes on NonStop with this patch, i.e. /dev/zero repla

RE: [PATCH v2] read-cache: add post-indexchanged hook

2019-02-15 Thread Ben Peart
> -Original Message- > From: Junio C Hamano On Behalf Of Junio C Hamano > Sent: Friday, February 15, 2019 12:50 PM > To: Ben Peart > Cc: Ramsay Jones ; git@vger.kernel.org; > Ben Peart ; Kevin Willford > ; sand...@crustytoothpaste.net > Subject: Re: [PATCH v2] read-cache: add post-indexch

[PATCH v3] read-cache: add post-index-change hook

2019-02-15 Thread Ben Peart
From: Ben Peart Add a post-index-change hook that is invoked after the index is written in do_write_locked_index(). This hook is meant primarily for notification, and cannot affect the outcome of git commands that trigger the index write. The hook is passed a flag to indicate whether the workin

Re: [PATCH v6 02/15] trace2: create new combined trace facility

2019-02-15 Thread Jeff Hostetler
On 2/15/2019 11:00 AM, Ævar Arnfjörð Bjarmason wrote: On Wed, Feb 06 2019, Jeff Hostetler via GitGitGadget wrote: + sa.sun_family = AF_UNIX; + strlcpy(sa.sun_path, path, sizeof(sa.sun_path)); + if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1 || + connect(fd, (st

Re: Re* [Breakage] 2.20.0-rc0 t1404: test_i18ngrep reports 1 instead of 0 on NonStop in one case

2019-02-15 Thread Junio C Hamano
Martin Ågren writes: > On Fri, 15 Feb 2019 at 03:13, Junio C Hamano wrote: >> >> Subject: [PATCH] t1404: do not rely on the exact phrasing of strerror() >> >> Not even in C locale, it is wrong to expect that the exact phrasing >> "File exists" is used to show EEXIST. > > s/Not even/Even/? Or s/w

Re: [PATCH v2] read-cache: add post-indexchanged hook

2019-02-15 Thread Junio C Hamano
Ben Peart writes: > On 2/14/2019 3:33 PM, Junio C Hamano wrote: >> Ramsay Jones writes: >> >>> On 14/02/2019 14:42, Ben Peart wrote: From: Ben Peart Add a post-indexchanged hook that is invoked after the index is written in >>> >>> s/post-indexchanged/post-index-changed/ >> >> Go

Re: [PATCH 1/1] tests: teach the test-tool to generate NUL bytes and use it

2019-02-15 Thread Junio C Hamano
Johannes Schindelin writes: > On Thu, 14 Feb 2019, Junio C Hamano wrote: > >> "Johannes Schindelin via GitGitGadget" >> writes: >> >> > From: Johannes Schindelin >> > >> > In cc95bc2025 (t5562: replace /dev/zero with a pipe from >> > generate_zero_bytes, 2019-02-09), we replaced usage of /dev/

Re: [PATCH v6 00/15] Trace2 tracing facility

2019-02-15 Thread Jeff Hostetler
On 2/14/2019 7:33 AM, Ævar Arnfjörð Bjarmason wrote: On Wed, Feb 06 2019, Jeff Hostetler via GitGitGadget wrote: V6 addresses: [] The remaining hdr-check warning in trace2/tr2_tls.h There are no other outstanding comments that I'm aware of. Not a comment on this, just a follow-up questio

RE: [PATCH] t5562: do not depend on /dev/zero

2019-02-15 Thread Randall S. Becker
On February 15, 2019 11:43, Max Kirillov wrote: > It was reported [1] that NonStop platform does not have /dev/zero. > > The test uses /dev/zero as a dummy input. Passing case (http-backed failed > because of too big input size) should not be reading anything from it. If http- > backend would erro

Re: [PATCH 1/1] fixup! trace2: collect Windows-specific process information

2019-02-15 Thread Jeff Hostetler
On 2/11/2019 6:19 PM, Junio C Hamano wrote: "Jeff Hostetler via GitGitGadget" writes: From: Jeff Hostetler Guard against infinite loop while computing the parent process hierarchy. ... --- compat/win32/trace2_win32_process_info.c | 32 ++-- 1 file changed, 25 inse

[PATCH] t5562: do not depend on /dev/zero

2019-02-15 Thread Max Kirillov
It was reported [1] that NonStop platform does not have /dev/zero. The test uses /dev/zero as a dummy input. Passing case (http-backed failed because of too big input size) should not be reading anything from it. If http-backend would erroneously try to read any data returning EOF probably would b

Re: [PATCH 1/1] mingw: safe-guard a bit more against getenv() problems

2019-02-15 Thread Jeff Hostetler
On 2/15/2019 10:17 AM, Johannes Schindelin via GitGitGadget wrote: From: Johannes Schindelin Running up to v2.21.0, we fixed two bugs that were made prominent by the Windows-specific change to retain copies of only the 30 latest getenv() calls' returned strings, invalidating any copies of pr

Re: [Bug report] git diff stat shows unrelated diff

2019-02-15 Thread Elijah Newren
Hi Viresh, On Thu, Feb 14, 2019 at 10:40 PM Viresh Kumar wrote: > > On 14-02-19, 13:23, Elijah Newren wrote: > > I think you're getting tripped up by double-dot vs triple-dot with > > diff being different than log: > > > > `git diff D..E` means the same thing as `git diff D E`, i.e. diff the > >

Re: [PATCH v6 02/15] trace2: create new combined trace facility

2019-02-15 Thread Ævar Arnfjörð Bjarmason
On Wed, Feb 06 2019, Jeff Hostetler via GitGitGadget wrote: > + sa.sun_family = AF_UNIX; > + strlcpy(sa.sun_path, path, sizeof(sa.sun_path)); > + if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1 || > + connect(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { > + i

[GSoC][PATCH 1/2] clone: extract function from copy_or_link_directory

2019-02-15 Thread Matheus Tavares
Extract dir creation code snippet from copy_or_link_directory to its own function named mkdir_if_missing. This change will help removing copy_or_link_directory's explicit recursion, which will be done in patch "clone: use dir-iterator to avoid explicit dir traversal". Also makes code more readable.

[GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-15 Thread Matheus Tavares
Replace usage of opendir/readdir/closedir API to traverse directories recursively, at copy_or_link_directory function, by the dir-iterator API. Signed-off-by: Matheus Tavares --- builtin/clone.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff

[GSoC][PATCH 0/2] clone: convert explicit traversal to

2019-02-15 Thread Matheus Tavares
Convert explicit recursive dir traversal at copy_or_link_directory of clone.c to use dir-iterator API. This is my microproject for GSoC 2019. Idea taken from https://git.github.io/SoC-2019-Microprojects/#use-dir-iterator-to-avoid-explicit-recursive-directory-traversal Matheus Tavares (2): clone

[PATCH 0/1] Safe-guard the Windows code a bit more against getenv() problems

2019-02-15 Thread Johannes Schindelin via GitGitGadget
We saw a couple of getenv() cleanups, where we now immediately duplicate the return value of getenv() in order to avoid problems. However, I am really uncomfortable with the current value (30) of GETENV_MAX_RETAIN in compat/mingw.c: it strikes me as low, given that the average number of getenv()

[PATCH 1/1] mingw: safe-guard a bit more against getenv() problems

2019-02-15 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Running up to v2.21.0, we fixed two bugs that were made prominent by the Windows-specific change to retain copies of only the 30 latest getenv() calls' returned strings, invalidating any copies of previous getenv() calls' return values. While this really shines a light

Re: [PATCH 1/1] tests: teach the test-tool to generate NUL bytes and use it

2019-02-15 Thread Johannes Schindelin
Hi Junio, On Thu, 14 Feb 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > From: Johannes Schindelin > > > > In cc95bc2025 (t5562: replace /dev/zero with a pipe from > > generate_zero_bytes, 2019-02-09), we replaced usage of /dev/zero (which > > is not availa

RE: [ANNOUNCE] Git v2.21.0-rc1 (NonStop Results)

2019-02-15 Thread Randall S. Becker
On February 15, 2019 8:02, SZEDER Gábor wrote: > To: Johannes Schindelin > Cc: Randall S. Becker ; 'Junio C Hamano' > ; git@vger.kernel.org; 'Max Kirillov' > > Subject: Re: [ANNOUNCE] Git v2.21.0-rc1 (NonStop Results) > > On Thu, Feb 14, 2019 at 10:36:42PM +0100, Johannes Schindelin wrote: > > O

Re: [ANNOUNCE] Git v2.21.0-rc1 (NonStop Results)

2019-02-15 Thread SZEDER Gábor
On Thu, Feb 14, 2019 at 10:36:42PM +0100, Johannes Schindelin wrote: > On Thu, 14 Feb 2019, Randall S. Becker wrote: > > > t5562 still hangs (blocking) - this breaks our CI pipeline since the > > test hangs and we have no explanation of whether the hang is in git or > > the tests. > > I have "goo

RE: [PATCH 0/1] Fix hang in t5562, introduced in v2.21.0-rc1 (stack traces inside)

2019-02-15 Thread Randall S. Becker
On February 14, 2019 22:48, Max Kirillov wrote: > To: Randall S. Becker > Cc: 'Max Kirillov' ; 'Johannes Schindelin via GitGitGadget' > ; git@vger.kernel.org; 'Junio C Hamano' > > Subject: Re: [PATCH 0/1] Fix hang in t5562, introduced in v2.21.0-rc1 (stack > traces inside) > > On Thu, Feb 14, 20

无标题

2019-02-15 Thread 王伟
When use Git-Svn Command , the "perl" process is allways running . without read or write files. Version is 2.20.1 for windows my cpu is 8 core, 13 percent is max value that one process can use.

Re: How to get next commit that just after a specified commit

2019-02-15 Thread Philip Oakley
On 13/02/2019 21:12, Junio C Hamano wrote: Ævar Arnfjörð Bjarmason writes: (Replying to https://public-inbox.org/git/383c14cc.9289.168e61d39e8.coremail.wuzhouhu...@mails.ucas.ac.cn/ which curiously I can see there, but not in my inbox (or spam)) Git's data format doesn't make it easy to find

[PATCH v3 0/1] Document git-submodule's default behavior

2019-02-15 Thread Denton Liu
Thanks for the review, Junio. Changes since v1: * Incorporate Duy's suggestion of "The default command is '...'" * Fix additional discrepancies between git-remote and git-submodule (on the submodule side) Changes since v2: * Revert "The default command is '...'" back to original text * Drop "

[PATCH v3 1/1] submodule: document default behavior

2019-02-15 Thread Denton Liu
submodule's default behavior wasn't documented in both git-submodule.txt and in the usage text of git-submodule. Document the default behavior similar to how git-remote does it. Signed-off-by: Denton Liu --- Documentation/git-submodule.txt | 4 git-submodule.sh| 3 ++- 2 fil

Re: [GSoC][RFC PATCH] clone: use dir-iterator to avoid explicit dir traversal

2019-02-15 Thread Christian Couder
On Thu, Feb 14, 2019 at 11:04 PM Matheus Tavares Bernardino wrote: > > On Thu, Feb 14, 2019 at 7:16 PM Christian Couder > wrote: > > > -static void copy_or_link_directory(struct strbuf *src, struct strbuf > > > *dest, > > > - const char *src_repo, int src_basele