Re: [PATCH 6/7] rev-list: let traversal die when --missing is not in use

2019-04-05 Thread Taylor Blau
On Fri, Apr 05, 2019 at 02:41:11PM -0400, Jeff King wrote: > On Thu, Apr 04, 2019 at 08:37:54PM -0700, Taylor Blau wrote: > > > 3. have the traversal machinery communicate the failure to the caller, > > so that it can decide how to proceed without re-evaluting the object > > itself. > > >

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread Taylor Blau
On Fri, Apr 05, 2019 at 04:53:45PM -0400, Jeff King wrote: > On Fri, Apr 05, 2019 at 03:25:43PM -0400, Eric Sunshine wrote: > > > On Fri, Apr 5, 2019 at 2:24 PM Jeff King wrote: > > > On Fri, Apr 05, 2019 at 12:50:33PM +0200, SZEDER Gábor wrote: > > > > > + git cat-file commit $commit | > > > >

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread Taylor Blau
On Fri, Apr 05, 2019 at 02:24:12PM -0400, Jeff King wrote: > On Fri, Apr 05, 2019 at 12:50:33PM +0200, SZEDER Gábor wrote: > > > > +test_expect_failure 'traverse unexpected non-tree entry (seen)' ' > > > + test_must_fail git rev-list --objects $blob $broken_tree >output 2>&1 > > > > This test saves

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread Taylor Blau
Hi Peff, On Fri, Apr 05, 2019 at 02:31:42PM -0400, Jeff King wrote: > On Thu, Apr 04, 2019 at 08:37:44PM -0700, Taylor Blau wrote: > > > Let A be the object referenced with an unexpected type, and B be the > > object doing the referencing. Do the following: > > > > - test 'git rev-list --objects

Re: [PATCH] fixup! diff: batch fetching of missing blobs

2019-04-05 Thread Duy Nguyen
On Sat, Apr 6, 2019 at 12:09 AM Jonathan Tan wrote: > > This is a fixup on the tip of jt/batch-fetch-blobs-in-diff (571debe1d9). > > I don't know if Junio has already merged this branch to next (he marked > this as "Will merge to 'next'" in the "What's Cooking" email, but when I > fetched, it hasn

[PATCH 2/2] Documentation/git-svn: improve asciidoctor compatibility

2019-04-05 Thread Todd Zullinger
The second paragraph in the CONFIGURATION section intends to emphasize the word 'must' with bold type. Adjust the formatting slightly to provide similar results between asciidoc and asciidoctor. Signed-off-by: Todd Zullinger --- I debated changing 'must' from bold to italic in this hunk. There a

[PATCH 0/2] a few more minor asciidoc/tor formatting fixes

2019-04-05 Thread Todd Zullinger
Hi, Martin Ågren wrote: > On Fri, 5 Apr 2019 at 03:40, Todd Zullinger wrote: >> There are two other changes I've got queued locally. One in >> git-show-branch.txt removes the last use of {apostrophe}. >> Another in git-svn.txt is a bit of a work-around for a >> difference in the way asciidoc and

[PATCH 1/2] Documentation/git-show-branch: drop last use of {apostrophe}

2019-04-05 Thread Todd Zullinger
The {apostrophe} was needed at the time of a521845800 ("Documentation: remove stray backslash in show-branch discussion", 2010-08-20). All other uses of {apostrophe} were removed in 6cf378f0cb ("docs: stop using asciidoc no-inline-literal", 2012-04-26). Escape only the leading single-quote. This

Re: [PATCH v3 0/4] Progress display fixes

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 02:45:35AM +0200, SZEDER Gábor wrote: > This patch series fixes two progress display issues by breaking > progress bars longer than the width of the terminal and by properly > cleaning up the previously shown progress bar. > > Changes since v2, following Eric's and Peff's

Re: Feature request: Add --no-edit to git tag command

2019-04-05 Thread Jeff King
On Thu, Apr 04, 2019 at 08:56:16AM -0500, Robert Dailey wrote: > > I was thinking it was just the --no-edit fix. :) Even with the "--amend" > > thing, though, it's probably a little light for a 3-month-long GSoC > > project. :) > > I apologize for the confusion. I'm not fully aware of any per-opt

Re: [PATCH v2 0/2] Batch fetching of missing blobs in diff and show

2019-04-05 Thread Jeff King
On Fri, Mar 29, 2019 at 02:39:26PM -0700, Jonathan Tan wrote: > Thanks, everyone for the review. > > Changes from v1: > - used test_when_finished (Szeder) > - used flag to inhibit fetching of missing objects (Dscho) > - moved the prefetch so that it also works if we request rename >detecti

Exquisite Capital & Financing

2019-04-05 Thread Zap
I write to inform you about viable Business Proposal Zap Business Consultant

