[PATCH v5 8/9] fetch: document local ref updates with/without --force

2018-08-31 Thread Ævar Arnfjörð Bjarmason
is information using tables. In lieu of that, this is accurate, and fixes a big omission in the existing refspec docs. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/fetch-options.txt| 15 +- Documentation/pull-fetch-param.txt | 32 +-

[PATCH v5 9/9] fetch: stop clobbering existing tags without --force

2018-08-31 Thread Ævar Arnfjörð Bjarmason
re's any reason "fetch" couldn't fully converge with the behavior used by "push", but that's a topic for another change. One of the tests added in 31b808a032 ("clone --single: limit the fetch refspec to fetched branch", 2012-09-20) is being changed to use --force where a c

[PATCH v5 2/9] push tests: make use of unused $1 in test description

2018-08-31 Thread Ævar Arnfjörð Bjarmason
ng tag behavior", 2018-04-29). Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5516-fetch-push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 539c25aada..62d5059f92 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fet

[PATCH v5 3/9] push tests: use spaces in interpolated string

2018-08-31 Thread Ævar Arnfjörð Bjarmason
The quoted -m'msg' option would mean the same as -mmsg when passed through the test_force_push_tag helper. Let's instead use a string with spaces in it, to have a working example in case we need to pass other whitespace-delimited arguments to git-tag. Signed-off-by: Ævar Arnfjörð Bjarmason

[PATCH v5 4/9] fetch tests: add a test for clobbering tag behavior

2018-08-31 Thread Ævar Arnfjörð Bjarmason
The test suite only incidentally (and unintentionally) tested for the current behavior of eager tag clobbering on "fetch". This is a followup to 380efb65df ("push tests: assert re-pushing annotated tags", 2018-07-31) which tests for it explicitly. Signed-off-by: Ævar Arnfjö

[PATCH v5 5/9] push doc: remove confusing mention of remote merger

2018-08-31 Thread Ævar Arnfjörð Bjarmason
nd explanation of the use of + in git push refspecs.", 2009-02-19), as can be seen in that change the point of the example being cited was to show that force pushing can leave unreferenced commits on the remote. It's enough that we explain that in its own section, it doesn't need to be mentioned here.

[PATCH v5 0/9] git fetch" should not clobber existing tags without --force

2018-08-31 Thread Ævar Arnfjörð Bjarmason
t; 2: 28275baca2 push tests: make use of unused $1 in test description 2: 013ecd83b3 ! 3: 834501afdc push tests: correct quoting in interpolated string @@ -1,24 +1,11 @@ Author: Ævar Arnfjörð Bjarmason -push tests: correct quoting in interpolated string +

[PATCH v5 1/9] fetch: change "branch" to "reference" in --force -h output

2018-08-31 Thread Ævar Arnfjörð Bjarmason
initially introduced in 8320199873 ("Rewrite builtin-fetch option parsing to use parse_options().", 2007-12-04). Signed-off-by: Ævar Arnfjörð Bjarmason --- builtin/fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index

[PATCH v5 6/9] push doc: move mention of "tag " later in the prose

2018-08-31 Thread Ævar Arnfjörð Bjarmason
's now somewhere in the middle. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-push.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 83e499ee97..71c78ac1a4 100644 --- a/Documentation/git-pu

[PATCH v5 7/9] push doc: correct lies about how push refspecs work

2018-08-31 Thread Ævar Arnfjörð Bjarmason
t all), and that could be covered separately as an advanced topic. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-push.txt | 52 -- Documentation/gitrevisions.txt | 7 +++-- 2 files changed, 48 insertions(+), 11 deletions(-) diff --git a/Documentation/git

Re: [PATCH v4 4/6] push doc: correct lies about how push refspecs work

2018-08-31 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 31, 2018 at 6:24 PM Junio C Hamano wrote: > > Ævar Arnfjörð Bjarmason writes: > > > On Thu, Aug 30 2018, Ævar Arnfjörð Bjarmason wrote: > > > > [Notes to self] > > ... > > > > Later below this we say: > > > > Pushing an emp

Re: [PATCH 5/6] pack-bitmap: save "have" bitmap from walk

