Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-25 Thread Martin Ågren
On 25 April 2018 at 01:51, brian m. carlson <sand...@crustytoothpaste.net> wrote: > On Tue, Apr 24, 2018 at 11:50:16AM +0200, Martin Ågren wrote: >> On 24 April 2018 at 01:39, brian m. carlson >> <sand...@crustytoothpaste.net> wrote: >> > The code for readin

Re: [PATCH 25/41] builtin/receive-pack: avoid hard-coded constants for push certs

2018-04-24 Thread Martin Ågren
On 25 April 2018 at 04:00, brian m. carlson <sand...@crustytoothpaste.net> wrote: > On Tue, Apr 24, 2018 at 11:58:17AM +0200, Martin Ågren wrote: >> On 24 April 2018 at 01:39, brian m. carlson >> > diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c >>

Re: [PATCH 31/41] wt-status: convert two uses of EMPTY_TREE_SHA1_HEX

2018-04-24 Thread Martin Ågren
On 24 April 2018 at 01:39, brian m. carlson wrote: > Convert two uses of EMPTY_TREE_SHA1_HEX to use oid_to_hex_r and > the_hash_algo to avoid a dependency on a given hash algorithm. Use > oid_to_hex_r in preference to oid_to_hex because the buffer needs to > last

Re: [PATCH 25/41] builtin/receive-pack: avoid hard-coded constants for push certs

2018-04-24 Thread Martin Ågren
On 24 April 2018 at 01:39, brian m. carlson wrote: > Use the GIT_SHA1_RAWSZ and GIT_SHA1_HEXSZ macros instead of hard-coding > the constants 20 and 40. Switch one use of 20 with a format specifier > for a hex value to use the hex constant instead, as the original

Re: [PATCH 21/41] http: eliminate hard-coded constants

2018-04-24 Thread Martin Ågren
On 24 April 2018 at 01:39, brian m. carlson wrote: > Use the_hash_algo to find the right size for parsing pack names. > > Signed-off-by: brian m. carlson > --- > http.c | 11 ++- > 1 file changed, 6 insertions(+), 5

Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-24 Thread Martin Ågren
On 24 April 2018 at 01:39, brian m. carlson wrote: > The code for reading certain pack v2 offsets had a hard-coded 5 > representing the number of uint32_t words that we needed to skip over. > Specify this value in terms of a value from the_hash_algo. > >

Re: [PATCH 02/41] server-info: remove unused members from struct pack_info

2018-04-24 Thread Martin Ågren
On 24 April 2018 at 01:39, brian m. carlson wrote: > The head member of struct pack_info is completely unused and the > nr_heads member is used only in one place, which is an assignment. > Since these structure members are not useful, remove them. Good catch. > @@

Re: [PATCH 01/41] cache: add a function to read an object ID from a buffer

2018-04-24 Thread Martin Ågren
On 24 April 2018 at 01:39, brian m. carlson wrote: > In various places throughout the codebase, we need to read data into a > struct object_id from a pack or other unsigned char buffer. Add an > inline function that does this based on the current hash algorithm in >

Re: [PATCH 1/2] merge: setup `opts` later in `checkout_fast_forward()`

2018-04-24 Thread Martin Ågren
On 24 April 2018 at 08:20, Jacob Keller wrote: > I'm guessing the diff algorithm simply found that this was a more > compact representation of the change? It's a bit confusing when your > description indicates you "moved" some code down, but it looks like > you moved code

[PATCH 2/2] unpack_trees_options: free messages when done