Re: [PATCH v2 1/2] sha1-file: support OBJECT_INFO_FOR_PREFETCH

2019-04-05 Thread Jeff King
On Fri, Mar 29, 2019 at 02:39:27PM -0700, Jonathan Tan wrote: > Teach oid_object_info_extended() to support a new flag that inhibits > fetching of missing objects. This is equivalent to setting > fetch_is_missing to 0, calling oid_object_info_extended(), then setting > fetch_if_missing to whatever

[PATCH v4 0/4] rebase: teach rebase --keep-base

2019-04-05 Thread Denton Liu
Hi all, I dug into it a little more and according to the bash 4.2->4.3 changelog, bbb. Fixed a bug that caused spurious DEL characters (\177) to appear in double-quoted expansion where the RHS is evaluated to the empty string. so, in particular, I've removed all of the '' from th

[PATCH v4 1/4] t3431: add rebase --fork-point tests

2019-04-05 Thread Denton Liu
Signed-off-by: Denton Liu --- t/t3431-rebase-fork-point.sh | 53 1 file changed, 53 insertions(+) create mode 100755 t/t3431-rebase-fork-point.sh diff --git a/t/t3431-rebase-fork-point.sh b/t/t3431-rebase-fork-point.sh new file mode 100755 index 00..

[PATCH v4 4/4] rebase: teach rebase --keep-base

2019-04-05 Thread Denton Liu
A common scenario is if a user is working on a topic branch and they wish to make some changes to intermediate commits or autosquash, they would run something such as git rebase -i --onto master... master in order to preserve the merge base. This is useful when contributing a patch series

[PATCH v4 2/4] t3432: test rebase fast-forward behavior

2019-04-05 Thread Denton Liu
When rebase is run on a branch that can be fast-forwarded, this should automatically be done. Create test to ensure this behavior happens. There is one case that currently does not pass. In the case where a feature and master have diverged, running "git rebase master... master" causes a full rebas

[PATCH v4 3/4] rebase: fast-forward --onto in more cases

2019-04-05 Thread Denton Liu
Before, when we had the following graph, A---B---C (master) \ D (side) running 'git rebase --onto master... master side' would result in D being always rebased, no matter what. However, the desired behavior is that rebase should notice that this is fast-forwardabl

[GSoC][RFC v3] Proposal: Improve consistency of sequencer commands

2019-04-05 Thread Rohit Ashiwal
Hiya Here is one more iteration of my draft proposal[1]. RFC. Thanks Rohit [1]: https://gist.github.com/r1walz/5588d11065d5231ee451c0136400610e -- >8 -- # Improve consistency of sequencer commands ## About Me ### Person

Re: [PATCH v3 1/4] t3431: add rebase --fork-point tests

2019-04-05 Thread SZEDER Gábor
On Fri, Apr 05, 2019 at 10:19:59PM +0200, Johannes Schindelin wrote: > Hi, > > On Fri, 5 Apr 2019, Johannes Schindelin wrote: > > > On Fri, 5 Apr 2019, Johannes Sixt wrote: > > > > > Am 05.04.19 um 19:25 schrieb Denton Liu: > > > > On Fri, Apr 05, 2019 at 04:55:37PM +0200, Johannes Schindelin wro

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 03:25:43PM -0400, Eric Sunshine wrote: > On Fri, Apr 5, 2019 at 2:24 PM Jeff King wrote: > > On Fri, Apr 05, 2019 at 12:50:33PM +0200, SZEDER Gábor wrote: > > > > + git cat-file commit $commit | > > > > + perl -lpe "/^author/ && print q(parent $blob)" \ > > > >

[PATCH] clone: send server options when using protocol v2

2019-04-05 Thread Jonathan Tan
Commit 5e3548ef16 ("fetch: send server options when using protocol v2", 2018-04-24) taught "fetch" the ability to send server options when using protocol v2, but not "clone". This ability is triggered by "-o" or "--server-option". Teach "clone" the same ability, except that because "clone" already

[PATCH/docs] make slash-rules more readable

2019-04-05 Thread Dr. Adam Nielsen
From: Adam Nielsen gitignore.txt: make slash-rules more readable Remove the addition `it is removed for the purpose of the following description` and make clear in which situations a trailing slash is used or not. Increase readability and make all paragraphs valid, even if they are not read i

Re: [PATCH v3 1/4] t3431: add rebase --fork-point tests

