Re: [PATCH] stash: fix show referencing stash index

2019-06-16 Thread Thomas Gummerer
On 06/15, Andrei Rybak wrote: > On 6/15/19 1:26 PM, Thomas Gummerer wrote: > > diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh > > index ea30d5f6a0..3973cbda0e 100755 > > --- a/t/t3903-stash.sh > > +++ b/t/t3903-stash.sh > > @@ -708,6 +708,24 @@ test_expect_success 'invalid ref of the form "n", n

Re: [GSoC][PATCH v4 1/4] sequencer: add advice for revert

2019-06-16 Thread Thomas Gummerer
On 06/16, Rohit Ashiwal wrote: > In the case of merge conflicts, while performing a revert, we are > currently advised to use `git cherry-pick --` > of which --continue is incompatible for continuing the revert. > Introduce a separate advice message for `git revert`. Also change > the signature of

Re: 'git interpret-trailers' is tripped by comment characters other than '#'

2019-06-16 Thread Christian Couder
On Mon, Jun 17, 2019 at 6:33 AM Masahiro Yamada wrote: > > On Sat, Jun 15, 2019 at 5:41 PM Christian Couder > wrote: > > > > > I do wonder if the trailer code is correct to always respect it, though. > > > For example, in "git log" output we'd expect to see commit messages from > > > people with

Re: 'git interpret-trailers' is tripped by comment characters other than '#'

2019-06-16 Thread Masahiro Yamada
On Sat, Jun 15, 2019 at 12:08 AM Jeff King wrote: > > On Fri, Jun 14, 2019 at 08:35:04PM +0900, Masahiro Yamada wrote: > > > Perhaps, 'git interpret-trailers' should be changed > > to recognize core.commentChar ? > > It looks like the trailer code does respect it, but the > interpret-trailers prog

Re: 'git interpret-trailers' is tripped by comment characters other than '#'

2019-06-16 Thread Masahiro Yamada
On Sat, Jun 15, 2019 at 5:41 PM Christian Couder wrote: > > On Fri, Jun 14, 2019 at 5:10 PM Jeff King wrote: > > > > On Fri, Jun 14, 2019 at 08:35:04PM +0900, Masahiro Yamada wrote: > > > > > Perhaps, 'git interpret-trailers' should be changed > > > to recognize core.commentChar ? > > > > It look

Re: [PATCH] show --continue/skip etc. consistently in synopsis

2019-06-16 Thread Elijah Newren
On Sun, Jun 16, 2019 at 6:29 AM Phillip Wood wrote: > > From: Phillip Wood > > The synopsis for am shows the command mode options as > (--continue | --skip | --abort | --quit) > They are on a single line and in parenthesis as they are not > optional. Fix the merge and rebase docs to match thi

Re: [PATCH] fsmonitor: avoid signed integer overflow / infinite loop

2019-06-16 Thread Derrick Stolee
On 6/15/2019 12:11 PM, Carlo Marcelo Arenas Belón wrote: > 883e248b8a ("fsmonitor: teach git to optionally utilize a file system > monitor to speed up detecting new or changed files.", 2017-09-22) uses > an int in a loop that would wrap if index_state->cache_nr (unsigned) > is bigger than INT_MAX

Re: [PATCH 2/2] use COPY_ARRAY for copying arrays

2019-06-16 Thread Derrick Stolee
On 6/15/2019 2:36 PM, René Scharfe wrote: > Convert calls of memcpy(3) to use COPY_ARRAY, which shortens and > simplifies the code a bit. These changes do look simpler. Thanks! > Patch generated by Coccinelle and contrib/coccinelle/array.cocci. And this auto-generation is particularly useful! >

Re: commit sized around 100 gb in changes failed to push to a TFS remote - Git

2019-06-16 Thread Philip Oakley
Hi Aram On 14/06/2019 17:47, Aram Maliachi (WIPRO LIMITED) wrote: To @Git Community From the perspective of an Azure DevOps support engineer. I have a customer who is unable to make a push with following error: fatal: The remote end hung up unexpectedly failed to push some refs into https://z

Re: [PATCH] Use an intermediate file between between git blame and sed to avoid git blame's exit code being hidden.

2019-06-16 Thread Junio C Hamano
Denton Liu writes: > For yours, I would reword your commit message to something like > > t8014: avoid git command in upstream pipe > > Use an intermediate file between between git blame and sed to avoid > git blame's exit code being hidden. I agree that the main "points"

Re: [PATCH] show --continue/skip etc. consistently in synopsis

2019-06-16 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > The synopsis for am shows the command mode options as > (--continue | --skip | --abort | --quit) > They are on a single line and in parenthesis as they are not > optional. Fix the merge and rebase docs to match this style. Is it so clear-cut tha

Re: [PATCH 4/4] config: avoid calling `labs()` on too-large data type

