[PATCH v2] doc: improve usage string in MyFirstContribution

2019-06-21 Thread Christian Couder
We implement a command called git-psuh which accept arguments, so let's show that it accepts arguments in the doc and the usage string. While at it, we need to prepare "a NULL-terminated array of usage strings", not just "a NULL-terminated usage string". Helped-by: Emily Shaffer Helped-by: Eric

Re: [PATCH 13/14] completion: add default options

2019-06-21 Thread Felipe Contreras
On Fri, Jun 21, 2019 at 10:02 PM Duy Nguyen wrote: > > On Sat, Jun 22, 2019 at 5:31 AM Felipe Contreras > wrote: > > > > Versions of Git older than v2.17 don't know about > > --git-completion-helper, so provide some defaults for them. > > > > Also, some commands fail if there's no Git repository

Re: [PATCH] l10n: localizable upload progress messages

2019-06-21 Thread Duy Nguyen
On Sat, Jun 22, 2019 at 2:18 AM Junio C Hamano wrote: > > Dimitriy Ryazantcev writes: > > > Signed-off-by: Dimitriy Ryazantcev > > --- > > progress.c | 3 ++- > > strbuf.c | 8 > > 2 files changed, 6 insertions(+), 5 deletions(-) > > > > diff --git a/progress.c b/progress.c > > index

Re: [PATCH 13/14] completion: add default options

2019-06-21 Thread Duy Nguyen
On Sat, Jun 22, 2019 at 5:31 AM Felipe Contreras wrote: > > Versions of Git older than v2.17 don't know about > --git-completion-helper, so provide some defaults for them. > > Also, some commands fail if there's no Git repository available. > > Signed-off-by: Felipe Contreras > --- > contrib/com

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Duy Nguyen
On Sat, Jun 22, 2019 at 6:31 AM brian m. carlson wrote: > > On 2019-06-19 at 09:58:50, Nguyễn Thái Ngọc Duy wrote: > > This is probably just my itch. Every time I have to do something with > > the index, I need to add a little bit code here, a little bit there to > > get a better "view" of the ind

Re: [PATCH v4 10/10] list-objects-filter-options: make parser void

2019-06-21 Thread Jonathan Tan
> This function always returns 0, so make it return void instead. And...patches 7-10 look straightforward and good to me. In summary, I don't think any changes need to be made to all 10 patches other than textual ones (commit messages, documentation, and function names).

Re: [PATCH v4 06/10] list-objects-filter-options: make filter_spec a string_list