2018-08-31 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 21 2018, Jeff King wrote: > +int bitmap_has_sha1_in_uninteresting(struct bitmap_index *bitmap_git, > + const unsigned char *sha1) > +{ > + int pos; > + > + if (!bitmap_git) > + return 0; /* no bitmap loaded */ > + if

Re: Feature request: hooks directory

2018-08-31 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 31 2018, Wesley Schwengle wrote: > Hop, > > 2018-08-30 16:45 GMT+02:00 Ævar Arnfjörð Bjarmason : > >>> Solution: >>> We discussed this at work and we thought about making a .d directory >>> for the hooks, eg. $GIT_DIR/hooks/post-commit.d, w

Re: [PATCH] config.mak.uname: resolve FreeBSD iconv-related compilation warning

2018-08-31 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 31, 2018 at 11:52 AM Eric Sunshine wrote: > OLD_ICONV has long been needed by FreeBSD so config.mak.uname defines > it unconditionally. However, recent versions do not need it, and its > presence results in compilation warnings. Resolve this issue by defining > OLD_ICONV only for

Re: improved diff tool

2018-08-31 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Piers Titus van der Torren wrote: > Is there interest to incorporate this algorithm in the main git > codebase? And if so, any hints on how to proceed? This looks very nice, it would be great to have it in git. I think it's more useful to focus on getting it into the git C

Re: [PATCH 3/3] wt-status.c: Set the commitable flag in the collect phase.

2018-08-31 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 31 2018, Stephen P. Smith wrote: > In an update to fix a bug with "commit --dry-run" it was found that > the commitable flag was broken. The update was, at the time, > accepted as it was better than the previous version. What update is this? I.e. git.git commit id? See the "or

Re: [PATCH 2/3] Add test for commit --dry-run --short.

2018-08-31 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 31 2018, Stephen P. Smith wrote: > Add test for commit with --dry-run --short for a new file of zero > length. > > The test demonstrated that the setting of the commitable flag was > broken as was found durning an earlier patch review. > > Signed-off-by: Stephen P. Smith > --- >

Re: [PATCH 1/3] Change tests from expecting to fail to expecting success.

2018-08-31 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 31 2018, Stephen P. Smith wrote: > diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh > index 4cae92804..810d4cea7 100755 > --- a/t/t7501-commit.sh > +++ b/t/t7501-commit.sh > @@ -99,12 +99,12 @@ test_expect_success '--dry-run with stuff to commit > returns ok' ' > git commit

Re: [PATCH v4 4/6] push doc: correct lies about how push refspecs work

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Ævar Arnfjörð Bjarmason wrote: [Notes to self] > diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt > index 55277a9781..0f03d36f1e 100644 > --- a/Documentation/git-push.txt > +++ b/Documentation/git-push.txt > @@ -74,12 +74,41

Re: [GSoC][PATCH v8 00/20] Convert "git stash" to C builtin

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Paul-Sebastian Ungureanu wrote: > Hello, > > This a new iteration of `stash.c`. What is new? > > * Some commits got squashed. The commit related to replacing > `git apply` child process was dropped since it wasn't the best > idea. > > * In v7, there was a bug [1]

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Jeff King wrote: > On Thu, Aug 30, 2018 at 01:29:53PM -0700, Junio C Hamano wrote: > >> >> > I do not know if the documentation that is shipped in 2.20 should >> >> > talk about how the old world looked like, though. `-l` was a short >> >> > for `--create-reflog` is worth

[PATCH v4 6/6] fetch: stop clobbering existing tags without --force

2018-08-30 Thread Ævar Arnfjörð Bjarmason
re's any reason "fetch" couldn't fully converge with the behavior used by "push", but that's a topic for another change. One of the tests added in 31b808a032 ("clone --single: limit the fetch refspec to fetched branch", 2012-09-20) is being changed to use --force where a c

[PATCH v4 4/6] push doc: correct lies about how push refspecs work

2018-08-30 Thread Ævar Arnfjörð Bjarmason
t all), and that could be covered separately as an advanced topic. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/git-push.txt | 41 +- Documentation/gitrevisions.txt | 7 +++--- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/Documentation/git

[PATCH v4 5/6] fetch: document local ref updates with/without --force

2018-08-30 Thread Ævar Arnfjörð Bjarmason
is information using tables. In lieu of that, this is accurate, and fixes a big omission in the existing refspec docs. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/fetch-options.txt| 15 +- Documentation/pull-fetch-param.txt | 32 +-

[PATCH v4 3/6] fetch tests: add a test for clobbering tag behavior

2018-08-30 Thread Ævar Arnfjörð Bjarmason
The test suite only incidentally (and unintentionally) tested for the current behavior of eager tag clobbering on "fetch". This is a followup to 380efb65df ("push tests: assert re-pushing annotated tags", 2018-07-31) which tests for it explicitly. Signed-off-by: Ævar Arnfjö

[PATCH v4 2/6] push tests: correct quoting in interpolated string

