Git Pull --ff-only should imply --no-rebase

2019-02-25 Thread Shane Carr
Greetings, I have the pull.rebase config enabled for my branch. Sometimes I want to pull and I know that the pull is going to be a fast-forward. However, if I run git pull --ff-only # (with pull.rebase config enabled) I get the error error: Cannot pull with rebase: You have unstaged

Re: `git status -u no` suppresses modified files too.

2019-02-25 Thread Duy Nguyen
On Mon, Feb 25, 2019 at 12:37 PM Rusty Russell wrote: > > Jeff King writes: > > On Fri, Feb 08, 2019 at 12:18:57PM +1030, Rusty Russell wrote: > > > >> This broke my "is this clean?" sanity check and very much violates > >> the man page description. > > > > Wow, this one had me scratching my head

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

2019-02-25 Thread Duy Nguyen
On Sun, Feb 24, 2019 at 9:45 PM Ævar Arnfjörð Bjarmason wrote: > .. > Can't the utility function we're moving to just be made to be > bug-compatible with what we're doing now with symlinks? I haven't really followed closely this thread. But I think the first step should be bug-compatible (it real

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

2019-02-25 Thread Ævar Arnfjörð Bjarmason
On Mon, Feb 25 2019, Matheus Tavares Bernardino wrote: > Hi, Christian and Ævar > > First of all, thanks for the fast and attentive reviews. > > I am a little confused about what I should do next. How should I > proceed with this series? > > By what was said, I understood that the series: > 1) I

Re: [GSoC] Introduction

2019-02-25 Thread Rohit Ashiwal
Hey Christian On Mon, Feb 25, 2019 at 12:20 PM Christian Couder wrote: > In addition to what Dscho (alias Johannes Schindelin) wrote, please > just send one patch that replaces `test -d`, `test -d` and similar > code in only one t/t-*.sh file. No need to do more than that. I don't think I q

Draft of Git Rev News edition 48

2019-02-25 Thread Christian Couder
Hi everyone! A draft of a new Git Rev News edition is available here: https://github.com/git/git.github.io/blob/master/rev_news/drafts/edition-48.md Everyone is welcome to contribute in any section either by editing the above page on GitHub and sending a pull request, or by commenting on this

[PATCH 0/1] t5580: verify that alternates can be UNC paths

2019-02-25 Thread Johannes Schindelin via GitGitGadget
This was fixed in git.git's master some time ago, unfortunately not upstreamed from Git for Windows' patch thicket (my fault, or better put: the fault of the twenty-four hour days not being longer). We carried a regression test on top of the fix, and I can at least contribute that. Johannes Schind

[PATCH 1/1] t5580: verify that alternates can be UNC paths

2019-02-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin On Windows, UNC paths are a very convenient way to share data, and alternates are all about sharing data. We fixed a bug where alternates specifying UNC paths were not handled properly, and it is high time that we add a regression test to ensure that this bug is not rei

How to test the url of a remote ?

2019-02-25 Thread CHABANNE PABLO p1602176
Hi, we are currently working on adding the set-upstream to pull, and we were wondering on how to test if the url of the remote is a valid one. We believe it's call in the do_fetch() function in fetch.c, but we don't how it works. Thanks in advance, -- Corentin Bombard, Nathan Berbezier and Pab

Re: [ANNOUNCE] Git v2.21.0

2019-02-25 Thread Randall S. Becker
Just some good news. We have two platform variants in NonStop to worry about (soon to be three). Our testing is being conducted on the oldest and slowest (J-series) so that we catch whatever we can. 2.21.0 one is still testing 2.21.0 in our Jenkins instance on J-series but is looking consistent wit

[BUG] git log -L ... -s does not suppress diff output

2019-02-25 Thread Matthew Booth
Example output: = $ git --version git version 2.20.1 $ git log -L 2957,3107:nova/compute/manager.py -s commit 35ce77835bb271bad3c18eaf22146edac3a42ea0 diff --git a/nova/compute/manager.py b/nova/compute/manager.py --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -2937,152

Re: [BUG] git log -L ... -s does not suppress diff output

2019-02-25 Thread Jeff King
On Mon, Feb 25, 2019 at 05:03:50PM +, Matthew Booth wrote: > Example output: > > = > $ git --version > git version 2.20.1 > > $ git log -L 2957,3107:nova/compute/manager.py -s > commit 35ce77835bb271bad3c18eaf22146edac3a42ea0 > > > diff --git a/nova/compute/manager.py b/nova/comput

[PATCH] line-log: suppress diff output with "-s"

2019-02-25 Thread Jeff King
On Mon, Feb 25, 2019 at 12:18:17PM -0500, Jeff King wrote: > > git log docs suggest it should not do this: > > > >-s, --no-patch > >Suppress diff output. Useful for commands like git show > > that show the patch by default, or to cancel > >the effect of --patch. >

