Re: [PATCH v2] Make it possible to implement bisecting only on first parents or on merge commits by passing flags to find_bisection(), instead of just a find_all boolean

2018-04-15 Thread Christian Couder
its body), I was suggesting a patch like the following: >From 3a0ced0953ccc6038a43885d98a507eb18c19e42 Mon Sep 17 00:00:00 2001 From: Harald Nordgren <haraldnordg...@gmail.com> Date: Sun, 15 Apr 2018 12:44:38 +0200 Subject: [PATCH] bisect: create 'bisect_flags' parameter in find_bisection() Mak

[PATCH v2] Make it possible to implement bisecting only on first parents or on merge commits by passing flags to find_bisection(), instead of just a find_all boolean

2018-04-15 Thread Harald Nordgren
Signed-off-by: Harald Nordgren --- Notes: Updates according to Christian Couder's code review bisect.c | 20 bisect.h | 6 -- builtin/rev-list.c | 6 +++--- 3 files changed, 19 insertions(+), 13 deletions(-) diff

Re: [PATCH 01/15] read-cache.c: make $GIT_TEST_SPLIT_INDEX boolean

2018-04-14 Thread Ævar Arnfjörð Bjarmason
On Sat, Apr 14 2018, Nguyễn Thái Ngọc Duy wrote: > While at there, document about this special mode when running the test > suite. This whole series looks good to me, and I see this patch addressed the confusing test env variable situation I pointed out in v8

[PATCH v4 0/4] Make DEVELOPER more more flexible with DEVOPTS

2018-04-14 Thread Ævar Arnfjörð Bjarmason
This is a v4 and replacement of gitster/nd/warn-more-for-devs. I'm sending this with Duy's blessing. The first two patches are the same, except for one trivial s/faimily/family/ typo fix. The third patch in gitster/nd/warn-more-for-devs ("Makefile: add EAGER_DEVELOPER mode") is gone, instead

[PATCH 01/15] read-cache.c: make $GIT_TEST_SPLIT_INDEX boolean

2018-04-14 Thread Nguyễn Thái Ngọc Duy
(+), 3 deletions(-) diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 3735ce413f..8190a753de 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -11,7 +11,7 @@ make --jobs=2 make --quiet test if test "$jobname" = "linux-gcc" then -

Re: [RFC 00/10] Make .the gitmodules file path configurable

2018-04-13 Thread Antonio Ospite
On Fri, 13 Apr 2018 00:20:37 +0200 Antonio Ospite wrote: [...] > Antonio Ospite (10): > submodule: add 'core.submodulesFile' to override the '.gitmodules' > path > submodule: fix getting custom gitmodule file in fetch command > submodule: use the 'submodules_file' variable

Re: [RFC 00/10] Make .the gitmodules file path configurable

2018-04-12 Thread Stefan Beller
Hi Antonio, On Thu, Apr 12, 2018 at 3:20 PM, Antonio Ospite wrote: > Hi, > > vcsh[1] uses bare git repositories and detached work-trees to manage > *distinct* sets of configuration files directly into $HOME. > > In general, submodules have worked perfectly fine with detached >

[RFC 00/10] Make .the gitmodules file path configurable

2018-04-12 Thread Antonio Ospite
Hi, vcsh[1] uses bare git repositories and detached work-trees to manage *distinct* sets of configuration files directly into $HOME. In general, submodules have worked perfectly fine with detached work-trees for some time[2,3,4]. However when multiple repositories take turns using the same

Re: [PATCH v14 2/4] ref-filter: make ref_array_item allocation more consistent

2018-04-11 Thread Junio C Hamano
Eric Sunshine writes: > On Wed, Apr 11, 2018 at 2:07 PM, Stefan Beller wrote: >> On Wed, Apr 11, 2018 at 10:57 AM, Harald Nordgren >> wrote: >>> There have been no new comments for the last few days. I know Jeff >>> King

Re: [PATCH v14 2/4] ref-filter: make ref_array_item allocation more consistent

2018-04-11 Thread Eric Sunshine
>> - ref-filter: factor ref_array pushing into its own function >> - ref-filter: make ref_array_item allocation more consistent >> - ref-filter: use "struct object_id" consistently >> (this branch is used by hn/sort-ls-remote.) >> >> API clean-up aournd ref

Re: [PATCH v14 2/4] ref-filter: make ref_array_item allocation more consistent

2018-04-11 Thread Todd Zullinger
-array-push (2018-04-09) 3 commits >> - ref-filter: factor ref_array pushing into its own function >> - ref-filter: make ref_array_item allocation more consistent >> - ref-filter: use "struct object_id" consistently >> (this branch is used by hn/sort-ls-remote.)

Re: [PATCH v14 2/4] ref-filter: make ref_array_item allocation more consistent