2019-04-05 Thread Johannes Schindelin
Hi, On Fri, 5 Apr 2019, Johannes Schindelin wrote: > On Fri, 5 Apr 2019, Johannes Sixt wrote: > > > Am 05.04.19 um 19:25 schrieb Denton Liu: > > > On Fri, Apr 05, 2019 at 04:55:37PM +0200, Johannes Schindelin wrote: > > >> On Mon, 1 Apr 2019, Denton Liu wrote: > > >>> +test_rebase() { > > >>> +

Re: [PATCH v2 05/13] midx: check both pack and index names for containment

2019-04-05 Thread René Scharfe
Am 05.04.2019 um 20:06 schrieb Jeff King: > A midx file (and the struct we parse from it) contains a list of all of > the covered packfiles, mentioned by their ".idx" names (e.g., > "pack-1234.idx", etc). And thus calls to midx_contains_pack() expect > callers to provide the idx name. > > This work

Re: [PATCH 05/12] http: simplify parsing of remote objects/info/packs

2019-04-05 Thread René Scharfe
Am 05.04.2019 um 20:11 schrieb Jeff King: > On Fri, Apr 05, 2019 at 12:41:27PM +0200, René Scharfe wrote: >> Parsing "P" and "pack-" together crosses logical token boundaries, >> but that I don't mind it here. > > Yeah, I was tempted to write: > > if (skip_prefix(data, "P ", &data) && > ski

Re: [PATCH] fixup! diff: batch fetching of missing blobs

2019-04-05 Thread Johannes Schindelin
Hi Jonathan, On Fri, 5 Apr 2019, Jonathan Tan wrote: > This is a fixup on the tip of jt/batch-fetch-blobs-in-diff (571debe1d9). > > I don't know if Junio has already merged this branch to next (he marked > this as "Will merge to 'next'" in the "What's Cooking" email, but when I > fetched, it hasn

Re: [PATCH v4 00/11] Many promisor remotes

2019-04-05 Thread Johannes Schindelin
Hi Junio, On Thu, 4 Apr 2019, Junio C Hamano wrote: > Christian Couder writes: > > > This path series is a follow up from the "remote odb" patch series > > that I sent last year, which were a follow up from previous > > series. See the links section for more information. > > When this topic gets

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread Eric Sunshine
On Fri, Apr 5, 2019 at 2:24 PM Jeff King wrote: > On Fri, Apr 05, 2019 at 12:50:33PM +0200, SZEDER Gábor wrote: > > > + git cat-file commit $commit | > > > + perl -lpe "/^author/ && print q(parent $blob)" \ > > > + >broken-commit && > > > Wouldn't a 'sed' one-liner suffice, s

Re: [PATCH v2 01/13] packfile.h: drop extern from function declarations

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 08:19:30PM +0100, Ramsay Jones wrote: > > /* global flag to enable extra checks when accessing packed objects */ > > -extern int do_check_packed_object_crc; > > +int do_check_packed_object_crc; > > ... removing this 'extern' on an int variable sends 'sparse' > into a fren

Re: [PATCH v2 01/13] packfile.h: drop extern from function declarations

2019-04-05 Thread Ramsay Jones
On 05/04/2019 19:03, Jeff King wrote: > As CodingGuidelines recommends, we do not need an "extern" when > declaring a public function. Let's drop these. Note that we leave the > extern on report_garbage(), as that is actually a function pointer, not > a function itself. Hmm, perhaps we need to

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 08:42:29PM +0200, SZEDER Gábor wrote: > > > Don't run git commands upstream of a pipe, because the pipe hides > > > their exit code. This applies to several other tests below as well. > > > > I disagree with that rule here. We're not testing "cat-file" in any > > meaningf

Re: [PATCH v3 1/4] t3431: add rebase --fork-point tests

2019-04-05 Thread Johannes Schindelin
Hi Hannes & Denton, On Fri, 5 Apr 2019, Johannes Sixt wrote: > Am 05.04.19 um 19:25 schrieb Denton Liu: > > On Fri, Apr 05, 2019 at 04:55:37PM +0200, Johannes Schindelin wrote: > >> On Mon, 1 Apr 2019, Denton Liu wrote: > >>> +test_rebase() { > >>> + expected="$1" && > >>> + shift && > >>> + tes

Re: [PATCH] asciidoctor-extensions: provide ``

2019-04-05 Thread Jeff King
On Thu, Apr 04, 2019 at 10:17:21PM -0400, Todd Zullinger wrote: > Elsewhere in this thread, Jeff made the very valid point > that we're probably wise to keep using the docbook/xmlto > chain as long as we're supporting both asciidoc and > asciidoctor. Unless it turns out that it's more work to > c

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread SZEDER Gábor
On Fri, Apr 05, 2019 at 02:24:12PM -0400, Jeff King wrote: > On Fri, Apr 05, 2019 at 12:50:33PM +0200, SZEDER Gábor wrote: > > > > +test_expect_failure 'traverse unexpected non-tree entry (seen)' ' > > > + test_must_fail git rev-list --objects $blob $broken_tree >output 2>&1 > > > > This test sav

Re: [PATCH 6/7] rev-list: let traversal die when --missing is not in use

2019-04-05 Thread Jeff King
On Thu, Apr 04, 2019 at 08:37:54PM -0700, Taylor Blau wrote: > 3. have the traversal machinery communicate the failure to the caller, > so that it can decide how to proceed without re-evaluting the object > itself. > > Of those, I think (3) is probably the best path forward. However, thi

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread Jeff King
On Thu, Apr 04, 2019 at 08:37:44PM -0700, Taylor Blau wrote: > Let A be the object referenced with an unexpected type, and B be the > object doing the referencing. Do the following: > > - test 'git rev-list --objects A B'. This causes A to be "cached", and > presents the above scenario. >

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 12:50:33PM +0200, SZEDER Gábor wrote: > > +test_expect_failure 'traverse unexpected non-tree entry (seen)' ' > > + test_must_fail git rev-list --objects $blob $broken_tree >output 2>&1 > > This test saves standard output and error, but doesn't look at them. I think we w

Re: [PATCH v2 0/13] a rabbit hole of update-server-info (and midx!) fixes

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 02:03:06PM -0400, Jeff King wrote: > Other than that, it's substantially the same as v1. I did move the > public declaration of pack_basename() to the patch where it is added, > rather than doing it later, which shows up in the range diff below. Sorry, two things I noticed

Re: [PATCH v2 09/13] server-info: simplify cleanup in parse_pack_def()

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 02:13:13PM -0400, Jeff King wrote: > Subject: server-info: simplify cleanup in parse_pack_def() > We have two exits from the function: either we jump to the out_stale > label or not. But in both exits we repeat our cleanup, and the only > difference is our return value. Let

[PATCH v2 10/13] server-info: use strbuf to read old info/packs file

2019-04-05 Thread Jeff King
This old code uses fgets with a fixed-size buffer. Let's use a strbuf instead, so we don't have to wonder if "1000" is big enough, or what happens if we see a long line. This also lets us drop our custom code to trim the newline. Probably nobody actually cares about the 1000-char limit (after all

[PATCH v2 12/13] server-info: drop objdirlen pointer arithmetic

2019-04-05 Thread Jeff King
When writing objects/info/packs, we use the basename of each pack (i.e., just the "pack-1234abcd.pack" part). We compute that manually by adding "objdirlen + 6" to the name. This _should_ work consistently, as we do not include non-local packs, meaning everything should be in $objdir/pack/. Before

[PATCH v2 11/13] server-info: drop nr_alloc struct member

2019-04-05 Thread Jeff King
We keep an array of struct pointers, with each one representing a single packfile. But for some reason there is a nr_alloc parameter inside each struct, which has never been used. This is probably cruft left over from development, where we might have wanted a nr_alloc to dynamically grow the list.

[PATCH v2 13/13] update_info_refs(): drop unused force parameter

2019-04-05 Thread Jeff King
Once upon a time the force flag meant something when writing info/refs, but it hasn't done anything since 60d0526aaa (Unoptimize info/refs creation., 2005-09-14). Signed-off-by: Jeff King --- server-info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-info.c b/se

Re: [PATCH v2 10/32] commit.c: add repo_get_commit_tree()

2019-04-05 Thread Johannes Schindelin
Hi Duy, On Fri, 5 Apr 2019, Duy Nguyen wrote: > On Fri, Apr 5, 2019 at 12:04 AM SZEDER Gábor wrote: > > > struct object_id *get_commit_tree_oid(const struct commit *); > > > > > > /* > > > diff --git a/contrib/coccinelle/commit.cocci > > > b/contrib/coccinelle/commit.cocci > > > index c49aa5

[PATCH v2 07/13] http: simplify parsing of remote objects/info/packs

2019-04-05 Thread Jeff King
We can use skip_prefix() and parse_oid_hex() to continuously increment our pointer, rather than dealing with magic numbers. This also fixes a few small shortcomings: - if we see a line with the right prefix, suffix, and length, i.e. matching /P pack-.{40}.pack\n/, we'll interpret the middle

[PATCH v2 09/13] server-info: simplify cleanup in parse_pack_def()

2019-04-05 Thread Jeff King
We have two exits from the function: either we jump to the out_stale label or not. But in both exits we repeat our cleanup, and the only difference is our return value. Let's just use a variable for the return value to avoid repeating ourselves. Signed-off-by: Jeff King --- server-info.c | 7 +++

[PATCH v2 08/13] server-info: fix blind pointer arithmetic

2019-04-05 Thread Jeff King
When we're writing out a new objects/info/packs file, we read back the old one to try to keep the ordering the same. When we see a line starting with "P", we expect "P pack-1234..." and blindly jump to "line + 2" to parse the pack name. If we saw a line with _just_ "P" and nothing else, we'd jump p

Re: [PATCH 05/12] http: simplify parsing of remote objects/info/packs

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 12:41:27PM +0200, René Scharfe wrote: > Am 05.04.2019 um 01:27 schrieb Jeff King: > > We can use skip_prefix() and parse_oid_hex() to continuously increment > > our pointer, rather than dealing with magic numbers. This also fixes a > > few small shortcomings: > > > > - if

[PATCH v2 06/13] packfile: fix pack basename computation

2019-04-05 Thread Jeff King
When we have a multi-pack-index that covers many packfiles, we try to avoid opening the .idx for those packfiles. To do that we feed the pack name to midx_contains_pack(). But that function wants to see only the basename, which we compute using strrchr() to find the final slash. But that leaves an

[PATCH v2 05/13] midx: check both pack and index names for containment

2019-04-05 Thread Jeff King
A midx file (and the struct we parse from it) contains a list of all of the covered packfiles, mentioned by their ".idx" names (e.g., "pack-1234.idx", etc). And thus calls to midx_contains_pack() expect callers to provide the idx name. This works for most of the calls, but the one in open_packed_g

[PATCH v2 04/13] t5319: drop useless --buffer from cat-file

2019-04-05 Thread Jeff King
The cat-file --buffer option is the default already when using --batch-all-objects. It doesn't hurt to specify it, but it's nice for the test scripts to model good usage. Signed-off-by: Jeff King --- t/t5319-multi-pack-index.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH v2 02/13] pack-revindex: open index if necessary

2019-04-05 Thread Jeff King
We can't create a pack revindex if we haven't actually looked at the index. Normally we would never get as far as creating a revindex without having already been looking in the pack, so this code never bothered to double-check that pack->index_data had been loaded. But with the new multi-pack-inde

[PATCH v2 03/13] t5319: fix bogus cat-file argument

2019-04-05 Thread Jeff King
There's no such argument as "--unsorted"; it's spelled "--unordered". But our test failed to notice that cat-file didn't run at all because: 1. It lost the exit code of git on the left-hand side of a pipe. 2. It was comparing two runs of the broken invocation with and without a particula

[PATCH v2 01/13] packfile.h: drop extern from function declarations

2019-04-05 Thread Jeff King
As CodingGuidelines recommends, we do not need an "extern" when declaring a public function. Let's drop these. Note that we leave the extern on report_garbage(), as that is actually a function pointer, not a function itself. Signed-off-by: Jeff King --- This is bumped to the front in v2 since we

[PATCH v2 0/13] a rabbit hole of update-server-info (and midx!) fixes

2019-04-05 Thread Jeff King
On Thu, Apr 04, 2019 at 07:21:04PM -0400, Jeff King wrote: > This patch series started with patch 12: I just wanted to drop the > unused "force" parameter from update_info_refs(). > [...] > And here we are. I present them here in reverse rabbit-hole order (which > is also roughly important fixes f

Re: [PATCH v3 1/4] t3431: add rebase --fork-point tests

2019-04-05 Thread Johannes Sixt
Am 05.04.19 um 19:25 schrieb Denton Liu: > On Fri, Apr 05, 2019 at 04:55:37PM +0200, Johannes Schindelin wrote: >> On Mon, 1 Apr 2019, Denton Liu wrote: >>> +test_rebase() { >>> + expected="$1" && >>> + shift && >>> + test_expect_success "git rebase $@" " >>> + git checkout master &

Re: [PATCH v3 1/4] t3431: add rebase --fork-point tests

2019-04-05 Thread Denton Liu
On Fri, Apr 05, 2019 at 04:55:37PM +0200, Johannes Schindelin wrote: > Hi Denton, > > On Mon, 1 Apr 2019, Denton Liu wrote: > > > diff --git a/t/t3431-rebase-fork-point.sh b/t/t3431-rebase-fork-point.sh > > new file mode 100755 > > index 00..8e2483b73e > > --- /dev/null > > +++ b/t/t3431-

[PATCH] fixup! diff: batch fetching of missing blobs

2019-04-05 Thread Jonathan Tan
This is a fixup on the tip of jt/batch-fetch-blobs-in-diff (571debe1d9). I don't know if Junio has already merged this branch to next (he marked this as "Will merge to 'next'" in the "What's Cooking" email, but when I fetched, it hasn't been merged yet). If he has, we can use this commit message:

[[GSoC][PATCH …]] In notes-merge.c updated notes_merge_commit()

2019-04-05 Thread UTKARSH RAI
Updated notes_merge_commit() by replacing readdir() ,opendir() apis by replacing them with dir_iterator_advance() and dir_iterator_begin() respectively. Signed-off-by: ur10 --- notes-merge.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/notes-merge

Re: [PATCH v3 00/15] Switch directory rename detection default

2019-04-05 Thread Jacob Keller
On Fri, Apr 5, 2019 at 8:03 AM Elijah Newren wrote: > > This series adds a new configuration option, merge.directoryRenames, > for setting how to make use of directory rename detection heuristics. > The default becomes "conflict", meaning that conflicts are reported > instead of silently moving pa

Re: Questions on GSoC 2019 Ideas

2019-04-05 Thread Matheus Tavares Bernardino
On Thu, Apr 4, 2019 at 4:56 AM Christian Couder wrote: > > Hi, > > On Thu, Apr 4, 2019 at 3:15 AM Matheus Tavares Bernardino > wrote: > > > > I've been studying the codebase and looking for older emails in the ML > > that discussed what I want to propose as my GSoC project. In > > particular, I f

[PATCH v3 00/15] Switch directory rename detection default

2019-04-05 Thread Elijah Newren
This series adds a new configuration option, merge.directoryRenames, for setting how to make use of directory rename detection heuristics. The default becomes "conflict", meaning that conflicts are reported instead of silently moving paths according to the heuristics. Also, even when merge.directo

[PATCH v3 05/15] merge-recursive: use 'ci' for rename_conflict_info variable name

2019-04-05 Thread Elijah Newren
We used a couple different names, but used 'ci' the most. Use the same variable name throughout for a little extra consistency. Signed-off-by: Elijah Newren --- merge-recursive.c | 41 ++--- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/merg

[PATCH v3 09/15] merge-recursive: track branch where rename occurred in rename struct

2019-04-05 Thread Elijah Newren
We previously tracked the branch associated with a rename in a separate field in rename_conflict_info, but since it is directly associated with the rename it makes more sense to move it into the rename struct. Signed-off-by: Elijah Newren --- merge-recursive.c | 113 +

[PATCH v3 10/15] merge-recursive: cleanup handle_rename_* function signatures

2019-04-05 Thread Elijah Newren
Instead of passing various bits and pieces of 'ci', just pass it directly. Signed-off-by: Elijah Newren --- merge-recursive.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index f85c276f35..ada1c19ed2 1

[PATCH v3 03/15] merge-recursive: rename diff_filespec 'one' to 'o'

2019-04-05 Thread Elijah Newren
In the previous commit, we noted that several places throughout merge recursive both had a reason to use 'o'; some for a merge_options struct, and others for a diff_filespec struct. Some places had both, forcing one of the two to be renamed, though the choice was inconsistent. Now that the merge_

[PATCH v3 07/15] merge-recursive: shrink rename_conflict_info

2019-04-05 Thread Elijah Newren
The rename_conflict_info struct used both a pair and a stage_data which were taken from a rename struct. Just use the original rename struct. This will also allow us to start making other simplifications to the code. Signed-off-by: Elijah Newren --- merge-recursive.c | 120 +++--

[PATCH v3 02/15] merge-recursive: rename merge_options argument from 'o' to 'opt'

2019-04-05 Thread Elijah Newren
The name 'o' was used for the merge_options struct pointer taken by many functions, but in a few places it was named 'opt'. Several functions that didn't need merge_options instead used 'o' for a diff_filespec argument or local. Some functions needed both an inconsistently either renamed the merg

[PATCH v3 08/15] merge-recursive: remove ren[12]_other fields from rename_conflict_info

2019-04-05 Thread Elijah Newren
The ren1_other and ren2_other fields were synthesized from information in ren1->src_entry and ren2->src_entry. Since we already have the necessary information in ren1 and ren2, just use those. Signed-off-by: Elijah Newren --- merge-recursive.c | 71 ++

[PATCH v3 12/15] t6043: fix copied test description to match its purpose

2019-04-05 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t6043-merge-rename-directories.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t6043-merge-rename-directories.sh b/t/t6043-merge-rename-directories.sh index 62c564707b..fe205be607 100755 --- a/t/t6043-merge-rename-directories.sh +++

[PATCH v3 01/15] Use 'unsigned short' for mode, like diff_filespec does

2019-04-05 Thread Elijah Newren
struct diff_filespec defines mode to be an 'unsigned short'. Several other places in the API which we'd like to interact with using a diff_filespec used a plain unsigned (or unsigned int). This caused problems when taking addresses, so switch to unsigned short. Signed-off-by: Elijah Newren ---

[PATCH v3 15/15] merge-recursive: switch directory rename detection default

2019-04-05 Thread Elijah Newren
When all of x/a, x/b, and x/c have moved to z/a, z/b, and z/c on one branch, there is a question about whether x/d added on a different branch should remain at x/d or appear at z/d when the two branches are merged. There are different possible viewpoints here: A) The file was placed at x/d; it'

[PATCH v3 06/15] merge-recursive: move some struct declarations together

2019-04-05 Thread Elijah Newren
These structs are related and reference each other, so move them together to make it easier for folks to determine what they hold and what their purpose is. Signed-off-by: Elijah Newren --- merge-recursive.c | 78 +++ 1 file changed, 39 insertions(+),

[PATCH v3 11/15] merge-recursive: switch from (oid,mode) pairs to a diff_filespec

2019-04-05 Thread Elijah Newren
There was a significant inconsistency in the various parts of the API used in merge-recursive; many places used a pair of (oid, mode) to track file version/contents, while other parts used a diff_filespec (which have an oid and mode embedded in it). This inconsistency caused lots of places to need

[PATCH v3 13/15] merge-recursive: track information associated with directory renames

2019-04-05 Thread Elijah Newren
Directory rename detection previously silently applied. In order to allow printing information about paths that changed or printing a conflict notification (and only doing so near other potential conflict messages associated with the paths), save this information inside the rename struct for later

[PATCH v3 04/15] merge-recursive: rename locals 'o' and 'a' to 'obuf' and 'abuf'

2019-04-05 Thread Elijah Newren
Since we want to replace oid,mode pairs with a single diff_filespec, we will soon want to be able to use the names 'o', 'a', and 'b' for the three different file versions. Rename some local variables in blob_unchanged() that would otherwise conflict. Signed-off-by: Elijah Newren --- merge-recur

[PATCH v3 14/15] merge-recursive: give callers of handle_content_merge() access to contents

2019-04-05 Thread Elijah Newren
Pass a merge_file_info struct to handle_content_merge() so that the callers can access the oid and mode of the result afterward. Signed-off-by: Elijah Newren --- merge-recursive.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/merge-re

Re: [PATCH v3 1/4] t3431: add rebase --fork-point tests

2019-04-05 Thread Johannes Schindelin
Hi Denton, On Mon, 1 Apr 2019, Denton Liu wrote: > diff --git a/t/t3431-rebase-fork-point.sh b/t/t3431-rebase-fork-point.sh > new file mode 100755 > index 00..8e2483b73e > --- /dev/null > +++ b/t/t3431-rebase-fork-point.sh > @@ -0,0 +1,53 @@ > +#!/bin/sh > +# > +# Copyright (c) 2019 Dento

Re: [PATCH v2 2/2] diff: batch fetching of missing blobs

2019-04-05 Thread Johannes Schindelin
Hi Jonathan, On Fri, 29 Mar 2019, Jonathan Tan wrote: > When running a command like "git show" or "git diff" in a partial clone, > batch all missing blobs to be fetched as one request. > > This is similar to c0c578b33c ("unpack-trees: batch fetching of missing > blobs", 2017-12-08), but for anoth

Re: [PATCH v2 1/2] sha1-file: support OBJECT_INFO_FOR_PREFETCH

2019-04-05 Thread Johannes Schindelin
Hi Jonathan, On Fri, 29 Mar 2019, Jonathan Tan wrote: > Teach oid_object_info_extended() to support a new flag that inhibits > fetching of missing objects. This is equivalent to setting > fetch_is_missing to 0, calling oid_object_info_extended(), then setting > fetch_if_missing to whatever it was

Re: [PATCH 04/12] packfile: check midx coverage with .idx rather than .pack

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 02:01:20PM +0200, SZEDER Gábor wrote: > > The tests don't notice because there's nothing about opening those .idx > > files that would cause us to give incorrect output. It's just a little > > slower. The new test checks this case by corrupting the covered .idx, > > and the

Re: [PATCH v2 2/2] diff: batch fetching of missing blobs

2019-04-05 Thread Johannes Schindelin
Hi, On Thu, 4 Apr 2019, SZEDER Gábor wrote: > On Fri, Mar 29, 2019 at 02:39:28PM -0700, Jonathan Tan wrote: > > diff --git a/t/t4067-diff-partial-clone.sh b/t/t4067-diff-partial-clone.sh > > new file mode 100755 > > index 00..349851be7d > > --- /dev/null > > +++ b/t/t4067-diff-partial-clo

Re: [PATCH 04/12] packfile: check midx coverage with .idx rather than .pack

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 09:21:25AM -0400, Jeff King wrote: > > ... which also means this open_pack_index() call isn't done anymore if > > there's no .midx file at all. You don't mention this change in the > > commit message; is it intended? > > Doh, thank you for catching that. I made that switc

Re: [PATCH 04/12] packfile: check midx coverage with .idx rather than .pack

2019-04-05 Thread Jeff King
On Fri, Apr 05, 2019 at 10:05:29AM +0200, René Scharfe wrote: > > @@ -486,15 +496,16 @@ static int open_packed_git_1(struct packed_git *p) > > ssize_t read_result; > > const unsigned hashsz = the_hash_algo->rawsz; > > > > - if (!p->index_data) { > > + if (!p->index_data && the_reposito

Re: [PATCH 04/12] packfile: check midx coverage with .idx rather than .pack

2019-04-05 Thread SZEDER Gábor
On Thu, Apr 04, 2019 at 07:25:46PM -0400, Jeff King wrote: > When we have a .midx that covers many packfiles, we try to avoid opening > the .idx for those packfiles. However, there are a few problems with the > filename comparison we use: > > - we ask midx_contains_pack() about the .pack name, n

Re: [PATCH v3 1/4] t3431: add rebase --fork-point tests

2019-04-05 Thread SZEDER Gábor
On Mon, Apr 01, 2019 at 01:51:57PM -0700, Denton Liu wrote: > Signed-off-by: Denton Liu > --- > t/t3431-rebase-fork-point.sh | 53 > 1 file changed, 53 insertions(+) > create mode 100755 t/t3431-rebase-fork-point.sh > > diff --git a/t/t3431-rebase-fork-point

Re: [PATCH 2/7] t: introduce tests for unexpected object types

2019-04-05 Thread SZEDER Gábor
On Thu, Apr 04, 2019 at 08:37:44PM -0700, Taylor Blau wrote: > diff --git a/t/t6102-rev-list-unexpected-objects.sh > b/t/t6102-rev-list-unexpected-objects.sh > new file mode 100755 > index 00..472b08528a > --- /dev/null > +++ b/t/t6102-rev-list-unexpected-objects.sh > @@ -0,0 +1,123 @@ > +

Re: [PATCH 05/12] http: simplify parsing of remote objects/info/packs

2019-04-05 Thread René Scharfe
Am 05.04.2019 um 01:27 schrieb Jeff King: > We can use skip_prefix() and parse_oid_hex() to continuously increment > our pointer, rather than dealing with magic numbers. This also fixes a > few small shortcomings: > > - if we see a 'P' line that does not match our expectations, we'll > leave

Re: [PATCH v1 0/2] minor asciidoc/tor formatting fixes

2019-04-05 Thread Martin Ågren
Hi Todd, On Fri, 5 Apr 2019 at 03:40, Todd Zullinger wrote: > > On Sat, 30 Mar 2019 at 19:30, Todd Zullinger wrote: > >> > >> Just chipping away at the remaining differences between asciidoc and > >> asciidoctor. > >> > >> Todd Zullinger (2): > >> Documentation/rev-list-options: wrap --date=

Re: [PATCH v2 2/2] diff: batch fetching of missing blobs

2019-04-05 Thread Duy Nguyen
On Sat, Mar 30, 2019 at 4:40 AM Jonathan Tan wrote: > > When running a command like "git show" or "git diff" in a partial clone, > batch all missing blobs to be fetched as one request. > > This is similar to c0c578b33c ("unpack-trees: batch fetching of missing > blobs", 2017-12-08), but for anothe

Re: [PATCH v2 10/32] commit.c: add repo_get_commit_tree()

2019-04-05 Thread Duy Nguyen
On Fri, Apr 5, 2019 at 12:04 AM SZEDER Gábor wrote: > > struct object_id *get_commit_tree_oid(const struct commit *); > > > > /* > > diff --git a/contrib/coccinelle/commit.cocci > > b/contrib/coccinelle/commit.cocci > > index c49aa558f0..f5bc639981 100644 > > --- a/contrib/coccinelle/commit.coc

Re: [PATCH v2 01/32] rebase: 'make coccicheck' cleanup

2019-04-05 Thread Duy Nguyen
On Fri, Apr 5, 2019 at 12:25 AM SZEDER Gábor wrote: > > On Wed, Apr 03, 2019 at 06:34:26PM +0700, Nguyễn Thái Ngọc Duy wrote: > > Signed-off-by: Nguyễn Thái Ngọc Duy > > --- > > builtin/rebase.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/builtin/rebase.c

Re: "commit --author=..." does not work if global email and name is not set

2019-04-05 Thread Junio C Hamano
On Fri, Apr 5, 2019 at 4:35 PM Piotr Krukowiecki wrote: > > Hi, > > I have a repo downloaded on machines which do automatic tests. > Sometimes I want to make a quick fix there and push back to origin. > Reading git-commit docs I had impression that I can use "--author=me" > and it will work. But i

Re: [PATCH 04/12] packfile: check midx coverage with .idx rather than .pack

2019-04-05 Thread René Scharfe
Am 05.04.2019 um 01:25 schrieb Jeff King: > When we have a .midx that covers many packfiles, we try to avoid opening > the .idx for those packfiles. However, there are a few problems with the > filename comparison we use: > >- we ask midx_contains_pack() about the .pack name, not the .idx name.

"commit --author=..." does not work if global email and name is not set

2019-04-05 Thread Piotr Krukowiecki
Hi, I have a repo downloaded on machines which do automatic tests. Sometimes I want to make a quick fix there and push back to origin. Reading git-commit docs I had impression that I can use "--author=me" and it will work. But it requires setting global user name and email: ==