Re: your mail

2017-06-22 Thread demerphq
On 22 June 2017 at 23:58, Ævar Arnfjörð Bjarmason wrote: > +You don't need to be subscribed to the list to send mail to it, and > +others on-list will generally CC you when replying (although some > +forget this). It's adviced to subscribe to the list if you want to be FWIW: "adviced" is misspel

Re: [PATCH 2/3] t1301: move movebits() to test-lib-functions.sh

2017-06-22 Thread Junio C Hamano
Ramsay Jones writes: > On 22/06/17 20:52, Junio C Hamano wrote: >> Christian Couder writes: >> >>> As the movebits() function can be useful outside t1301, >>> let's move it into test-lib-functions.sh, and while at >>> it let's rename it test_movebits(). >> >> Good thinking, especially on the r

Re: What's cooking in git.git (Jun 2017, #06; Thu, 22)

2017-06-22 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Thu, Jun 22 2017, Junio C. Hamano jotted: > >> * sd/branch-copy (2017-06-18) 3 commits >> - branch: add a --copy (-c) option to go with --move (-m) >> - branch: add test for -m renaming multiple config sections >> - config: create a function to format secti

Re: your mail

2017-06-22 Thread Junio C Hamano
Jeff King writes: >> +You don't need to be subscribed to the list to send mail to it, and >> +others on-list will generally CC you when replying (although some >> +forget this). It's adviced to subscribe to the list if you want to be >> +sure you're not missing follow-up discussion, or if your in

Re: [PATCH v3 0/4] Add regression tests for recent rebase -i fixes

2017-06-22 Thread Junio C Hamano
Junio C Hamano writes: >> git-rebase.sh | 4 +- >> sequencer.c | 11 ++-- >> t/t3404-rebase-interactive.sh | 7 +++ >> t/t3420-rebase-autostash.sh | 136 >> -- >> 4 files changed, 147 insertions(+), 11 deletions(-)