Re: [PATCH] line-log: suppress diff output with "-s"

2019-02-25 Thread SZEDER Gábor
On Mon, Feb 25, 2019 at 12:32:49PM -0500, Jeff King wrote: > diff --git a/line-log.c b/line-log.c > index 24e21731c4..863f5cbe0f 100644 > --- a/line-log.c > +++ b/line-log.c > @@ -1106,7 +1106,8 @@ int line_log_print(struct rev_info *rev, struct commit > *commit) > struct line_log_data *rang

ag/sequencer-reduce-rewriting-todo, was Re: What's cooking in git.git (Feb 2019, #04; Sun, 24)

2019-02-25 Thread Alban Gruin
Hi Junio, Le 24/02/2019 à 19:18, Junio C Hamano a écrit : > * ag/sequencer-reduce-rewriting-todo (2019-01-29) 16 commits > - rebase--interactive: move transform_todo_file() to rebase--interactive.c > - sequencer: use edit_todo_list() in complete_action() > - rebase-interactive: rewrite edit_tod

RE: [BUG] git log -L ... -s does not suppress diff output

2019-02-25 Thread Randall S. Becker
On February 25, 2019 12:18, Jeff King wrote: > To: Matthew Booth > Cc: git@vger.kernel.org > Subject: Re: [BUG] git log -L ... -s does not suppress diff output > > On Mon, Feb 25, 2019 at 05:03:50PM +, Matthew Booth wrote: > > > Example output: > > > > = > > $ git --version > > git v

Re: [PATCH] line-log: suppress diff output with "-s"