2018-04-11 Thread Stefan Beller
ilter: factor ref_array pushing into its own function > - ref-filter: make ref_array_item allocation more consistent > - ref-filter: use "struct object_id" consistently > (this branch is used by hn/sort-ls-remote.) > > API clean-up aournd ref-filter code. > > Will merge t

Re: [PATCH v14 2/4] ref-filter: make ref_array_item allocation more consistent

2018-04-11 Thread Harald Nordgren
There have been no new comments for the last few days. I know Jeff King will be away for the next two weeks, but should we still move forward with this? The initial reactions to the idea seemed positive. Best regards Harald On Mon, Apr 9, 2018 at 3:42 AM, Harald Nordgren

[PATCH v6 10/15] sequencer: make refs generated by the `label` command worktree-local

2018-04-10 Thread Johannes Schindelin
This allows for rebases to be run in parallel in separate worktrees (think: interrupted in the middle of one rebase, being asked to perform a different rebase, adding a separate worktree just for that job). Signed-off-by: Johannes Schindelin --- refs.c

[PATCH v6 07/15] rebase-helper --make-script: introduce a flag to rebase merges

2018-04-10 Thread Johannes Schindelin
and which can therefore not be labeled, we use a unique +* abbreviation of the commit name. This is slightly more complicated +* than calling find_unique_abbrev() because we also need to make +* sure that the abbreviation does not conflict with any other +* lab

[PATCH v6 02/15] sequencer: make rearrange_squash() a bit more obvious

2018-04-10 Thread Johannes Schindelin
There are some commands that have to be skipped from rearranging by virtue of not handling any commits. However, the logic was not quite obvious: it skipped commands based on their position in the enum todo_command. Instead, let's make it explicit that we skip all commands that do not handle any

Re: [PATCH v2] Make running git under other debugger-like programs easy