Re: [PATCH 08/26] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-22 Thread Junio C Hamano
Stefan Beller writes: > Actually that function already has some quick return: > > static int new_blank_line_at_eof(struct emit_callback *ecbdata, const > char *line, int len) > { > if (!((ecbdata->ws_rule & WS_BLANK_AT_EOF) && > ecbdata->blank_at_eof_in_preimage && > ecbdata

Re: [PATCH] pathspec: die on empty strings as pathspec

2017-06-22 Thread Junio C Hamano
Junio C Hamano writes: > Emily Xie writes: > >> I ran the tests and none of them failed. > > This is not about a test you touched, but applied to or merged to > any of the recent integration branches (like 'master' or 'maint') > > $ make > $ cd t > $ GIT_TEST_LONG=YesPlease sh ./t00

Re: [PATCH v3 0/4] Add regression tests for recent rebase -i fixes

2017-06-22 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > I've updated the second two tests to be portable using q_to_cr() as > Johannes suggested and added his patch to fix the autostash messages > going to stdout rather than stderr. The reflog message test is > unchanged. Thanks to Johannes for his help a

Re: [PATCH] pathspec: die on empty strings as pathspec

2017-06-22 Thread Junio C Hamano
Emily Xie writes: > I ran the tests and none of them failed. This is not about a test you touched, but applied to or merged to any of the recent integration branches (like 'master' or 'maint') $ make $ cd t $ GIT_TEST_LONG=YesPlease sh ./t0027-*.sh fails at the very beginning. I

Re: Truncating HEAD reflog on branch move

2017-06-22 Thread Jeff King
On Thu, Jun 22, 2017 at 06:25:46PM -0400, Jeff King wrote: > So here's a patch on top of what I posted before that pushes the reflog > check into the loop (it just decides whether to pull from the reflogs or > from the commit queue at the top of the loop). > > I was surprised to find, though, tha

Re:

2017-06-22 Thread Marie Angèle Ouattara
-- I need your cooperation in a transaction that will benefit you, details will disclose to you once i receive your reply. Regards Mrs. Marie Angèle O.

Re: [PATCH] pathspec: die on empty strings as pathspec

2017-06-22 Thread Emily Xie
I ran the tests and none of them failed. Technically, the state of the index would indeed be different with these new changes, but this shouldn't be an issue. In the current version, there's one only item added to the index that ends up getting used in subsequent tests. That is, foo1, which is test

Re: Ambiguity warning printed twice ?

2017-06-22 Thread Kaartic Sivaraam
On Thu, 2017-06-22 at 10:23 -0400, Jeff King wrote: > It's not unreasonable for a complex command like git-status to need > to > resolve HEAD multiple times. You can see how we get to each case by > running: > >   gdb /path/to/git-status > > and then doing: > >   break warning >   run > > Each

[PATCHv2 01/25] diff.c: readability fix

2017-06-22 Thread Stefan Beller
We already have dereferenced 'p->two' into a local variable 'two'. Use that. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 74283d9001..3f5bf8b5a4 100644 --- a/diff.c +++ b/diff.

[PATCHv2 18/25] diff.c: convert word diffing to use emit_diff_symbol

2017-06-22 Thread Stefan Beller
The word diffing is not line oriented and would need some serious effort to be transformed into a line oriented approach, so just go with a symbol DIFF_SYMBOL_WORD_DIFF that is a partial line. Signed-off-by: Stefan Beller --- diff.c | 79 ++

[PATCHv2 23/25] diff.c: color moved lines differently, plain mode

2017-06-22 Thread Stefan Beller
Add the 'plain' mode for move detection of code. This omits the checking for adjacent blocks, so it is not as useful. If you have a lot of the same blocks moved in the same patch, the 'Zebra' would end up slow as it is O(n^2) (n is number of same blocks). So this may be useful there and is generall

[PATCHv2 20/25] diff.c: emit_diff_symbol learns about DIFF_SYMBOL_SUMMARY

2017-06-22 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 71 ++ 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/diff.c b/diff.c index 0ed86ba984..f9fb94b0d3 100644 --- a/diff.c +++ b/diff.c @@ -571,6 +571,7 @@ enum diff_symbol {

[PATCHv2 17/25] diff.c: convert show_stats to use emit_diff_symbol

2017-06-22 Thread Stefan Beller
We call print_stat_summary from builtin/apply, so we still need the version with a file pointer, so introduce print_stat_summary_0 that uses emit_string machinery and keep print_stat_summary with the same arguments around. Signed-off-by: Stefan Beller --- diff.c | 114 +++

[PATCHv2 15/25] submodule.c: migrate diff output to use emit_diff_symbol

2017-06-22 Thread Stefan Beller
As the submodule process is no longer attached to the same file pointer 'o->file' as the superprojects process, there is a different result in color.c::check_auto_color. That is why we need to pass coloring explicitly, such that the submodule coloring decision will be made by the child process proc

[PATCHv2 12/25] diff.c: emit_diff_symbol learns DIFF_SYMBOL_HEADER

2017-06-22 Thread Stefan Beller
The header is constructed lazily including line breaks, so just emit the raw string as is. Signed-off-by: Stefan Beller --- diff.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/diff.c b/diff.c index 761ee581ad..34314455b5 100644 --- a/diff.c ++

[PATCHv2 11/25] diff.c: emit_diff_symbol learns DIFF_SYMBOL_FILEPAIR_{PLUS, MINUS}

2017-06-22 Thread Stefan Beller
We have to use fprintf instead of emit_line, because we want to emit the tab after the color. This is important for ancient versions of gnu patch AFAICT, although we probably do not want to feed colored output to the patch utility, such that it would not matter if the trailing tab is colored. Keep

[PATCHv2 21/25] diff.c: buffer all output if asked to

2017-06-22 Thread Stefan Beller
Introduce a new option 'emitted_symbols' in the struct diff_options which controls whether all output is buffered up until all output is available. It is set internally in diff.c when necessary. We'll have a new struct 'emitted_string' in diff.c which will be used to buffer each line. The emitted

[PATCHv2 16/25] diff.c: convert emit_binary_diff_body to use emit_diff_symbol

2017-06-22 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 63 ++- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/diff.c b/diff.c index bc78a216ab..7c92675f6f 100644 --- a/diff.c +++ b/diff.c @@ -560,6 +560,11 @@ static void emit_line(st

[PATCHv2 24/25] diff.c: add dimming to moved line detection

2017-06-22 Thread Stefan Beller
Any lines inside a moved block of code are not interesting. Boundaries of blocks are only interesting if they are next to another block of moved code. Signed-off-by: Stefan Beller --- color.h| 2 + diff.c | 139 ---

[PATCHv2 25/25] diff: document the new --color-moved setting

2017-06-22 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- Documentation/config.txt | 12 ++-- Documentation/diff-options.txt | 27 +++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt in

[PATCHv2 10/25] diff.c: emit_diff_symbol learns DIFF_SYMBOL_CONTEXT_INCOMPLETE

2017-06-22 Thread Stefan Beller
The context marker use the exact same output pattern, so reuse it. Signed-off-by: Stefan Beller --- diff.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 3d081edd12..f3d0918810 100644 --- a/diff.c +++ b/diff.c @@ -563,6 +563,7 @@ enum diff_symbol

[PATCHv2 19/25] diff.c: emit_diff_symbol learns about DIFF_SYMBOL_STAT_SEP

2017-06-22 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/diff.c b/diff.c index 60630d2c3f..0ed86ba984 100644 --- a/diff.c +++ b/diff.c @@ -570,6 +570,7 @@ enum diff_symbol { DIFF_SYMBOL_STATS_SUMMARY_INSERTS_DELETES, DI

[PATCHv2 22/25] diff.c: color moved lines differently

2017-06-22 Thread Stefan Beller
When a patch consists mostly of moving blocks of code around, it can be quite tedious to ensure that the blocks are moved verbatim, and not undesirably modified in the move. To that end, color blocks that are moved within the same patch differently. For example (OM, del, add, and NM are different c

[PATCHv2 08/25] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-22 Thread Stefan Beller
Add a new flags field to emit_diff_symbol, that will be used by context lines for: * white space rules that are applicable (The first 12 bits) Take a note in cahe.c as well, when this ws rules are extended we have to fix the bits in the flags field. * how the rules are evaluated (actually this

[PATCHv2 14/25] diff.c: emit_diff_symbol learns DIFF_SYMBOL_REWRITE_DIFF

2017-06-22 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/diff.c b/diff.c index 78cf5ad691..0314d57647 100644 --- a/diff.c +++ b/diff.c @@ -560,6 +560,7 @@ static void emit_line(struct diff_options *o, const c

[PATCHv2 04/25] diff.c: introduce emit_diff_symbol

2017-06-22 Thread Stefan Beller
In a later patch we want to buffer all output before emitting it as a new feature ("markup moved lines") conceptually cannot be implemented in a single pass over the output. There are different approaches to buffer all output such as: * Buffering on the char level, i.e. we'd have a char[] which wo

[PATCHv2 06/25] diff.c: emit_diff_symbol learns DIFF_SYMBOL_CONTEXT_FRAGINFO

2017-06-22 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index c550f75195..16818fa571 100644 --- a/diff.c +++ b/diff.c @@ -560,6 +560,7 @@ static void emit_line(struct diff_options *o, const char *set, const char *reset

[PATCHv2 02/25] diff.c: move line ending check into emit_hunk_header

2017-06-22 Thread Stefan Beller
The emit_hunk_header() function is responsible for assembling a hunk header and calling emit_line() to send the hunk header to the output file. Its only caller fn_out_consume() needs to prepare for a case where the function emits an incomplete line and add the terminating LF. Instead make sure em

[PATCHv2 09/25] diff.c: emit_diff_symbol learns DIFF_SYMBOL_WORDS[_PORCELAIN]

2017-06-22 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/diff.c b/diff.c index e7583efca3..3d081edd12 100644 --- a/diff.c +++ b/diff.c @@ -560,6 +560,8 @@ static void emit_line(struct diff_options *o,

[PATCHv2 13/25] diff.c: emit_diff_symbol learns about DIFF_SYMBOL_BINARY_FILES

2017-06-22 Thread Stefan Beller
we could save a little bit of memory when buffering in a later mode by just passing the inner part ("%s and %s", file1, file 2), but those a just a few bytes, so instead let's reuse the implementation from DIFF_SYMBOL_HEADER and keep the whole line around. Signed-off-by: Stefan Beller --- diff.c

[PATCHv2 00/25] reroll of sb/diff-color-moved

2017-06-22 Thread Stefan Beller
v2: * addressed all issues raised * last patch dropped (WIP/RFC: diff.c: have a "machine parseable" move coloring) * interdiff below v1: This is a complete rewrite of the series. Highlights: * instead of buffering partial lines, we'll pretend all diff output follows a well defined grammar, and w

[PATCHv2 07/25] diff.c: emit_diff_symbol learns DIFF_SYMBOL_NO_LF_EOF

2017-06-22 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/diff.c b/diff.c index 16818fa571..b78f698cad 100644 --- a/diff.c +++ b/diff.c @@ -560,6 +560,7 @@ static void emit_line(struct diff_options *o, const char *set, const

[PATCHv2 05/25] diff.c: emit_diff_symbol learns DIFF_SYMBOL_CONTEXT_MARKER

2017-06-22 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/diff.c b/diff.c index 2257d44e2c..c550f75195 100644 --- a/diff.c +++ b/diff.c @@ -560,13 +560,20 @@ static void emit_line(struct diff_options *o, const char *set, const char *res

[PATCHv2 03/25] diff.c: factor out diff_flush_patch_all_file_pairs

2017-06-22 Thread Stefan Beller
In a later patch we want to do more things before and after all filepairs are flushed. So factor flushing out all file pairs into its own function that the new code can be plugged in easily. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff.c | 17 - 1 file cha

Re: [PATCH 11/26] diff.c: emit_diff_symbol learns DIFF_SYMBOL_FILEPAIR

2017-06-22 Thread Stefan Beller
On Wed, Jun 21, 2017 at 1:09 PM, Junio C Hamano wrote: > Jonathan Tan writes: > >> On Mon, 19 Jun 2017 19:48:01 -0700 >> Stefan Beller wrote: >> >>> @@ -676,6 +677,14 @@ static void emit_diff_symbol(struct diff_options *o, >>> enum diff_symbol s, >>> } >>> emit_line(o,

Re: [PATCH 08/26] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-22 Thread Stefan Beller
On Thu, Jun 22, 2017 at 4:30 PM, Stefan Beller wrote: > On Wed, Jun 21, 2017 at 1:05 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> static void emit_add_line(const char *reset, >>> struct emit_callback *ecbdata, >>> const char *line, in

Re: [PATCH 08/26] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-22 Thread Stefan Beller
On Wed, Jun 21, 2017 at 1:05 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> static void emit_add_line(const char *reset, >> struct emit_callback *ecbdata, >> const char *line, int len) >> { >> - emit_line_checked(reset, ecbdata, line,

Re: your mail

2017-06-22 Thread Jeff King
On Thu, Jun 22, 2017 at 11:58:08PM +0200, Ævar Arnfjörð Bjarmason wrote: > Which, in the context of what this follows (how to submit a bug, > questions etc.) isn't a good use of time for the person reading the > instructions. > > Maybe something more like: > > diff --git a/README.md b/README.md

Re: [PATCH 0/5] Move unquote_path() from git-add--interactive.perl to Git.pm

2017-06-22 Thread Jeff King
On Thu, Jun 22, 2017 at 11:26:17AM +0100, Phillip Wood wrote: > From: Phillip Wood > > I'm using this in some scripts and it would be more convenient to have > it available from Git.pm rather than copying and pasting it each time > I need it. I think it should be useful to other people using Git

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

2017-06-22 Thread Jeff King
On Thu, Jun 22, 2017 at 08:19:40PM +0200, René Scharfe wrote: > > I'd be OK with keeping it if we could reduce the number of magic > > numbers. E.g,. rather than 32 elsewhere use: > > > >(sizeof(*loose_objects_subdir_bitmap) * CHAR_BIT) > > We have a bitsizeof macro for that. > > > and simi

Re: [PATCH] sha1_name: cache readdir(3) results in find_short_object_filename()

2017-06-22 Thread Jeff King
On Thu, Jun 22, 2017 at 08:19:48PM +0200, René Scharfe wrote: > Read each loose object subdirectory at most once when looking for unique > abbreviated hashes. This speeds up commands like "git log --pretty=%h" > considerably, which previously caused one readdir(3) call for each > candidate, even

Re: [PATCH 2/3] t1301: move movebits() to test-lib-functions.sh

2017-06-22 Thread Ramsay Jones
On 22/06/17 20:52, Junio C Hamano wrote: > Christian Couder writes: > >> As the movebits() function can be useful outside t1301, >> let's move it into test-lib-functions.sh, and while at >> it let's rename it test_movebits(). > > Good thinking, especially on the renaming. Err, except for the

Re: What's cooking in git.git (Jun 2017, #06; Thu, 22)

2017-06-22 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 22 2017, Junio C. Hamano jotted: > * sd/branch-copy (2017-06-18) 3 commits > - branch: add a --copy (-c) option to go with --move (-m) > - branch: add test for -m renaming multiple config sections > - config: create a function to format section headers > > "git branch" learned "-c

What's cooking in git.git (Jun 2017, #06; Thu, 22)

2017-06-22 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. You can find the changes described

Re: Truncating HEAD reflog on branch move

2017-06-22 Thread Jeff King
On Thu, Jun 22, 2017 at 05:52:35PM -0400, Jeff King wrote: > Which really makes me feel like this patch is going in the right > direction, as it makes all of this behave conceptually like: > > while read old new etc ... > do > git show $new > done <.git/logs/$ref > > which is simple to

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

2017-06-22 Thread Junio C Hamano
Jeff King writes: > I'd still prefer this to have: > > if (!remote->fetch && remote->fetch_refspec_nr) > BUG("attempt to add refspec to uninitialized list"); > > at the top, as otherwise this case writes garbage into remote->fetch[0]. > > I see you have another series dealing with the laz

Re: your mail

2017-06-22 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Maybe something more like: Much better. > diff --git a/README.md b/README.md > index f17af66a97..dc175757fa 100644 > --- a/README.md > +++ b/README.md > @@ -36,6 +36,12 @@ the body to majord...@vger.kernel.org. The mailing list > archives are > available at <

Re: [PATCH 2/3] pack-objects: WIP add max-blob-size filtering

2017-06-22 Thread Junio C Hamano
Jonathan Tan writes: > On Thu, 22 Jun 2017 20:36:14 + > Jeff Hostetler wrote: > >> +static signed long max_blob_size = -1; > > FYI Junio suggested "blob-max-bytes" when he looked at my patch [1]. > > [1] https://public-inbox.org/git/xmqqmv9ryoym@gitster.mtv.corp.google.com/ To give cred

Re: [PATCH 1/3] list-objects: add filter_blob to traverse_commit_list

2017-06-22 Thread Jonathan Tan
On Thu, 22 Jun 2017 14:45:26 -0700 Jonathan Tan wrote: > On Thu, 22 Jun 2017 20:36:13 + > Jeff Hostetler wrote: > > > From: Jeff Hostetler > > > > In preparation for partial/sparse clone/fetch where the > > server is allowed to omit large/all blobs from the packfile, > > teach traverse_co

Re: [PATCH v4 15/20] repository: add index_state to struct repo

2017-06-22 Thread Junio C Hamano
Brandon Williams writes: > That makes sense. While at it, would it make sense to ensure that the > 'struct index_state *' which is stored in 'the_repository.index' be > '&the_index'? I was imagining (read: speculating one possible future, without thinking things through to judge if it makes sen

Re: [PATCH] name-rev: Fix tag lookup on repository with mixed types of tags

2017-06-22 Thread Junio C Hamano
Orgad Shaneh writes: > Commit 7550424804 (name-rev: include taggerdate in considering the best > name) introduced a bug in name-rev. > > If a repository has both annotated and non-annotated tags, annotated > tag will always win, even if it was created decades after the commit. Thanks. It is a p

Re: your mail

2017-06-22 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 22 2017, Junio C. Hamano jotted: > Simon Ruderich writes: > >> On Thu, Jun 22, 2017 at 01:55:27PM +, Patrick Lehmann wrote: >>> The description on https://github.com/git/git doesn't reflect that policy. >>> >>> a) >>> It explains that discussions take place in the mentioned maili

Re: [PATCH 2/3] pack-objects: WIP add max-blob-size filtering

2017-06-22 Thread Jonathan Tan
On Thu, 22 Jun 2017 20:36:14 + Jeff Hostetler wrote: > +static signed long max_blob_size = -1; FYI Junio suggested "blob-max-bytes" when he looked at my patch [1]. [1] https://public-inbox.org/git/xmqqmv9ryoym@gitster.mtv.corp.google.com/ [snip] > +/* > + * Filter blobs by pathname or

Re: Truncating HEAD reflog on branch move

2017-06-22 Thread Jeff King
On Thu, Jun 22, 2017 at 01:32:44PM -0700, Junio C Hamano wrote: > I do not think command line parser does not allow "log -g > maint..master" so all the "limited" processing the remainder of > get_revision_1() does shouldn't matter. Yeah, I don't think negative endpoints work at all, and "foo...ba

Re: [PATCH 1/3] list-objects: add filter_blob to traverse_commit_list

2017-06-22 Thread Jonathan Tan
On Thu, 22 Jun 2017 20:36:13 + Jeff Hostetler wrote: > From: Jeff Hostetler > > In preparation for partial/sparse clone/fetch where the > server is allowed to omit large/all blobs from the packfile, > teach traverse_commit_list() to take a blob filter-proc that > controls when blobs are sho

[PATCH 0/3] wildmatch refactoring

2017-06-22 Thread Ævar Arnfjörð Bjarmason
The first patch here should be applied, but 2 & 3 trail along as RFCs to show where this is going. The RFC patches work, but I'm sure there'll be critiques of the interface / other suggestions, so they're being sent as RFC so Junio doesn't need to worry about picking them up / tracking them. This

[PATCH 1/3] wildmatch: remove unused wildopts parameter

2017-06-22 Thread Ævar Arnfjörð Bjarmason
Remove the unused wildopts placeholder struct from being passed to all wildmatch() invocations, or rather remove all the boilerplate NULL parameters. This parameter was added back in commit 9b3497cab9 ("wildmatch: rename constants and update prototype", 2013-01-01) as a placeholder for future use.

[RFC/PATCH 2/3] wildmatch: add interface for precompiling wildmatch() patterns

2017-06-22 Thread Ævar Arnfjörð Bjarmason
Add the scaffolding necessary for precompiling wildmatch() patterns. There is currently no point in doing this with the wildmatch() function we have now, since it can't make any use of precompiling the pattern. But adding this interface and making use of it will make it easy to refactor the wildm

[RFC/PATCH 3/3] wildmatch: make use of the interface for precompiling wildmatch() patterns

2017-06-22 Thread Ævar Arnfjörð Bjarmason
Make use of the batch wildmatch() interface. As noted in the comment here the main hot codepath is not being touched, but some other invocations where we repeatedly match the same glob against multiple strings have been migrated. Signed-off-by: Ævar Arnfjörð Bjarmason --- builtin/name-rev.c | 6

Re: your mail

2017-06-22 Thread Junio C Hamano
Simon Ruderich writes: > On Thu, Jun 22, 2017 at 01:55:27PM +, Patrick Lehmann wrote: >> The description on https://github.com/git/git doesn't reflect that policy. >> >> a) >> It explains that discussions take place in the mentioned mailing list. >> b) >> It describes how to subscribe. > > Ho

Re: [PATCHv2] submodules: overhaul documentation

2017-06-22 Thread Stefan Beller
On Thu, Jun 22, 2017 at 2:03 PM, Brandon Williams wrote: > On 06/22, Stefan Beller wrote: >> On Thu, Jun 22, 2017 at 1:20 PM, Junio C Hamano wrote: >> > Brandon Williams writes: >> > >> >> On 06/20, Stefan Beller wrote: >> >> ... >> >>> +The configuration of submodules >> >>> +--

Re: [PATCH 3/3] t1700: make sure split-index respects core.sharedrepository

2017-06-22 Thread Christian Couder
On Thu, Jun 22, 2017 at 10:25 PM, Junio C Hamano wrote: > Christian Couder writes: > >> We use "git config core.sharedrepository 0666" at the beginning of >> this test, so it will only apply to the shared index files that are >> created after that. >> >> Do you suggest that we test before setting

Re: [PATCHv2] submodules: overhaul documentation

2017-06-22 Thread Brandon Williams
On 06/22, Stefan Beller wrote: > On Thu, Jun 22, 2017 at 1:20 PM, Junio C Hamano wrote: > > Brandon Williams writes: > > > >> On 06/20, Stefan Beller wrote: > >> ... > >>> +The configuration of submodules > >>> +--- > >>> + > >>> +Submodule operations can be configured

[PATCHv3] submodules: overhaul documentation

2017-06-22 Thread Stefan Beller
This patch aims to detangle (a) the usage of `git-submodule` from (b) the concept of submodules and (c) how the actual implementation looks like, such as where they are configured and (d) what the best practices are. To do so, move the conceptual parts of the 'git-submodule' man page to a new man

Re: your mail

2017-06-22 Thread Simon Ruderich
On Thu, Jun 22, 2017 at 01:55:27PM +, Patrick Lehmann wrote: > The description on https://github.com/git/git doesn't reflect that policy. > > a) > It explains that discussions take place in the mentioned mailing list. > b) > It describes how to subscribe. However it doesn't say that you have t

Re: [PATCH] name-rev: Fix tag lookup on repository with mixed types of tags

2017-06-22 Thread Stefan Beller
On Thu, Jun 22, 2017 at 12:52 PM, wrote: > From: Orgad Shaneh > > Commit 7550424804 (name-rev: include taggerdate in considering the best > name) introduced a bug in name-rev. > > If a repository has both annotated and non-annotated tags, annotated > tag will always win, even if it was created d

[PATCH 1/3] list-objects: add filter_blob to traverse_commit_list

2017-06-22 Thread Jeff Hostetler
From: Jeff Hostetler In preparation for partial/sparse clone/fetch where the server is allowed to omit large/all blobs from the packfile, teach traverse_commit_list() to take a blob filter-proc that controls when blobs are shown and marked as SEEN. Normally, traverse_commit_list() always marks v

[PATCH 2/3] pack-objects: WIP add max-blob-size filtering

2017-06-22 Thread Jeff Hostetler
From: Jeff Hostetler Teach pack-objects command to accept --max-blob-size= argument and use a traverse_commit_list filter-proc to omit unwanted blobs from the resulting packfile. This filter-proc always includes special files matching ".git*" (such as ".gitignore") and blobs smaller than . is

[PATCH 0/3] WIP list-objects and pack-objects for partial clone

2017-06-22 Thread Jeff Hostetler
From: Jeff Hostetler This WIP is a follow up to earlier patches to teach pack-objects to omit large blobs from packfiles. This doesn't attempt to solve the whole end-to-end problem of partial/sparse clone/fetch or that of the client operating with missing blobs. This WIP is for now limited to b

[PATCH 3/3] pack-objects: add t5317 to test max-blob-size

2017-06-22 Thread Jeff Hostetler
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/t5317-pack-objects-blob-filtering.sh | 68 ++ 1 file changed, 68 insertions(+) create mode 100644 t/t5317-pack-objects-blob-filtering.sh diff --git a/t/t5317-pack-objects-blob-filtering.sh b/t/t5317-pack

Re: [PATCH v4 15/20] repository: add index_state to struct repo

2017-06-22 Thread Brandon Williams
On 06/22, Junio C Hamano wrote: > Brandon Williams writes: > > > struct repository { > > /* Environment */ > > @@ -49,6 +50,12 @@ struct repository { > > */ > > struct config_set *config; > > > > + /* > > +* Repository's in-memory index. > > +* 'repo_read_index()' can be

Re: Truncating HEAD reflog on branch move

2017-06-22 Thread Junio C Hamano
Jeff King writes: > So I'd be tempted to just ditch the whole thing and teach > get_revision_1() to just walk through the list of logs, rather than this > weird "add a pending commit and then try to figure out which reflog it > referred to". For instance, right now: > > git log -g HEAD $(git sy

Re: [PATCHv2] submodules: overhaul documentation

2017-06-22 Thread Stefan Beller
On Thu, Jun 22, 2017 at 1:20 PM, Junio C Hamano wrote: > Brandon Williams writes: > >> On 06/20, Stefan Beller wrote: >> ... >>> +The configuration of submodules >>> +--- >>> + >>> +Submodule operations can be configured using the following mechanisms >>> +(from highes

Re: [PATCH 3/3] t1700: make sure split-index respects core.sharedrepository

2017-06-22 Thread Junio C Hamano
Christian Couder writes: > We use "git config core.sharedrepository 0666" at the beginning of > this test, so it will only apply to the shared index files that are > created after that. > > Do you suggest that we test before setting core.sharedrepository that > the existing shared index files all

Re: Truncating HEAD reflog on branch move

2017-06-22 Thread Jeff King
On Thu, Jun 22, 2017 at 12:03:31PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > I don't think this is quite right, though. We've decremented "recno" > > after assigning the old pointer to "reflog". So in the existing code, > > "reflog" in that second conditional pointing to the _next_

Re: [PATCHv2] submodules: overhaul documentation

2017-06-22 Thread Junio C Hamano
Brandon Williams writes: > On 06/20, Stefan Beller wrote: > ... >> +The configuration of submodules >> +--- >> + >> +Submodule operations can be configured using the following mechanisms >> +(from highest to lowest precedence): >> + >> + * the command line for those co

Re: [PATCH 3/3] t1700: make sure split-index respects core.sharedrepository

2017-06-22 Thread Christian Couder
On Thu, Jun 22, 2017 at 9:53 PM, Junio C Hamano wrote: > Christian Couder writes: > >> Add a test to check that both the split-index file and the >> shared-index file are created using the right permissions >> when core.sharedrepository is set. >> >> Signed-off-by: Christian Couder >> --- >> t/

Re: [PATCH v4 15/20] repository: add index_state to struct repo

2017-06-22 Thread Junio C Hamano
Brandon Williams writes: > struct repository { > /* Environment */ > @@ -49,6 +50,12 @@ struct repository { >*/ > struct config_set *config; > > + /* > + * Repository's in-memory index. > + * 'repo_read_index()' can be used to populate 'index'. > + */ > +

Re: [PATCH 3/3] t1700: make sure split-index respects core.sharedrepository

2017-06-22 Thread Junio C Hamano
Christian Couder writes: > Add a test to check that both the split-index file and the > shared-index file are created using the right permissions > when core.sharedrepository is set. > > Signed-off-by: Christian Couder > --- > t/t1700-split-index.sh | 12 > 1 file changed, 12 inser

[PATCH] name-rev: Fix tag lookup on repository with mixed types of tags

2017-06-22 Thread orgads
From: Orgad Shaneh Commit 7550424804 (name-rev: include taggerdate in considering the best name) introduced a bug in name-rev. If a repository has both annotated and non-annotated tags, annotated tag will always win, even if it was created decades after the commit. Consider a repository that al

Re: [PATCH 2/3] t1301: move movebits() to test-lib-functions.sh

2017-06-22 Thread Junio C Hamano
Christian Couder writes: > As the movebits() function can be useful outside t1301, > let's move it into test-lib-functions.sh, and while at > it let's rename it test_movebits(). Good thinking, especially on the renaming.

Re: [PATCH 1/3] read-cache: use shared perms when writing shared index

2017-06-22 Thread Junio C Hamano
Christian Couder writes: > Since f6ecc62dbf (write_shared_index(): use tempfile module, 2015-08-10) > write_shared_index() has been using mks_tempfile() to create the > temporary file that will become the shared index. > > But even before that, it looks like the functions used to create this > fi

Re: [PATCH v4 00/20] repository object

2017-06-22 Thread Stefan Beller
On Thu, Jun 22, 2017 at 11:43 AM, Brandon Williams wrote: > As before you can find this series at: > https://github.com/bmwill/git/tree/repository-object > > Changes in v4: > > * Patch 11 is slightly different and turns off all path relocation when a > worktree is provided instead of just for th

[PATCH] name-rev: Fix tag lookup on repository with mixed types of tags

2017-06-22 Thread Orgad Shaneh
Commit 7550424804 (name-rev: include taggerdate in considering the best name) introduced a bug in name-rev. If a repository has both annotated and non-annotated tags, annotated tag will always win, even if it was created decades after the commit. Consider a repository that always used non-annotat

Re: [PATCH 0/5] Move unquote_path() from git-add--interactive.perl to Git.pm

2017-06-22 Thread Junio C Hamano
Thanks. I had some comments, mostly on the structure of the series, but overall it was a pleasant read that takes the code in the right direction.

Re: [PATCH 3/5] Git::unquote_path() throw an exception on bad path

2017-06-22 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > This is what the other routines in Git.pm do if there's an error. > > Signed-off-by: Phillip Wood > --- > perl/Git.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/perl/Git.pm b/perl/Git.pm > index > 889bf88cfcd34136

Re: [PATCH 1/5] Git.pm Add unquote_path()

2017-06-22 Thread Junio C Hamano
Phillip Wood writes: > Subject: Re: [PATCH 1/5] Git.pm Add unquote_path() Subject: [PATCH 1/5] Git.pm: add unquote_path() But I think it is more customary to remove the implementation in the other file and adjust the existing callers to call this new one in this same commit. And then in follow

Re: [PATCH/FINAL] Documentation/git-submodule: cleanup

2017-06-22 Thread Stefan Beller
On Thu, Jun 22, 2017 at 12:07 PM, Junio C Hamano wrote: > Kaartic Sivaraam writes: > >> The "add" section for 'git-submodule' is redundant in >> its description and the short synopsis line. Fix it. >> >> Remove the redundant mentioning of the 'repository' argument >> being mandatory. >> >> The te

Re: [PATCH/FINAL] Documentation/git-submodule: cleanup

2017-06-22 Thread Junio C Hamano
Kaartic Sivaraam writes: > The "add" section for 'git-submodule' is redundant in > its description and the short synopsis line. Fix it. > > Remove the redundant mentioning of the 'repository' argument > being mandatory. > > The text is hard to read because of back-references, so remove > those. >

Re: Truncating HEAD reflog on branch move

2017-06-22 Thread Junio C Hamano
Jeff King writes: > I don't think this is quite right, though. We've decremented "recno" > after assigning the old pointer to "reflog". So in the existing code, > "reflog" in that second conditional pointing to the _next_ entry (or > previous, really, since we are going in reverse order). > > So

[PATCH 3/3] t1700: make sure split-index respects core.sharedrepository

2017-06-22 Thread Christian Couder
Add a test to check that both the split-index file and the shared-index file are created using the right permissions when core.sharedrepository is set. Signed-off-by: Christian Couder --- t/t1700-split-index.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t1700-split-index

[PATCH 1/3] read-cache: use shared perms when writing shared index

2017-06-22 Thread Christian Couder
Since f6ecc62dbf (write_shared_index(): use tempfile module, 2015-08-10) write_shared_index() has been using mks_tempfile() to create the temporary file that will become the shared index. But even before that, it looks like the functions used to create this file didn't call adjust_shared_perm(), w

[PATCH 2/3] t1301: move movebits() to test-lib-functions.sh

2017-06-22 Thread Christian Couder
As the movebits() function can be useful outside t1301, let's move it into test-lib-functions.sh, and while at it let's rename it test_movebits(). Signed-off-by: Christian Couder --- t/t1301-shared-repo.sh | 18 +++--- t/test-lib-functions.sh | 5 + 2 files changed, 12 insertio

Re: [PATCHv2] submodules: overhaul documentation

2017-06-22 Thread Stefan Beller
>> + * the `.gitmodules` file inside the superproject. A project usually >> + includes this file to suggest defaults for the upstream collection >> + of repositories. > > I dislike this last point. Realistically we don't want this right? So > perhaps we shouldn't include it? Well, it describ

[PATCH v4 12/20] path: add repo_git_path and strbuf_repo_git_path

2017-06-22 Thread Brandon Williams
Introduce 'repo_git_path' and 'strbuf_repo_git_path' which take a repository struct and constructs a path into the repository's git directory. Signed-off-by: Brandon Williams --- path.c | 21 + path.h | 8 2 files changed, 29 insertions(+) diff --git a/path.c b/pat

  1   2   >