2018-04-23 Thread Martin Ågren
`. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- unpack-trees.h | 5 + builtin/checkout.c | 1 + merge-recursive.c | 1 + merge.c| 3 +++ unpack-trees.c | 11 +++ 5 files changed, 21 insertions(+) diff --git a/unpack-trees.h b/unpack-trees.h

[PATCH 1/2] merge: setup `opts` later in `checkout_fast_forward()`

2018-04-23 Thread Martin Ågren
those early returns. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- merge.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/merge.c b/merge.c index f06a4773d4..f123658e58 100644 --- a/merge.c +++ b/merge.c @@ -94,8 +94,24

Re: [PATCH v8 06/16] sequencer: introduce the `merge` command

2018-04-23 Thread Martin Ågren
cgohtxxf1mjbmy_l7y+aa4eg...@mail.gmail.com/#t Martin Martin Ågren (2): merge: setup `opts` later in `checkout_fast_forward()` unpack_trees_options: free messages when done unpack-trees.h | 5 + builtin/checkout.c | 1 + merge-recursive.c | 1 + merge.c| 35 +++

[PATCH 2/2] walker: drop fields of `struct walker` which are always 1

2018-04-22 Thread Martin Ågren
as they try to set these fields. (If they do not set them, note that `get_http_walker()` leaves them undefined, so the behavior will have been undefined all the time.) Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- walker.h | 3 --- http-fetch.c | 3 --- remote-curl.c | 3 --- wa

[PATCH 1/2] http-fetch: make `-a` standard behaviour

2018-04-22 Thread Martin Ågren
rning when it is used "unnecessarily" now. Similarly, do not add anything scary-looking to the man-page about how it will be removed in the future. We can always do so later. (It is not like we are in desperate need of freeing up one-letter arguments.) Signed-off-by: Martin Ågren <

Re: [PATCH 5/6] builtin/grep.c: show column numbers via --column-number

2018-04-21 Thread Martin Ågren
On 21 April 2018 at 05:45, Taylor Blau wrote: > This commit teaches 'git-grep(1)' a new option, '--column-number'. This > option builds upon previous commits to show the column number of the > first match on a non-context line. > > For example: > > $ git grep -mn example |

Re: [PATCH 3/6] grep.[ch]: teach columnnum, color_columnno to grep_opt

2018-04-21 Thread Martin Ågren
On 21 April 2018 at 05:45, Taylor Blau wrote: > diff --git a/grep.c b/grep.c > index 29bc799ecf..7872a5d868 100644 > --- a/grep.c > +++ b/grep.c > @@ -95,6 +95,10 @@ int grep_config(const char *var, const char *value, void > *cb) > opt->linenum =

Re: [PATCH v3] fast-export: fix regression skipping some merge-commits

2018-04-21 Thread Martin Ågren
On 21 April 2018 at 05:43, Junio C Hamano wrote: > but I do not think the updated "fix" below is better. It might be > just aesthetics and I suspect I won't find it as disturbing if we > could push with > > object_array_push(commits, (struct object *)commit); > > or

Re: [PATCH v3] fast-export: fix regression skipping some merge-commits

2018-04-21 Thread Martin Ågren
On 21 April 2018 at 00:16, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Fri, Apr 20, 2018 at 6:12 PM, Martin Ågren <martin.ag...@gmail.com> wrote: >> Re-add a commit when it is not yet time to handle it. An alternative >> that was considered was to peek-then-

[PATCH v3] fast-export: fix regression skipping some merge-commits

2018-04-20 Thread Martin Ågren
on the same object, in a concerted fashion. Add a test that would have caught this. Reported-by: Isaac Chou <isaac.c...@microfocus.com> Analyzed-by: Isaac Chou <isaac.c...@microfocus.com> Helped-by: Johannes Schindelin <johannes.schinde...@gmx.de> Signed-off-by: Martin Ågren <m

Re: [PATCH] fast-export: fix regression skipping some merge-commits

2018-04-20 Thread Martin Ågren
Hi Johannes, On 20 April 2018 at 21:07, Johannes Schindelin <johannes.schinde...@gmx.de> wrote: > On Fri, 20 Apr 2018, Martin Ågren wrote: > >> Reintroduce the pattern of first grabbing the last object (using a new >> function `object_array_peek()`), then later popin

[PATCH v2] fast-export: fix regression skipping some merge-commits

2018-04-20 Thread Martin Ågren
are referring to the same item, i.e., we do not grab one element, then remove another one. Add a test that would have caught this. Reported-by: Isaac Chou <isaac.c...@microfocus.com> Analyzed-by: Isaac Chou <isaac.c...@microfocus.com> Signed-off-by: Martin Ågren <martin.ag...@gmai

[PATCH] fast-export: fix regression skipping some merge-commits

2018-04-20 Thread Martin Ågren
are referring to the same item, i.e., we do not grab one element, then remove another one. Add a test that would have caught this. Reported-by: Isaac Chou <isaac.c...@microfocus.com> Analyzed-by: Isaac Chou <isaac.c...@microfocus.com> Signed-off-by: Martin Ågren <martin.ag...@gmail

Re: [PATCH 1/3] gettext: avoid initialization if the locale dir is not present

2018-04-20 Thread Martin Ågren
On 20 April 2018 at 11:59, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Apr 20 2018, Johannes Schindelin wrote: > >> The runtime of a simple `git.exe version` call on Windows is currently >> dominated by the gettext setup, adding a whopping ~150ms to the ~210ms >> total. >> >>

Re: [BUG] Git fast-export with import marks file omits merge commits

2018-04-19 Thread Martin Ågren
On 20 April 2018 at 00:48, Junio C Hamano wrote: > Isaac Chou writes: > >> I inspected the source code (builtin/fast-export.c) for the >> fast-export issue I encountered, and it looks like the merge >> commit is discarded too early by the call to

Re: [PATCH v10 25/36] merge-recursive: fix overwriting dirty files involved in renames

2018-04-19 Thread Martin Ågren
On 19 April 2018 at 22:48, Martin Ågren <martin.ag...@gmail.com> wrote: > On 19 April 2018 at 19:58, Elijah Newren <new...@gmail.com> wrote: >> -static int git_merge_trees(int index_only, >> +static int git_merge_trees(struct merge_options *o, >>

Re: [PATCH v10 25/36] merge-recursive: fix overwriting dirty files involved in renames

2018-04-19 Thread Martin Ågren
On 19 April 2018 at 19:58, Elijah Newren wrote: > This fixes an issue that existed before my directory rename detection > patches that affects both normal renames and renames implied by > directory rename detection. Additional codepaths that only affect > overwriting of dirty

Re: [PATCH v10 33/36] merge-recursive: fix was_tracked() to quit lying with some renamed paths

2018-04-19 Thread Martin Ågren
On 19 April 2018 at 19:58, Elijah Newren wrote: > + /* Free the extra index left from git_merge_trees() */ > + /* > +* FIXME: Need to also data allocated by > setup_unpack_trees_porcelain() > +* tucked away in o->unpack_opts.msgs, but the problem is

Re: man page for "git remote set-url" seems confusing/contradictory

2018-04-18 Thread Martin Ågren
On 18 April 2018 at 22:56, Todd Zullinger wrote: > Tangentially (and I don't know if it's worth fixing), while > poking around the documentation which includes urls.txt I > noticed that git-clone.txt refers readers to the "URLS > section below" when the name of the section is "GIT

Re: [PATCH 1/2] commit: fix --short and --porcelain

2018-04-18 Thread Martin Ågren
Hi Samuel, Welcome back. :-) On 18 April 2018 at 05:06, Samuel Lijin wrote: > Make invoking `git commit` with `--short` or `--porcelain` return status > code zero when there is something to commit. > > Mark the commitable flag in the wt_status object in the call to >

[PATCH 3/4] git-[short]log.txt: unify quoted standalone --

2018-04-17 Thread Martin Ågren
ese should still be clear enough since just a few lines above each instance, the space is clearly visible in a longer context. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- Documentation/git-log.txt | 4 ++-- Documentation/git-shortlog.txt | 2 +- 2 files changed, 3 insertions

[PATCH 4/4] git-submodule.txt: quote usage in monospace, drop backslash

2018-04-17 Thread Martin Ågren
and Asciidoctor 1.5.4), but by getting rid of this instance, we reduce the chances of \-- cropping up in places where it matters more. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- Documentation/git-submodule.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documen

[PATCH 0/4] doc: cleaning up instances of \--

2018-04-17 Thread Martin Ågren
lways turn into "--" since it can be rendered as an em dash. Martin Martin Ågren (4): doc: convert \--option to --option doc: convert [\--] to [--] git-[short]log.txt: unify quoted standalone -- git-submodule.txt: quote usage in monospace, drop backslash Documentation/git-

[PATCH 2/4] doc: convert [\--] to [--]

2018-04-17 Thread Martin Ågren
, it appears that we do need to use the backslash there, so leave those. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- Documentation/git-log.txt | 4 ++-- Documentation/git-shortlog.txt | 4 ++-- Documentation/gitk.txt | 2 +- 3 files changed, 5 insertions(+), 5 del

[PATCH 1/4] doc: convert \--option to --option

2018-04-17 Thread Martin Ågren
by Asciidoctor. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- Documentation/git-format-patch.txt | 2 +- Documentation/git-push.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt

Re: Regression in patch add?

2018-04-15 Thread Martin Ågren
Hi Mahmoud On 15 April 2018 at 14:21, wrote: > I first run `git add -p`, then manually edit a chunk (after hitting `s` > once, if it matters). The chunk originally contains the following: [...] > Under git 2.7.4, I can edit it to the following, which is accepted > without

Re: fixup! [PATCH 1/6] doc: fix formatting inconsistency in githooks.txt

2018-04-12 Thread Martin Ågren
On 11 April 2018 at 23:08, Andreas Heiduk wrote: > - reflow some paragraphs > --- > Documentation/githooks.txt | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) I have reviewed the resulting githooks.txt. See the diff below for two more instances that I

Re: [PATCH v1 1/2] fsexcludes: add a programmatic way to exclude files from git's working directory traversal logic

2018-04-10 Thread Martin Ågren
On 10 April 2018 at 23:04, Ben Peart wrote: > The File System Excludes module is a new programmatic way to exclude files and > folders from git's traversal of the working directory. fsexcludes_init() > should > be called with a string buffer that contains a NUL

Re: [PATCH 1/6] doc: fix formatting inconsistency in githooks.txt

2018-04-10 Thread Martin Ågren
On 10 April 2018 at 22:04, Andreas Heiduk <ashei...@gmail.com> wrote: > Am 10.04.2018 um 21:13 schrieb Martin Ågren: >> On 10 April 2018 at 20:32, Andreas Heiduk <ashei...@gmail.com> wrote: >> Hmm, I wonder if that is actually intentional. `git commit --amend` &

Re: [PATCH 4/6] doc: added '-d' and '-q' for 'git push'

2018-04-10 Thread Martin Ågren
On 10 April 2018 at 21:38, Andreas Heiduk wrote: > Can I add "Reviewed-by: $YOU" to this one and 2/6? Sure!

Re: [PATCH 4/6] doc: added '-d' and '-q' for 'git push'

2018-04-10 Thread Martin Ågren
On 10 April 2018 at 20:32, Andreas Heiduk wrote: > Add the missing `-o` shortcut for `--push-option` to the synposis. > Add the missing `-d` shortcut for `--delete` in the main section. s/synposis/synopsis/ The subject of this patch says -q, which should be -o. The subject

Re: [PATCH 2/6] doc: align 'diff --no-index' in text with synopsis

2018-04-10 Thread Martin Ågren
On 10 April 2018 at 20:32, Andreas Heiduk wrote: > Comparing > The two '' parameters are not optional but the option > '--no-index' is. Also move the `--options` part to the same > place where the other variants show them. That first line should probably not be there. The

Re: [PATCH 1/6] doc: fix formatting inconsistency in githooks.txt

2018-04-10 Thread Martin Ågren
On 10 April 2018 at 20:32, Andreas Heiduk wrote: > The section 'post-rewrite' in 'githooks.txt' renders only one command > using backticks (`git commit`) but the other commands using single quotes > ('git-rebase'). Align this formatting to use single quotes. > > Signed-off-by:

Re: [PATCH v6 15/15] rebase -i --rebase-merges: add a section to the man page

2018-04-10 Thread Martin Ågren
On 10 April 2018 at 14:30, Johannes Schindelin wrote: > The --rebase-merges mode is probably not half as intuitive to use as > its inventor hopes, so let's document it some. I quite like this documentation. Well-structured and well-paced. Already after the first

Re: [PATCH 0/3] shortlog: do not accept revisions when run outside repo

2018-03-28 Thread Martin Ågren
On 28 March 2018 at 10:48, Jeff King <p...@peff.net> wrote: > On Sat, Mar 10, 2018 at 12:52:09PM +0100, Martin Ågren wrote: > >> Someone trying this out might notice that `man git-shortlog` renders >> "\--" as "\--", which is not wanted. (Also visib

Re: [PATCH] submodule deinit: handle non existing pathspecs gracefully

2018-03-27 Thread Martin Ågren
On 28 March 2018 at 01:28, Stefan Beller wrote: > This fixes a regression introduced in 22e612731b5 (submodule: port s/22/2/ > submodule subcommand 'deinit' from shell to C, 2018-01-15), when handling > pathspecs that do not exist gracefully. This restores the historic

Re: [PATCH v6 2/3] Makefile: add Perl runtime prefix support

2018-03-19 Thread Martin Ågren
On 19 March 2018 at 03:50, Dan Jacques wrote: > Add a new Makefile flag, RUNTIME_PREFIX_PERL, which, when enabled, > configures Perl scripts to locate the Git installation's Perl support > libraries by resolving against the script's path, rather than > hard-coding that path at

Re: [PATCH v2 5/5] ref-filter: get_ref_atom_value() error handling

2018-03-15 Thread Martin Ågren
I skimmed the first four patches of this v2. It seems that patches 1 and 4 are identical to v2. Patches 2 and 3 have very straightforward changes based on my earlier comments. Let's see what this patch is about. :-) On 14 March 2018 at 20:04, Olga Telezhnaya wrote: >

[PATCH v2 3/3] shortlog: disallow left-over arguments outside repo

2018-03-14 Thread Martin Ågren
a repo. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- t/t4201-shortlog.sh | 5 + builtin/shortlog.c | 5 + 2 files changed, 10 insertions(+) diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index da10478f59..ff6649ed9a 100755 --- a/t/t4201-shortlog.sh +++ b/t

[PATCH v2 2/3] shortlog: add usage-string for stdin-reading

2018-03-14 Thread Martin Ågren
t shortlog --`, but we gain readability and consistency. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- builtin/shortlog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/shortlog.c b/builtin/short