2018-08-30 Thread Ævar Arnfjörð Bjarmason
right here with multiple backslashes, but I don't think it's worth it, and it makes things much less readable. 1. https://public-inbox.org/git/xmqq4lgfcn5a@gitster-ct.c.googlers.com/ 2. https://public-inbox.org/git/20180813192249.27585-1-ava...@gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmas

[PATCH v4 0/6] "git fetch" should not clobber existing tags without --force

2018-08-30 Thread Ævar Arnfjörð Bjarmason
Now that the tests for this have landed in master (in v3), and because I needed to rebase these for rolling out my own version based on v2.19.0-rc1, here's a re-roll which should address the (mostly doc) comments on the previous (v2) round. Ævar Arnfjörð Bjarmason (6): fetch: change "b

[PATCH v4 1/6] fetch: change "branch" to "reference" in --force -h output

2018-08-30 Thread Ævar Arnfjörð Bjarmason
initially introduced in 8320199873 ("Rewrite builtin-fetch option parsing to use parse_options().", 2007-12-04). Signed-off-by: Ævar Arnfjörð Bjarmason --- builtin/fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >>> +-l:: >>> --list:: >>> List branches. With optional `...`, e.g. `git >>> branch --list 'maint-*'`, list only the branches that match >> >>

Re: [PATCH v2 06/10] push doc: correct lies about how push refspecs work

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30, 2018 at 5:23 PM Junio C Hamano wrote: > > Ævar Arnfjörð Bjarmason writes: > > > I.e. the non-refs/{tags,heads}/* update logic treats all updates to > > tags/commits as branch updates. We just look at the tag v2.18.0, see you > > want to replace it

Re: [PATCH v2 06/10] push doc: correct lies about how push refspecs work

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Tue, Jul 31 2018, Junio C Hamano wrote: I'm finally getting to re-rolling this. Just some inline comments. > Ævar Arnfjörð Bjarmason writes: > >> The is often the name of the branch you would want to push, but >> -it can be any arbitrary "SHA-1 express

Re: Feature request: hooks directory

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Wesley Schwengle wrote: > Hello all, > > I would like to ask if it is worth my time looking into the following > solution to a problem we have at work. > > Problem: > We want to have some git-hooks and we want to provide them to the > user. In a most recent example we have

Re: Trivial enhancement: All commands which require an author should accept --author

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Johannes Schindelin wrote: > Hi Junio, > > On Wed, 29 Aug 2018, Junio C Hamano wrote: > >> Johannes Schindelin writes: >> >> > The `stash` command only incidentally requires that the author is set, as >> > it calls `git commit` internally (which records the author). As

Re: Git in Outreachy Dec-Mar?

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Jeff King wrote: > On Wed, Aug 29, 2018 at 03:12:37PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> > 2. To get our landing page and list of projects in order (and also >> > micro-projects for applicants). This can probably build on the

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Fri, Jun 22 2018, Jeff King wrote: > diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt > index 1072ca0eb6..fc88e984e1 100644 > --- a/Documentation/git-branch.txt > +++ b/Documentation/git-branch.txt > @@ -100,8 +100,6 @@ OPTIONS > The negated form

Re: How is the ^{sha256} peel syntax supposed to work?

2018-08-29 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 29 2018, Jonathan Nieder wrote: > Hi, > > Ævar Arnfjörð Bjarmason wrote: >> On Wed, Aug 29 2018, Jonathan Nieder wrote: > >>> what objects would you expect the following to refer to? >>> >>> abcdabcd^{sha1} >>> abcdabcd

Re: How is the ^{sha256} peel syntax supposed to work?

2018-08-29 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 29 2018, Jonathan Nieder wrote: > Stefan Beller wrote: > >> And with that model, ^{sha256}^{tree} >> could mean to obtain the sha256 value of and then derive >> the tree from that object, > > What does "the sha256 value of " mean? > > For example, in a repository

Re: Thank you for public-inbox!

2018-08-29 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 29 2018, Andrei Rybak wrote: > On 2018-08-29 12:02, Eric Wong wrote: >> Anyways I hope to teach public-inbox to auto-linkify Message-ID-looking >> strings "" into URLs for domain-portability, >> (but it's ambiguous with email addresses). But yeah, I don't >> like things being tied

Re: Git in Outreachy Dec-Mar?

2018-08-29 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 28 2018, Jeff King wrote: > The Outreachy application period is set to begin on September 10th for > interns participating in the December-March program. Do we want to > participate? > > Details on the program are here: > > https://www.outreachy.org/communities/cfp/ > > If we want

Re: [RFC PATCH 00/12] Base SHA-256 algorithm implementation

2018-08-29 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 29 2018, brian m. carlson wrote: > If libgit2 would like to import this SHA-256 implementation, they're > welcome to do so under their normal license terms. If not, that's fine, > too. For them and anyone else interested in such re-use, can you elaborate on which parts? It seems

Re: [RFC PATCH 09/12] Add a base implementation of SHA-256 support

2018-08-29 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 29 2018, brian m. carlson wrote: > SHA-1 is weak and we need to transition to a new hash function. For > some time, we have referred to this new function as NewHash. > > The selection criteria for NewHash specify that it should (a) be 256 > bits in length, (b) have high quality

How is the ^{sha256} peel syntax supposed to work?

2018-08-29 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 24 2018, Jonathan Nieder wrote: > Hi, > > Ævar Arnfjörð Bjarmason wrote: > >>> git --output-format=sha1 log abac87a^{sha1}..f787cac^{sha256} >> >> How is this going to interact with other peel syntax? I.e. now we have >> ^{commit} ^{tag} et

Re: [RFC PATCH 10/12] sha256: add an SHA-256 implementation using libgcrypt

2018-08-29 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 29 2018, brian m. carlson wrote: > Generally, one gets better performance out of cryptographic routines > written in assembly than C, and this is also true for SHA-256 It makes sense to have a libgcrypt implementation... > In addition, most Linux distributions cannot distribute

Re: [PATCH v4 4/6] tests: use shorter here-docs in chainlint.sed for AIX sed

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 24 2018, Eric Sunshine wrote: > On Fri, Aug 24, 2018 at 11:20 AM Ævar Arnfjörð Bjarmason > wrote: >> Improve the portability of chainlint by using shorter here-docs. On >> AIX sed will complain about: >> >> sed: 0602-417 The label :h

[PATCH 1/2] tests: fix non-portable "${var:-"str"}" construct

2018-08-28 Thread Ævar Arnfjörð Bjarmason
89 ("t4013: test new output from diff --abbrev --raw", 2017-12-03) first released with Git v2.16.0. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t4013-diff-various.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index

[PATCH 0/2] FreeBSD & AIX test portability fixes

2018-08-28 Thread Ævar Arnfjörð Bjarmason
This makes the vanilla test suite pass without errors on the FreeBSD system noted in the commit messages. On AIX things are still horribly broken, but this fixes one more issue that also affects that system. Ævar Arnfjörð Bjarmason (2): tests: fix non-portable "${var:-"str"}&quo

[PATCH 2/2] tests: fix non-portable iconv invocation

2018-08-28 Thread Ævar Arnfjörð Bjarmason
hat checks for its availability. The iconv command is in POSIX, and we have numerous tests unconditionally relying on its ability to convert ASCII, UTF-8 and UTF-16, but unconditionally relying on the presence of more obscure encodings isn't portable. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t00

Re: Questions about the hash function transition

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 28 2018, Edward Thomson wrote: > On Tue, Aug 28, 2018 at 2:50 PM, Ævar Arnfjörð Bjarmason > wrote: >> If we instead had something like clean/smudge filters: >> >> [extensions] >> objectFilter = sha256-to-sha1 >> compatObje

Re: Questions about the hash function transition

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23 2018, Ævar Arnfjörð Bjarmason wrote: >> Transition plan >> --- > > One thing that's not covered in this document at all, which I feel is > missing, is how we're going to handle references to old commit IDs in > commit messages, bug trackers

Re: A rebase regression in Git 2.18.0

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 28 2018, Nikolay Kasyanov wrote: > Hi, > > I’ve found something that may be a regression in git rebase implementation in > 2.18.0. > First I spotted it on macOS but I can also confirm it happening on Linux. > Git 2.19.0.rc0.48.gb9dfa238d is affected too. > > In order to trigger it,

[PATCH v4 1/8] fsck tests: setup of bogus commit object

2018-08-28 Thread Ævar Arnfjörð Bjarmason
Several fsck tests used the exact same git-hash-object output, but had copy/pasted that part of the setup code. Let's instead do that setup once and use it in subsequent tests. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5504-fetch-receive-strict.sh | 8 1 file changed, 4 insertions

[PATCH v4 6/8] fsck: use strbuf_getline() to read skiplist file

2018-08-28 Thread Ævar Arnfjörð Bjarmason
1450.15: fsck with 10 skipped bad commits8.01(7.60+0.41) 8.08(7.70+0.38) +0.9% 1450.17: fsck with 100 skipped bad commits 7.60(7.10+0.50) 7.37(7.18+0.19) -3.0% Helped-by: Jeff King Signed-off-by: Rene Scharfe Signed-off-by: Ævar Arnfjörð Bjarmason -

[PATCH v4 7/8] fsck: use oidset instead of oid_array for skipList

2018-08-28 Thread Ævar Arnfjörð Bjarmason
.43+0.41) -1.6% 1450.17: fsck with 100 skipped bad commits 7.72(7.22+0.50) 7.28(7.07+0.20) -5.7% 7.13(6.87+0.25) -7.6% Helped-by: Ævar Arnfjörð Bjarmason Signed-off-by: Rene Scharfe Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config.txt | 11 +

[PATCH v4 3/8] fsck: document and test sorted skipList input

2018-08-28 Thread Ævar Arnfjörð Bjarmason
self reading the new docs can see this never needed to be sorted ("why do I have all this code to sort this thing..."). Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config.txt| 10 +- t/t5504-fetch-receive-strict.sh | 19 +++ 2 files changed

[PATCH v4 2/8] fsck tests: add a test for no skipList input

2018-08-28 Thread Ævar Arnfjörð Bjarmason
exit code. Add such a test. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5504-fetch-receive-strict.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh index 6d268f3327..cbae31f330 100755 --- a/t/t5504-fetch-receive-strict.

[PATCH v4 8/8] fsck: support comments & empty lines in skipList

2018-08-28 Thread Ævar Arnfjörð Bjarmason
ad commits 7.87(7.47+0.40) 7.86(7.46+0.40) -0.1% 1450.15: fsck with 10 skipped bad commits7.77(7.39+0.38) 7.83(7.48+0.34) +0.8% 1450.17: fsck with 100 skipped bad commits 7.17(6.92+0.24) 7.11(6.85+0.26) -0.8% Signed-off-by: Ævar Arnfjörð Bjarmason --- Doc

[PATCH v4 0/8] use oidset for skiplist + docs + tests + comment support

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote: > On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote: > Does that just mean that when cloning with --recursive with > transfer.fsckObjects=true we'll re-read the file for each "clone" > invocation, both for the main project

[PATCH v4 5/8] fsck: add a performance test for skipList

2018-08-28 Thread Ævar Arnfjörð Bjarmason
Scharfe Signed-off-by: Ævar Arnfjörð Bjarmason --- t/perf/p1450-fsck-skip-list.sh | 40 ++ 1 file changed, 40 insertions(+) create mode 100755 t/perf/p1450-fsck-skip-list.sh diff --git a/t/perf/p1450-fsck-skip-list.sh b/t/perf/p1450-fsck-skip-list.sh new file

[PATCH v4 4/8] fsck: document and test commented & empty line skipList input

2018-08-28 Thread Ævar Arnfjörð Bjarmason
of the next line, and then go into uninitialized memory. This is fixed in a subsequent change. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config.txt| 11 +++ t/t5504-fetch-receive-strict.sh | 21 + 2 files changed, 28 insertions(+), 4 deletions

Re: Would a config var for --force-with-lease be useful?

2018-08-27 Thread Ævar Arnfjörð Bjarmason
On Mon, Aug 27 2018, Junio C Hamano wrote: [Scott, I hope you're still with us despite your recent attempt to unsubscribe from git@ :)] > Ævar Arnfjörð Bjarmason writes: > >> This was after/during a long discussion starting with: >> https://public-inbox.org/git/cac

Re: [PATCH v3 6/7] fsck: use oidset for skiplist

2018-08-27 Thread Ævar Arnfjörð Bjarmason
On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote: > From: René Scharfe > > Object IDs to skip are stored in a shared static oid_array. Lookups do > a binary search on the sorted array. The code checks if the object IDs > are already in the correct order while loading an

Re: [PATCH v3 0/7] use oidset for skiplist + docs + tests + comment support

2018-08-27 Thread Ævar Arnfjörð Bjarmason
On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote: > On Mon, Aug 27 2018, René Scharfe wrote: > >> Am 27.08.2018 um 09:37 schrieb Ævar Arnfjörð Bjarmason: >>> >>> On Sat, Aug 25 2018, René Scharfe wrote: >>> [...] >>> Now, I like yours much bett

[PATCH v3 0/7] use oidset for skiplist + docs + tests + comment support

2018-08-27 Thread Ævar Arnfjörð Bjarmason
On Mon, Aug 27 2018, René Scharfe wrote: > Am 27.08.2018 um 09:37 schrieb Ævar Arnfjörð Bjarmason: >> >> On Sat, Aug 25 2018, René Scharfe wrote: >> [...] >> Now, I like yours much better. I'm just saying that currently the >> patch/commit message combo is con

[PATCH v3 1/7] fsck tests: setup of bogus commit object

2018-08-27 Thread Ævar Arnfjörð Bjarmason
Several fsck tests used the exact same git-hash-object output, but had copy/pasted that part of the setup code. Let's instead do that setup once and use it in subsequent tests. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5504-fetch-receive-strict.sh | 8 1 file changed, 4 insertions

[PATCH v3 3/7] fsck: document and test sorted skipList input

2018-08-27 Thread Ævar Arnfjörð Bjarmason
self reading the new docs can see this never needed to be sorted ("why do I have all this code to sort this thing..."). Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config.txt| 10 +- t/t5504-fetch-receive-strict.sh | 19 +++ 2 files changed

[PATCH v3 2/7] fsck tests: add a test for no skipList input

2018-08-27 Thread Ævar Arnfjörð Bjarmason
exit code. Add such a test. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t5504-fetch-receive-strict.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh index 6d268f3327..cbae31f330 100755 --- a/t/t5504-fetch-receive-strict.

[PATCH v3 5/7] fsck: use strbuf_getline() to read skiplist file

2018-08-27 Thread Ævar Arnfjörð Bjarmason
without a newline after the last line, supports any hash length automatically, and is shorter. Helped-by: Jeff King Signed-off-by: Rene Scharfe Signed-off-by: Ævar Arnfjörð Bjarmason --- fsck.c | 25 - t/t5504-fetch-receive-strict.sh | 2 +- 2

[PATCH v3 7/7] fsck: support comments & empty lines in skipList

2018-08-27 Thread Ævar Arnfjörð Bjarmason
ion of Git this was changed in, since this on-disk format can be expected to be used by multiple versions of git. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config.txt| 4 ++-- fsck.c | 2 ++ t/t5504-fetch-receive-strict.sh | 6 +++--- 3 files changed, 7

[PATCH v3 6/7] fsck: use oidset for skiplist

2018-08-27 Thread Ævar Arnfjörð Bjarmason
indirection. Performance on repositories with a low number of reported issues and .gitmodules files (i.e. the usual case) won't be affected much. The oidset should be a bit quicker with higher numbers of bad objects in the skipList. Helped-by: Ævar Arnfjörð Bjarmason Signed-off-by: Rene Scharfe

[PATCH v3 4/7] fsck: document and test commented & empty line skipList input

2018-08-27 Thread Ævar Arnfjörð Bjarmason
of the next line, and then go into uninitialized memory. This is fixed in a subsequent change. Signed-off-by: Ævar Arnfjörð Bjarmason --- Documentation/config.txt| 11 +++ t/t5504-fetch-receive-strict.sh | 21 + 2 files changed, 28 insertions(+), 4 deletions

Re: Would a config var for --force-with-lease be useful?

2018-08-27 Thread Ævar Arnfjörð Bjarmason
On Mon, Aug 27 2018, Junio C Hamano wrote: > Scott Johnson writes: > >> Hello Everyone: >> >> I'm considering writing a patch that adds a configuration variable >> that will allow the user to default the command: >> >> git push --force >> >> to: >> >> git push --force-with-lease > > I actually

Re: [PATCH v2 2/2] fsck: use oidset for skiplist

2018-08-27 Thread Ævar Arnfjörð Bjarmason
On Sat, Aug 25 2018, René Scharfe wrote: > diff --git a/Documentation/config.txt b/Documentation/config.txt > index 2fa65b7516..80ab570579 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -1715,7 +1715,7 @@ doing the same for `receive.fsck.` and > `fetch.fsck.` >

[PATCH v4 2/6] tests: fix and add lint for non-portable seq

2018-08-24 Thread Ævar Arnfjörð Bjarmason
add a check to "make test-lint". The regex is aiming to capture the likes of $(seq ..) and "seq" as a stand-alone command, without capturing some existing cases where we e.g. have files called "seq", as \bseq\b would do. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/

[PATCH v4 5/6] tests: fix version-specific portability issue in Perl JSON

2018-08-24 Thread Ævar Arnfjörð Bjarmason
behavior of this test still looks odd to me. Why implement our own ad-hoc encoder just for some one-off test, as opposed to say Perl's own Data::Dumper with Sortkeys et al? But with this change it works, so let's leave it be. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t0019/parse_js

[PATCH v4 0/6] OpenBSD & AIX etc. portability fixes

2018-08-24 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23 2018, Eric Sunshine wrote: > On Thu, Aug 23, 2018 at 4:36 PM Ævar Arnfjörð Bjarmason > wrote: >> As noted in [1] there's still a remaining recently introduced >> portability issue also introduced in 878f988350 ("t/test-lib: teach >> --chain-li

[PATCH v4 1/6] tests: fix and add lint for non-portable head -c N

2018-08-24 Thread Ævar Arnfjörð Bjarmason
practice, but it's easier to just use the wrapper than introduce some exception for the "make test-lint" check being added here. 1. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html 2. https://github.com/openbsd/ports/commit/08d5d82eaefe5cf2f125ecc0c6a57df9cf91350c#diff-

[PATCH v4 4/6] tests: use shorter here-docs in chainlint.sed for AIX sed

2018-08-24 Thread Ævar Arnfjörð Bjarmason
on AIX without issues, and the "gmake check-chainlint" test also passes. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/chainlint.sed | 56 - 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/t/chainlint.sed b/t/chainlint

[PATCH v4 6/6] tests: fix and add lint for non-portable grep --file

2018-08-24 Thread Ævar Arnfjörð Bjarmason
/grep.html Signed-off-by: Ævar Arnfjörð Bjarmason --- t/check-non-portable-shell.pl | 1 + t/t5318-commit-graph.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl index 75f38298d7..b45bdac688 100755 --- a/t

[PATCH v4 3/6] tests: fix comment syntax in chainlint.sed for AIX sed

2018-08-24 Thread Ævar Arnfjörð Bjarmason
Change a comment in chainlint.sed to appease AIX sed, which would previously print this error: sed:# stash for later printing is not a recognized function 1. https://public-inbox.org/git/CAPig+cTTbU5HFMKgNyrxTp3+kcK46-Fn=4zh6zdt1oqchac...@mail.gmail.com/ Signed-off-by: Ævar Arnfjörð

Re: clone, hardlinks, and file modes (and CAP_FOWNER)

2018-08-24 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 24 2018, Andreas Krey wrote: > I'm currently looking into more aggressively sharing space between multiple > repositories, > and into getting them to share again after one did a repack (which costs us > 15G space). > > One thing I stumbled on is the

Re: [PATCH v4 0/9] Make submodules work if .gitmodules is not checked out

2018-08-24 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 24 2018, Antonio Ospite wrote: > this series teaches git to try and read the .gitmodules file from the > index (:.gitmodules) and the current branch (HEAD:.gitmodules) when it > is not readily available in the working tree. FWIW I didn't read any of the earlier series's, and I'm

Re: [PATCH v4 1/9] submodule: add a print_config_from_gitmodules() helper

2018-08-24 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 24 2018, Antonio Ospite wrote: > Add a new print_config_from_gitmodules() helper function to print values > from .gitmodules just like "git config -f .gitmodules" would. > > This will be used by a new submodule--helper subcommand to be able to > access the .gitmodules file in a more

Re: [ANNOUNCE] Git v2.19.0-rc0

2018-08-24 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 24 2018, Jeff King wrote: > On Thu, Aug 23, 2018 at 04:59:27PM -0400, Derrick Stolee wrote: > >> Using git/git: >> >> Test v2.18.0 v2.19.0-rc0 HEAD >> - >> 0001.2: 3.10(3.02+0.08) 3.27(3.17+0.09) +5.5%

[PATCH v3 1/5] tests: fix and add lint for non-portable head -c N

2018-08-23 Thread Ævar Arnfjörð Bjarmason
practice, but it's easier to just use the wrapper than introduce some exception for the "make test-lint" check being added here. 1. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html 2. https://github.com/openbsd/ports/commit/08d5d82eaefe5cf2f125ecc0c6a57df9cf91350c#diff-

[PATCH v3 3/5] tests: use shorter here-docs in chainlint.sed for AIX sed

2018-08-23 Thread Ævar Arnfjörð Bjarmason
blic-inbox.org/git/871sapezba@evledraar.gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason --- t/chainlint.sed | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/chainlint.sed b/t/chainlint.sed index 8544df38df..2333705b27 100644 --- a/t/chainlint.sed +++ b/t/chainlint.se

[PATCH v3 4/5] tests: fix version-specific portability issue in Perl JSON

2018-08-23 Thread Ævar Arnfjörð Bjarmason
behavior of this test still looks odd to me. Why implement our own ad-hoc encoder just for some one-off test, as opposed to say Perl's own Data::Dumper with Sortkeys et al? But with this change it works, so let's leave it be. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t0019/parse_js

[PATCH v3 2/5] tests: fix and add lint for non-portable seq

2018-08-23 Thread Ævar Arnfjörð Bjarmason
add a check to "make test-lint". The regex is aiming to capture the likes of $(seq ..) and "seq" as a stand-alone command, without capturing some existing cases where we e.g. have files called "seq", as \bseq\b would do. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/

[PATCH v3 0/5] OpenBSD & AIX etc. portability fixes

2018-08-23 Thread Ævar Arnfjörð Bjarmason
This grew a bit more. I'm going to stop poking at this for now. The tests are still broken on OpenBSD (3-5 broken) and on AIX something like 20-30 are broken, but this makes it slightly better. Ævar Arnfjörð Bjarmason (5): tests: fix and add lint for non-portable head -c N tests: fix and add

[PATCH v3 5/5] tests: fix and add lint for non-portable grep --file

2018-08-23 Thread Ævar Arnfjörð Bjarmason
/grep.html Signed-off-by: Ævar Arnfjörð Bjarmason --- t/check-non-portable-shell.pl | 1 + t/t5318-commit-graph.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl index 75f38298d7..b45bdac688 100755 --- a/t

Re: [PATCH v2 01/10] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

2018-08-23 Thread Ævar Arnfjörð Bjarmason
On Wed, Jul 11 2018, Eric Sunshine wrote: Found in some 2.19 testing on AIX: > +# here-doc -- swallow it to avoid false hits within its body (but keep the > +# command to which it was attached) > +/<<[ ]*[-\\]*EOF[]*/ { > + s/[ ]*<<[ ]*[-\\]*EOF// > + h > +

Re: [PATCH] tests: fix and add lint for non-portable head -c N

2018-08-23 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Junio: Even though this isn't a 2.19.0-rc0 regression I think it makes >> sense for 2.19.0. The fix is trivial, and it'll unbreak (at least some >> of) the tests on stock git on OpenBS

Re: [PATCH v2 2/2] tests: fix and add lint for non-portable seq

2018-08-23 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> GNU seq is not a POSIX command, and doesn't exist on > > s/GNU //; the command did not even originate there, but came from V8 > and/or Plan9 IIRC. > >> e.g. OpenBSD. We've

[PATCH v2 1/2] tests: fix and add lint for non-portable head -c N

2018-08-23 Thread Ævar Arnfjörð Bjarmason
practice, but it's easier to just use the wrapper than introduce some exception for the "make test-lint" check being added here. 1. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html 2. https://github.com/openbsd/ports/commit/08d5d82eaefe5cf2f125ecc0c6a57df9cf91350c#diff-

[PATCH v2 2/2] tests: fix and add lint for non-portable seq

2018-08-23 Thread Ævar Arnfjörð Bjarmason
add a check to "make test-lint". The regex is aiming to capture the likes of $(seq ..) and "seq" as a stand-alone command, without capturing some existing cases where we e.g. have files called "seq". Signed-off-by: Ævar Arnfjörð Bjarmason --- Now with a fix & che

Re: Questions about the hash function transition

2018-08-23 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >>> - The trailer consists of the following: >>> - A copy of the 20-byte SHA-256 checksum at the end of the >>> corresponding packfile. >>> >>> - 20-byte

Re: [PATCH v2 1/1] t2024: mark a `checkout -p` test as requiring Perl

2018-08-23 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23 2018, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > A recently-added test case tries to verify that the output of `checkout > -p` contains a certain piece of advice. > > But if Git was built without Perl and therefore lacks support for `git > add

Questions about the hash function transition

2018-08-23 Thread Ævar Arnfjörð Bjarmason
I wanted to send another series to clarify things in hash-function-transition.txt, but for some of the issues I don't know the answer, and I had some questions after giving this another read. So let's discuss that here first. Quoting from the document (available at

Test failures on OpenBSD

2018-08-23 Thread Ævar Arnfjörð Bjarmason
This is on OpenBSD 6.2 amd64 with my "tests: fix and add lint for non-portable head -c N" patch (which fixes one failure). $ for t in t1305-config-include.sh t1308-config-set.sh t5004-archive-corner-cases.sh t5552-skipping-fetch-negotiator.sh; do ./$t --no-color -v -x 2>&1 | grep -B10 "^not

Re: [feature] how to output absolute paths in git diff? => --show-abs-path

2018-08-23 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 23, 2018 at 11:16 AM Timothee Cour wrote: > > This has all the context: > https://stackoverflow.com/questions/22698505/how-to-show-full-paths-in-git-diff It's helpful to copy it anyway, so we can discuss it here: QUOTE How do I show full paths in git diff? One can use

[PATCH] tests: fix and add lint for non-portable head -c N

2018-08-23 Thread Ævar Arnfjörð Bjarmason
practice, but it's easier to just use the wrapper than introduce some exception for the "make test-lint" check being added here. 1. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html 2. https://github.com/openbsd/ports/commit/08d5d82eaefe5cf2f125ecc0c6a57df9cf9135

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