2019-06-21 Thread Jonathan Tan
Patch 5 and this patch look good to me. > @@ -1134,27 +1134,25 @@ int cmd_clone(int argc, const char **argv, const char > *prefix) > transport_set_option(transport, TRANS_OPT_FOLLOWTAGS, "1"); > > if (option_upload_pack) > transport_set_option(transport, TRANS_

Re: [PATCH v4 04/10] list-objects-filter: implement composite filters

2019-06-21 Thread Jonathan Tan
> Allow combining filters such that only objects accepted by all filters > are shown. The motivation for this is to allow getting directory > listings without also fetching blobs. This can be done by combining > blob:none with tree:. There are massive repositories that have > larger-than-expected t

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread brian m. carlson
On 2019-06-19 at 09:58:50, Nguyễn Thái Ngọc Duy wrote: > This is probably just my itch. Every time I have to do something with > the index, I need to add a little bit code here, a little bit there to > get a better "view" of the index. > > This solves it for me. It allows me to see pretty much eve

Re: [PATCH v4 01/10] list-objects-filter: make API easier to use

2019-06-21 Thread Jonathan Tan
> Make the list-objects-filter.h API more opaque and easier to use. This > prepares for combined filter support, where filters will be created and > used in a new context. > > Helped-by: Jeff Hostetler > Helped-by: Junio C Hamano > Signed-off-by: Matthew DeVore So what happens is that filter_f

[PATCH 02/14] completion: zsh: fix for directories with spaces

2019-06-21 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 0d66c27366..034cfa9e8f 100644 --- a/contrib/completion/git-completion.

[PATCH 04/14] completion: zsh: improve main function selection

2019-06-21 Thread Felipe Contreras
Sometimes we want to use the function directly (e.g. _git_checkout), for example when zsh has the option 'complete_aliases', this way, we can do something like: compdef _git gco=git_checkout Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 4 +++- 1 file changed, 3

[PATCH 11/14] test: completion: tests for __gitcomp regression

2019-06-21 Thread Felipe Contreras
There's a regression in the completion since the introduction of __gitcomp. Go to any directory that doesn't contain a git repository, like /tmp. Then type the following: git checkout -- You will see nothing. That's because `git checkout --git-completion-helper` fails when you run it outside a

[PATCH 03/14] completion: remove zsh hack

2019-06-21 Thread Felipe Contreras
We don't want to override the 'complete()' function in zsh, which can be used by bashcomp. Reported-by: Mark Lodato Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 1 + contrib/completion/git-completion.zsh | 6 -- 2 files changed, 1 insertion(+), 6 deletions(-

[PATCH 14/14] completion: add default merge strategies

2019-06-21 Thread Felipe Contreras
In case the command fails. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 4 +++- t/t9902-completion.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completio

[PATCH 01/14] completion: zsh: fix __gitcomp_direct()

2019-06-21 Thread Felipe Contreras
Many callers append a space suffix, but zsh automatically appends a space, making the completion add two spaces, for example: git log ma Will complete 'master '. Let's remove that extra space. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 2 +- contrib/comple

[PATCH 05/14] completion: prompt: fix color for Zsh

2019-06-21 Thread Felipe Contreras
We don't need PROMPT_COMMAND in Zsh; we are already using %F{color} %f, which in turn use %{ and %}, which are the equivalent of Bash's \[ and \]. We can use as many colors as we want and output directly into PS1 (or RPS1) without the risk of buffer wrapping issues. Signed-off-by: Felipe Contrera

[PATCH 00/14] completion: a bunch of updates

2019-06-21 Thread Felipe Contreras
Hi, Here's another try at completion fixes, cleanups, and more tests. Some of these have already been sent. Felipe Contreras (14): completion: zsh: fix __gitcomp_direct() completion: zsh: fix for directories with spaces completion: remove zsh hack completion: zsh: improve main function se

[PATCH 10/14] completion: zsh: trivial cleanups

2019-06-21 Thread Felipe Contreras
We don't need to override IFS, zsh has a native way of splitting by new lines: the expansion flag (f). Also, we don't need to split files by ':' or '='; that's only for words. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 18 ++ 1 file changed, 6 in

[PATCH 08/14] completion: bash: remove old compat wrappers

2019-06-21 Thread Felipe Contreras
It's been seven years, probably more than enough time to move on. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 12 1 file changed, 12 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index dba

[PATCH 13/14] completion: add default options

2019-06-21 Thread Felipe Contreras
Versions of Git older than v2.17 don't know about --git-completion-helper, so provide some defaults for them. Also, some commands fail if there's no Git repository available. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 97 +- t/t9902-comp

[PATCH 12/14] test: completion: use global config

2019-06-21 Thread Felipe Contreras
When appropriate. Signed-off-by: Felipe Contreras --- t/t9902-completion.sh | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 7bef41eaf5..3dbfef6960 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@

[PATCH 09/14] completion: bash: remove zsh wrapper

2019-06-21 Thread Felipe Contreras
It has been deprecated for more than seven years. It's time to move on. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 84 +- 1 file changed, 2 insertions(+), 82 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/com

[PATCH 07/14] completion: zsh: update installation instructions

2019-06-21 Thread Felipe Contreras
Commit 0e5ed7cca3 wrongly changed the extension of the bash script to .zsh. The extension doesn't really matter, but it confuses people. I've changed the text to make it clear that your zsh script goes to ~/.zsh/_git, and the bash script to ~/.contrib/completion/git-completion.bash (or wherever y

[PATCH 06/14] completion: bash: cleanup cygwin check

2019-06-21 Thread Felipe Contreras
Avoid Yoda conditions, and use $OSTYPE. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 676b19a983..dba822d0e7

Re: Deadname rewriting

2019-06-21 Thread CB Bailey
On Fri, Jun 21, 2019 at 11:34:06PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> This topic was discussed at the last git contributor summit (brought up > >> by CB Bailey) resulting in this patch, which I see didn't make it in & > >> needs to be resurrected again: > >> https://public-inbox.org/git/201

Re: Deadname rewriting

2019-06-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 21 2019, Phil Hord wrote: > On Sat, Jun 15, 2019 at 1:19 AM Ævar Arnfjörð Bjarmason > wrote: >> On Sat, Jun 15 2019, Phil Hord wrote: >> >> > At $work we have a long time employee who has changed their name from >> > Alice to Bob. Bob doesn't want anyone to call him "Alice" anymore

Re: Deadname rewriting

2019-06-21 Thread Phil Hord
On Sat, Jun 15, 2019 at 1:19 AM Ævar Arnfjörð Bjarmason wrote: > On Sat, Jun 15 2019, Phil Hord wrote: > > > At $work we have a long time employee who has changed their name from > > Alice to Bob. Bob doesn't want anyone to call him "Alice" anymore and > > is prone to be offended if they do. Thi

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Jeff King
On Fri, Jun 21, 2019 at 08:10:58AM -0700, Junio C Hamano wrote: > Duy Nguyen writes: > > > Considering the amount of code to output these, supporting multiple > > formats would be a nightmare. I may be ok with versioning the output > > so the tool know what format they need to deal with, but I'd

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Jeff King
On Fri, Jun 21, 2019 at 03:16:52PM +0200, Johannes Schindelin wrote: > > I think your warning in the manpage that this is for debugging is fine, > > as it does not put us on the hook for maintaining the feature nor its > > format forever. We might want to call it "--debug=json" or something, > > t

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Jeff King
On Fri, Jun 21, 2019 at 03:37:45PM +0700, Duy Nguyen wrote: > On Thu, Jun 20, 2019 at 2:17 AM Jeff King wrote: > > I think your warning in the manpage that this is for debugging is fine, > > as it does not put us on the hook for maintaining the feature nor its > > format forever. We might want to

Re: [PATCH v2 15/20] msvc: support building Git using MS Visual C++

2019-06-21 Thread Junio C Hamano
Johannes Schindelin writes: >> ifdef SANE_TOOL_PATH >> SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH)) >> -BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix >> "$(SANE_TOOL_PATH_SQ)"|' >> +BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix >> $(SANE_TOOL

