Re: [PATCH v5 3/4] test-strcmp-offset: created test for strcmp_offset

2017-04-05 Thread SZEDER Gábor
I think this patch should be squashed into the previous commit; I don't see any reason why the tests should be added in a different commit than the function they are testing. However... > Signed-off-by: Jeff Hostetler > --- > Makefile | 1 + >

Re: [PATCH v5 4/4] read-cache: speed up add_index_entry during checkout

2017-04-05 Thread SZEDER Gábor
> Teach add_index_entry_with_check() and has_dir_name() > to see if the path of the new item is greater than the > last path in the index array before attempting to search > for it. > > During checkout, merge_working_tree() populates the new > index in sorted order, so this change saves at least

Re: [PATCH v2 2/2] doc/SubmittingPatches: show how to get a CLI commit summary

2017-03-21 Thread SZEDER Gábor
> Amend the section which describes how to get a commit summary to show > how do to that with "git show", currently the documentation only shows > how to do that with gitk. > > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > Documentation/SubmittingPatches | 11 ++- > 1

Re: Remove help advice text from git editors for interactive rebase and reword

2017-07-24 Thread SZEDER Gábor
figurable via the 'advice.commitMsg' config variable. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Documentation/config.txt | 2 ++ advice.c | 2 ++ advice.h | 1 + builtin/commit.c | 69 ++-- wt

[PATCHv2] blame: fix memory corruption scrambling revision name in error message

2017-07-24 Thread SZEDER Gábor
name in the affected functions (find_single_final() and find_single_initial()). Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Use xstrdup_or_null() in the first hunk. blame.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blame.c b/blame.c index 91e

[PATCH] blame: fix memory corruption scrambling revision name in error message

2017-07-24 Thread SZEDER Gábor
name in the affected functions (find_single_final() and find_single_initial()). Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- blame.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/blame.c b/blame.c index 91e26e93e..9ee0a375f 100644 --- a/blame.c +++ b/b

Re: [PATCH] comment: fix a typo in the comment

2017-07-06 Thread SZEDER Gábor
> On Wed, 2017-07-05 at 11:18 -0700, Junio C Hamano wrote: > > Kaartic Sivaraam writes: > > > > > --- > > > �Though very trivial, I wanted to correct this as I didn't > > > �want to ignore it after seeing it. > > > > Thanks for sharp eyes.��Sign-off?��(or

Re: [PATCH] Add --indent-heuristic to bash completion.

2017-04-27 Thread SZEDER Gábor
> The patch adds BASH completion for a newly added option. There is a '--no-indent-heuristic' option, too, and a 'diff.indentHeuristic' config variable as well. I'm not sure it's worth it, though. As far as I remember the future plans for indent heuristics, this option and config variable are

Re: git-clone --config order & fetching extra refs during initial clone

2017-05-03 Thread SZEDER Gábor
Cc'ing Ævar because of his work on 'clone --no-tags'. On Wed, Mar 15, 2017 at 6:08 PM, Jeff King <p...@peff.net> wrote: > On Sat, Mar 11, 2017 at 01:41:34AM +0100, SZEDER Gábor wrote: >> > Though if I'm bikeshedding, I'd probably have written the whole thing >> > wit

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

2017-05-15 Thread SZEDER Gábor
rigin='. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- builtin/clone.c | 20 +++- t/t5611-clone-config.sh | 44 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/builtin/clone.c b/builtin/clone.c

[PATCHv3 2/4] Documentation/clone: document ignored configuration variables

2017-05-15 Thread SZEDER Gábor
' and 'remote.origin.tagOpt') under the documentation of 'git clone -c'. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Documentation/git-clone.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index ec41d3d69..4f1

[PATCHv3 3/4] remote: drop free_refspecs() function

2017-05-15 Thread SZEDER Gábor
From: Jeff King We already have free_refspec(), a public function which does the same thing as the static free_refspecs(). Let's just keep one. There are two minor differences between the functions: 1. free_refspecs() is a noop when the refspec argument is NULL. This

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

2017-05-15 Thread SZEDER Gábor
h need to be freed. [sg: adjusted the function parameters.] Signed-off-by: Jeff King <p...@peff.net> Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- builtin/clone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/clone.c b/builtin/clone.c index 4144190da

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

2017-05-15 Thread SZEDER Gábor
.wsdzogshc4iln...@sigill.intra.peff.net/T/#m021eadff5d1e4351d99a27096090be39f53df961 Jeff King (2): remote: drop free_refspecs() function clone: use free_refspec() to free refspec list SZEDER Gábor (2): clone: respect additional configured fetch refspecs during initial fetch Documentation

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