2018-04-10 Thread Johannes Schindelin
Hi Elijah, On Mon, 9 Apr 2018, Elijah Newren wrote: > On Mon, Apr 9, 2018 at 2:19 PM, Johannes Schindelin > wrote: > > > > On Mon, 9 Apr 2018, Elijah Newren wrote: > > > >> debug () { > >> - GIT_TEST_GDB=1 "$@" <&6 >&5 2>&7 > >> + case "$1" in > >> +

Re: [PATCH v2] Make running git under other debugger-like programs easy

2018-04-09 Thread Elijah Newren
[Re-sending, making sure the annoying rich text mode isn't turned on in gmail...] Hi Dscho, On Mon, Apr 9, 2018 at 2:19 PM, Johannes Schindelin wrote: > Hi Elijah, > > On Mon, 9 Apr 2018, Elijah Newren wrote: > >> debug () { >> - GIT_TEST_GDB=1 "$@" <&6 >&5

Re: [PATCH v2] Make running git under other debugger-like programs easy

2018-04-09 Thread Johannes Schindelin
HELL_PATH" <&6 >&5 2>&7 > } > > -# Wrap git in gdb. Adding this to a command can make it easier to > -# understand what is going on in a failing test. > +# Wrap git with a debugger. Adding this to a command can make it easier > +# to understand what is

[PATCH v2] Make running git under other debugger-like programs easy

2018-04-09 Thread Elijah Newren
les changed, 33 insertions(+), 10 deletions(-) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 1701fe2a06..0591d9a7f8 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -145,12 +145,28 @@ test_pause () { "$SHELL_PATH" <&6 >&

[PATCH v3 13/15] git_config_set: make use of the config parser's event stream

2018-04-09 Thread Johannes Schindelin
In the recent commit with the title "config: introduce an optional event stream while parsing", we introduced an optional callback to keep track of the config parser's events "comment", "white-space", "section header" and "entry". One motivation

[PATCH v14 2/4] ref-filter: make ref_array_item allocation more consistent

2018-04-08 Thread Harald Nordgren
From: Jeff King We have a helper function to allocate ref_array_item structs, but it only takes a subset of the possible fields in the struct as initializers. We could have it accept an argument for _every_ field, but that becomes a pain for the fields which some callers don't

[PATCH v13 2/4] ref-filter: make ref_array_item allocation more consistent

2018-04-08 Thread Harald Nordgren
From: Jeff King We have a helper function to allocate ref_array_item structs, but it only takes a subset of the possible fields in the struct as initializers. We could have it accept an argument for _every_ field, but that becomes a pain for the fields which some callers don't

[PATCH v12 2/4] ref-filter: make ref_array_item allocation more consistent

2018-04-08 Thread Harald Nordgren
From: Jeff King We have a helper function to allocate ref_array_item structs, but it only takes a subset of the possible fields in the struct as initializers. We could have it accept an argument for _every_ field, but that becomes a pain for the fields which some callers don't

[PATCH v11 2/4] ref-filter: make ref_array_item allocation more consistent

2018-04-07 Thread Harald Nordgren
From: Jeff King We have a helper function to allocate ref_array_item structs, but it only takes a subset of the possible fields in the struct as initializers. We could have it accept an argument for _every_ field, but that becomes a pain for the fields which some callers don't

Re: [PATCH] Make running git under other debugger-like programs easy

2018-04-06 Thread Elijah Newren
Hi Dscho, On Fri, Apr 6, 2018 at 3:38 AM, Johannes Schindelin wrote: > On Thu, 5 Apr 2018, Elijah Newren wrote: >> On Thu, Apr 5, 2018 at 12:57 PM, Johannes Schindelin >> wrote: >> That all looks great to me. But at this point, it

[PATCH 2/3] ref-filter: make ref_array_item allocation more consistent

2018-04-06 Thread Jeff King
We have a helper function to allocate ref_array_item structs, but it only takes a subset of the possible fields in the struct as initializers. We could have it accept an argument for _every_ field, but that becomes a pain for the fields which some callers don't want to set initially. Instead,

Re: [PATCH] Make running git under other debugger-like programs easy

2018-04-06 Thread Johannes Schindelin
Hi Elijah, On Thu, 5 Apr 2018, Elijah Newren wrote: > On Thu, Apr 5, 2018 at 12:57 PM, Johannes Schindelin > wrote: > > > I wonder whether a better approach would be to add an optional argument to > > that `debug` function (which is intended to have `git` as first

Re: [PATCH] Make running git under other debugger-like programs easy

2018-04-05 Thread Elijah Newren
Hi Johannes, On Thu, Apr 5, 2018 at 12:57 PM, Johannes Schindelin wrote: > I wonder whether a better approach would be to add an optional argument to > that `debug` function (which is intended to have `git` as first argument, > anyway, or at least a command/function

Re: [PATCH] Make running git under other debugger-like programs easy

2018-04-05 Thread Johannes Schindelin
Hi Elijah, On Thu, 5 Apr 2018, Elijah Newren wrote: > This allows us to run git, when using the script from bin-wrappers, under > other programs. A few examples: >GIT_WRAPPER=nemiver git $ARGS >GIT_WRAPPER="valgrind --tool=memcheck --track-origins=yes" git $ARGS > > Yes, we already

[PATCH] Make running git under other debugger-like programs easy

2018-04-05 Thread Elijah Newren
This allows us to run git, when using the script from bin-wrappers, under other programs. A few examples: GIT_WRAPPER=nemiver git $ARGS GIT_WRAPPER="valgrind --tool=memcheck --track-origins=yes" git $ARGS Yes, we already have GIT_TEST_GDB (which could potentially be replaced with

[RFC PATCH 5/7] dir: Make the DO_MATCH_SUBMODULE code reusable for a non-submodule case

2018-04-05 Thread Elijah Newren
The specific checks done in match_pathspec_item for the DO_MATCH_SUBMODULE case are useful for other cases which have nothing to do with submodules. Rename this constant; a subsequent commit will make use of this change. Signed-off-by: Elijah Newren <new...@gmail.com> --- dir.c | 6 +++

[PATCH v2 12/15] git_config_set: make use of the config parser's event stream

2018-04-03 Thread Johannes Schindelin
In the recent commit with the title "config: introduce an optional event stream while parsing", we introduced an optional callback to keep track of the config parser's events "comment", "white-space", "section header" and "entry". One motivation

Re: [PATCH] t2028: tighten grep expression to make "move worktree" test more robust

2018-04-03 Thread Duy Nguyen
On Tue, Apr 3, 2018 at 11:25 AM, Eric Sunshine wrote: > Following a rename of worktree "source" to "destination", the "move > worktree" test uses grep to verify that the output of "git worktree list > --porcelain" does not contain "source" (and does contain

[PATCH] t2028: tighten grep expression to make "move worktree" test more robust

2018-04-03 Thread Eric Sunshine
Following a rename of worktree "source" to "destination", the "move worktree" test uses grep to verify that the output of "git worktree list --porcelain" does not contain "source" (and does contain "destination"). Unfortunately, the grep expression is too loose and can match unexpectedly. For

[PATCH 5/5] branch: make "-l" a synonym for "--list"

2018-03-26 Thread Jeff King
The other "mode" options of git-branch have short-option aliases that are easy to type (e.g., "-d" and "-m"). Let's give "--list" the same treatment. This also makes it consistent with the similar "git tag -l" option. We didn't do this originally because "--create-reflog" was squatting on the

Re: [GSoC][PATCH v5] Make options that expect object ids less chatty if id is invalid

2018-03-19 Thread Junio C Hamano
Paul-Sebastian Ungureanu <ungureanupaulsebast...@gmail.com> writes: > Subject: Re: [GSoC][PATCH v5] Make options that expect object ids less chatty > if id is invalid For the past few iterations, this is no longer about "options that expect object IDs that get an invalid on

[GSoC][PATCH v5] Make options that expect object ids less chatty if id is invalid

2018-03-19 Thread Paul-Sebastian Ungureanu
Usually, the usage should be shown only if the user does not know what options are available. If the user specifies an invalid value, the user is already aware of the available options. In this case, there is no point in displaying the usage anymore. This patch applies to "git tag --contains",

[GSoC][PATCH v5] Make options that expect object ids less chatty if id is invalid

2018-03-19 Thread Paul-Sebastian Ungureanu
Usually, the usage should be shown only if the user does not know what options are available. If the user specifies an invalid value, the user is already aware of the available options. In this case, there is no point in displaying the usage anymore. This patch applies to "git tag --contains",

Re: [GSoC][PATCH v4] Make options that expect object ids less chatty if id is invalid

2018-03-19 Thread ungureanupaulsebastian
Hello, Thank you for your advice! Soon enough, I wil submit a new patch which fixes the issues you mentioned. Best regards, Paul Ungureanu

[PATCH 0/2] Make partial clone/fetch work when transfer.fsckobjects=1

2018-03-14 Thread Jonathan Tan
One of my colleagues noticed that we obtain a "fatal: did not receive expected object" error when partial-cloning (that is, with --filter set) if transfer.fsckobjects is true. Here's a fix for that. Jonathan Tan (2): index-pack: support checking objects but not links fetch-pack: do not check

Re: [PATCH 0/2] Make cvs tests pass with '-x' tracing and /bin/sh

2018-03-12 Thread Jeff King
On Thu, Mar 08, 2018 at 01:38:42PM +0100, SZEDER Gábor wrote: > > I installed 'cvs' and whatnot to run t94* and t96* tests, and sure > > enough, 5 tests in 2 test scripts fail with '-x' tracing and /bin/sh. > > I think I will be able to get around to send v2 during the weekend. > > Well, I

[PATCH 3/3] Makefile: make USE_LIBPCRE=YesPlease mean v2, not v1

2018-03-11 Thread Ævar Arnfjörð Bjarmason
Change the USE_LIBPCRE flag from being an alias for USE_LIBPCRE1 to being an alias for USE_LIBPCRE2. When support for v2 was added in my 94da9193a6 ("grep: add support for PCRE v2", 2017-06-01) the existing USE_LIBPCRE flag was left as meaning v1, with a note that this would likely change in a

Re: [GSoC][PATCH v4] Make options that expect object ids less chatty if id is invalid

2018-03-08 Thread Martin Ågren
> case PARSE_OPT_DONE: These are very slightly inconsistent with the ordering of PARSE_OPT_ERROR and PARSE_OPT_HELP. I don't think it matters much. ;-) > diff --git a/t/tcontains.sh b/t/tcontains.sh > new file mode 100755 > index 0..4856111ff > ---

[PATCH 0/2] Make cvs tests pass with '-x' tracing and /bin/sh

2018-03-08 Thread SZEDER Gábor
> On Sat, Feb 24, 2018 at 12:39 AM, SZEDER Gábor <szeder@gmail.com> wrote: > > This patch series makes '-x' tracing of tests work reliably even when > > running them with /bin/sh, and setting TEST_SHELL_PATH=bash will be > > unnecessary. > > > > mak

Re: [GSoC][PATCH v4] Make options that expect object ids less chatty if id is invalid

2018-03-06 Thread Junio C Hamano
Junio C Hamano writes: > I kind of find it surprising that the one single case I happened to > have noticed is the only one that needed special treatment. Did you > go though all the codepath and made sure that the ones that still > return -1 (not -2 and not -3) to

Re: [GSoC][PATCH v4] Make options that expect object ids less chatty if id is invalid

2018-03-06 Thread Junio C Hamano
Paul-Sebastian Ungureanu writes: > Usually, the usage should be shown only if the user does not know what > options are available. If the user specifies an invalid value, the user > is already aware of the available options. In this case, there is no > point in

Re: [GSoC][PATCH v3] Make options that expect object ids less chatty if id is invalid

2018-03-06 Thread Paul-Sebastian Ungureanu
not specified). - If usage is shown by calling usage_with_options_internal then PARSE_OPT_HELP is going to be forwarded and also returned by parse_options_step. What I also changed in the new patch [1] is to make parse_long_opt return -3 when ambiguous option are found, in which case parse_options_step will handle t

[GSoC][PATCH v4] Make options that expect object ids less chatty if id is invalid

2018-03-06 Thread Paul-Sebastian Ungureanu
Usually, the usage should be shown only if the user does not know what options are available. If the user specifies an invalid value, the user is already aware of the available options. In this case, there is no point in displaying the usage anymore. This patch applies to "git tag --contains",

Re: [GSoC][PATCH v3] Make options that expect object ids less chatty if id is invalid

2018-03-05 Thread Junio C Hamano
lt;ungureanupaulsebast...@gmail.com> > --- I am guessing that this was sent as a replacement for fcfba373 ("ref-filter: make "--contains " less chatty if is invalid", 2018-02-23) that was merged to 'next' at 9623d681 ("Merge branch 'ps/contains-id-error-message' into next

Re: [PATCH 00/11] Make the test suite pass with '-x' and /bin/sh

2018-03-05 Thread SZEDER Gábor
e > mysterious-looking redirects (but your commit messages seem to explain > it, so anybody can dig). > > Does it make descriptor 7 magical, and something that scripts should > avoid touching? That would mean we have 2 magical descriptors now. Tests can still use fd 7 as long as they

[GSoC][PATCH v3] Make options that expect object ids less chatty if id is invalid

2018-03-03 Thread Paul-Sebastian Ungureanu
Usually, the usage should be shown only if the user does not know what options are available. If the user specifies an invalid value, the user is already aware of the available options. In this case, there is no point in displaying the usage anymore. This patch applies to "git tag --contains",

Re: [PATCH 00/11] Make the test suite pass with '-x' and /bin/sh

2018-03-02 Thread Jeff King
opposed if you want to do the work to try to get the whole test-suite clean, and we can see how it goes from there. It shouldn't be hurting anything, I don't think, aside from some mysterious-looking redirects (but your commit messages seem to explain it, so anybody can dig). Does it make descr

Re: [PATCH 00/11] Make the test suite pass with '-x' and /bin/sh

2018-03-02 Thread SZEDER Gábor
On Sat, Feb 24, 2018 at 12:39 AM, SZEDER Gábor <szeder@gmail.com> wrote: > This patch series makes '-x' tracing of tests work reliably even when > running them with /bin/sh, and setting TEST_SHELL_PATH=bash will be > unnecessary. > > make GIT_TEST_OPTS='-x --verbose

Re: The case for two trees in a commit ("How to make rebase less modal")

2018-03-01 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > $ git hash-object --stdin -w -t commit < tree c70b4a33a0089f15eb3b38092832388d75293e86 > parent 105d5b91138ced892765a84e771a061ede8d63b8 > author Stefan Beller 1519859216 -0800 > committer Stefan Beller 1519859216 -0800 > tree

Re: The case for two trees in a commit ("How to make rebase less modal")

2018-03-01 Thread Junio C Hamano
Jacob Keller writes: > How does this let you defer a conflict? A future commit which modified > blobs in that tree wouldn't know what version of the trees/blobs to > actually use? Clearly future commits could record their own trees, but > how would they generate the

Re: The case for two trees in a commit ("How to make rebase less modal")

2018-03-01 Thread Junio C Hamano
Stefan Beller writes: > $ git hash-object --stdin -w -t commit < tree c70b4a33a0089f15eb3b38092832388d75293e86 > parent 105d5b91138ced892765a84e771a061ede8d63b8 > author Stefan Beller 1519859216 -0800 > committer Stefan Beller

Re: The case for two trees in a commit ("How to make rebase less modal")

2018-02-28 Thread Jacob Keller
On Wed, Feb 28, 2018 at 3:30 PM, Stefan Beller wrote: > $ git hash-object --stdin -w -t commit < tree c70b4a33a0089f15eb3b38092832388d75293e86 > parent 105d5b91138ced892765a84e771a061ede8d63b8 > author Stefan Beller 1519859216 -0800 > committer Stefan

Re: The case for two trees in a commit ("How to make rebase less modal")

2018-02-28 Thread Jeff King
On Wed, Feb 28, 2018 at 03:30:27PM -0800, Stefan Beller wrote: > During the rebase there might be a hard to resolve conflict, which > you may not want to resolve right now, but defer to later. Deferring a > conflict is currently impossible, because precisely one tree is recorded. > > If we had

Re: The case for two trees in a commit ("How to make rebase less modal")

2018-02-28 Thread Brandon Williams
On 03/01, Ramsay Jones wrote: > > > On 28/02/18 23:30, Stefan Beller wrote: > > $ git hash-object --stdin -w -t commit < > tree c70b4a33a0089f15eb3b38092832388d75293e86 > > parent 105d5b91138ced892765a84e771a061ede8d63b8 > > author Stefan Beller 1519859216 -0800 > > committer

Re: The case for two trees in a commit ("How to make rebase less modal")

2018-02-28 Thread Ramsay Jones
On 28/02/18 23:30, Stefan Beller wrote: > $ git hash-object --stdin -w -t commit < tree c70b4a33a0089f15eb3b38092832388d75293e86 > parent 105d5b91138ced892765a84e771a061ede8d63b8 > author Stefan Beller 1519859216 -0800 > committer Stefan Beller

The case for two trees in a commit ("How to make rebase less modal")

2018-02-28 Thread Stefan Beller
$ git hash-object --stdin -w -t commit < 1519859216 -0800 committer Stefan Beller 1519859216 -0800 tree 5495266479afc9a4bd9560e9feac465ed43fa63a test commit EOF 19abfc3bf1c5d782045acf23abdf7eed81e16669 $ git fsck |grep 19abfc3bf1c5d782045acf23abdf7eed81e16669 $ So it is

[PATCH v2 1/5] sequencer: make lockfiles non-static

2018-02-28 Thread Martin Ågren
After 076aa2cbd (tempfile: auto-allocate tempfiles on heap, 2017-09-05), we can have lockfiles on the stack. One of these functions fails to always roll back the lock. That will be fixed in the next commit. Signed-off-by: Martin Ågren --- sequencer.c | 10 +- 1

Re: [PATCH] test_must_be_empty: make sure the file exists, not just empty

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 01:27:29PM -0800, Junio C Hamano wrote: > The helper function test_must_be_empty is meant to make sure the > given file is empty, but its implementation is: > > if test -s "$1" > then > ... not empty, we detec

Re: [PATCH] test_must_be_empty: make sure the file exists, not just empty

2018-02-27 Thread Stefan Beller
On Tue, Feb 27, 2018 at 1:27 PM, Junio C Hamano <gits...@pobox.com> wrote: > The helper function test_must_be_empty is meant to make sure the > given file is empty, but its implementation is: > > if test -s "$1" > then > ..

[PATCH 1/5] sequencer: make lockfiles non-static

2018-02-27 Thread Martin Ågren
After 076aa2cbd (tempfile: auto-allocate tempfiles on heap, 2017-09-05), we can have lockfiles on the stack. One of these functions fails to always roll back the lock. That will be fixed in the next commit. Signed-off-by: Martin Ågren --- sequencer.c | 10 +- 1

[PATCH] test_must_be_empty: make sure the file exists, not just empty

2018-02-27 Thread Junio C Hamano
The helper function test_must_be_empty is meant to make sure the given file is empty, but its implementation is: if test -s "$1" then ... not empty, we detected a failure ... fi Surely, the file having non-zero size is a sign that the condition

[PATCH v5 02/12] sequencer: make rearrange_squash() a bit more obvious

2018-02-26 Thread Johannes Schindelin
There are some commands that have to be skipped from rearranging by virtue of not handling any commits. However, the logic was not quite obvious: it skipped commands based on their position in the enum todo_command. Instead, let's make it explicit that we skip all commands that do not handle any

[PATCH v5 09/12] sequencer: make refs generated by the `label` command worktree-local

2018-02-26 Thread Johannes Schindelin
This allows for rebases to be run in parallel in separate worktrees (think: interrupted in the middle of one rebase, being asked to perform a different rebase, adding a separate worktree just for that job). Signed-off-by: Johannes Schindelin --- refs.c

[PATCH v5 07/12] rebase-helper --make-script: introduce a flag to recreate merges

2018-02-26 Thread Johannes Schindelin
ts that are not to be +* rebased, and which can therefore not be labeled, we use a unique +* abbreviation of the commit name. This is slightly more complicated +* than calling find_unique_abbrev() because we also need to make +* sure that the abbreviation does not con

[PATCH v3 3/6] cache.h: make the_hash_algo read-only

2018-02-25 Thread Nguyễn Thái Ngọc Duy
By returning an R-value in the_hash_algo we make sure people can't accidentally change hash algorithm with the_hash_algo = _algos[something]; and go with repo_set_hash_algo() instead. Of course they can still do the_repository->hash_algo = ... but that is more obvious and easily cau

Re: [GSoC][PATCH v2] ref-filter: Make "--contains " less chatty if is invalid

2018-02-24 Thread Paul-Sebastian Ungureanu
only supplied an invalid argument value. I also have to make sure that all parsers (all callbacks and standard ones, for integer, filename, etc.) are already printing errors appropriately. Otherwise, some commands may fail and the user will not be aware of it because nothing will be shown (no usage

Re: [GSoC][PATCH v2] ref-filter: Make "--contains " less chatty if is invalid

2018-02-23 Thread Junio C Hamano
ke any values", but in any case, I do not think there is a reason for a failure detected in the callback should lead to the usage help. So perhaps "if we added a machanism...to tell..." part in the previous paragraph is not even needed, and the only thing we need to do is to make t

[PATCH 00/11] Make the test suite pass with '-x' and /bin/sh

2018-02-23 Thread SZEDER Gábor
This patch series makes '-x' tracing of tests work reliably even when running them with /bin/sh, and setting TEST_SHELL_PATH=bash will be unnecessary. make GIT_TEST_OPTS='-x --verbose-log' test passes on my setup and on all Travis CI build jobs (though neither me nor Travis CI run all tests

Re: [GSoC][PATCH v2] ref-filter: Make "--contains " less chatty if is invalid

2018-02-23 Thread Junio C Hamano
f-filter.c > @@ -2000,6 +2000,25 @@ static void do_merge_filter(struct ref_filter_cbdata > *ref_cbdata) > free(to_clear); > } > > +int add_str_to_commit_list(struct string_list_item *item, void *commit_list) If this function can be static to this file (and I s

[GSoC][PATCH v2] ref-filter: Make "--contains " less chatty if is invalid

2018-02-23 Thread Paul-Sebastian Ungureanu
Hello, I have made the changes after review. This is the updated patch based on what was discussed last time [1]. In this patch, I have fixed the same issue that was also seen in "git branch" and "git for-reach-ref". I have also removed the dead code that was left and updated the patches

[PATCH v4 09/12] sequencer: make refs generated by the `label` command worktree-local

2018-02-23 Thread Johannes Schindelin
This allows for rebases to be run in parallel in separate worktrees (think: interrupted in the middle of one rebase, being asked to perform a different rebase, adding a separate worktree just for that job). Signed-off-by: Johannes Schindelin --- refs.c

[PATCH v4 07/12] rebase-helper --make-script: introduce a flag to recreate merges

2018-02-23 Thread Johannes Schindelin
ts that are not to be +* rebased, and which can therefore not be labeled, we use a unique +* abbreviation of the commit name. This is slightly more complicated +* than calling find_unique_abbrev() because we also need to make +* sure that the abbreviation does not con

[PATCH v4 02/12] sequencer: make rearrange_squash() a bit more obvious

2018-02-23 Thread Johannes Schindelin
There are some commands that have to be skipped from rearranging by virtue of not handling any commits. However, the logic was not quite obvious: it skipped commands based on their position in the enum todo_command. Instead, let's make it explicit that we skip all commands that do not handle any

Re: [GSoC][PATCH] tag: Make "git tag --contains " less chatty if is invalid

2018-02-20 Thread Junio C Hamano
Stefan Beller writes: >> diff --git a/t/t7013-tag-contains.sh b/t/t7013-tag-contains.sh >> new file mode 100755 >> index 0..65119dada >> --- /dev/null >> +++ b/t/t7013-tag-contains.sh > > Thanks for adding the tests into a new file instead of putting it somewhere >

Re: [GSoC][PATCH] tag: Make "git tag --contains " less chatty if is invalid

2018-02-20 Thread Stefan Beller
ons.h is a very generic place in Gits source code, so this would also fix 'git branch --contains=' at the same time? Would it make sense to say so in the commit message or have a test for that? > @@ -258,9 +258,20 @@ extern int parse_opt_passthru_argv(const struct option > *, const char *,

Re: [PATCH] make hg-to-git compatible with python2.x and 3.x

2018-02-20 Thread Junio C Hamano
ence, but it actually is a required change. [Footnote] *1* Well, it would have been ideal if the original patch had enough information from the beginning to make this kind of "digging" unnecessary ;-)

Re: [PATCH] make hg-to-git compatible with python2.x and 3.x

2018-02-20 Thread Junio C Hamano
Hervé Beraud writes: > Signed-off-by: Hervé Beraud > --- > contrib/hg-to-git/hg-to-git.py | 52 > +- > 1 file changed, 26 insertions(+), 26 deletions(-) I think you shrunk the scope of the change,

[PATCH] make hg-to-git compatible with python2.x and 3.x

2018-02-20 Thread Hervé Beraud
Signed-off-by: Hervé Beraud --- contrib/hg-to-git/hg-to-git.py | 52 +- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py index

[GSoC][PATCH] tag: Make "git tag --contains " less chatty if is invalid

2018-02-19 Thread Paul-Sebastian Ungureanu
git tag --contains prints the whole help text if is invalid. It should only show the error message instead. This bug was a side effect of looking up the commit in option parser callback. When a error occurs in the option parser, the full usage is shown. To fix this bug, the part related to

Re: [PATCH v3 16/23] ref-filter: make cat_file_info independent

2018-02-16 Thread Jeff King
On Thu, Feb 15, 2018 at 01:33:25PM +0300, Оля Тележная wrote: > 2018-02-15 8:53 GMT+03:00 Jeff King : > > On Mon, Feb 12, 2018 at 08:08:54AM +, Olga Telezhnaya wrote: > > > >> Remove connection between expand_data variable > >> in cat-file and in ref-filter. > >> It will help

Re: [PATCH] make hg-to-git compatible with python2.x and 3.x

2018-02-15 Thread Junio C Hamano
Hervé Beraud <herveberaud@gmail.com> writes: > --- Thanks for posting, but this is way under-justified, even for something in contrib/ area. Are all changes in this patch necessary to "make it compatible with both Python 2 and 3", or are some parts do not

[PATCH] make hg-to-git compatible with python2.x and 3.x

2018-02-15 Thread Hervé Beraud
--- contrib/hg-to-git/hg-to-git.py | 140 - 1 file changed, 83 insertions(+), 57 deletions(-) diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py index de3f81667ed97..9b0842c3883dc 100755 --- a/contrib/hg-to-git/hg-to-git.py +++

Re: [PATCH v3 16/23] ref-filter: make cat_file_info independent

2018-02-15 Thread Оля Тележная
2018-02-15 8:53 GMT+03:00 Jeff King : > On Mon, Feb 12, 2018 at 08:08:54AM +, Olga Telezhnaya wrote: > >> Remove connection between expand_data variable >> in cat-file and in ref-filter. >> It will help further to get rid of using expand_data in cat-file. > > I have to admit I'm

Re: [PATCH v3 04/23] ref-filter: make valid_atom as function parameter

2018-02-15 Thread Оля Тележная
2018-02-15 8:23 GMT+03:00 Jeff King <p...@peff.net>: > On Mon, Feb 12, 2018 at 08:08:54AM +, Olga Telezhnaya wrote: > >> Make valid_atom as a function parameter, >> there could be another variable further. >> Need that for further reusing of formatting logic in ca

Re: [PATCH v3 17/23] ref-filter: make valid_atom general again

2018-02-14 Thread Jeff King
On Mon, Feb 12, 2018 at 08:08:54AM +, Olga Telezhnaya wrote: > Stop using valid_cat_file_atom, making the code more general. > Further commits will contain some tests, docs and > support of new features. Yay. -Peff

Re: [PATCH v3 16/23] ref-filter: make cat_file_info independent

2018-02-14 Thread Jeff King
On Mon, Feb 12, 2018 at 08:08:54AM +, Olga Telezhnaya wrote: > Remove connection between expand_data variable > in cat-file and in ref-filter. > It will help further to get rid of using expand_data in cat-file. I have to admit I'm confused at this point about what is_cat_file is for, or even

Re: [PATCH v3 04/23] ref-filter: make valid_atom as function parameter

2018-02-14 Thread Jeff King
On Mon, Feb 12, 2018 at 08:08:54AM +, Olga Telezhnaya wrote: > Make valid_atom as a function parameter, > there could be another variable further. > Need that for further reusing of formatting logic in cat-file.c. > > We do not need to allow users to pass their own vali

Re: Can we make git clone --recurse-submodules --shallow-submodules work for commits that are not on tags or branches

2018-02-14 Thread Stefan Beller
system clones: > https://github.com/cirosantilli/test-git-web-interface/blob/15335d3002a3e64fc5756b69fb832a733aa63fb9/shallow-submodule.sh#L158 > and on GitHub, so I'm guessing it is not just the settings for a > specific server? > > Would it be possible to make that work, or are there f

[PATCH v8 15/29] merge-recursive: make !o->detect_rename codepath more obvious

2018-02-14 Thread Elijah Newren
Previously, if !o->detect_rename then get_renames() would return an empty string_list, and then process_renames() would have nothing to iterate over. It seems more straightforward to simply avoid calling either function in that case. Reviewed-by: Stefan Beller Signed-off-by:

[PATCH v8 17/29] merge-recursive: make a helper function for cleanup for handle_renames

2018-02-14 Thread Elijah Newren
In anticipation of more involved cleanup to come, make a helper function for doing the cleanup at the end of handle_renames. Rename the already existing cleanup_rename[s]() to final_cleanup_rename[s](), name the new helper initial_cleanup_rename(), and leave the big comment in the code about why

Can we make git clone --recurse-submodules --shallow-submodules work for commits that are not on tags or branches

2018-02-13 Thread Ciro Santilli
server? Would it be possible to make that work, or are there fundamental reasons why it is not possible? Here is my use case repo, at the point of the ugly workaround I'm having to do: https://github.com/cirosantilli/linux-kernel-module-cheat/blob/a14c95346cfd9d2e7b2e475b0981aa71d819c20b/configure

Re: make git diff output easier to read - use better diff heuristics

2018-02-13 Thread Michael Haggerty
On Tue, Feb 13, 2018 at 7:25 PM, Σπύρος Βαζαίος wrote: > While I din't have the experience to express an opinion on this > matter, I have to say that the --no-indent-heuristic that Jeff > suggested worked great. > There were more than a handful of cases that this issue

Re: make git diff output easier to read - use better diff heuristics

2018-02-13 Thread Σπύρος Βαζαίος
lowing issue on github where I >>> initially reported the issue: >>> >>> https://github.com/git-for-windows/git/issues/1494 >>> >>> I have Included a picture to better illustrate the problem. What do >>> you think? Is it possible to make git diff output si

Re: make git diff output easier to read - use better diff heuristics

2018-02-13 Thread Stefan Beller
d a picture to better illustrate the problem. What do >> you think? Is it possible to make git diff output similar to svn diff >> regarding this issue? > > Try "git diff --no-indent-heuristic", which makes your example look > better. Here's a quick reproduction: > >

<    2   3   4   5   6   7   8   9   10   11   >