[PATCH v2 1/3] git-shortlog.txt: reorder usages

2018-03-14 Thread Martin Ågren
below the most common usage. To avoid being inconsistent, reorder these two usages here first. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- Documentation/git-shortlog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v2 0/3] shortlog: disallow left-over arguments outside repo

2018-03-14 Thread Martin Ågren
specific, "argc > 1", to better match the intention and commit message. Martin Martin Ågren (3): git-shortlog.txt: reorder usages shortlog: add usage-string for stdin-reading shortlog: disallow left-over arguments when run outside repo Documentation/git-shortlog.txt | 2 +- t/t420

Re: [PATCH 3/3] shortlog: do not accept revisions when run outside repo

2018-03-13 Thread Martin Ågren
On 13 March 2018 at 22:46, Junio C Hamano <gits...@pobox.com> wrote: > Martin Ågren <martin.ag...@gmail.com> writes: > >> in order to decide whether we should read from stdin. (So yes, after >> this patch, we will still silently ignore stdin for confused usage such

Re: [PATCH 3/3] shortlog: do not accept revisions when run outside repo

2018-03-13 Thread Martin Ågren
On 13 March 2018 at 20:56, Jonathan Nieder <jrnie...@gmail.com> wrote: > Hi, > > Martin Ågren wrote: > >> (So yes, after >> this patch, we will still silently ignore stdin for confused usage such >> as `git

Re: [RFC 0/4] ref-filter: remove printing from formatting logic

2018-03-13 Thread Martin Ågren
Hi Olga On 13 March 2018 at 11:25, Оля Тележная wrote: > The main idea of the patch is, if you want to format the output by > ref-filter, you should have an ability to work with errors by yourself > if you want to. > So I decided not to touch signature of

Re: [RFC 3/4] ref-filter: change parsing function error handling

2018-03-13 Thread Martin Ågren
On 13 March 2018 at 11:16, Olga Telezhnaya wrote: > Continue removing any printing from ref-filter formatting logic, > so that it could be more general. > > Change the signature of parse_ref_filter_atom() by changing return value, > adding previous return value to

Re: [RFC 2/4] ref-filter: add return value && strbuf to handlers

2018-03-13 Thread Martin Ågren
On 13 March 2018 at 11:16, Olga Telezhnaya wrote: > -static void append_atom(struct atom_value *v, struct ref_formatting_state > *state) > +static int append_atom(struct atom_value *v, struct ref_formatting_state > *state, > + struct strbuf *err) >

Re: [RFC 1/4] ref-filter: start adding strbufs with errors

2018-03-13 Thread Martin Ågren
On 13 March 2018 at 11:16, Olga Telezhnaya wrote: > This is a first step in removing any printing from > ref-filter formatting logic, so that it could be more general. > Everything would be the same for show_ref_array_item() users. > But, if you want to deal with errors

Re: [PATCH v2] git{,-blame}.el: remove old bitrotting Emacs code

2018-03-10 Thread Martin Ågren
On 10 March 2018 at 13:30, Ævar Arnfjörð Bjarmason wrote: > diff --git a/contrib/emacs/README b/contrib/emacs/README > index 82368bdbff..5a63109458 100644 > --- a/contrib/emacs/README > +++ b/contrib/emacs/README > @@ -1,30 +1,24 @@ > -This directory contains various modules for

[PATCH 2/3] shortlog: add usage-string for stdin-reading

2018-03-10 Thread Martin Ågren
t shortlog --`, but we gain readability and consistency. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- builtin/shortlog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/shortlog.c b/builtin/shortlog.c index e29875b84..dc4af03fc 100644 --- a/builtin/

[PATCH 1/3] git-shortlog.txt: reorder usages

2018-03-10 Thread Martin Ågren
below the most common usage. To avoid being inconsistent, reorder these two usages here first. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- Documentation/git-shortlog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-shortlog.txt b/Documen

[PATCH 3/3] shortlog: do not accept revisions when run outside repo

2018-03-10 Thread Martin Ågren
such as `git log v2.15.0.. | git shortlog v2.16.0..`. But at least that does not crash.) Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- t/t4201-shortlog.sh | 5 + builtin/shortlog.c | 6 ++ 2 files changed, 11 insertions(+) diff --git a/t/t4201-shortlog.sh b/t/t4201-short

[PATCH 0/3] shortlog: do not accept revisions when run outside repo

2018-03-10 Thread Martin Ågren
There is quite some history around such double-slashes and compatibility with AsciiDoc-versions, so I'd rather not do a "while at it" there. Regardless of the destiny of patch 1/3, I will follow up later to address various forms of "\--" throughout the tree. Martin Ågren

Re: What's cooking in git.git (Mar 2018, #02; Tue, 6)

2018-03-08 Thread Martin Ågren
On 7 March 2018 at 00:34, Junio C Hamano wrote: > * ma/config-page-only-in-list-mode (2018-02-21) 3 commits > - config: change default of `pager.config` to "on" > - config: respect `pager.config` in list/get-mode only > - t7006: add tests for how git config paginates > >

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

2018-03-08 Thread Martin Ågren
Hi Paul-Sebastian On 6 March 2018 at 20:31, Paul-Sebastian Ungureanu wrote: > 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

Re: [PATCH v2 0/5] roll back locks in various code paths

2018-03-01 Thread Martin Ågren
er way round ("FORCE_WRITE"), but that could break existing users behind their backs. Let's take the more conservative approach. We can still migrate existing callers to use our new flag. Later we might even be able to flip the default, possibly without entirely ignoring the risk

Re: [PATCH v2 0/5] roll back locks in various code paths

2018-02-28 Thread Martin Ågren
On 1 March 2018 at 00:20, Junio C Hamano <gits...@pobox.com> wrote: > Martin Ågren <martin.ag...@gmail.com> writes: > >> A further upshot of this patch is that `active_cache_changed`, which is >> defined as `the_index.cache_changed`, now only has a few

Re: [PATCH v2 0/5] roll back locks in various code paths

2018-02-28 Thread Martin Ågren
behind their backs. Let's take the more conservative approach. We can still migrate existing callers to use our new flag. Later we might even be able to flip the default, possibly without entirely ignoring the risk to in-flight or out-of-tree topics. Suggested-by: Jeff King <p...@peff.net> Signe

[PATCH v2 3/5] merge-recursive: always roll back lock in `merge_recursive_generic()`

2018-02-28 Thread Martin Ågren
If we return early, or if `active_cache_changed` is false, we forget to roll back the lockfile. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- merge-recursive.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/merge-recursive.c b/merge-recursive.c

[PATCH v2 4/5] merge: always roll back lock in `checkout_fast_forward()`

2018-02-28 Thread Martin Ågren
it to do so. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- merge.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/merge.c b/merge.c index 195b578700..f06a4773d4 100644 --- a/merge.c +++ b/merge.c @@ -113,17 +113,23 @@ int checkout_fast_forward

[PATCH v2 5/5] sequencer: do not roll back lockfile unnecessarily

2018-02-28 Thread Martin Ågren
message. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- sequencer.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sequencer.c b/sequencer.c index e6bac4692a..0e6d04e4ce 100644 --- a/sequencer.c +++ b/sequencer.c @@ -303,10 +303,8 @@ stat

[PATCH v2 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-28 Thread Martin Ågren
If we return early, we forget to roll back the lockfile. Do so. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- sequencer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 90807c4559..e6bac4692a 100644 --- a/sequencer.c

[PATCH v2 0/5] roll back locks in various code paths

2018-02-28 Thread Martin Ågren
fooled me when I prepared v1. Martin Martin Ågren (5): sequencer: make lockfiles non-static sequencer: always roll back lock in `do_recursive_merge()` merge-recursive: always roll back lock in `merge_recursive_generic()` merge: always roll back lock in `checkout_fast_forward()` sequencer

[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 <martin.ag...@gmail.com> --- sequencer.c | 10 +--

Re: [PATCH 3/5] merge-recursive: always roll back lock in `merge_recursive_generic()`

2018-02-28 Thread Martin Ågren
On 27 February 2018 at 22:30, Martin Ågren <martin.ag...@gmail.com> wrote: > If we return early, we forget to roll back the lockfile. Do so. > > Signed-off-by: Martin Ågren <martin.ag...@gmail.com> > --- > merge-recursive.c | 4 +++- > 1 file changed, 3 insertions(+)

Re: [PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Martin Ågren
On 27 February 2018 at 22:44, Jeff King wrote: > I want to note one thing that confused me while reviewing. While looking > to see if there were other returns, I noticed that the lines right near > the end of your context are funny: > > if (active_cache_changed && >

Re: [PATCH v5 01/12] sequencer: avoid using errno clobbered by rollback_lock_file()

2018-02-27 Thread Martin Ågren
On 26 February 2018 at 22:29, Johannes Schindelin wrote: > As pointed out in a review of the `--recreate-merges` patch series, > `rollback_lock_file()` clobbers errno. Therefore, we have to report the > error message that uses errno before calling said function. > >

[PATCH 3/5] merge-recursive: always roll back lock in `merge_recursive_generic()`

2018-02-27 Thread Martin Ågren
If we return early, we forget to roll back the lockfile. Do so. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- merge-recursive.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/merge-recursive.c b/merge-recursive.c index cc5fa0a949..7345125691 100644 --- a

[PATCH 5/5] sequencer: do not roll back lockfile unnecessarily

2018-02-27 Thread Martin Ågren
message. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- sequencer.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sequencer.c b/sequencer.c index e6bac4692a..0e6d04e4ce 100644 --- a/sequencer.c +++ b/sequencer.c @@ -303,10 +303,8 @@ stat

[PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Martin Ågren
If we return early, we forget to roll back the lockfile. Do so. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- sequencer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 90807c4559..e6bac4692a 100644 --- a/sequencer.c

[PATCH 4/5] merge: always roll back lock in `checkout_fast_forward()`

2018-02-27 Thread Martin Ågren
it to do so. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- merge.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/merge.c b/merge.c index 195b578700..f06a4773d4 100644 --- a/merge.c +++ b/merge.c @@ -113,17 +113,23 @@ int checkout_fast_forward

[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 <martin.ag...@gmail.com> --- sequencer.c | 10 +--

[PATCH 0/5] roll back locks in various code paths

2018-02-27 Thread Martin Ågren
h are already rolled back. I've based this on maint. There's a conflict on pu, with c7d4394111 (sequencer: avoid using errno clobbered by rollback_lock_file(), 2018-02-11). The conflict resolution would be to take my version for the "could not lock HEAD"-hunk. Martin Martin Ågren (5):

Re: [PATCH] t/known-leaky: add list of known-leaky test scripts

2018-02-26 Thread Martin Ågren
On 25 February 2018 at 04:48, Kaartic Sivaraam <kaartic.sivar...@gmail.com> wrote: > On Wednesday 21 February 2018 02:14 AM, Martin Ågren wrote: >> To sum up: I probably won't be looking into Travis-ing such a blacklist >> in the near future. >> > > Just thinking o

[PATCH v2 3/3] config: change default of `pager.config` to "on"

2018-02-21 Thread Martin Ågren
git config --edit` as it would have before the previous commit. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- Documentation/git-config.txt | 1 + t/t7006-pager.sh | 12 ++-- builtin/config.c | 2 +- 3 files changed, 8 insertions(+), 7 deletion

[PATCH v2 1/3] t7006: add tests for how git config paginates

2018-02-21 Thread Martin Ågren
ak it, or place new tests like these next to it, but let's instead make the tests for `git config` as similar as possible to the ones for `git tag` and `git branch`, and place them after those. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- t/t7006-pager.sh | 49 +

[PATCH v2 0/3] Re: t7006: add tests for how git config paginates

2018-02-21 Thread Martin Ågren
quot;. I have not done anything about that, except to try and motivate the choice better in the commit message of the second patch. Martin Martin Ågren (3): t7006: add tests for how git config paginates config: respect `pager.config` in list/get-mode only config: change default of `pager.c

[PATCH v2 2/3] config: respect `pager.config` in list/get-mode only

2018-02-21 Thread Martin Ågren
nt that we will never be able to enforce throughout the codebase and that will just open a can of worms. This fixes the failing test added in the previous commit. Also adapt the test for whether `git config foo.bar bar` and `git config --get foo.bar` respects `pager.config`. Signed-off-by: Martin Ågren

Re: [PATCH] t/known-leaky: add list of known-leaky test scripts

2018-02-20 Thread Martin Ågren
On 19 February 2018 at 22:29, Jeff King <p...@peff.net> wrote: > On Wed, Feb 14, 2018 at 10:56:37PM +0100, Martin Ågren wrote: > >> Here's what a list of known leaks might look like. It feels a bit >> awkward to post a known-incomplete list (I don't run all tests). D

[PATCH] t/known-leaky: add list of known-leaky test scripts

2018-02-14 Thread Martin Ågren
trigger leaks, in which case they would belong in this list. Suggested-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com> Helped-by: Jeff King <p...@peff.net> Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- t/known-leaky | 539 +

Re: [PATCH 2/3] config: respect `pager.config` in list/get-mode only

2018-02-13 Thread Martin Ågren
On 13 February 2018 at 11:25, Duy Nguyen <pclo...@gmail.com> wrote: > On Sun, Feb 11, 2018 at 11:40 PM, Martin Ågren <martin.ag...@gmail.com> wrote: >> Similar to de121ffe5 (tag: respect `pager.tag` in list-mode only, >> 2017-08-02), use the DELAY_PAGER_CONFI

Re: [PATCH 1/3] t7006: add tests for how git config paginates

2018-02-12 Thread Martin Ågren
On 12 February 2018 at 23:17, Junio C Hamano <gits...@pobox.com> wrote: > Martin Ågren <martin.ag...@gmail.com> writes: > >> +test_expect_success TTY 'git config respects pager.config when setting' ' >> + rm -f paginated.out && >> + test_ter

Re: [PATCH 3/7] worktree move: new command

2018-02-12 Thread Martin Ågren
On 12 February 2018 at 10:56, Duy Nguyen <pclo...@gmail.com> wrote: > On Wed, Feb 7, 2018 at 3:05 AM, Martin Ågren <martin.ag...@gmail.com> wrote: >> On 6 February 2018 at 03:13, Jeff King <p...@peff.net> wrote: >>> On Mon, Feb 05, 2018 at 08:28:10PM +07

[PATCH 2/3] config: respect `pager.config` in list/get-mode only

2018-02-11 Thread Martin Ågren
at we page all of --get[-*] and --list, than to divide the (current and future) getters into "pages" and "doesn't". This fixes the failing test added in the previous commit. Also adapt the test for whether `git config foo.bar bar` respects `pager.config`. Signed-off-by: Martin

[PATCH 3/3] config: change default of `pager.config` to "on"

2018-02-11 Thread Martin Ågren
git config --edit` as it would have before the previous commit. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- Documentation/git-config.txt | 2 +- t/t7006-pager.sh | 12 ++-- builtin/config.c | 2 +- 3 files changed, 8 insertions(+), 8 deletion

[PATCH 1/3] t7006: add tests for how git config paginates

2018-02-11 Thread Martin Ågren
e. Signed-off-by: Martin Ågren <martin.ag...@gmail.com> --- t/t7006-pager.sh | 42 +++--- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh index f5f46a95b4..5a7b757c94 100755 --- a/t/t7006-pager.sh +++ b/

Re: [PATCH 3/7] worktree move: new command

2018-02-06 Thread Martin Ågren
t; approach was good. But I haven't really pushed it any further. > > Martin Ågren (cc'd) did some follow-up work, but I think we still have a > long way to go. Agreed. :-) > My hope is that people who are interested in > leak-checking their new code can run some specific script

Re: [PATCH v2 2/2] send-email: Support separate Reply-To address

2018-01-18 Thread Martin Ågren
On 17 January 2018 at 19:08, Christian Ludwig wrote: > In some projects contributions from groups are only accepted from a > common group email address. But every individual may want to recieve > replies to her own personal address. That's what we have 'Reply-To' >

Re: [BUG] v2.16.0-rc0 seg faults when git bisect skip

2018-01-06 Thread Martin Ågren
On 6 January 2018 at 15:27, Yasushi SHOJI wrote: > best_bisection_sorted() seems to do > > - get the commit list along with the number of elements in the list > - walk the list one by one to check whether a element have TREESAME or not > - if TREESAME, skip > - if

Re: [BUG] v2.16.0-rc0 seg faults when git bisect skip

2018-01-06 Thread Martin Ågren
d and bad. But we had no tests for this behavior. Test the behavior when we mark a commit first bad, then good, but also when we are already in the bad state, where `git bisect skip` should notice it. This test would have caught the segfault which was recently fixed in 2e9fdc795c (bisect: fi

Re: [BUG] v2.16.0-rc0 seg faults when git bisect skip

2018-01-03 Thread Martin Ågren
On 3 January 2018 at 15:21, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Jan 03 2018, Yasushi SHOJI jotted: > >> Hi, >> >> git version 2.16.0.rc0 seg faults on my machine when I >> [...] >> Program terminated with signal SIGSEGV, Segmentation fault. >> #0 0x55a73107f900 in

<    1   2   3   4   5   6   >