Re: sg/rebase-progress, was Re: What's cooking in git.git (Jun 2019, #05; Wed, 19)

2019-06-21 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Junio, > > On Wed, 19 Jun 2019, Junio C Hamano wrote: > >> * sg/rebase-progress (2019-06-11) 4 commits > > No, it seems that the Windows-specific problem with this patch series' > tests have disappeared (I want to believe that my bugfix is the reason, > but I lack

Re: [PATCH v2 15/20] msvc: support building Git using MS Visual C++

2019-06-21 Thread Johannes Schindelin
Hi, On Wed, 19 Jun 2019, Jeff Hostetler via GitGitGadget wrote: > diff --git a/Makefile b/Makefile > index 3cf8cc8ffd..2b66d5a3f3 100644 > --- a/Makefile > +++ b/Makefile > @@ -1240,7 +1240,7 @@ endif > > ifdef SANE_TOOL_PATH > SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH)) > -BROKEN_PAT

Re: [PATCH] tests: mark two failing tests under FAIL_PREREQS

2019-06-21 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > ... The effect of the FAIL_PREREQS mode is to set all > prereqs to false, and therefore "test_have_prereq AUTOIDENT" is false, > but "test_have_prereq !AUTOIDENT" is true. > > So this test that would otherwise get skipped gets run. > > I honestly didn't think muc

md/list-objects-filter-combo, was Re: What's cooking in git.git (Jun 2019, #05; Wed, 19)

2019-06-21 Thread Johannes Schindelin
Hi Junio, On Wed, 19 Jun 2019, Junio C Hamano wrote: > * md/list-objects-filter-combo (2019-06-17) 10 commits > - list-objects-filter-options: make parser void > - list-objects-filter-options: clean up use of ALLOC_GROW > - list-objects-filter-options: allow mult. --filter > - strbuf: give UR