2019-06-16 Thread Junio C Hamano
René Scharfe writes: To fix it, let's just "unroll" the function (i.e. negate the value if it is negative). >>> >>> There's also imaxabs(3). That may be true, but seeing that some platforms wants to see intmax_t defined in the compat/ layer, I suspect we cannot avoid having a copy of u

[PATCH] t8014: avoid git command in upstream pipe

2019-06-16 Thread michael
From: Michael Platings Use an intermediate file between between git blame and sed to avoid git blame's exit code being hidden. Signed-off-by: Michael Platings --- t/t8014-blame-ignore-fuzzy.sh | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/t/t8014-blame-ignor

Re: [PATCH] Use an intermediate file between between git blame and sed to avoid git blame's exit code being hidden.

2019-06-16 Thread Michael Platings
Hi Denton, Thanks for the review. The patch was supposed to be in response to https://public-inbox.org/git/20190613151756.ga31...@szeder.dev/ but apparently I didn't use --in-reply-to correctly. I'll resubmit with the requested changes. -Michael On Sun, 16 Jun 2019 at 20:02, Denton Liu wrote: > >

Re: [PATCH] Use an intermediate file between between git blame and sed to avoid git blame's exit code being hidden.

2019-06-16 Thread Denton Liu
Thanks for the patch, Michael! On Sat, Jun 15, 2019 at 07:40:39PM +0100, mich...@platin.gs wrote: > Subject: [PATCH] Use an intermediate file between between git blame and sed > to avoid git blame's exit code being hidden. For your commit message, the usual convention is to first specify the are

[PATCH v2 02/10] t1410: make hash size independent

2019-06-16 Thread brian m. carlson
Instead of parsing object IDs using fixed-length shell patterns, use cut to extract the first two characters of an object ID in addition to the test helper for object paths. Update another test to look up an appropriate object ID fragment from the all-zeros object ID instead of hardcoding the valu

[PATCH v2 06/10] t0027: make hash size independent

2019-06-16 Thread brian m. carlson
Several parts of this test generate files that have specific hard-coded object IDs in them. We don't really care about what the object ID in question is, so we turn them all to zeros. However, because some of these values are fixed and some are generated, they can be of different lengths, which c

[PATCH v2 01/10] t: add helper to convert object IDs to paths

2019-06-16 Thread brian m. carlson
There are several places in our testsuite where we want to insert a slash after an object ID to make it into a path we can reference under .git/objects, and we have various ways of doing so. Add a helper to provide a standard way of doing this that works for all size hashes. Signed-off-by: brian

[PATCH v2 00/10] Hash-independent tests, part 4

2019-06-16 Thread brian m. carlson
This is an additional series of fixes for tests to make them work with SHA-256. This series makes use of several constants, such as $ZERO_OID, which will be replaced with appropriate values based on "test_oid" with later work. There is one test (t1410) which adds an SHA1 prerequisite. I wasn't ab

[PATCH v2 03/10] t1450: make hash size independent

2019-06-16 Thread brian m. carlson
Replace several hard-coded full and partial object IDs with variables or computed values. Create junk data to stuff inside an invalid tree that can be either 20 or 32 bytes long. Compute a binary all-zeros object ID instead of hard-coding a 20-byte length. Additionally, compute various object ID

[PATCH v2 09/10] t1710: make hash independent

2019-06-16 Thread brian m. carlson
This test uses several index hashes, which necessarily depend on the version of the index and the hash algorithm in use. Use test_oid_cache to provide values for these for both SHA-1 and SHA-256. Also, compute an object ID and use $EMPTY_BLOB to make the remainder of the tests independent of the

[PATCH v2 04/10] t5000: make hash independent

2019-06-16 Thread brian m. carlson
This test uses a stub of a very large (64 GB) object to test our generation of tar archives. In doing so, it uses the object ID of the object so it can insert it into the database properly. Look up these values using test_oid. Restructure the test slightly to use test_oid_in_path. Since we care

[PATCH v2 07/10] t0090: make test pass with SHA-256

2019-06-16 Thread brian m. carlson
One assertion of this test checks for a shrinking cache tree. The initial index contains a cache tree with two directory names but no object ID, and the second index contains a cache tree with an object ID but no directory name. With SHA-1, the second index is smaller than the first, because the

[PATCH v2 08/10] t1007: remove SHA1 prerequisites

2019-06-16 Thread brian m. carlson
Update this test to use test_oid_cache to specify the object IDs for both SHA-1 and SHA-256. Since this test now works with both algorithms, remove the SHA1 prerequisite. Signed-off-by: brian m. carlson --- t/t1007-hash-object.sh | 58 +++--- 1 file changed,

[PATCH v2 10/10] t2203: avoid hard-coded object ID values

