Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug

2019-03-13 Thread Johannes Sixt
Am 13.03.19 um 17:35 schrieb Jeff King: > On Wed, Mar 13, 2019 at 05:11:44PM +0100, Ævar Arnfjörð Bjarmason wrote: >> As a further improvement, is there a good reason for why we wouldn't >> pass something down to the oid machinery to say "we're only interested >> in commits". I have a WIP series so

Re: [PATCH v8 0/3]

2019-03-13 Thread Nickolai Belakovski
> > Patch 1 looks good to me. Given that we're on v8 and most of the other > comments are for patches 2 and 3, I think we might consider graduating > it separately if the other two are not ready soon. It's independently > useful, IMHO. Patch 2 was my main motivation, so it would be nice to get it

Re: [PATCH 2/2] trace2: randomize/timestamp trace2 targets

2019-03-13 Thread Junio C Hamano
Jeff King writes: > This definitely seems useful. Could we drop the final "%" and make it > either a single-character "%t" or "%(iso8601)" to match our other > formatting strings? There's no _technical_ reason to do that, but it > just seems like there's not much point in being unnecessarily > in

Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'

2019-03-13 Thread Elijah Newren
On Wed, Mar 13, 2019 at 8:29 PM Duy Nguyen wrote: > > On Mon, Mar 11, 2019 at 6:16 PM Phillip Wood > wrote: > > > +-m:: > > > +--merge:: > > > + If you have local modifications to one or more files that are > > > + different between the current branch and the branch to which > > > +

Re: [PATCH v8 3/3] branch: add worktree info on verbose output

2019-03-13 Thread Nickolai Belakovski
On Thu, Feb 21, 2019 at 4:59 AM Jeff King wrote: > > On Tue, Feb 19, 2019 at 05:31:23PM +0900, nbelakov...@gmail.com wrote: > > > From: Nickolai Belakovski > > > > To display worktree path for refs checked out in a linked worktree > > This would be a good place to describe why this is useful. :)

Re: [PATCH v1 09/11] t: add tests for restore

2019-03-13 Thread Junio C Hamano
Junio C Hamano writes: >> +test_expect_success 'restore -p without pathspec is fine' ' >> +echo q >cmd && >> +git restore -p > +' > > This stands out as a sore thumb, being an invocation with '-p' while > all the other tests for the '-p' feature are in t2071. I'll have this inserted imme

Re: [PATCH v8 2/3] branch: update output to include worktree info

2019-03-13 Thread Nickolai Belakovski
On Thu, Feb 21, 2019 at 4:44 AM Jeff King wrote: > > On Tue, Feb 19, 2019 at 05:31:22PM +0900, nbelakov...@gmail.com wrote: > > > From: Nickolai Belakovski > > > > The output of git branch is modified to mark branches checkout out in a > > s/checkout out/checked out/ ? > Yes, thanks > > > - s

Re: [PATCH v1 09/11] t: add tests for restore

2019-03-13 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/t/t2070-restore.sh b/t/t2070-restore.sh > new file mode 100755 > index 00..df91bf54bc > --- /dev/null > +++ b/t/t2070-restore.sh > @@ -0,0 +1,77 @@ > +#!/bin/sh > + > +test_description='restore basic functionality' > + > +. ./test-lib.sh > + ..