Re: [PATCH 1/1] t0001: fix on case-insensitive filesystems

2019-06-21 Thread Ævar Arnfjörð Bjarmason
On Sun, Jun 09 2019, brian m. carlson wrote: > On 2019-06-08 at 14:43:43, Johannes Schindelin via GitGitGadget wrote: >> diff --git a/t/t0001-init.sh b/t/t0001-init.sh >> index 42a263cada..f54a69e2d9 100755 >> --- a/t/t0001-init.sh >> +++ b/t/t0001-init.sh >> @@ -307,10 +307,20 @@ test_expect_su

sg/rebase-progress, was Re: What's cooking in git.git (Jun 2019, #05; Wed, 19)

2019-06-21 Thread Johannes Schindelin
Hi Junio, On Wed, 19 Jun 2019, Junio C Hamano wrote: > * sg/rebase-progress (2019-06-11) 4 commits > - progress: use term_clear_line() > - rebase: fix garbled progress display with '-x' > - pager: add a helper function to clear the last line in the terminal > - t3404-rebase-interactive: use t

Re: [PATCH] l10n: localizable upload progress messages

2019-06-21 Thread Junio C Hamano
Dimitriy Ryazantcev writes: > Signed-off-by: Dimitriy Ryazantcev > --- > progress.c | 3 ++- > strbuf.c | 8 > 2 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/progress.c b/progress.c > index a2e8cf64a8..3d47c06495 100644 > --- a/progress.c > +++ b/progress.c > @@ -1

Re: [GSoC][PATCH v6 0/5] Teach cherry-pick/revert to skip commits

2019-06-21 Thread Junio C Hamano
Rohit Ashiwal writes: > I've covered the advice message behind `advice_resolve_conflict` variable and > changed the order of error and advice to match that of 1/5. I think the updated text reads much better, i.e. taking from your range-diff: > +cat >expect <<-EOF && > ++

Re: [PATCH] doc: improve usage string in MyFirstContribution

2019-06-21 Thread Eric Sunshine
On Fri, Jun 21, 2019 at 1:19 PM Junio C Hamano wrote: > Eric Sunshine writes: > > On Fri, Jun 21, 2019 at 6:43 AM Christian Couder > > wrote: > >> On Thu, Jun 20, 2019 at 11:29 PM Emily Shaffer > >> wrote: > >> > It doesn't require 1 or more args - you can run it with no args. So it > >> > mig

[PATCH] l10n: localizable upload progress messages