2017-05-15 Thread SZEDER Gábor
On Mon, May 15, 2017 at 1:05 PM, SZEDER Gábor <szeder@gmail.com> wrote: > From: Jeff King <p...@peff.net> > > Using free() on a refspec was always leaky, as its string > fields also need freed. But it became more so when ad00f128d > (clone: respect configured f

Why 10k remotes? Was: Re: [RFC/PATCH 0/5] remote: eliminate remote->{fetch,push}_refspec and lazy parsing of refspecs

2017-06-20 Thread SZEDER Gábor
On Sat, Jun 17, 2017 at 2:33 PM, Jeff King <p...@peff.net> wrote: > On Sat, Jun 17, 2017 at 02:25:39PM +0200, SZEDER Gábor wrote: >> Indeed. Even in my repos with close to 10k remotes the amount of >> memory wasted by the duplicated refspecs is not an problem, there are &g

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

2017-05-23 Thread SZEDER Gábor
On Tue, May 23, 2017 at 9:38 AM, Junio C Hamano wrote: > I was sifting entries in the draft "What's cooking" report to find > topics to merge to 'next'. I read the series over and as Peff said > in his <20170515224615.f6hnnfngwpier...@sigill.intra.peff.net>, I > think the

Re: [PATCHv3 2/4] Documentation/clone: document ignored configuration variables

2017-05-26 Thread SZEDER Gábor
On Mon, May 15, 2017 at 1:05 PM, SZEDER Gábor <szeder@gmail.com> wrote: > Due to limitations/bugs in the current implementation, some > configuration variables specified via 'git clone -c var=val' (or 'git > -c var=val clone') are ignored during the initial fetch and ch

[PATCH] docs/config.txt: fix indefinite article in core.fileMode description

2017-05-25 Thread SZEDER Gábor
Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Documentation/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 475e874d5..f9adc9afa 100644 --- a/Documentation/config.txt +++ b/Documentation/conf

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

2017-05-26 Thread SZEDER Gábor
ne place, add the default fetch refspec to the temporary configuration environment, so remote_get() can parse it along with all other refspecs that might have been specified on the command line. Add tests to check that refspecs given both via 'git clone -c ...' and 'git -c ... clone' retrieve all

[PATCHv4 2/2] Documentation/clone: document ignored configuration variables

2017-05-30 Thread SZEDER Gábor
' and 'remote.origin.tagOpt') under the documentation of 'git clone -c'. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Documentation/git-clone.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index ec41d3d69..4f1

[PATCHv4 1/2] clone: respect additional configured fetch refspecs during initial fetch

2017-05-30 Thread SZEDER Gábor
g either the default or the additional refspecs, and that it works even when the user specifies an alternative remote name via '--origin='. Helped-by: Jeff King <p...@peff.net> Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- builtin/clone.c | 34 +---

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

2017-05-30 Thread SZEDER Gábor
d go on its own branch. Interdiff against the first two patch of v3 below. SZEDER Gábor (2): clone: respect additional configured fetch refspecs during initial fetch Documentation/clone: document ignored configuration variables Documentation/git-clone.txt | 4 builtin/clone.c

Re: [PATCHv4 1/2] clone: respect additional configured fetch refspecs during initial fetch

2017-05-31 Thread SZEDER Gábor
On Wed, May 31, 2017 at 6:23 AM, Jeff King <p...@peff.net> wrote: > On Tue, May 30, 2017 at 09:12:43AM +0200, SZEDER Gábor wrote: > >> diff --git a/remote.c b/remote.c >> index ad6c5424e..b8fd09dc9 100644 >> --- a/remote.c >> +++ b/remote.c &g

Re: [PATCHv4 2/2] Documentation/clone: document ignored configuration variables

2017-05-31 Thread SZEDER Gábor
On Tue, May 30, 2017 at 11:01 AM, Ævar Arnfjörð Bjarmason <ava...@gmail.com> wrote: > On Tue, May 30, 2017 at 9:12 AM, SZEDER Gábor <szeder@gmail.com> wrote: >> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt >> index ec41d3d69..4f1e7d4ba 10

[PATCH 3/3] revision.c: use skip_prefix() in handle_revision_pseudo_opt()

2017-06-02 Thread SZEDER Gábor
Instead of starts_with() and a bunch of magic numbers. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- revision.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/revision.c b/revision.c index 2b64b7e0e..ab0279572 100644 --- a/revision.c

[PATCH 0/3] Use skip_prefix() in handle_revision_{,pseudo_}opt()

2017-06-02 Thread SZEDER Gábor
While at it, the first one fixes a minor bug, which allowed e.g. 'git log --no-min-parents-foobarbaz' to succeed. The other two are fairly straightforward starts_with() -> skip_prefix() conversions. SZEDER Gábor (3): revision.c: stricter parsing of '--no-{min,max}-parents' revision.c:

[PATCH 1/3] revision.c: stricter parsing of '--no-{min,max}-parents'

2017-06-02 Thread SZEDER Gábor
These two options are parsed using starts_with(), allowing things like 'git log --no-min-parents-foobarbaz' to succeed. Use strcmp() instead. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- revision.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/revisi

[PATCH 2/3] revision.c: use skip_prefix() in handle_revision_opt()

2017-06-02 Thread SZEDER Gábor
Instead of starts_with() and a bunch of magic numbers. While at it, there is an indentation fix where processing '--early-output', and a coding style fix where processing '--show-notes'. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- revision.

Re: [PATCHv4 1/2] clone: respect additional configured fetch refspecs during initial fetch

2017-06-07 Thread SZEDER Gábor
On Tue, Jun 6, 2017 at 8:37 PM, Jeff King wrote: >> To put your worries to rest we should eliminate remote->fetch_refspec >> altogether and parse refspecs into remote->fetch right away, I'd >> think. After all, that's what's used in most places anyway, and it >> can be easily

Re: [PATCH 0/6] Some more git config completions

2017-06-04 Thread SZEDER Gábor
> As an aside from this series, has anyone ever proposed some method of > semi-automatically keeping this up-to-date? For configuration variables, not that I know of. For command line options, there was an attempt to enhance parse-options to dump all command line options and use this in the

[PATCH] docs/pretty-formats: stress that %- removes all preceding line-feeds

2017-06-15 Thread SZEDER Gábor
Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- A mere plural "line-feeds" was too subtle for me to grasp on first (and second...) reading. Documentation/pretty-formats.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/pret

Re: [PATCHv4 1/2] clone: respect additional configured fetch refspecs during initial fetch

2017-06-16 Thread SZEDER Gábor
On Wed, Jun 14, 2017 at 2:48 AM, Jonathan Nieder wrote: >> diff --git a/remote.h b/remote.h >> index 924881169..9ad8c1085 100644 >> --- a/remote.h >> +++ b/remote.h >> @@ -164,6 +164,7 @@ struct ref *ref_remove_duplicates(struct ref *ref_map); >> >> int

[PATCH 4/5] remote.c: eliminate remote->fetch_refspec

2017-06-16 Thread SZEDER Gábor
(gently or otherwise). Update all sites accessing fetch-refspec-related fields to use the new field names. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- builtin/clone.c | 6 +++--- builtin/fetch.c | 20 ++-- builtin/remote.c

[PATCHv5 1/2] clone: respect additional configured fetch refspecs during initial fetch

2017-06-16 Thread SZEDER Gábor
g either the default or the additional refspecs, and that it works even when the user specifies an alternative remote name via '--origin='. Helped-by: Jeff King <p...@peff.net> Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- builtin/clone.c | 36 +++---

[PATCHv5 0/2] clone: respect additional configured fetch refspecs during initial fetch

2017-06-16 Thread SZEDER Gábor
remains unaltered til the very end, but this is the right thing to do. SZEDER Gábor (2): clone: respect additional configured fetch refspecs during initial fetch Documentation/clone: document ignored configuration variables Documentation/git-clone.txt | 5 + builtin/clone.c

[PATCHv5 2/2] Documentation/clone: document ignored configuration variables

2017-06-16 Thread SZEDER Gábor
' and 'remote.origin.tagOpt') under the documentation of 'git clone -c'. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- Documentation/git-clone.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index ec41d3d69..5ce

[PATCH 3/5] remote.c: extract a helper function to parse a single refspec

2017-06-16 Thread SZEDER Gábor
are about to parse refspecs _while_ reading them from the configuration, one by one, and a function parsing a single refspec into a memory location provided by the caller will be quite useful then. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- remote.c

[PATCH 1/5] remote: don't use remote->{fetch,push}_refspec

2017-06-16 Thread SZEDER Gábor
e->{fetch,push} entries. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- builtin/remote.c | 22 +++--- remote.c | 20 remote.h | 2 ++ 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/builtin/remote.c b/buil

[PATCH 2/5] remote.c: don't pass copies of refspecs to add_{fetch,push}_refspec()

2017-06-16 Thread SZEDER Gábor
will not be necessary. Perform the copying inside these functions and modify their callers to either not pass duplicates or free() them to avoid leaks. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- builtin/clone.c | 3 +-- remote.c| 21 ++--- 2 files changed, 15 inse

[PATCH 5/5] remote.c: eliminate remote->push_refspec

2017-06-16 Thread SZEDER Gábor
Do the same as in the previous patch, but for push refspecs, i.e. with remote->push_refspec, remote->push and add_push_refspec(). Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- builtin/push.c | 12 +++- builtin/remote.c | 19 --- remote.c

[RFC/PATCH 0/5] remote: eliminate remote->{fetch,push}_refspec and lazy parsing of refspecs

2017-06-16 Thread SZEDER Gábor
t: https://github.com/szeder/git remote-no-string-refspecs Best, Gábor SZEDER Gábor (5): remote: don't use remote->{fetch,push}_refspec remote.c: don't pass copies of refspecs to add_{fetch,push}_refspec() remote.c: extract a helper function to parse a single refspec remote.c: elim

Re: [PATCHv5 2/2] Documentation/clone: document ignored configuration variables

2017-06-16 Thread SZEDER Gábor
On Fri, Jun 16, 2017 at 11:10 PM, Ævar Arnfjörð Bjarmason wrote: > diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt > index 35cc34b2fb..2169e5c97f 100644 > --- a/Documentation/git-clone.txt > +++ b/Documentation/git-clone.txt > @@

Re: [RFC/PATCH 0/5] remote: eliminate remote->{fetch,push}_refspec and lazy parsing of refspecs

2017-06-17 Thread SZEDER Gábor
On Fri, Jun 16, 2017 at 11:55 PM, Junio C Hamano <gits...@pobox.com> wrote: > SZEDER Gábor <szeder@gmail.com> writes: > >> 'struct remote' stores refspecs twice: once in their original string >> form in remote->{fetch,push}_refspecs and once in their pars

[PATCHv2.1] revision.h: turn rev_info.early_output back into an unsigned int

2017-06-10 Thread SZEDER Gábor
g '--early-output' work again. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- > But the "users still expect" bit was a bit subtle to me, as I thought > you meant users of Git. But you mean that the feature itself is not a > boolean, but rather an integer count of how

Re: [BUG] add_again() off-by-one error in custom format

2017-06-13 Thread SZEDER Gábor
[sorry for double post, forgot the mailing list...] To throw in a fourth option, this one adjusts the expansions' cached offsets when the magic makes it necessary. It's not necessary for '%-', because it only makes a difference when the expansion is empty, and in that case - add_again()

Re: [PATCH 2/3] revision.c: use skip_prefix() in handle_revision_opt()

2017-06-09 Thread SZEDER Gábor
On Fri, Jun 2, 2017 at 10:11 PM, Jeff King <p...@peff.net> wrote: > On Fri, Jun 02, 2017 at 09:10:09PM +0200, SZEDER Gábor wrote: > >> @@ -1785,15 +1785,15 @@ static int handle_revision_opt(struct rev_info >> *revs, int argc, const char **arg >> } else if (!st

[PATCHv2 2/5] revision.c: stricter parsing of '--no-{min,max}-parents'

2017-06-09 Thread SZEDER Gábor
These two options are parsed using starts_with(), allowing things like 'git log --no-min-parents-foobarbaz' to succeed. Use strcmp() instead. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- revision.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/revisi

[PATCHv2 4/5] revision.c: use skip_prefix() in handle_revision_opt()

2017-06-09 Thread SZEDER Gábor
Instead of starts_with() and a bunch of magic numbers. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- revision.c | 48 +++- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/revision.c b/revision.c index 68531ff5d..c99

[PATCHv2 3/5] revision.c: stricter parsing of '--early-output'

2017-06-09 Thread SZEDER Gábor
strtoul_ui() to parse the optional integer argument and to refuse negative numbers. While at it, use skip_prefix() instead of starts_with() and magic numbers. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- revision.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-)

[PATCHv2 1/5] revision.h: turn rev_info.early_output back into an unsigned int

2017-06-09 Thread SZEDER Gábor
ill expect it to be a regular integer type. Consequently, any even number given via '--early-output=' effectively disabled the feature. Turn it back into an unsigned int, restoring its original data type. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- revision.h | 5 +++-- 1 file chang

[PATCHv2 5/5] revision.c: use skip_prefix() in handle_revision_pseudo_opt()

2017-06-09 Thread SZEDER Gábor
Instead of starts_with() and a bunch of magic numbers. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- revision.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/revision.c b/revision.c index c99c47c50..12a44189e 100644 --- a/revision.c

Re: What does this output of git supposed to mean ?

2017-06-06 Thread SZEDER Gábor
> >> In the context of "status", it probably is more logically correct if > >> it said "No commit yet" or something. This is no longer "is initial > >> harder than root?" ;-) > > > > Exactly. I agree with OP, in the context of running 'git status', I find > > the string "Initial commit"