2019-06-16 Thread brian m. carlson
In order to make this test work with multiple hash algorithms, compute the object ID used in this test instead of hard-coding it. Signed-off-by: brian m. carlson --- t/t2203-add-intent.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t2203-add-intent.sh b/t/t2203-ad

[PATCH v2 05/10] t6030: make test work with SHA-256

2019-06-16 Thread brian m. carlson
Compute several object ID values instead of hard-coding them, and use test_oid_to_path to cleanly produce a path for an object. Note that the bisect code which is tested here remains sensitive to the hash algorithm in use because it uses the object ID to disambiguate between two equidistant commit

[PATCH] wrapper: avoid UB in macOS

2019-06-16 Thread Carlo Marcelo Arenas Belón
0620b39b3b ("compat: add a mkstemps() compatibility function", 2009-05-31) included a function based on code from libiberty which would result in undefined behaviour in platforms where timeval's tv_usec is a 32-bit signed type as shown by: wrapper.c:505:31: runtime error: left shift of 594546 by 1

Re: [PATCH 4/4] config: avoid calling `labs()` on too-large data type

2019-06-16 Thread René Scharfe
Am 16.06.19 um 10:24 schrieb René Scharfe: > Am 16.06.19 um 08:48 schrieb René Scharfe: >> Am 13.06.19 um 13:49 schrieb Johannes Schindelin via GitGitGadget: >>> From: Johannes Schindelin >>> >>> The `labs()` function operates, as the initial `l` suggests, on `long` >>> parameters. However, in `co

[PATCH] show --continue/skip etc. consistently in synopsis

2019-06-16 Thread Phillip Wood
From: Phillip Wood The synopsis for am shows the command mode options as (--continue | --skip | --abort | --quit) They are on a single line and in parenthesis as they are not optional. Fix the merge and rebase docs to match this style. --- This patch is based on top of nd/merge-quit. The docs

Re: [PATCH 4/4] config: avoid calling `labs()` on too-large data type

2019-06-16 Thread René Scharfe
Am 16.06.19 um 08:48 schrieb René Scharfe: > Am 13.06.19 um 13:49 schrieb Johannes Schindelin via GitGitGadget: >> From: Johannes Schindelin >> >> The `labs()` function operates, as the initial `l` suggests, on `long` >> parameters. However, in `config.c` we tried to use it on values of type >> `i

[GSoC][PATCH v4 2/4] sequencer: rename reset_for_rollback to reset_merge

2019-06-16 Thread Rohit Ashiwal
We are on a path to teach cherry-pick/revert how to skip commits. To achieve this, we could really make use of existing functions. reset_for_rollback is one such function, but the name does not intuitively suggest to use it to reset a merge, which it was born to perform, see 539047c ("revert: intro

[GSoC][PATCH v4 4/4] cherry-pick/revert: advise using --skip

2019-06-16 Thread Rohit Ashiwal
The previous commit introduced a --skip flag for cherry-pick and revert. Update the advice messages, to tell users about this less cumbersome way of skipping commits. Also add tests to ensure everything is working fine. Signed-off-by: Rohit Ashiwal --- changes: - Use test_i18ncmp instead of t

[GSoC][PATCH v4 1/4] sequencer: add advice for revert

2019-06-16 Thread Rohit Ashiwal
In the case of merge conflicts, while performing a revert, we are currently advised to use `git cherry-pick --` of which --continue is incompatible for continuing the revert. Introduce a separate advice message for `git revert`. Also change the signature of `create_seq_dir` to handle which advice t

[GSoC][PATCH v4 0/4] [GSoC][PATCH 0/3] Teach cherry-pick/revert to skip commits

2019-06-16 Thread Rohit Ashiwal
Yet another iteration of my patch. We have changed the series a little bit. We now have a commit that rename `reset_for_rollback` to `reset_merge`. A lot of nit-picks were handled in this revision. Thanks Rohit Rohit Ashiwal (4): sequencer: add advice for revert sequencer: rename reset_for_ro

[GSoC][PATCH v4 3/4] cherry-pick/revert: add --skip option

2019-06-16 Thread Rohit Ashiwal
git am or rebase have a --skip flag to skip the current commit if the user wishes to do so. During a cherry-pick or revert a user could likewise skip a commit, but needs to use 'git reset' (or in the case of conflicts 'git reset --merge'), followed by 'git (cherry-pick | revert) --continue' to skip

Re: [GSoC][PATCH v3 2/3] cherry-pick/revert: add --skip option

2019-06-16 Thread Rohit Ashiwal
Hi Junio I am sorry, I missed to reply to these. On 2019-06-13 17:56 UTC Junio C Hamano wrote: > > > +int sequencer_skip(struct repository *r, struct replay_opts *opts) > > +{ > > + enum replay_action action = -1; > > + sequencer_get_last_command(r, &action); > > + > > + switch (opts->acti