2019-06-21 Thread Dimitriy Ryazantcev
Signed-off-by: Dimitriy Ryazantcev --- progress.c | 3 ++- strbuf.c | 8 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/progress.c b/progress.c index a2e8cf64a8..3d47c06495 100644 --- a/progress.c +++ b/progress.c @@ -151,7 +151,8 @@ static void throughput_string(struct

Re: [PATCH 4/4] config: avoid calling `labs()` on too-large data type

2019-06-21 Thread Johannes Schindelin
Hi René, On Thu, 20 Jun 2019, René Scharfe wrote: > Subject: [PATCH] config: simplify unit suffix handling > > parse_unit_factor() checks if a K, M or G is present after a number and > multiplies it by 2^10, 2^20 or 2^30, respectively. One of its callers > checks if the result is smaller than th

Re: [PATCH] tests: mark two failing tests under FAIL_PREREQS

2019-06-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 21 2019, Johannes Schindelin wrote: > Hi Ævar, > > On Thu, 20 Jun 2019, Ævar Arnfjörð Bjarmason wrote: > >> Fix a couple of tests that would potentially fail under >> GIT_TEST_FAIL_PREREQS=true. >> >> I missed these when annotating other tests in dfe1a17df9 ("tests: add >> a special

Re: [PATCH v4 04/10] list-objects-filter: implement composite filters

2019-06-21 Thread Johannes Schindelin
Hi, On Tue, 18 Jun 2019, Matthew DeVore wrote: > On Tue, Jun 18, 2019 at 10:42:10AM +0200, Johannes Schindelin wrote: > > > + if (!subspecs[0]) { > > > + strbuf_addf(errbuf, > > > + _("expected something after combine:")); > > > > Please squash this in, to pacify Cocci

Re: [PATCH] tests: mark two failing tests under FAIL_PREREQS

2019-06-21 Thread Johannes Schindelin
Hi Ævar, On Thu, 20 Jun 2019, Ævar Arnfjörð Bjarmason wrote: > Fix a couple of tests that would potentially fail under > GIT_TEST_FAIL_PREREQS=true. > > I missed these when annotating other tests in dfe1a17df9 ("tests: add > a special setup where prerequisites fail", 2019-05-13) because on my > s

Re: [PATCH v2 1/1] t0001: fix on case-insensitive filesystems

2019-06-21 Thread Junio C Hamano
Johannes Schindelin writes: > [Re-sending, as the Git mailing list seems to have decided to silently > drop this patch, I cannot see it on public-inbox.org, at least] Move that below the three-dash lines; otherwise the above two lines will make your in-body From: ineffective. > > From: Johannes

nntp://news.public-inbox.org/ may be unstable

2019-06-21 Thread Eric Wong
Hopefully I didn't break anything, stress testing some stuff and my own Internet connection is intermittent :<

Re: [PATCH] doc: improve usage string in MyFirstContribution

2019-06-21 Thread Junio C Hamano
Eric Sunshine writes: > On Fri, Jun 21, 2019 at 6:43 AM Christian Couder > wrote: >> On Thu, Jun 20, 2019 at 11:29 PM Emily Shaffer >> wrote: >> > It doesn't require 1 or more args - you can run it with no args. So it >> > might be better suited to state the args as optional: >> > >> > 'git

Re: [PATCH v3 2/8] env--helper: new undocumented builtin wrapping git_env_*()

2019-06-21 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > The --type=bool option will be used by subsequent patches, but not > --type=ulong. I figured it was easy enough to add it & test for it so > I left it in so we'd have wrappers for both git_env_*() functions, and > to have a template to make it obvious how we'd a

Re: [PATCH] doc: improve usage string in MyFirstContribution

2019-06-21 Thread Eric Sunshine
On Fri, Jun 21, 2019 at 6:43 AM Christian Couder wrote: > On Thu, Jun 20, 2019 at 11:29 PM Emily Shaffer > wrote: > > It doesn't require 1 or more args - you can run it with no args. So it > > might be better suited to state the args as optional: > > > > 'git psuh [arg]...' > > Yeah sure, I wi

Re: [PATCH 1/3] status: add status.aheadbehind setting

2019-06-21 Thread Junio C Hamano
"Jeff Hostetler via GitGitGadget" writes: > From: Jeff Hostetler > > The --[no-]ahead-behind option was introduced in fd9b544a > (status: add --[no-]ahead-behind to status and commit for V2 > format, 2018-01-09). This is a necessary change of behavior > in repos where the remote tracking branche

Re: [PATCH] push: make "HEAD:tags/my-tag" consistently push to a branch

2019-06-21 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > This resulted in a case[1] where someone on LKML did: > > git push kvm +HEAD:tags/for-linus > > Which would have created a new "refs/heads/tags/for-linus" branch in > their "kvm" repository. But since they happened to have an existing > "refs/tags/for-linus"

[PATCH] json-writer: fix a 'hdr-check' warning

2019-06-21 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Duy, If you need to re-roll your 'nd/index-dump-in-json' branch, could you please squash this into the relevant patch (commit 53f1666b3a, 'split-index.c: dump "link" extension as json', 2019-06-19). Thanks! ATB, Ramsay Jones json-writer.h | 1 + 1 file ch

Re: specifying revision - how to enforce matching a tag/branch-name or revision only

2019-06-21 Thread Junio C Hamano
Kyle Meyer writes: >> git rev-parse "${BRANCH_NAME}"  || git rev-parse >> "refs/remotes/${UPSTREAM}/${BRANCH_NAME}" >> >> Unfortunately somebody used the branch name "add-gcc10" and `git rev-parse` >> which didn't exist on one repository. However `git rev-parse` >> also supports to parse the `g

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Junio C Hamano
Duy Nguyen writes: > Considering the amount of code to output these, supporting multiple > formats would be a nightmare. I may be ok with versioning the output > so the tool know what format they need to deal with, but I'd rather > support just one version. For third parties wanting to dig deep,

Re: [PATCH v2 2/8] env--helper: new undocumented builtin wrapping git_env_*()

2019-06-21 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Just thought I'd ask if appeasing older analyzers is what we want for > these sorts of optional warnings in general. Yeah, examples of such "let's help users with common compilers so that they can focus on real errors" are abound. Thanks.

[PATCH] push: make "HEAD:tags/my-tag" consistently push to a branch

2019-06-21 Thread Ævar Arnfjörð Bjarmason
When a refspec like "HEAD:tags/my-tag" is pushed where "HEAD" is a branch, we'll push a *branch* that'll be located at "refs/heads/tags/my-tag". This is part of the rather straightforward rules I documented in 2219c09e23 ("push doc: document the DWYM behavior pushing to unqualified ", 2018-11-13).

Re: [PATCH v2 1/1] t0001: fix on case-insensitive filesystems

2019-06-21 Thread Johannes Schindelin
[Re-sending, as the Git mailing list seems to have decided to silently drop this patch, I cannot see it on public-inbox.org, at least] From: Johannes Schindelin On a case-insensitive filesystem, such as HFS+ or NTFS, it is possible that the idea Bash has of the current directory differs in case

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Duy Nguyen
On Fri, Jun 21, 2019 at 8:16 PM Johannes Schindelin wrote: > > I think your warning in the manpage that this is for debugging is fine, > > as it does not put us on the hook for maintaining the feature nor its > > format forever. We might want to call it "--debug=json" or something, > > though, in

Re: [GSoC][PATCH v7 00/10] clone: dir-iterator refactoring with tests

2019-06-21 Thread Matheus Tavares Bernardino
On Thu, Jun 20, 2019 at 5:18 PM Junio C Hamano wrote: > > Matheus Tavares writes: > > > Daniel Ferreira (1): > > dir-iterator: add tests for dir-iterator API > > > > Matheus Tavares (8): > > clone: better handle symlinked files at .git/objects/ > > dir-iterator: use warning_errno when possi

Re: pw/rebase-abort-clean-rewritten, was Re: What's cooking in git.git (Jun 2019, #04; Fri, 14)

2019-06-21 Thread Johannes Schindelin
Hi, On Thu, 20 Jun 2019, Phillip Wood wrote: > On 18/06/2019 04:30, Junio C Hamano wrote: > > Phillip Wood writes: > > > > > Yes I sent it just before I went offline, but that's a while ago now > > > > Yup. IIRC, you told us not to look at the patch "for now" as you > > would be offline, and I

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Johannes Schindelin
Hi Peff, On Wed, 19 Jun 2019, Jeff King wrote: > On Wed, Jun 19, 2019 at 04:58:50PM +0700, Nguyễn Thái Ngọc Duy wrote: > > > This is probably just my itch. Every time I have to do something with > > the index, I need to add a little bit code here, a little bit there to > > get a better "view" of

Re: [PATCH 1/8] ls-files: add --json to dump the index

2019-06-21 Thread Johannes Schindelin
Hi, On Wed, 19 Jun 2019, Derrick Stolee wrote: > On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote: > > > +--json:: > > + Dump the entire index content in JSON format. This is for > > + debugging purposes and the JSON structure may change from time > > + to time. > > + > > "...purposes and t

Re: [RFC PATCH 3/3] trace2: add a schema validator for trace2 events

2019-06-21 Thread Jakub Narebski
Josh Steadmon writes: > On 2019.06.12 15:28, Ævar Arnfjörð Bjarmason wrote: >> On Wed, Jun 12 2019, Josh Steadmon wrote: >> >>> trace_schema_validator can be used to verify that trace2 event output >>> conforms to the expectations set by the API documentation and codified >>> in event_schema.jso

Re: [PATCH 0/2] Add OBJECT_INFO_NO_FETCH_IF_MISSING flag

2019-06-21 Thread Christian Couder
On Thu, Jun 20, 2019 at 10:52 PM Junio C Hamano wrote: > > Christian Couder writes: > > > In a review[1] of my "many promisor remotes" patch series[2] and in > > the following thread, it was suggested that a flag should be passed to > > tell oid_object_info_extended() that it should not fetch obj

Re: [PATCH] doc: improve usage string in MyFirstContribution

2019-06-21 Thread Christian Couder
On Thu, Jun 20, 2019 at 11:29 PM Emily Shaffer wrote: > > On Thu, Jun 20, 2019 at 12:13:15AM +0200, Christian Couder wrote: > > SYNOPSIS > > > > [verse] > > -'git-psuh' > > +'git-psuh ...' > > It doesn't require 1 or more args - you can run it with no args. So it > might be better suit

[PATCH v3 4/8] t6040 test: stop using global "script" variable

2019-06-21 Thread Ævar Arnfjörð Bjarmason
Change test code added in c0234b2ef6 ("stat_tracking_info(): clear object flags used during counting", 2008-07-03) to stop using the "script" variable also used for lazy prerequisites in test-lib-functions.sh. Since this test uses test_i18ncmp and expects to use its own "script" variable twice it

[PATCH v3 1/8] config tests: simplify include cycle test

2019-06-21 Thread Ævar Arnfjörð Bjarmason
Simplify an overly verbose test added in 9b25a0b52e ("config: add include directive", 2012-02-06). The "expect" file was never used, and by using .gitconfig it's not as intuitive to reproduce this manually with "-d" as some other tests, since HOME needs to be set in the environment. Also remove th

[PATCH v3 7/8] tests: replace test_tristate with "git env--helper"

2019-06-21 Thread Ævar Arnfjörð Bjarmason
The test_tristate helper introduced in 83d842dc8c ("tests: turn on network daemon tests by default", 2014-02-10) can now be better implemented with "git env--helper" to give the variables in question the standard boolean behavior. The reason for the "tristate" was to have all of false/true/auto, w

[PATCH v3 3/8] config.c: refactor die_bad_number() to not call gettext() early

2019-06-21 Thread Ævar Arnfjörð Bjarmason
Prepare die_bad_number() for a change to specially handle GIT_TEST_GETTEXT_POISON calling git_env_bool() by making die_bad_number() not call gettext() early, which would in turn call git_env_bool(). There's no meaningful change here yet, just a re-arrangement of the current code to make that subse

[PATCH v3 8/8] tests: make GIT_TEST_FAIL_PREREQS a boolean

2019-06-21 Thread Ævar Arnfjörð Bjarmason
Change the GIT_TEST_FAIL_PREREQS variable from being "non-empty?" to being a more standard boolean variable. I recently added the variable in dfe1a17df9 ("tests: add a special setup where prerequisites fail", 2019-05-13), having to add another "non-empty?" special-case is what prompted me to write

[PATCH v3 6/8] tests README: re-flow a previously changed paragraph

2019-06-21 Thread Ævar Arnfjörð Bjarmason
A previous change to the "GIT_TEST_GETTEXT_POISON" variable left this paragraph needing to be re-flowed. Let's do that in this separate change to make it easy to see that there's no change here when viewed with "--word-diff". Signed-off-by: Ævar Arnfjörð Bjarmason --- t/README | 8 1 fi

[PATCH v3 5/8] tests: make GIT_TEST_GETTEXT_POISON a boolean

2019-06-21 Thread Ævar Arnfjörð Bjarmason
Change the GIT_TEST_GETTEXT_POISON variable from being "non-empty?" to being a more standard boolean variable. Since it needed to be checked in both C code and shellscript (via test -n) it was one of the remaining shellscript-like variables. Now that we have "env--helper" we can change that. Ther

[PATCH v3 2/8] env--helper: new undocumented builtin wrapping git_env_*()

2019-06-21 Thread Ævar Arnfjörð Bjarmason
We have many GIT_TEST_* variables that accept a because they're implemented in C, and then some that take because they're implemented at least partially in shellscript. Add a helper that wraps git_env_bool() and git_env_ulong() as the first step in fixing this. This isn't being added as a test-t

[PATCH v3 0/8] Change GIT_TEST_* variables to

2019-06-21 Thread Ævar Arnfjörð Bjarmason
Now with: * The --type=bool etc. Ui change to env--bool. * I considered supporting YesPlease for gettext poison, but didn't go for it. Details in updated commit message. * "default" "case" arm fork warning on some compilers. Ævar Arnfjörð Bjarmason (8): config tests: simplify include cy

[GSoC][PATCH v6 4/5] cherry-pick/revert: add --skip option

2019-06-21 Thread Rohit Ashiwal
git am or rebase have a --skip flag to skip the current commit if the user wishes to do so. During a cherry-pick or revert a user could likewise skip a commit, but needs to use 'git reset' (or in the case of conflicts 'git reset --merge'), followed by 'git (cherry-pick | revert) --continue' to skip

[GSoC][PATCH v6 0/5] Teach cherry-pick/revert to skip commits

2019-06-21 Thread Rohit Ashiwal
I've covered the advice message behind `advice_resolve_conflict` variable and changed the order of error and advice to match that of 1/5. I believe that we don't have any advice variable appropriate for advice in 1/5. Rohit Ashiwal (5): sequencer: add advice for revert sequencer: rename reset_

[GSoC][PATCH v6 5/5] cherry-pick/revert: advise using --skip

2019-06-21 Thread Rohit Ashiwal
The previous commit introduced a --skip flag for cherry-pick and revert. Update the advice messages, to tell users about this less cumbersome way of skipping commits. Also add tests to ensure everything is working fine. Signed-off-by: Rohit Ashiwal --- builtin/commit.c| 13 ++

[GSoC][PATCH v6 1/5] sequencer: add advice for revert

2019-06-21 Thread Rohit Ashiwal
In the case of merge conflicts, while performing a revert, we are currently advised to use `git cherry-pick --` of which --continue is incompatible for continuing the revert. Introduce a separate advice message for `git revert`. Also change the signature of `create_seq_dir` to handle which advice t

[GSoC][PATCH v6 2/5] sequencer: rename reset_for_rollback to reset_merge

2019-06-21 Thread Rohit Ashiwal
We are on a path to teach cherry-pick/revert how to skip commits. To achieve this, we could really make use of existing functions. reset_for_rollback is one such function, but the name does not intuitively suggest to use it to reset a merge, which it was born to perform see 539047c ("revert: introd

[GSoC][PATCH v6 3/5] sequencer: use argv_array in reset_merge

2019-06-21 Thread Rohit Ashiwal
Avoid using magic numbers for array size and index under `reset_merge` function. Use `argv_array` instead. This will make code shorter and easier to extend. Signed-off-by: Rohit Ashiwal --- sequencer.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sequenc

Re: Re-enabled a folder set as untracked

2019-06-21 Thread Philip Oakley
On 10/06/2019 21:11, Samuel Rabini wrote: Using SourceTree I issue the Stop Tracking command (I think it executed the add untracked https://git-scm.com/docs/git-add#Documentation/git-add.txt-adduntracked). Is there anyway to revert this command and re-enable the folder? I was able to re-add t

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Duy Nguyen
On Thu, Jun 20, 2019 at 2:17 AM Jeff King wrote: > I think your warning in the manpage that this is for debugging is fine, > as it does not put us on the hook for maintaining the feature nor its > format forever. We might want to call it "--debug=json" or something, Hmm.. does it mean we make --d

Re: [PATCH v2 2/8] env--helper: new undocumented builtin wrapping git_env_*()

2019-06-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 21 2019, Junio C Hamano wrote: > Junio C Hamano writes: > >> ... >> as I am getting >> >> error: 'ret' may be used uninitialized in this function >> [-Werror=maybe-uninitialized] >> >> from here. >> >> Giving an otherwise useless initial value to ret would be a >> workaround. >

Re: [GSoC][PATCH v5 4/5] cherry-pick/revert: add --skip option

2019-06-21 Thread Rohit Ashiwal
Hi Phillip On 2019-06-20 11:42 UTC Phillip Wood wrote: > > Hi Rohit > > On 20/06/2019 11:34, Rohit Ashiwal wrote: >> Hi Phillip >> >> On 2019-06-20 10:02 UTC Phillip Wood wrote: >>> +test_expect_success 'allow skipping stopped cherry-pick because of untracked file modifications' ' >>>