Re: [PATCHv4 1/2] clone: respect additional configured fetch refspecs during initial fetch

2017-06-06 Thread SZEDER Gábor
On Mon, Jun 5, 2017 at 10:18 AM, Jeff King wrote: > Yeah, I agree it is safe now. I'm just worried about some function in > remote.c later doing: > >read_config(); >add_and_parse_fetch_refspec(remotes[0], whatever); > > which leaves the struct in an inconsistent state (we

Re: [PATCH] for_each_string_list_item(): behave correctly for empty list

2017-09-16 Thread SZEDER Gábor
> >> It would be a pain to have to change the signature of this macro, and > >> we'd prefer not to add overhead to each iteration of the loop. So > >> instead, whenever `list->items` is NULL, initialize `item` to point at > >> a dummy `string_list_item` created for the purpose. > > > > What

Re: [PATCH] for_each_string_list_item(): behave correctly for empty list

2017-09-19 Thread SZEDER Gábor
On Tue, Sep 19, 2017 at 8:51 AM, Michael Haggerty wrote: > On 09/19/2017 02:08 AM, Stefan Beller wrote: >>> I am hoping that this last one is not allowed and we can use the >>> "same condition is checked every time we loop" version that hides >>> the uglyness inside the

Re: [PATCH] for_each_string_list_item(): behave correctly for empty list