2019-02-25 Thread Jeff King
On Mon, Feb 25, 2019 at 06:59:18PM +0100, SZEDER Gábor wrote: > On Mon, Feb 25, 2019 at 12:32:49PM -0500, Jeff King wrote: > > diff --git a/line-log.c b/line-log.c > > index 24e21731c4..863f5cbe0f 100644 > > --- a/line-log.c > > +++ b/line-log.c > > @@ -1106,7 +1106,8 @@ int line_log_print(struct

Re: [PATCH v3 2/2] setup: fix memory leaks with `struct repository_format`

2019-02-25 Thread Martin Ågren
On Fri, 25 Jan 2019 at 20:51, Jeff King wrote: > > > On Wed, 23 Jan 2019 at 06:57, Jeff King wrote: > > > > > > On Tue, Jan 22, 2019 at 10:45:48PM +0100, Martin Ågren wrote: > > > > > > > Call `clear_...()` at the start of `read_...()` instead of just zeroing > > > > the struct, since we sometime

[PATCH 1/1] mingw: drop MakeMaker reference

2019-02-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In 20d2a30f8ffe (Makefile: replace perl/Makefile.PL with simple make rules, 2017-12-10), Git stopped using MakeMaker. Therefore, that definition in the MINGW-specific section became useless. Signed-off-by: Johannes Schindelin --- config.mak.uname | 1 - 1 file changed

[PATCH 0/1] Drop last MakeMaker reference

2019-02-25 Thread Johannes Schindelin via GitGitGadget
Back when we stopped using MakeMaker, we forgot one reference... Johannes Schindelin (1): mingw: drop MakeMaker reference config.mak.uname | 1 - 1 file changed, 1 deletion(-) base-commit: 8104ec994ea3849a968b4667d072fedd1e688642 Published-As: https://github.com/gitgitgadget/git/releases/ta

Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages

2019-02-25 Thread Eric Sunshine
On Mon, Feb 25, 2019 at 3:03 PM Martin Ågren wrote: > These stylesheets very rarely change, but when they do, it really helps > if the manpages depend on them. We're casting the net a bit too wide > here, since we'll only ever use a subset of the stylesheets, but since > these files change so rare

[PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages

2019-02-25 Thread Martin Ågren
These stylesheets very rarely change, but when they do, it really helps if the manpages depend on them. We're casting the net a bit too wide here, since we'll only ever use a subset of the stylesheets, but since these files change so rarely, that should be ok. It's better than missing a dependency.

[PATCH 2/3] Documentation/Makefile: add missing dependency on asciidoctor-extensions

2019-02-25 Thread Martin Ågren
asciidoctor-extensions.rb has never changed, but when it does -- such as in the next commit --, it helps if the xml-files depend on it. We're casting the net a bit too wide here, since we'll be rebuilding even with AsciiDoc, which won't look at this file. But since this file changes so rarely, that

[PATCH 0/3] asciidoctor-extensions: fix spurious space after linkgit

2019-02-25 Thread Martin Ågren
Patch 3/3 gets rid of a spurious space which shows up immediately after Asciidoctor has expanded linkgit:foo[bar] if the macro is followed by punctuation such as a comma, period or closing parenthesis. Patch 2/3 adds a missing dependency to the makefile, so that the docs will actually be rebuilt w

Re: [PATCH 1/1] mingw: drop MakeMaker reference

2019-02-25 Thread Jonathan Nieder
Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > In 20d2a30f8ffe (Makefile: replace perl/Makefile.PL with simple make > rules, 2017-12-10), Git stopped using MakeMaker. Therefore, that > definition in the MINGW-specific section became useless. > > Signed-off-by: Johanne

[PATCH 3/3] asciidoctor-extensions: fix spurious space after linkgit

2019-02-25 Thread Martin Ågren
When we render, e.g., "linkgit:gitglossary[7]." with Asciidoctor, we get "gitglossary(7) ." with a space between the linkgit macro expansion and the punctuation. We can fix this by dropping the trailing newline after we've turned `linkgit:foo[bar]` into `..`. The diff produced by `USE_ASCIIDOCTOR=

Compile error due to po/fr.po on old gettext in v2.21.0

2019-02-25 Thread Ævar Arnfjörð Bjarmason
On a NetBSD test box I have with msgfmt 0.14.4 v2.21.0 fails to compile. I didn't spot this in rc2 because b3225a4183 ("l10n: fr.po v2.21.0 rnd 2", 2019-02-13) along with the rest of i18n updates gets pulled in after all the RCs. The error s: $ msgfmt --version; msgfmt -o fr.mo po/fr.po

Re: [GSoC] Introduction

2019-02-25 Thread Christian Couder
Hi Rohit, On Mon, Feb 25, 2019 at 12:36 PM Rohit Ashiwal wrote: > > Hey Christian > > On Mon, Feb 25, 2019 at 12:20 PM Christian Couder > wrote: > > > In addition to what Dscho (alias Johannes Schindelin) wrote, please > > just send one patch that replaces `test -d`, `test -d` and similar > > co

Re: [ANNOUNCE] Git v2.21.0

2019-02-25 Thread Jean-Noël AVILA
Hi all, On localization of the manpages Some work was started in German and French. Some other languages were added but with no further work. For v2.21.0, pages are only generated in French for add, checkout, commit, stage. The work on German did not reach the threshold of 80% translated to tr

Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages

2019-02-25 Thread Martin Ågren
On Mon, 25 Feb 2019 at 21:08, Eric Sunshine wrote: > > On Mon, Feb 25, 2019 at 3:03 PM Martin Ågren wrote: > > These stylesheets very rarely change, but when they do, it really helps > > if the manpages depend on them. We're casting the net a bit too wide > > here, since we'll only ever use a sub

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

2019-02-25 Thread Christian Couder
On Mon, Feb 25, 2019 at 11:25 AM Ævar Arnfjörð Bjarmason wrote: > > > On Mon, Feb 25 2019, Matheus Tavares Bernardino wrote: > > > Hi, Christian and Ævar > > > > First of all, thanks for the fast and attentive reviews. > > > > I am a little confused about what I should do next. How should I > > pr

Re: Compile error due to po/fr.po on old gettext in v2.21.0

2019-02-25 Thread Jean-Noël AVILA
On Monday, 25 February 2019 21:19:53 CET Ævar Arnfjörð Bjarmason wrote: > On a NetBSD test box I have with msgfmt 0.14.4 v2.21.0 fails to compile. > > I didn't spot this in rc2 because b3225a4183 ("l10n: fr.po v2.21.0 rnd > 2", 2019-02-13) along with the rest of i18n updates gets pulled in after >

Re: Compile error due to po/fr.po on old gettext in v2.21.0

2019-02-25 Thread Ævar Arnfjörð Bjarmason
On Mon, Feb 25 2019, Jean-Noël AVILA wrote: > On Monday, 25 February 2019 21:19:53 CET Ævar Arnfjörð Bjarmason wrote: >> On a NetBSD test box I have with msgfmt 0.14.4 v2.21.0 fails to compile. >> >> I didn't spot this in rc2 because b3225a4183 ("l10n: fr.po v2.21.0 rnd >> 2", 2019-02-13) along

Re: [PATCH 1/3] Documentation/Makefile: add missing xsl dependencies for manpages

2019-02-25 Thread Eric Sunshine
On Mon, Feb 25, 2019 at 3:29 PM Martin Ågren wrote: > On Mon, 25 Feb 2019 at 21:08, Eric Sunshine wrote: > > On Mon, Feb 25, 2019 at 3:03 PM Martin Ågren wrote: > > > -%.1 %.5 %.7 : %.xml manpage-base-url.xsl > > > +%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl) > > > > The wi

Re: [WIP 7/7] upload-pack: send part of packfile response as uri

2019-02-25 Thread Christian Couder
On Sun, Feb 24, 2019 at 12:39 AM Jonathan Tan wrote: > > Teach upload-pack to send part of its packfile response as URIs. > > An administrator may configure a repository with one or more > "uploadpack.blobpackfileuri" lines, each line containing an OID and a > URI. A client may configure fetch.uri

Re: [GSoC] Introduction

2019-02-25 Thread Eric Sunshine
On Mon, Feb 25, 2019 at 3:22 PM Christian Couder wrote: > On Mon, Feb 25, 2019 at 12:36 PM Rohit Ashiwal > wrote: > > I don't think I quite understood this. Were you asking for replacing > > all `test -X` calls with `test_path_is_*` calls in only one t-*.sh > > file or `test -d` calls with `t

[PATCH] l10n: fr.po unfuzzy commented entries

2019-02-25 Thread Jean-Noël Avila
The 0.14.4 gettext release was back in 2005, so presumably this is due to some GPLv3 allergy of NetBSD's. The OS version itself is 7.1, released a couple of years ago. Signed-off-by: Jean-Noël Avila --- po/fr.po | 190 +++ 1 file changed, 95 in

[PATCH 6/8] t5700: only run with protocol version 1

2019-02-25 Thread Jonathan Tan
Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5700-protocol-v1.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/t5700-protocol-v1.sh b/t/t5700-protocol-v1.sh index ba86a44eb1..d5ed196bfd 100755 --- a/t/t5700-protocol-v1.sh +++ b/t/t5700-protocol-v1.sh @@ -4,6 +4,9 @

[PATCH 7/8] tests: fix protocol version for overspecifications

2019-02-25 Thread Jonathan Tan
These tests are also marked with a NEEDSWORK comment. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5515-fetch-merge-logic.sh | 4 t/t5539-fetch-http-shallow.sh | 5 - t/t5541-http-push-smart.sh| 14 -- t/t5551-http-fetch-smart.sh | 34 ++

[PATCH 3/8] tests: always test fetch of unreachable with v0

2019-02-25 Thread Jonathan Tan
Some tests check that fetching an unreachable object fails, but protocol v2 allows such fetches. Unset GIT_TEST_PROTOCOL_VERSION so that these tests are always run using protocol v0. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5500-fetch-pack.sh | 4 +++- t/t5516-fet

[PATCH 2/8] t5601: check ssh command only with protocol v0

2019-02-25 Thread Jonathan Tan
When running the SSH command as part of a fetch, Git will write "SendEnv GIT_PROTOCOL" as an option if protocol v1 or v2 is used, but not v0. Update all tests that check this to run Git with GIT_TEST_PROTOCOL_VERSION=0. I chose not to do a more thorough fix (for example, checking the value of GIT_

[PATCH 1/8] tests: define GIT_TEST_PROTOCOL_VERSION

2019-02-25 Thread Jonathan Tan
Define a GIT_TEST_PROTOCOL_VERSION environment variable meant to be used from tests. When set, this ensures protocol.version is at least the given value, allowing the entire test suite to be run as if this configuration is in place for all repositories. As of this patch, all tests pass whether GIT

[PATCH 0/8] GIT_TEST_PROTOCOL_VERSION, this time on master

2019-02-25 Thread Jonathan Tan
There's a version of this in Junio's Git repository as jt/test-protocol-version, blocked by js/protocol-advertise-multi. After chatting with Josh (the author of js/protocol-advertise-multi) last week, it seems that that branch might take a while, so I have decided to rebase my patches on master. T

[PATCH 5/8] t5512: compensate for v0 only sending HEAD symrefs

2019-02-25 Thread Jonathan Tan
Protocol v2 supports sending non-HEAD symrefs, but this is not true of protocol v0. Some tests expect protocol v0 behavior, so fix them to use protocol v0. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5512-ls-remote.sh | 18 +- 1 file changed, 13 insertions(+

[PATCH 4/8] t5503: fix overspecification of trace expectation

2019-02-25 Thread Jonathan Tan
In order to extract the wants from a trace, a loop in t5503 currently breaks if "" is found. This works for protocol v0 and v1, but not v2. Instead, teach t5503 to look specifically for the "want" string, which is compatible with all protocols. Signed-off-by: Jonathan Tan Signed-off-by: Junio

[PATCH 8/8] t5552: compensate for v2 filtering ref adv.

2019-02-25 Thread Jonathan Tan
Protocol v2 filters the ref advertisement, but protocol v0 does not. A test in t5552 uses the ref advertisement, so fix it to use protocol v0. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5552-skipping-fetch-negotiator.sh | 5 - 1 file changed, 4 insertions(+), 1 deletio

Re: [WIP 0/7] CDN offloading of fetch response

2019-02-25 Thread Christian Couder
On Sun, Feb 24, 2019 at 12:39 AM Jonathan Tan wrote: > There are probably some more design discussions to be had: [...] > - Client-side whitelist of protocol and hostnames. I've implemented >whitelist of protocol, but not hostnames. I would appreciate a more complete answer to my comments

Re: [PATCH 1/1] mingw: drop MakeMaker reference

2019-02-25 Thread Johannes Schindelin
Hi Jonathan, On Mon, 25 Feb 2019, Jonathan Nieder wrote: > Johannes Schindelin via GitGitGadget wrote: > > > From: Johannes Schindelin > > > > In 20d2a30f8ffe (Makefile: replace perl/Makefile.PL with simple make > > rules, 2017-12-10), Git stopped using MakeMaker. Therefore, that > > definition

Re: [PATCH v2 5/5] remote-curl: use post_rpc() for protocol v2 also

2019-02-25 Thread Jeff King
On Thu, Feb 21, 2019 at 12:24:41PM -0800, Jonathan Tan wrote: > When transmitting and receiving POSTs for protocol v0 and v1, > remote-curl uses post_rpc() (and associated functions), but when doing > the same for protocol v2, it uses a separate set of functions > (proxy_rpc() and others). Besides

Re: [PATCH] l10n: fr.po unfuzzy commented entries

2019-02-25 Thread Ævar Arnfjörð Bjarmason
On Mon, Feb 25 2019, Jean-Noël Avila wrote: > The 0.14.4 gettext release was back in 2005, so presumably this is due > to some GPLv3 allergy of NetBSD's. The OS version itself is 7.1, > released a couple of years ago. So this one pargaraph of commit message is just a paragraph from my E-Mail up

[PATCH v13 07/27] t3903: add test for --intent-to-add file

2019-02-25 Thread Thomas Gummerer
From: Matthew Kraai Add a test showing the 'git stash' behaviour with a file that has been added with 'git add --intent-to-add'. Stash fails to stash the file, so the purpose of this test is mainly to make sure git doesn't crash, but exits normally in this situation. This is in preparation for

[PATCH v13 08/27] stash: rename test cases to be more descriptive

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Rename some test cases' labels to be more descriptive and under 80 characters per line. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- t/t3903-stash.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a

[PATCH v13 01/27] sha1-name.c: add `get_oidf()` which acts like `get_oid()`

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Compared to `get_oid()`, `get_oidf()` has as parameters a pointer to `object_id`, a printf format string and additional arguments. This will help simplify the code in subsequent commits. Original-idea-by: Johannes Schindelin Signed-off-by: Paul-Sebastian Ungureanu

[PATCH v13 12/27] stash: convert drop and clear to builtin

2019-02-25 Thread Thomas Gummerer
From: Joel Teichroeb Add the drop and clear commands to the builtin helper. These two are each simple, but are being added together as they are quite related. We have to unfortunately keep the drop and clear functions in the shell script as functions are called with parameters internally that ar

[PATCH v13 02/27] strbuf.c: add `strbuf_join_argv()`

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Implement `strbuf_join_argv()` to join arguments into a strbuf. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- strbuf.c | 15 +++ strbuf.h | 7 +++ 2 files changed, 22 insertions(+) diff --git a/strbuf.c b/strbuf.c i

[PATCH v13 11/27] stash: convert apply to builtin

2019-02-25 Thread Thomas Gummerer
From: Joel Teichroeb Add a builtin helper for performing stash commands. Converting all at once proved hard to review, so starting with just apply lets conversion get started without the other commands being finished. The helper is being implemented as a drop in replacement for stash so that whe

[PATCH v13 13/27] stash: convert branch to builtin

2019-02-25 Thread Thomas Gummerer
From: Joel Teichroeb Add stash branch to the helper and delete the apply_to_branch function from the shell script. Checkout does not currently provide a function for checking out a branch as cmd_checkout does a large amount of sanity checks first that we require here. Signed-off-by: Joel Teichr

[PATCH v13 06/27] t3903: modernize style

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Remove whitespaces after redirection operators and wrap long lines. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- t/t3903-stash.sh | 120 --- 1 file changed, 61 insertions(+), 59 deletions(

[PATCH v13 03/27] strbuf.c: add `strbuf_insertf()` and `strbuf_vinsertf()`

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Implement `strbuf_insertf()` and `strbuf_vinsertf()` to insert data using a printf format string. Original-idea-by: Johannes Schindelin Signed-off-by: Paul-Sebastian Ungureanu Helped-by: Johannes Sixt Signed-off-by: Thomas Gummerer --- strbuf.c | 36 ++

[PATCH v13 10/27] stash: mention options in `show` synopsis

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Mention in the documentation, that `show` accepts any option known to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- Documentation/git-stash.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docum

[PATCH v13 00/27] Convert "git stash" to C builtin

2019-02-25 Thread Thomas Gummerer
As I was advocating for this series to go into 'next' without a large refactor of this series, I'll put my money were my mouth is and try to make the cleanups and fixes required, though without trying to avoid further external process calls, or changing the series around too much. One thing to con

[PATCH v13 04/27] ident: add the ability to provide a "fallback identity"

2019-02-25 Thread Thomas Gummerer
From: Johannes Schindelin In 3bc2111fc2e9 (stash: tolerate missing user identity, 2018-11-18), `git stash` learned to provide a fallback identity for the case that no proper name/email was given (and `git stash` does not really care about a correct identity anyway, but it does want to create a co

[PATCH v13 09/27] stash: add tests for `git stash show` config

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu This commit introduces tests for `git stash show` config. It tests all the cases where `stash.showStat` and `stash.showPatch` are unset or set to true / false. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- t/t3907-stash-show-config.s

[PATCH v13 14/27] stash: convert pop to builtin

2019-02-25 Thread Thomas Gummerer
From: Joel Teichroeb Add stash pop to the helper and delete the pop_stash, drop_stash, assert_stash_ref functions from the shell script now that they are no longer needed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- builtin/stash--

[PATCH v13 05/27] stash: improve option parsing test coverage

2019-02-25 Thread Thomas Gummerer
From: Joel Teichroeb In preparation for converting the stash command incrementally to a builtin command, this patch improves test coverage of the option parsing. Both for having too many parameters, or too few. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by

[PATCH v13 15/27] stash: convert list to builtin

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Add stash list to the helper and delete the list_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- builtin/stash--helper.c | 31 +++ git-stash.sh| 7 +--

[PATCH v13 17/27] stash: convert store to builtin

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Add stash store to the helper and delete the store_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- builtin/stash--helper.c | 62 + git-stash.sh|

[PATCH v13 23/27] stash: replace all `write-tree` child processes with API calls

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Avoid spawning write-tree child processes by replacing the calls with in-core API calls. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- builtin/stash--helper.c | 41 - 1 file changed, 12 inserti

[PATCH v13 16/27] stash: convert show to builtin

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Add stash show to the helper and delete the show_stash, have_stash, assert_stash_like, is_stash_like and parse_flags_and_rev functions from the shell script now that they are no longer needed. In shell version, although `git stash show` accepts `--index` and `--qui

[PATCH v13 21/27] stash: convert save to builtin

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Add stash save to the helper and delete functions which are no longer needed (`show_help()`, `save_stash()`, `push_stash()`, `create_stash()`, `clear_stash()`, `untracked_files()` and `no_changes()`). Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas G

[PATCH v13 20/27] stash: make push -q quiet

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu There is a change in behaviour with this commit. When there was no initial commit, the shell version of stash would still display a message. This commit makes `push` to not display any message if `--quiet` or `-q` is specified. Add tests for `--quiet`. Signed-off-b

[PATCH v13 22/27] stash: optimize `get_untracked_files()` and `check_changes()`

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu This commits introduces a optimization by avoiding calling the same functions again. For example, `git stash push -u` would call at some points the following functions: * `check_changes()` (inside `do_push_stash()`) * `do_create_stash()`, which calls: `check_chan

[PATCH v13 18/27] stash: convert create to builtin

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Add stash create to the helper. Signed-off-by: Paul-Sebastian Ungureanu Helped-by: Matthew Kraai Signed-off-by: Thomas Gummerer --- builtin/stash--helper.c | 449 +++- git-stash.sh| 2 +- 2 files changed, 449 in

[PATCH v13 19/27] stash: convert push to builtin

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu Add stash push to the helper. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Thomas Gummerer --- builtin/stash--helper.c | 246 +++- git-stash.sh| 6 +- 2 files changed, 246 insertions(+), 6 deletions(-)

[PATCH v13 25/27] stash: add back the original, scripted `git stash`

2019-02-25 Thread Thomas Gummerer
From: Johannes Schindelin This simply copies the version as of sd/stash-wo-user-name verbatim. As of now, it is not hooked up. The next commit will change the builtin `stash` to hand off to the scripted `git stash` when `stash.useBuiltin=false`. Signed-off-by: Johannes Schindelin Signed-off-by

[PATCH v13 24/27] stash: convert `stash--helper.c` into `stash.c`

2019-02-25 Thread Thomas Gummerer
From: Paul-Sebastian Ungureanu The old shell script `git-stash.sh` was removed and replaced entirely by `builtin/stash.c`. In order to do that, `create` and `push` were adapted to work without `stash.sh`. For example, before this commit, `git stash create` called `git stash--helper create --mess

[PATCH v13 27/27] tests: add a special setup where stash.useBuiltin is off

2019-02-25 Thread Thomas Gummerer
From: Johannes Schindelin Add a GIT_TEST_STASH_USE_BUILTIN=false test mode which is equivalent to running with stash.useBuiltin=false. This is needed to spot that we're not introducing any regressions in the legacy stash version while we're carrying both it and the new built-in version. This imi

[PATCH v13 26/27] stash: optionally use the scripted version again

2019-02-25 Thread Thomas Gummerer
From: Johannes Schindelin We recently converted the `git stash` command from Unix shell scripts to builtins. Let's end users a way out when they discover a bug in the builtin command: `stash.useBuiltin`. As the file name `git-stash` is already in use, let's rename the scripted backend to `git-l

Re: [WIP 0/7] CDN offloading of fetch response

2019-02-25 Thread Jonathan Nieder
Hi, Christian Couder wrote: > On Sun, Feb 24, 2019 at 12:39 AM Jonathan Tan > wrote: >> There are probably some more design discussions to be had: > > [...] > >> - Client-side whitelist of protocol and hostnames. I've implemented >>whitelist of protocol, but not hostnames. > > I would appr

[FIXUP] Fixup on tip of jt/http-auth-proto-v2-fix

2019-02-25 Thread Jonathan Tan
Thanks, Peff, for noticing this. It's because the client sometimes sends "" as a single request (that is, it flushes, and then before it sends any data, it flushes again). And post_rpc() assumes that it can always read something - which is usually correct, but not in this case; we read in state

[WIP RFC PATCH 0/7] clone: dir iterator refactoring with tests

2019-02-25 Thread Ævar Arnfjörð Bjarmason
On Mon, Feb 25 2019, Duy Nguyen wrote: > On Sun, Feb 24, 2019 at 9:45 PM Ævar Arnfjörð Bjarmason > wrote: >> .. >> Can't the utility function we're moving to just be made to be >> bug-compatible with what we're doing now with symlinks? > > I haven't really followed closely this thread. But I thin

[WIP RFC PATCH 1/7] dir-iterator: add pedantic option to dir_iterator_begin

2019-02-25 Thread Ævar Arnfjörð Bjarmason
From: Matheus Tavares Add the pedantic option to dir-iterator's initialization function, dir_iterator_begin. When this option is set to true, dir_iterator_advance will immediately return ITER_ERROR when failing to fetch the next entry. When set to false, dir_iterator_advance will emit a warning a

[WIP RFC PATCH 7/7] clone: break cloning repos that have symlinks in them

2019-02-25 Thread Ævar Arnfjörð Bjarmason
Revert back to the lstat() behavior in the dir_iterator interface we've had since it was added in 0fe5043dad ("dir_iterator: new API for iterating over a directory tree", 2016-06-18). No reflog test depends on it, so it's unclear if it's needed. Since clone now uses this it changes the longstandin

[WIP RFC PATCH 4/7] clone: test for our behavior on odd objects/* content

2019-02-25 Thread Ævar Arnfjörð Bjarmason
We've implicitly supported .git/objects/* content of symlinks since approximately forever, and when we do a copy of the repo we transfer those over, but aren't very consistent about other random stuff we find depending on if it's a "hidden" file or not. Let's add a test for that, which shouldn't r

[WIP RFC PATCH 2/7] dir-iterator: use stat() instead of lstat()

2019-02-25 Thread Ævar Arnfjörð Bjarmason
This is surely a horrible idea, but all tests pass with this (not that I trust them much). Doing this for later WIP use in clone.c. Signed-off-by: Ævar Arnfjörð Bjarmason --- dir-iterator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir-iterator.c b/dir-iterator.c index

[WIP RFC PATCH 6/7] clone: stop ignoring dotdirs in --local etc. clone

2019-02-25 Thread Ævar Arnfjörð Bjarmason
This seems to never have been intentional, just a side-effect of how the existing code was written. Signed-off-by: Ævar Arnfjörð Bjarmason --- builtin/clone.c| 8 +++- t/t5604-clone-reference.sh | 9 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/builti

[WIP RFC PATCH 3/7] clone: extract function from copy_or_link_directory

2019-02-25 Thread Ævar Arnfjörð Bjarmason
From: 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 a following patch. Also makes code more readable. Signed-off-by: Mathe

[WIP RFC PATCH 5/7] clone: use dir-iterator to avoid explicit dir traversal

2019-02-25 Thread Ævar Arnfjörð Bjarmason
From: Matheus Tavares Replace usage of opendir/readdir/closedir API to traverse directories recursively, at copy_or_link_directory function, by the dir-iterator API. This simplifies the code and avoid recursive calls to copy_or_link_directory. [Ævar: This should be bug-compatible with the existi

Re: [WIP 7/7] upload-pack: send part of packfile response as uri

2019-02-25 Thread Jonathan Nieder
Hi, Christian Couder wrote: > On Sun, Feb 24, 2019 at 12:39 AM Jonathan Tan > wrote: >> Teach upload-pack to send part of its packfile response as URIs. >> >> An administrator may configure a repository with one or more >> "uploadpack.blobpackfileuri" lines, each line containing an OID and a >>

Re: [WIP RFC PATCH 2/7] dir-iterator: use stat() instead of lstat()

2019-02-25 Thread Matheus Tavares Bernardino
On Mon, Feb 25, 2019 at 9:26 PM Ævar Arnfjörð Bjarmason wrote: > > This is surely a horrible idea, but all tests pass with this (not that > I trust them much). Doing this for later WIP use in clone.c. > > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > dir-iterator.c | 2 +- > 1 file changed, 1 i

Re: Compile error due to po/fr.po on old gettext in v2.21.0

2019-02-25 Thread Jiang Xin
Jean-Noël AVILA 于2019年2月26日周二 上午4:54写道: > > On Monday, 25 February 2019 21:19:53 CET Ævar Arnfjörð Bjarmason wrote: > > On a NetBSD test box I have with msgfmt 0.14.4 v2.21.0 fails to compile. > > > > I didn't spot this in rc2 because b3225a4183 ("l10n: fr.po v2.21.0 rnd > > 2", 2019-02-13) along

Re: [PATCH 3/3] asciidoctor-extensions: fix spurious space after linkgit

2019-02-25 Thread brian m. carlson
On Mon, Feb 25, 2019 at 09:02:40PM +0100, Martin Ågren wrote: > When we render, e.g., "linkgit:gitglossary[7]." with Asciidoctor, we get > "gitglossary(7) ." with a space between the linkgit macro expansion and > the punctuation. We can fix this by dropping the trailing newline after > we've turned

Re: [PATCH 0/3] asciidoctor-extensions: fix spurious space after linkgit

2019-02-25 Thread brian m. carlson
On Mon, Feb 25, 2019 at 09:02:37PM +0100, Martin Ågren wrote: > Patch 3/3 gets rid of a spurious space which shows up immediately after > Asciidoctor has expanded linkgit:foo[bar] if the macro is followed by > punctuation such as a comma, period or closing parenthesis. > > Patch 2/3 adds a missing

Re: [WIP RFC PATCH 5/7] clone: use dir-iterator to avoid explicit dir traversal

2019-02-25 Thread Matheus Tavares Bernardino
On Mon, Feb 25, 2019 at 9:26 PM Ævar Arnfjörð Bjarmason wrote: > > From: Matheus Tavares > > Replace usage of opendir/readdir/closedir API to traverse directories > recursively, at copy_or_link_directory function, by the dir-iterator > API. This simplifies the code and avoid recursive calls to >

[WIP RFC PATCH v2 0/5] clone: dir iterator refactoring with tests

2019-02-25 Thread Matheus Tavares
Ævar sent v1: https://public-inbox.org/git/20190226002625.13022-1-ava...@gmail.com/ Based on Ævar's work and comments, I refactored my previous series[1], so that clone's original behaviour regarding symlinks is kept untouched. So, keeping this behaviour, having tests for this, changing local clo

[WIP RFC PATCH v2 2/5] clone: test for our behavior on odd objects/* content

2019-02-25 Thread Matheus Tavares
From: Ævar Arnfjörð Bjarmason We've implicitly supported .git/objects/* content of symlinks since approximately forever, and when we do a copy of the repo we transfer those over, but aren't very consistent about other random stuff we find depending on if it's a "hidden" file or not. Let's add a

[WIP RFC PATCH v2 5/5] clone: use dir-iterator to avoid explicit dir traversal

2019-02-25 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. This simplifies the code and avoid recursive calls to copy_or_link_directory. This process also makes copy_or_link_directory call die() in case of an erro

[WIP RFC PATCH v2 1/5] dir-iterator: add flags parameter to dir_iterator_begin

2019-02-25 Thread Matheus Tavares
Add the possibility of giving flags to dir_iterator_begin to initialize a dir-iterator with special options. Currently possible flags are DIR_ITERATOR_PEDANTIC, which makes dir_iterator_advance abort imediatelly in the case of an error while trying to fetch next entry; and DIR_ITERATOR_FOLLOW_SYML

[WIP RFC PATCH v2 3/5] clone: copy hidden paths at local clone

2019-02-25 Thread Matheus Tavares
Make the copy_or_link_directory function no longer skip hidden paths. This function, used to copy .git/objects, currently skips all hidden directories but not hidden files, which is an odd behaviour. The reason for that could be unintentional: probably the intention was to skip '.' and '..' only bu

[WIP RFC PATCH v2 4/5] clone: extract function from copy_or_link_directory

2019-02-25 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 a following patch. Also makes code more readable. Signed-off-by: Matheus Tavares --- builtin

  1   2   >