Re: [PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Junio C Hamano
Jeff King writes: > I think it does apply, though the reasoning in the commit message of > "this is OK because 'left' is large enough" becomes a lot more > hand-wavy. The patch is not making anything _worse_, certainly, but the > fact of the matter is that "left" still might not be big enough, if

Re: [PATCH 1/4] rebase: document --rerere-autoupdate

2019-03-13 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > This option was missing from the man page. > > Signed-off-by: Phillip Wood > --- Looks good, but I do not see what the point is to have 1-3 as three separate patches. It does make sense to have 4/4 as a separate step, though.

Re: [PATCH 3/3] cherry-pick --continue: remember options

2019-03-13 Thread Junio C Hamano
Johannes Schindelin writes: >> Remember --allow-empty, --allow-empty-message and >> --keep-redundant-commits when cherry-pick stops for a conflict >> resolution. >> >> Signed-off-by: Phillip Wood > > This whole patch series makes sense to me. Yes, the changes look sensible (provided if it is t

Re: [PATCH v1 09/11] t: add tests for restore

2019-03-13 Thread Duy Nguyen
On Thu, Mar 14, 2019 at 5:17 AM Johannes Schindelin wrote: > > Hi Duy, > > On Wed, 13 Mar 2019, Duy Nguyen wrote: > > > On Wed, Mar 13, 2019 at 4:13 PM Johannes Schindelin > > wrote: > > > Duy, have you thought about making use of the CI builds? You could catch > > > those bugs before they hit th

Re: [PATCH 4/5] gc: don't run "reflog expire" when keeping reflogs

2019-03-13 Thread Junio C Hamano
Jeff King writes: > Seeing "--stale-fix" again reminded me: that may be the "oops, we can > spend tons of CPU walking history" bit that I mentioned in the other > part of the thread. But I don't think git-gc would ever run with that > option. The option was a purely transitional measure to recov

Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'

2019-03-13 Thread Junio C Hamano
Phillip Wood writes: >> +-m:: >> +--merge:: >> +If you have local modifications to one or more files that are >> +different between the current branch and the branch to which >> +you are switching, the command refuses to switch branches in >> +order to preserve your modifications

Re: [PATCH 05/11] tests: use 'test_atexit' to stop httpd

2019-03-13 Thread Junio C Hamano
Junio C Hamano writes: > I see most of these changes are removal of stop_httpd because it is > done as part of start_httpd() to arrange it to be called at exit. > > But ... > ... > ... I see we lost many "trap 'die' EXIT" in the orignal. Is that > something we want to lose as part of this commit

Re: [PATCH 4/4] get_oid(): when an object was not found, try harder

2019-03-13 Thread Junio C Hamano
Jeff King writes: > I'm not sure it's really worth addressing (just because I don't think > there's a good way to do it that isn't expensive). I do not think so, either. Not at this layer, anyway. If a "-x" command newly created an object whose prefix makes it ambiguous against an existing obj

Re: [PATCH 4/4] get_oid(): when an object was not found, try harder

2019-03-13 Thread Junio C Hamano
Jeff King writes: >> 1. is reprepare_packed_git() a bit too heavy-weight, if the only >> thing we are addressing is the loose-object cache going stale? > > It's not the only thing we are addressing. :) > > Try this: Yes, I knew about repacking. I was alluding to the overly heavy reference

Re: [PATCH v1 00/11] And new command "restore"

2019-03-13 Thread Duy Nguyen
On Thu, Mar 14, 2019 at 5:58 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > > On Fri, Mar 8, 2019 at 5:17 PM Nguyễn Thái Ngọc Duy > > wrote: > >> - --index has a different meaning in git-apply. I don't have a good > >> suggestion except "yeah we have two different worlds now, the old > >

Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'

2019-03-13 Thread Duy Nguyen
On Mon, Mar 11, 2019 at 6:16 PM Phillip Wood wrote: > > +-m:: > > +--merge:: > > + If you have local modifications to one or more files that are > > + different between the current branch and the branch to which > > + you are switching, the command refuses to switch branches in > > +

Re: [PATCH 05/11] tests: use 'test_atexit' to stop httpd

2019-03-13 Thread Junio C Hamano
SZEDER Gábor writes: > t/lib-git-svn.sh | 5 - > t/lib-httpd.sh| 6 +- > t/t0410-partial-clone.sh | 2 -- > t/t5500-fetch-pack.sh | 3 --- > t/t5510-fetch.sh

Re: [PATCH 03/11] test-lib: introduce 'test_atexit'

2019-03-13 Thread Junio C Hamano
SZEDER Gábor writes: > +test_atexit () { > + # We cannot detect when we are in a subshell in general, but by > + # doing so on Bash is better than nothing (the test will > + # silently pass on other shells). > + test "${BASH_SUBSHELL-0}" = 0 || > + error "bug in test script: t

Re: [PATCH 4/4] get_oid(): when an object was not found, try harder

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 10:22:46PM -0400, Jeff King wrote: > Try this: > > -- >8 -- > mkfifo in > (git cat-file --batch-check exec 9>in > > git commit --allow-empty -m one > git commit --allow-empty -m two > > git rev-parse --short HEAD^ >&9 > git repack -adk > git rev-parse --short HEAD >&9 >

Re: [PATCH 02/11] t/lib-git-daemon: make sure to kill the 'git-daemon' process

2019-03-13 Thread Junio C Hamano
SZEDER Gábor writes: > After 'start_git_daemon' starts 'git daemon' (note the space in the > middle) in the background, it saves the background process' PID, so > the daemon can be stopped at the end of the test script. However, > 'git-daemon' is not a builtin but a dashed external command, whic

Re: [PATCH 4/4] get_oid(): when an object was not found, try harder

2019-03-13 Thread Jeff King
On Thu, Mar 14, 2019 at 10:29:49AM +0900, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > @@ -442,6 +442,18 @@ static enum get_oid_result get_short_oid(const char > > *name, int len, > > find_short_packed_object(&ds); > > status = finish_object_disambiguat

Re: [PATCH 01/11] test-lib: fix interrupt handling with 'dash' and '--verbose-log -x'

2019-03-13 Thread Junio C Hamano
SZEDER Gábor writes: > Putting these together, when a test script run with 'dash' and > '--verbose-log -x' is interrupted, then 'dash' tries to write the > trace output from the EXIT trap to the script's original standard > error, but it very likely can't, because the 'tee' downstream of the > pi

Re: [PATCH 1/1] check-docs: fix for setups where executables have an extension

2019-03-13 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > On Windows, for example, executables (must) have the extension `.exe`. > Our `check-docs` target was not prepared for that. > > Signed-off-by: Johannes Schindelin > --- My writing this loop certainly predates increa

Re: [PATCH 4/4] get_oid(): when an object was not found, try harder

2019-03-13 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > @@ -442,6 +442,18 @@ static enum get_oid_result get_short_oid(const char > *name, int len, > find_short_packed_object(&ds); > status = finish_object_disambiguation(&ds, oid); > > + /* > + * If we didn't find it, do the usual

Re: [PATCH 2/4] sequencer: improve error message when an OID could not be parsed

2019-03-13 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > The interactive rebase simply complains about an "invalid line" when the > object hash of, say, a `pick` line could not be parsed. > > Let's tell the user what happened in a little more detail. Makes sense. > > Sign

Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug

2019-03-13 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > +test_expect_failure SHA1 'loose object cache vs re-reading todo list' ' > + GIT_REBASE_TODO=.git/rebase-merge/git-rebase-todo && > + export GIT_REBASE_TODO && > + write_script append-todo.sh <<-\EOS && > + # For values 5 and 6, thi

Re: [PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Ramsay Jones
On 14/03/2019 00:19, Jeff King wrote: > On Wed, Mar 13, 2019 at 09:49:58PM +, Ramsay Jones wrote: > >> From: Jeff King >> [...] >> Signed-off-by: Ramsay Jones > > Signed-off-by: Jeff King > > Naturally. :) > >> As promised, I am forwarding a 'saved' patch from Jeff, which was >> a by-

Re: [PATCH 5/5] reflog expire: don't assert the OID when locking refs

2019-03-13 Thread Jeff King
On Thu, Mar 14, 2019 at 12:54:39AM +0100, Ævar Arnfjörð Bjarmason wrote: > The locking protocol for reflogs involves getting a *.lock file on the > loose ref[1] (even if the actual ref is packed). This isn't needed to > expire the reflog, and needlessly results promotes reference update > contenti

Re: [PATCH 4/5] gc: don't run "reflog expire" when keeping reflogs

2019-03-13 Thread Jeff King
On Thu, Mar 14, 2019 at 12:54:38AM +0100, Ævar Arnfjörð Bjarmason wrote: > Don't redundantly run "git reflog expire --all" when gc.reflogExpire > and gc.reflogExpireUnreachable are set to "never". > > I'm being careful to not repeat the issue fixed in > 8ab5aa4bd8 ("parseopt: handle malformed --e

Re: [PATCH 3/5] gc: refactor a "call me once" pattern

2019-03-13 Thread Jeff King
On Thu, Mar 14, 2019 at 12:54:37AM +0100, Ævar Arnfjörð Bjarmason wrote: > Change an idiom we're using to ensure that gc_before_repack() only > does work once (see 62aad1849f ("gc --auto: do not lock refs in the > background", 2014-05-25)) to be more obvious. > > Nothing except this function care

Re: [PATCH 2/5] gc: convert to using the_hash_algo

2019-03-13 Thread Jeff King
On Thu, Mar 14, 2019 at 12:54:36AM +0100, Ævar Arnfjörð Bjarmason wrote: > There's been a lot of changing of the hardcoded "40" values to > the_hash_algo->hexsz, but we've so far missed this one where we > hardcoded 38 for the loose object file length. > > This is because a SHA-1 like abcde[...]

Re: [PATCH 1/5] gc: remove redundant check for gc_auto_threshold

2019-03-13 Thread Jeff King
On Thu, Mar 14, 2019 at 12:54:35AM +0100, Ævar Arnfjörð Bjarmason wrote: > Checking gc_auto_threshold in too_many_loose_objects() was added in > 17815501a8 ("git-gc --auto: run "repack -A -d -l" as necessary.", > 2007-09-17) when need_to_gc() itself was also reliant on > gc_auto_pack_limit before

Re: BUG: Race condition due to reflog expiry in "gc"

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 05:22:22PM +0100, Ævar Arnfjörð Bjarmason wrote: > > That's what the retry-with-timeout is supposed to address, so maybe it > > works. But I wouldn't be surprised if it's insufficient in practice, > > since the reflog code may walk big parts of the graph under lock, > > che

Re: [PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 09:49:58PM +, Ramsay Jones wrote: > From: Jeff King > [...] > Signed-off-by: Ramsay Jones Signed-off-by: Jeff King Naturally. :) > As promised, I am forwarding a 'saved' patch from Jeff, which was > a by-product of a long-ago discussion regarding commit 5efde212fc

Re: [PATCH 2/2] trace2: randomize/timestamp trace2 targets

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 04:33:29PM -0700, Josh Steadmon wrote: > When the value of a trace2 environment variable contains instances of > the string "%ISO8601%", expand them into the current UTC timestamp in > ISO 8601 format. This definitely seems useful. Could we drop the final "%" and make it e

Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 11:40:54PM +0100, Johannes Schindelin wrote: > > > + shift > > > + test -z "$*" || > > > + echo "exec $0 $*" >>$GIT_REBASE_TODO > > > > And here we do the same thing. That second redirection is unnecessary. > > It is actually not unnecessary, but to the contrary quite nec

Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 11:27:02PM +0100, Johannes Schindelin wrote: > > We have get_oid_commit() and get_oid_committish() already. Should rebase > > just be using those? (I think we probably want "commit()", because we do > > not expect a "pick" line to have a tag, for example. > > I did think a

[PATCH 0/5] gc: minor code cleanup + contention fixes

2019-03-13 Thread Ævar Arnfjörð Bjarmason
[45]/5 fix a couple of issues I noted upthread. While I was at it I noticed a few things I could clean up in [123]/5 that I figured I'd send alongside this. Ævar Arnfjörð Bjarmason (5): gc: remove redundant check for gc_auto_threshold gc: convert to using the_hash_algo gc: refactor a "call m

[PATCH 2/5] gc: convert to using the_hash_algo

2019-03-13 Thread Ævar Arnfjörð Bjarmason
There's been a lot of changing of the hardcoded "40" values to the_hash_algo->hexsz, but we've so far missed this one where we hardcoded 38 for the loose object file length. This is because a SHA-1 like abcde[...] gets turned into objects/ab/cde[...]. There's no reason to suppose the same won't be

[PATCH 3/5] gc: refactor a "call me once" pattern

2019-03-13 Thread Ævar Arnfjörð Bjarmason
Change an idiom we're using to ensure that gc_before_repack() only does work once (see 62aad1849f ("gc --auto: do not lock refs in the background", 2014-05-25)) to be more obvious. Nothing except this function cares about the "pack_refs" and "prune_reflogs" variables, so let's not leave the reader

[PATCH 5/5] reflog expire: don't assert the OID when locking refs

2019-03-13 Thread Ævar Arnfjörð Bjarmason
The locking protocol for reflogs involves getting a *.lock file on the loose ref[1] (even if the actual ref is packed). This isn't needed to expire the reflog, and needlessly results promotes reference update contention to hard errors in e.g. "gc". During reflog expiry, the cmd_reflog_expire() fun

[PATCH 4/5] gc: don't run "reflog expire" when keeping reflogs

2019-03-13 Thread Ævar Arnfjörð Bjarmason
Don't redundantly run "git reflog expire --all" when gc.reflogExpire and gc.reflogExpireUnreachable are set to "never". I'm being careful to not repeat the issue fixed in 8ab5aa4bd8 ("parseopt: handle malformed --expire arguments more nicely", 2018-04-21). We'll die early if the config variables a

[PATCH 1/5] gc: remove redundant check for gc_auto_threshold

2019-03-13 Thread Ævar Arnfjörð Bjarmason
Checking gc_auto_threshold in too_many_loose_objects() was added in 17815501a8 ("git-gc --auto: run "repack -A -d -l" as necessary.", 2007-09-17) when need_to_gc() itself was also reliant on gc_auto_pack_limit before its early return: gc_auto_threshold <= 0 && gc_auto_pack_limit <= 0 When tha

Re: [PATCH 2/2] trace2: randomize/timestamp trace2 targets

2019-03-13 Thread Ævar Arnfjörð Bjarmason
On Thu, Mar 14 2019, Josh Steadmon wrote: > When the value of a trace2 environment variable contains instances of > the string "%ISO8601%", expand them into the current UTC timestamp in > ISO 8601 format. Any reason not to just support feeding the path to strbuf_addftime(), to e.g. support a da

Re: [BUG] fetching all remote branches results in failed multiple updates

2019-03-13 Thread Alexander Huynh
Hi all, I appreciate the help offered in identifying what I was doing incorrectly. Upon further investigation, I remembered why I added the original `origin.fetch` parameter: I was compensating for shallow clones not fetching all remote refs. Here's the use case that I have: [root@chabuduo

[PATCH 0/2] Randomize / timestamp trace2 targets

2019-03-13 Thread Josh Steadmon
Persistently enabling trace2 output is difficult because it requires specifying a full filename. This series teaches tr2_dst_get_trace_fd() to randomize filenames when a directory or filename prefix are given as targets in the GIT_TR2_* envvars. It also allows expansion of a timestamp template stri

[PATCH 2/2] trace2: randomize/timestamp trace2 targets

2019-03-13 Thread Josh Steadmon
When the value of a trace2 environment variable contains instances of the string "%ISO8601%", expand them into the current UTC timestamp in ISO 8601 format. When the value of a trace2 environment variable is an absolute path referring to an existing directory, write output to randomly-named files

[PATCH 1/2] date: make get_time() public

2019-03-13 Thread Josh Steadmon
get_time() is the standard way to get the current time while also respecting frozen timestamps for tests. Expose this for use in other files. Signed-off-by: Josh Steadmon --- cache.h | 1 + date.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index abd5

Re: [PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Ramsay Jones
On 13/03/2019 21:49, Ramsay Jones wrote: > From: Jeff King > > We use the "offset" variable for two purposes. It's the offset into > the packfile that the caller provides us (which is rightly an off_t, > since we might have a packfile much larger than memory). But later we > also use it as the

Re: [PATCH v2] submodule: explain first attempt failure clearly

2019-03-13 Thread Junio C Hamano
Jonathan Tan writes: > It is additional to what fetch prints. To make it clearer, I have > removed all mentions of "additional" from the commit message. But right > now I'm not sure if that whole section is important (since what happens > can be deduced quite easily by reading the fewer than 10 l

Re: [PATCH v1 00/11] And new command "restore"

2019-03-13 Thread Junio C Hamano
Duy Nguyen writes: > On Fri, Mar 8, 2019 at 5:17 PM Nguyễn Thái Ngọc Duy wrote: >> - --index has a different meaning in git-apply. I don't have a good >> suggestion except "yeah we have two different worlds now, the old >> and the new one" > > I will rename --index to --staged to avoid this.

Re: [PATCH 4/4] merge: tweak --rerere-autoupdate documentation

2019-03-13 Thread Johannes Schindelin
Hi Phillip, On Wed, 13 Mar 2019, Phillip Wood wrote: > From: Phillip Wood > > Spell out --no-rerere-autoupdate explictly to make searching > easier. This matches the other --no options in the man page. > > Signed-off-by: Phillip Wood > --- > Documentation/git-merge.txt | 3 ++- > 1 file chan

Re: [PATCH 3/3] cherry-pick --continue: remember options

2019-03-13 Thread Johannes Schindelin
Hi Phillip, On Wed, 13 Mar 2019, Phillip Wood wrote: > From: Phillip Wood > > Remember --allow-empty, --allow-empty-message and > --keep-redundant-commits when cherry-pick stops for a conflict > resolution. > > Signed-off-by: Phillip Wood This whole patch series makes sense to me. And it is

Re: [PATCH v1 06/11] restore: add --worktree and --index

2019-03-13 Thread Junio C Hamano
Elijah Newren writes: >> + /* >> +* NEEDSWORK: if --worktree is not specified, we >> +* should save stat info of checked out files in the >> +* index to avoid the next (potentially costly) >> +* refresh. But it's a bit

Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug

2019-03-13 Thread Johannes Schindelin
Hi Peff, On Wed, 13 Mar 2019, Jeff King wrote: > > By the way, while reading the test more carefully, I did notice two > funny things: > > > +test_expect_failure SHA1 'loose object cache vs re-reading todo list' ' > > + GIT_REBASE_TODO=.git/rebase-merge/git-rebase-todo && > > + export GIT_R

Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug

2019-03-13 Thread Johannes Schindelin
Hi Ævar & Peff, On Wed, 13 Mar 2019, Jeff King wrote: > On Wed, Mar 13, 2019 at 05:11:44PM +0100, Ævar Arnfjörð Bjarmason wrote: > > > > And this is where the loose object cache interferes with this > > > feature: if *some* loose object was read whose hash shares the same > > > first two digits

Re: [RFC/PATCH] point pull requesters to Git Git Gadget

2019-03-13 Thread Junio C Hamano
Jeff King writes: > On Wed, Mar 13, 2019 at 10:49:22AM +0900, Junio C Hamano wrote: > >> Jeff King writes: >> >> > infrequent contributors. And there are a few reasons to prefer GGG: >> > >> > 1. submitGit seems to still have a few rough edges. E.g., it doesn't >> > munge timestamps to h

Re: [PATCH v1 09/11] t: add tests for restore

2019-03-13 Thread Johannes Schindelin
Hi Duy, On Wed, 13 Mar 2019, Duy Nguyen wrote: > On Wed, Mar 13, 2019 at 4:13 PM Johannes Schindelin > wrote: > > Duy, have you thought about making use of the CI builds? You could catch > > those bugs before they hit the Git mailing list... > > Using Azure? No. This hostility is totally unnec

Re: [PATCH v2] stash: pass pathspec as pointer

2019-03-13 Thread Johannes Schindelin
Hi Thomas, On Tue, 12 Mar 2019, Thomas Gummerer wrote: > On 03/12, Johannes Schindelin wrote: > > > On Mon, 11 Mar 2019, Thomas Gummerer wrote: > > > [...] > > > @@ -1042,6 +1049,7 @@ static int stash_working_tree(struct stash_info > > > *info, struct pathspec ps) > > > struct index_state ist

[PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Ramsay Jones
From: Jeff King We use the "offset" variable for two purposes. It's the offset into the packfile that the caller provides us (which is rightly an off_t, since we might have a packfile much larger than memory). But later we also use it as the offset within a given mmap'd window, and that window ca

Re: Possible race condition with git-rebase + .git/index.lock

2019-03-13 Thread Sergio Durigan Junior
On Wednesday, March 13 2019, Jeff King wrote: > On Wed, Mar 13, 2019 at 04:48:36PM -0400, Sergio Durigan Junior wrote: > >> Huh, I do have some of the files opened in Emacs! They're in >> background, but indeed, now that you mentioned I remember that Emacs >> keeps track of changes and invokes "g

Re: [RFC/PATCH] point pull requesters to Git Git Gadget

2019-03-13 Thread Johannes Schindelin
Hi, On Wed, 13 Mar 2019, Jeff King wrote: > On Wed, Mar 13, 2019 at 10:49:22AM +0900, Junio C Hamano wrote: > > > Jeff King writes: > > > > > infrequent contributors. And there are a few reasons to prefer GGG: > > > > > > 1. submitGit seems to still have a few rough edges. E.g., it doesn't >

Re: Possible race condition with git-rebase + .git/index.lock

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 04:48:36PM -0400, Sergio Durigan Junior wrote: > Huh, I do have some of the files opened in Emacs! They're in > background, but indeed, now that you mentioned I remember that Emacs > keeps track of changes and invokes "git status" sometimes. Next time I > see the bug, I'l

straw poll: git merge conference location

2019-03-13 Thread Jeff King
I took an informal poll at the last contributor summit in Brussels, but that obviously has some bias. So I'll ask here: do you have a location preference for a Git Merge conference (and associated contributor summit) next March? We're looking at doing it in North America, but there are two specifi

Re: [RFC/PATCH] point pull requesters to Git Git Gadget

2019-03-13 Thread Johannes Schindelin
Hi Roberto, On Tue, 12 Mar 2019, Roberto Tyley wrote: > On Tue, 12 Mar 2019 at 21:34, Jeff King wrote: > > > I feel a little bad sending this, because I really value the work that > > Roberto has done on submitGit. So just dropping it feels a bit > > dismissive. > > Oh, you're very kind, that'

Re: Possible race condition with git-rebase + .git/index.lock

2019-03-13 Thread Sergio Durigan Junior
On Wednesday, March 13 2019, Phillip Wood wrote: > Hi Sergio > > On 12/03/2019 19:32, Sergio Durigan Junior wrote: >> On Tuesday, March 12 2019, Elijah Newren wrote: >> >>> On Tue, Mar 12, 2019 at 9:48 AM Sergio Durigan Junior >>> wrote: On Tuesday, March 12 2019, Duy Nguyen wrote:

Re: [PATCH 2/2] difftool: allow running outside Git worktrees with --no-index

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 12:20:14PM -0700, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > As far as this developer can tell, the conversion from a Perl script to > a built-in caused the regression in the difftool that it no longer runs > outside of a Git worktree (wi

Re: Possible race condition with git-rebase + .git/index.lock

2019-03-13 Thread Phillip Wood
Hi Sergio On 12/03/2019 19:32, Sergio Durigan Junior wrote: On Tuesday, March 12 2019, Elijah Newren wrote: On Tue, Mar 12, 2019 at 9:48 AM Sergio Durigan Junior wrote: On Tuesday, March 12 2019, Duy Nguyen wrote: On Tue, Mar 12, 2019 at 5:18 AM Sergio Durigan Junior wrote: This works wi

Re: [RFC/PATCH] point pull requesters to Git Git Gadget

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 03:39:09PM -0400, Jeff King wrote: > On Wed, Mar 13, 2019 at 10:49:22AM +0900, Junio C Hamano wrote: > > > Jeff King writes: > > > > > infrequent contributors. And there are a few reasons to prefer GGG: > > > > > > 1. submitGit seems to still have a few rough edges. E.

Re: [RFC/PATCH] point pull requesters to Git Git Gadget

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 11:18:25AM +0900, Junio C Hamano wrote: > Junio C Hamano writes: > > > Jeff King writes: > > > >> -Nevertheless, you can use [submitGit](http://submitgit.herokuapp.com/) to > >> +Nevertheless, you can use [Git Git > >> Gadget](https://gitgitgadget.github.io/) to > > > >

Re: [RFC/PATCH] point pull requesters to Git Git Gadget

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 10:49:22AM +0900, Junio C Hamano wrote: > Jeff King writes: > > > infrequent contributors. And there are a few reasons to prefer GGG: > > > > 1. submitGit seems to still have a few rough edges. E.g., it doesn't > > munge timestamps to help threaded mail readers han

Re: [RFC/PATCH] point pull requesters to Git Git Gadget

2019-03-13 Thread Jeff King
On Tue, Mar 12, 2019 at 11:08:00PM +, Roberto Tyley wrote: > On Tue, 12 Mar 2019 at 21:34, Jeff King wrote: > ... > > We could continue to mention _both_ tools, but it's probably better to > > pick one in order to avoid overwhelming the user with choice. After all, > > one of the purposes her

[PATCH 2/2] difftool: allow running outside Git worktrees with --no-index

2019-03-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin As far as this developer can tell, the conversion from a Perl script to a built-in caused the regression in the difftool that it no longer runs outside of a Git worktree (with `--no-index`, of course). It is a bit embarrassing that it took over two years after retiring

[PATCH 0/2] Allow difftool to be run outside of Git worktrees

2019-03-13 Thread Johannes Schindelin via GitGitGadget
It was reported in https://github.com/git-for-windows/git/issues/2123 that git difftool --no-index fails to work outside worktrees, even if it should work. I fear this is a regression I introduced over two years ago (!) when I converted the Perl script to C. At least now that I know about the bu

[PATCH 1/2] difftool: remove obsolete (and misleading) comment

2019-03-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin We will always spawn something from `git difftool`, so we will always have to set `GIT_DIR` and `GIT_WORK_TREE`. Signed-off-by: Johannes Schindelin --- builtin/difftool.c | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/difftool.c b/builtin/difftool.c index

[PATCH] promisor-remote.h: fix a 'hdr-check' warning

2019-03-13 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Christian, If you need to re-roll your 'cc/multi-promisor' branch, could you please squash this into the relevant patch (commit 9e8a7cf4be ("promisor-remote: implement promisor_remote_get_direct()", 2019-03-12)). Also, I note that the promisor_remote_new() f

Re: [PATCH v3 17/21] switch: no implicit dwim, use --guess to dwim

2019-03-13 Thread Eckhard Maaß
On Fri, Mar 08, 2019 at 04:57:48PM +0700, Nguyễn Thái Ngọc Duy wrote: > Similar to automatic detach, this behavior could be confusing because > it can sometimes create a new branch without a user asking it to, > especially when the user is still not aware about this feature. > > In the future, per

[PATCH 2/4] cherry-pick/revert: document --rerere-autoupdate

2019-03-13 Thread Phillip Wood
From: Phillip Wood This option was missing from the man pages. --- Documentation/git-cherry-pick.txt | 5 + Documentation/git-revert.txt | 5 + 2 files changed, 10 insertions(+) diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt index b8cfeec67e..d6

[PATCH 1/4] rebase: document --rerere-autoupdate

2019-03-13 Thread Phillip Wood
From: Phillip Wood This option was missing from the man page. Signed-off-by: Phillip Wood --- Documentation/git-rebase.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 5629ba4c5d..fbf9a4d70a 100644 --- a/Documentatio

[PATCH 3/4] am: document --rerere-autoupdate

2019-03-13 Thread Phillip Wood
From: Phillip Wood This option was missing from the man page. Signed-off-by: Phillip Wood --- Documentation/git-am.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 6f6c34b0f4..fc3b993c33 100644 --- a/Documentation/git-am.txt

[PATCH 4/4] merge: tweak --rerere-autoupdate documentation

2019-03-13 Thread Phillip Wood
From: Phillip Wood Spell out --no-rerere-autoupdate explictly to make searching easier. This matches the other --no options in the man page. Signed-off-by: Phillip Wood --- Documentation/git-merge.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git-merge

[PATCH 2/3] cherry-pick: demonstrate option amnesia

2019-03-13 Thread Phillip Wood
From: Phillip Wood When cherry-pick stops for a conflict resolution it forgets --allow-empty --allow-empty-message and --keep-redundant-commits. Signed-off-by: Phillip Wood --- t/t3507-cherry-pick-conflict.sh | 24 1 file changed, 24 insertions(+) diff --git a/t/t3507

[PATCH 3/3] cherry-pick --continue: remember options

2019-03-13 Thread Phillip Wood
From: Phillip Wood Remember --allow-empty, --allow-empty-message and --keep-redundant-commits when cherry-pick stops for a conflict resolution. Signed-off-by: Phillip Wood --- sequencer.c | 18 ++ t/t3507-cherry-pick-conflict.sh | 4 ++-- 2 files changed, 2

[PATCH 1/3] sequencer: break some long lines

2019-03-13 Thread Phillip Wood
From: Phillip Wood reformat save_opts() to remove excessively long lines. Signed-off-by: Phillip Wood --- sequencer.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/sequencer.c b/sequencer.c index 0db410d590..5e19b22f8f 100644 --- a/se

Re: Deprecating git diff ..; dealing with other ranges

2019-03-13 Thread Andreas Schwab
On Mär 13 2019, Duy Nguyen wrote: > A..B from fetch is the same as branch@{1}..branch. If we have some > shortcut similar to ^! but for reflog, that would be perfect (the > branch part does not require much typing with tab completion). Tab completion is much slower than c&p, especially if the co

[PATCH v2] submodule: explain first attempt failure clearly

2019-03-13 Thread Jonathan Tan
When cloning with --recurse-submodules a superproject with at least one submodule with HEAD pointing to an unborn branch, the clone goes something like this: Cloning into 'test'... Submodule '' () registered for path '' Cloning into ''... fatal: Couldn't fi

Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 12:35:16PM -0400, Jeff King wrote: > On Wed, Mar 13, 2019 at 05:11:44PM +0100, Ævar Arnfjörð Bjarmason wrote: > > > > And this is where the loose object cache interferes with this feature: > > > if *some* loose object was read whose hash shares the same first two > > > dig

Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 05:11:44PM +0100, Ævar Arnfjörð Bjarmason wrote: > > And this is where the loose object cache interferes with this feature: > > if *some* loose object was read whose hash shares the same first two > > digits with a commit that was not yet created when that loose object was

Re: BUG: Race condition due to reflog expiry in "gc"

2019-03-13 Thread Ævar Arnfjörð Bjarmason
On Wed, Mar 13 2019, Jeff King wrote: > On Wed, Mar 13, 2019 at 11:28:39AM +0100, Ævar Arnfjörð Bjarmason wrote: > >> I was under the impression that git-gc was supposed to support operating >> on a repository that's concurrently being modified, as long as you don't >> set the likes of gc.pruneE

Re: [PATCH 1/4] rebase -i: demonstrate obscure loose object cache bug

2019-03-13 Thread Ævar Arnfjörð Bjarmason
On Wed, Mar 13 2019, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > We specifically support `exec` commands in `git rebase -i`'s todo lists > to rewrite the very same todo list. Of course, we need to validate that > todo list when re-reading it. > > It is also total

Re: BUG: Race condition due to reflog expiry in "gc"

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 11:28:39AM +0100, Ævar Arnfjörð Bjarmason wrote: > I was under the impression that git-gc was supposed to support operating > on a repository that's concurrently being modified, as long as you don't > set the likes of gc.pruneExpire too aggressively. To some degree. If it

Re: disabling sha1dc unaligned access, was Re: One failed self test on Fedora 29

2019-03-13 Thread Ævar Arnfjörð Bjarmason
On Wed, Mar 13 2019, Jeff King wrote: > On Wed, Mar 13, 2019 at 12:47:51PM +0100, Thomas Braun wrote: > >> > Reading Thomas's email again, that might actually have been what he was >> > recommending. If so, sorry for the confusion. And I agree that's a valid >> > solution. >> >> Yes that is what

Re: disabling sha1dc unaligned access, was Re: One failed self test on Fedora 29

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 12:47:51PM +0100, Thomas Braun wrote: > > Reading Thomas's email again, that might actually have been what he was > > recommending. If so, sorry for the confusion. And I agree that's a valid > > solution. > > Yes that is what I tried to explain. Looks like it was lost in t

Re: [PATCH 0/4] get_oid: cope with a possibly stale loose object cache

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 03:16:30AM -0700, Johannes Schindelin via GitGitGadget wrote: > Over at the companion PR for Git for Windows > [https://github.com/git-for-windows/git/pull/2121], I discussed this with > Peff (who introduced the loose object cache), and he pointed out that my > original so

Init of submodule within subtree not working

2019-03-13 Thread Thomas Kitzinger
Hello, currently I’m having trouble using subtree to include a subproject that itself contains submodules. $ git subtree add --prefix folderB/subtreeproject https:\\xx master --squash The resulting structure is something like the following: superproject/ ├── .git/ ├── .gitmodules └── folderA/

Re: [PATCH] repack: enable bitmaps by default on bare repos

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 01:51:33AM +, Eric Wong wrote: > But I did find Ævar's forgotten gitperformance doc and thread > where the topic was brought up: > > https://public-inbox.org/git/20170403211644.26814-1-ava...@gmail.com/ One thing that thread reminded me of: we probably also want to

Re: [PATCH] t4150: remove unused variable

2019-03-13 Thread Phillip Wood
On 12/03/2019 14:38, Andrei Rybak wrote: In commit 735285b403 ("am: fix signoff when other trailers are present", 2017-08-08) tests using variable $signoff were rewritten and it is no longer used, so just remove it from the test setup. Well spotted, thanks Phillip Signed-off-by: Andrei Rybak

  1   2   >