2017-09-19 Thread SZEDER Gábor
On Tue, Sep 19, 2017 at 3:38 PM, SZEDER Gábor <szeder@gmail.com> wrote: > A bit "futuristic" option along these lines could be something like > this, using a scoped loop variable in the outer loop to ensure that > it's executed at most once: > > #define for_

Re: [PATCH 4/4] ALLOC_GROW: avoid -Wsign-compare warnings

2017-09-22 Thread SZEDER Gábor
At first I was somewhat puzzled by the "ALLOC_GROW:" prefix in the subject line, because this patch doesn't touch ALLOC_GROW() at all. However, since ALLOC_GROW() is a macro, of course, and since this patch changes the data type of variables "passed" to ALLOC_GROW(), that's sort of fine... But

Re: [PATCH 1/2] describe: do not use cmd_*() as a subroutine

2017-10-10 Thread SZEDER Gábor
> The cmd_foo() function is a moral equivalent of 'main' for a Git > subcommand 'git foo', and as such, it is allowed to do many things > that make it unsuitable to be called as a subroutine, including > > - call exit(3) to terminate the process; > > - allocate resource held and used

Re: [PATCH v1 2/2] travis-ci: skip a branch build if equal tag is present

2017-09-11 Thread SZEDER Gábor
> If we push a branch and a tag pointing to the HEAD of this branch, s/the HEAD of//, perhaps? There is no such thing as "HEAD" (all capital!) of a branch, is it? > then Travis CI would run the build twice. This wastes resources and Nit: s/run the build/build and test the same tree/, to further

Re: [PATCH] tag: avoid NULL pointer arithmetic

2017-10-03 Thread SZEDER Gábor
> lookup_blob() etc. can return NULL if the referenced object isn't of the > expected type. In theory it's wrong to reference the object member in > that case. In practice it's OK because it's located at offset 0 for all > types, so the pointer arithmetic (NULL + 0) is optimized out by the >

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-29 Thread SZEDER Gábor
> > diff --git a/contrib/completion/git-prompt.sh > > b/contrib/completion/git-prompt.sh > > index c6cbef38c2..71a64e7959 100644 > > --- a/contrib/completion/git-prompt.sh > > +++ b/contrib/completion/git-prompt.sh > > @@ -282,7 +282,7 @@ __git_eread () > > { > > local f="$1" > > shift >

Re: [PATCH] git-prompt: fix reading files with windows line endings

2017-11-30 Thread SZEDER Gábor
On Thu, Nov 30, 2017 at 2:51 AM, Johannes Schindelin <johannes.schinde...@gmx.de> wrote: > On Thu, 30 Nov 2017, SZEDER Gábor wrote: > >> > > diff --git a/contrib/completion/git-prompt.sh >> > > b/contrib/completion/git-prompt.sh >> > > index c6

Re: [PATCH] bash completion: Add --autostash and --no-autostash to pull

2017-11-24 Thread SZEDER Gábor
> Ideally we should only autocomplete if pull has --rebase since > they only work with it but could not figure out how to do that > and the error message of doing git pull --autostash points out > that you need --rebase so i guess it's good enough You could use the completion script's

[PATCH v2 3/8] travis-ci: move setting environment variables to 'ci/lib-travisci.sh'

2017-12-16 Thread SZEDER Gábor
there is really no good reason to keep the environment variables separately. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- .travis.yml| 18 +- ci/lib-travisci.sh | 21 + 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.travis

[PATCH v2 2/8] travis-ci: introduce a $jobname variable for 'ci/*' scripts

2017-12-16 Thread SZEDER Gábor
build jobs. Use $jobname instead of $TRAVIS_OS_NAME in scripts taking different actions based on the OS and build job (when installing P4 and Git LFS dependencies and including them in $PATH). The following two patches will also rely on $jobname. Signed-off-by: SZEDER Gábor <szeder.

Re: [PATCH v2 8/8] travis-ci: only print test failures if there are

2017-12-16 Thread SZEDER Gábor
Check upfront and proceed only if there are any such files present. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- ci/print-test-failures.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh index f757e616c..b4a62ef98 10075

Re: [PATCH 1/4] travis-ci: use 'set -x' in 'ci/*' scripts for extra tracing output

2017-12-12 Thread SZEDER Gábor
On Tue, Dec 12, 2017 at 7:00 PM, Lars Schneider <larsxschnei...@gmail.com> wrote: > >> On 12 Dec 2017, at 00:34, SZEDER Gábor <szeder@gmail.com> wrote: >> >> While the build logic was embedded in our '.travis.yml', Travis CI >> used to produce a nice tr

Re: [PATCH 1/4] travis-ci: use 'set -x' in 'ci/*' scripts for extra tracing output

2017-12-14 Thread SZEDER Gábor
On Thu, Dec 14, 2017 at 12:10 AM, Lars Schneider <larsxschnei...@gmail.com> wrote: > >> On 12 Dec 2017, at 19:43, SZEDER Gábor <szeder@gmail.com> wrote: >> >> On Tue, Dec 12, 2017 at 7:00 PM, Lars Schneider >> <larsxschnei...@gmail.com> wrote: &g

Re: [PATCH v2 6/8] travis-ci: don't install 'language-pack-is' package

2017-12-18 Thread SZEDER Gábor
On Mon, Dec 18, 2017 at 10:33 PM, Lars Schneider <larsxschnei...@gmail.com> wrote: > >> On 16 Dec 2017, at 13:57, SZEDER Gábor <szeder@gmail.com> wrote: >> >> Ever since we have started to use Travis CI in 522354d70 (Add Travis >> CI support, 2015-11-2

Re: [PATCH v2 6/8] travis-ci: don't install 'language-pack-is' package

2017-12-19 Thread SZEDER Gábor
On Mon, Dec 18, 2017 at 11:04 PM, SZEDER Gábor <szeder@gmail.com> wrote: > $ sudo apt-get install language-pack-is > [...] > $ ./t0204-gettext-reencode-sanity.sh > # lib-gettext: Found 'is_IS.utf8' as an is_IS UTF-8 locale > # lib-gettext: No is_IS ISO-8859-1 lo

Re: [PATCH 1/4] travis-ci: use 'set -x' in 'ci/*' scripts for extra tracing output

2017-12-15 Thread SZEDER Gábor
On Fri, Dec 15, 2017 at 1:10 PM, Johannes Schindelin wrote: > Hi, > >> There is a lot going on in 'run-windows-build.sh', so the output of 'set >> -x' might be useful or might be considered too much clutter, I don't >> know. I put Dscho on Cc, I think it's mainly his

[PATCH v2 7/8] travis-ci: save prove state for the 32 bit Linux build

2017-12-16 Thread SZEDER Gábor
state file in the cache directory, because that's outside of the directory hierarchy accessible from within the container. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- ci/run-linux32-build.sh | 1 + ci/run-linux32-docker.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/

[PATCH v2 5/8] travis-ci: don't install default addon packages for the 32 bit Linux build

2017-12-16 Thread SZEDER Gábor
The 32 bit Linux build job compiles Git and runs the test suite in a Docker container, while the additional packages (apache2, git-svn, language-pack-is) are installed on the host, therefore don't have any effect and are unnecessary. Signed-off-by: SZEDER Gábor <szeder@gmail.

[PATCH v2 8/8] travis-ci: only print test failures if there are test results available

2017-12-16 Thread SZEDER Gábor
... cat: t/test-results/*.out: No such file or directory Check upfront and proceed only if there are any such files present. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- ci/print-test-failures.sh | 6 ++ 1 file changed, 6 inse

[PATCH v2 4/8] travis-ci: set GIT_TEST_HTTPD in 'ci/lib-travisci.sh'

2017-12-16 Thread SZEDER Gábor
build jobs to 'ci/lib-travisci.sh' to ensure that the build job fails when the httpd tests can't be run. (We could set it in 'ci/run-tests.sh' just as well, but it's better to keep all environment variables in one place in 'ci/lib-travisci.sh'.) Signed-off-by: SZEDER Gábor <szeder@gmail

[PATCH v2 6/8] travis-ci: don't install 'language-pack-is' package

2017-12-16 Thread SZEDER Gábor
, even that commit introducing Travis CI support. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4684b3f4f..ea11b5af6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ compiler:

[PATCH v2 0/8] Travis CI cleanups

2017-12-16 Thread SZEDER Gábor
secret token. I would like to get an Acked-by: from Dscho on this patch before it gets merged. - Patches 5-8 are new. They are various fixes/cleanups unrelated to the Travis CI scriptification, but I don't think it's worth to have them in separate patch series. SZEDER Gábor (8

[PATCH v2 1/8] travis-ci: use 'set -x' in select 'ci/*' scripts for extra tracing

2017-12-16 Thread SZEDER Gábor
redacted in the trace logs even with 'set -x'. However, disable this tracing in 'ci/print-test-failures.sh', as it produces far too much noise in the output of that script. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- ci/lib-travisci.sh| 6 -- ci/print-test-failures.

Re: [PATCH] config: document blame configuration

2017-11-01 Thread SZEDER Gábor
> The options are currently only referenced by the git-blame man page, > also explain them in git-config, which is the canonical page to > contain all config options. Good idea. > Signed-off-by: Stefan Beller > --- > Documentation/config.txt | 17 + > 1 file

[PATCH] travis-ci: fix running P4 and Git LFS tests in Linux build jobs

2017-11-01 Thread SZEDER Gábor
default $PATH. Move adjusting $PATH to 'ci/lib-travisci.sh', which is sourced in all other 'ci/' scripts, so all those scripts will see the updated $PATH value. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- ci/install-dependencies.sh | 10 -- ci/lib-travisci.sh

[PATCH] travis-ci: don't build Git for the static analysis job

2017-11-01 Thread SZEDER Gábor
binaries at all. Spare some of Travis CI's resources and don't build Git for the static analysis job unnecessarily. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fea

Re: [PATCHv2] config: document blame configuration

2017-11-02 Thread SZEDER Gábor
On Thu, Nov 2, 2017 at 7:10 PM, Stefan Beller wrote: > +blame.blankBoundary:: > + Show blank SHA-1 for boundary commits in linkgit:git-blame[1]. This is still SHA-1 instead of object id (or perhaps "commit object name" would be even better). Not sure whether oversight

[PATCH] setup.c: don't try to access '//HEAD' during repo discovery

2017-11-02 Thread SZEDER Gábor
double slashes. Reported-by: Andrew Baumann <andrew.baum...@microsoft.com> Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- I'm not quite sure whether this is the right or complete fix. I can't test it on Cygwin, and I don't know whether Git for Windows is affected with it's dr

Re: [PATCH v5 4/4] builtin/branch: strip refs/heads/ using skip_prefix

2017-12-03 Thread SZEDER Gábor
On Fri, Dec 1, 2017 at 6:59 AM, Kaartic Sivaraam wrote: > Sorry, missed a ';' in v4. > > The surprising thing I discovered in the TravisCI build for v4 > was that apart from the 'Documentation' build the 'Static Analysis' > build passed, with the following output, > >

Re: Bug in git-completion.bash in __git_heads() function

2017-12-04 Thread SZEDER Gábor
Hi, >This is the first time I am sending a bug report here, so if I have > not met the criteria please let me know. >I found that at: > https://github.com/git/git/blob/master/contrib/completion/git-completion.bash#L371, > the usage of refname:strip=2 generates error: > > fatal: unknown

Re: git-completion.bash: Show list of local branches instead of refs for git checkout

2017-12-04 Thread SZEDER Gábor
Hi, > I am using git-completion.bash and when I try to checkout a branch > by typing git checkout on the prompt, I get the following: > > FETCH_HEAD FETCH ORIG_FETCH What is "ORIG_FETCH"? This string was never present in Git's source code. > Will it not be more useful if the list of local

[PATCH] setup.c: fix comment about order of .git directory discovery

2017-12-07 Thread SZEDER Gábor
last line which still puts gitdir before gitfile. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.c b/setup.c index 03f51e056..b168d25db 100644 --- a/setup.c +++ b/setup.c @@ -921,7 +921,7 @@ static enum

Re: [PATCH 3/3] travis: run tests with GIT_TEST_SPLIT_INDEX

2017-12-11 Thread SZEDER Gábor
> Make sure that split index doesn't get broken, by running it on travis > CI. > > Run the test suite with split index enabled in linux 64 bit mode, and > leave split index turned off in 32-bit mode. This doesn't accurately describe what the patch does. Travis CI runs three 64 bit Linux build

[PATCH 4/4] travis-ci: set GIT_TEST_HTTPD in 'ci/lib-travisci.sh'

2017-12-11 Thread SZEDER Gábor
build jobs to 'ci/lib-travisci.sh' to ensure that the build job fails when the httpd tests can't be run. (We could set it in 'ci/run-tests.sh' just as well, but it's better to keep all environment variables in one place in 'ci/lib-travisci.sh'.) Signed-off-by: SZEDER Gábor <szeder@gmail

[PATCH 1/4] travis-ci: use 'set -x' in 'ci/*' scripts for extra tracing output

2017-12-11 Thread SZEDER Gábor
is sourced in most other 'ci/*' scripts, so we get trace log about the commands executed in all of those scripts. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- ci/lib-travisci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/lib-travisci.sh b/ci/lib-travi

[PATCH 3/4] travis-ci: move setting environment variables to 'ci/lib-travisci.sh'

2017-12-11 Thread SZEDER Gábor
there is really no good reason to keep the environment variables separately. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- .travis.yml| 18 +- ci/lib-travisci.sh | 21 + 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.travis

[PATCH 0/4] travis-ci: clean up setting environment variables

2017-12-11 Thread SZEDER Gábor
(Was: [PATCH] travis-ci: fix running P4 and Git LFS tests in Linux build jobs) On Wed, Nov 1, 2017 at 12:55 PM, SZEDER Gábor <szeder@gmail.com> wrote: > However, after these > embedded scriptlets were moved into dedicated scripts executed in > separate shell processes, any vari

[PATCH 2/4] travis-ci: introduce a $jobname variable for 'ci/*' scripts

2017-12-11 Thread SZEDER Gábor
build jobs. Use $jobname instead of $TRAVIS_OS_NAME in scripts taking different actions based on the OS and build job (when installing P4 and Git LFS dependencies and including them in $PATH). The following two patches will also rely on $jobname. Signed-off-by: SZEDER Gábor <szeder.

Re: [PATCH 4/3] t/Makefile: introduce TEST_SHELL_PATH

2017-10-20 Thread SZEDER Gábor
> On Thu, Oct 19, 2017 at 05:01:40PM -0400, Jeff King wrote: > > > I sometimes run git's test suite as part of an automated testing > > process. I was hoping to add "-x" support to get more details when a > > test fails (since failures are sometimes hard to reproduce). Would it make sense (or

Re: [bug] Multiline value should error if the next line is section

2018-05-06 Thread SZEDER Gábor
> On Sun, 6 May 2018 22:03:10 +0200 > Martin Ågren wrote: > > On 6 May 2018 at 21:03, Shulhan wrote: > > > [alias] > > > tree = --no-pager log --graph \ > > > -n 20 \ > > > [user] > > > name = Shulhan > > > > > > (2) Run

Re: [PATCH v10 18/36] merge-recursive: add get_directory_renames()

2018-05-06 Thread SZEDER Gábor
> diff --git a/merge-recursive.c b/merge-recursive.c > index 30894c1cc7..22c5e8e5c9 100644 > --- a/merge-recursive.c > +++ b/merge-recursive.c > +static struct hashmap *get_directory_renames(struct diff_queue_struct *pairs, > + struct tree *tree) > +{ > +

Re: [PATCH v3 1/1] completion: load completion file for external subcommand

2018-05-07 Thread SZEDER Gábor
On Sun, Apr 29, 2018 at 6:42 PM, Florian Gamböck wrote: > This way we can leverage bash-completion's dynamic loading for git > subcommands and make it easier for developers to distribute custom > completion scripts. The patch and the updated commit message both look good to me.

Re: [PATCH] tests: introduce test_unset_prereq, for debugging

2018-05-07 Thread SZEDER Gábor
> While working on the --convert-graft-file test, I missed that I was > relying on the GPG prereq, by using output of test cases that were only > run under that prereq. That GPG vs --convert-graft-file thing really does have a bit of a fallout, doesn't it? I'm at five patches and possibly

[PATCH] t6050-replace: don't disable stdin for the whole test script

2018-05-07 Thread SZEDER Gábor
properly in t6050, because we can't enter any commands to the shell and the debugger, respectively. So let's remove that redirection. Signed-off-by: SZEDER Gábor <szeder@gmail.com> --- t/t6050-replace.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/t/t6050-replace.sh b/t

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