[PATCH v4 0/4] Warn about git-filter-branch usage and avoid it

2019-08-29 Thread Elijah Newren
Here's a series warns about git-filter-branch usage and avoids it ourselves. Changes since v3 * Incorporated Eric's detailed feedback on the git-filter-branch manpage, some notes: * s/filter-branch/git-&/ (and similar for ls-files) * Multiple sections removed (and existing sectio

[PATCH v4 3/4] Recommend git-filter-repo instead of git-filter-branch

2019-08-29 Thread Elijah Newren
filter-branch suffers from a deluge of disguised dangers that disfigure history rewrites (i.e. deviate from the deliberate changes). Many of these problems are unobtrusive and can easily go undiscovered until the new repository is in use. This can result in problems ranging from an even messier h

[PATCH v4 2/4] t3427: accelerate this test by using fast-export and fast-import

2019-08-29 Thread Elijah Newren
fast-export and fast-import can easily handle the simple rewrite that was being done by filter-branch, and should be significantly faster on systems with a slow fork. Timings from before and after on two laptops that I have access to (measured via `time ./t3427-rebase-subtree.sh`, i.e. including e

[PATCH v4 1/4] t6006: simplify and optimize empty message test

2019-08-29 Thread Elijah Newren
Test t6006.71 ("oneline with empty message") was creating two commits with simple commit messages, and then running filter-branch to rewrite the commit messages to be empty. This test was written this way because the --allow-empty-message option to git commit did not exist at the time. Simplify t

[PATCH v4 4/4] t9902: use a non-deprecated command for testing

2019-08-29 Thread Elijah Newren
t9902 had a list of three random porcelain commands as a sanity check, one of which was filter-branch. Since we are recommending people not use filter-branch, let's update this test to use rebase instead of filter-branch. Signed-off-by: Elijah Newren --- t/t9902-completion.sh | 12 ++--

Re: [PATCH] clarify documentation for remote helpers

2019-08-29 Thread Martin Ågren
On Thu, 29 Aug 2019 at 23:06, David Turner wrote: > -Optionally may output a 'lock ' line indicating a file under > -GIT_DIR/objects/pack which is keeping a pack until refs can be > -suitably updated. > +Optionally may output a 'lock ' line indicating the full path of > +a file under under GIT_DI

Re: [PATCH] help: make help_unknown_ref() NORETURN

2019-08-29 Thread Martin Ågren
On Thu, 29 Aug 2019 at 22:08, René Scharfe wrote: > > Am 29.08.19 um 21:40 schrieb Martin Ågren: > > On Thu, 29 Aug 2019 at 21:15, René Scharfe wrote: > >> diff --git a/help.h b/help.h > >> index b8780fbd0f..7a455beeb7 100644 > >> --- a/help.h > >> +++ b/help.h > >> @@ -42,8 +42,8 @@ void list_co

Re: [PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Taylor Blau
Hi Elijah, On Thu, Aug 29, 2019 at 05:19:44PM -0700, Elijah Newren wrote: > On Thu, Aug 29, 2019 at 2:42 PM Pratyush Yadav wrote: > > > > On 30/08/19 02:00AM, Pratyush Yadav wrote: > > > On 29/08/19 04:07PM, Derrick Stolee wrote: > > > > On 8/29/2019 2:54 PM, Phillip Wood wrote: > > > > > Hi Stol

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Jon Simons
On 8/29/19 4:48 PM, Eric Sunshine wrote: On Thu, Aug 29, 2019 at 7:12 PM Jon Simons wrote: On 8/29/19 3:45 PM, Eric Sunshine wrote: On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: + test_write_lines /* >sparse-src/all-files && Hmm, does this work correctly? I would expect the /* to

Re: [PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Elijah Newren
On Thu, Aug 29, 2019 at 2:42 PM Pratyush Yadav wrote: > > On 30/08/19 02:00AM, Pratyush Yadav wrote: > > On 29/08/19 04:07PM, Derrick Stolee wrote: > > > On 8/29/2019 2:54 PM, Phillip Wood wrote: > > > > Hi Stolee > > > > > > > > On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: > > > >>

Re: [PATCH v3 3/4] Recommend git-filter-repo instead of git-filter-branch

2019-08-29 Thread Elijah Newren
Hi Eric, Thanks for the careful and thoughtful review. On Thu, Aug 29, 2019 at 11:11 AM Eric Sunshine wrote: > > On Wed, Aug 28, 2019 at 8:07 PM Elijah Newren wrote: > > filter-branch suffers from a deluge of disguised dangers that disfigure > > history rewrites (i.e. deviate from the deliberat

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Eric Sunshine
On Thu, Aug 29, 2019 at 7:12 PM Jon Simons wrote: > On 8/29/19 3:45 PM, Eric Sunshine wrote: > > On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: > >> + test_write_lines /* >sparse-src/all-files && > > > > Hmm, does this work correctly? I would expect the /* to expand to all > > names at t

[PATCH v3 2/2] list-objects-filter: handle unresolved sparse filter OID

2019-08-29 Thread Jon Simons
Handle a potential NULL 'sparse_oid_value' when attempting to load sparse filter exclusions by blob, to avoid segfaulting later during 'add_excludes_from_blob_to_list'. While here, uniquify the errors emitted to distinguish between the case that a given OID is NULL due to an earlier failure to res

[PATCH v3 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Jon Simons
Fix a bug in partial cloning with sparse filters by ensuring to check for 'have_git_dir' before attempting to resolve the sparse filter OID. Otherwise the client will trigger: BUG: refs.c:1851: attempting to get main_ref_store outside of repository when attempting to git clone with a sparse

[PATCH v3 0/2] partial-clone: fix two issues with sparse filter handling

2019-08-29 Thread Jon Simons
Included here are two fixes for partial cloning with sparse filters. These issues were uncovered in early testing internally at GitHub, where Taylor and Peff have provided early offlist review feedback. This third revision includes a fix for a test bug introduced in the second revision. Jon Simon

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Jon Simons
On 8/29/19 3:45 PM, Eric Sunshine wrote: On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: Fix a bug in partial cloning with sparse filters by ensuring to check for 'have_git_dir' before attempting to resolve the sparse filter OID. [...] Signed-off-by: Jon Simons --- diff --git a/t/t5616-parti

Re: [PATCH v5 2/2] am: reload .gitattributes after patching it

2019-08-29 Thread brian m. carlson
On 2019-08-28 at 11:30:53, Johannes Schindelin wrote: > > diff --git a/convert.c b/convert.c > > index 94ff837649..0e6e9d2d75 100644 > > --- a/convert.c > > +++ b/convert.c > > @@ -8,6 +8,7 @@ > > #include "pkt-line.h" > > #include "sub-process.h" > > #include "utf8.h" > > +#include "ll-merge.h"

[PATCH v2 2/2] list-objects-filter: handle unresolved sparse filter OID

2019-08-29 Thread Jon Simons
Handle a potential NULL 'sparse_oid_value' when attempting to load sparse filter exclusions by blob, to avoid segfaulting later during 'add_excludes_from_blob_to_list'. While here, uniquify the errors emitted to distinguish between the case that a given OID is NULL due to an earlier failure to res

[PATCH v2 0/2] partial-clone: fix two issues with sparse filter handling

2019-08-29 Thread Jon Simons
Included here are two fixes for partial cloning with sparse filters. These issues were uncovered in early testing internally at GitHub, where Taylor and Peff have provided early offlist review feedback. In this second revision I've adopted Eric and Peff's additional feedback on some of the test de

[PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Jon Simons
Fix a bug in partial cloning with sparse filters by ensuring to check for 'have_git_dir' before attempting to resolve the sparse filter OID. Otherwise the client will trigger: BUG: refs.c:1851: attempting to get main_ref_store outside of repository when attempting to git clone with a sparse

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Eric Sunshine
On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: > Fix a bug in partial cloning with sparse filters by ensuring to check > for 'have_git_dir' before attempting to resolve the sparse filter OID. > [...] > Signed-off-by: Jon Simons > --- > diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-cl

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread SZEDER Gábor
On Thu, Aug 29, 2019 at 11:58:18PM +0200, SZEDER Gábor wrote: > On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote: > > So any fixes there have to happen on the client side. I am still > > confused about why the client is writing in this case, per the argument > > in 014ade7484 (upload-pack:

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread SZEDER Gábor
On Thu, Aug 29, 2019 at 10:38:05AM -0400, Jeff King wrote: > So any fixes there have to happen on the client side. I am still > confused about why the client is writing in this case, per the argument > in 014ade7484 (upload-pack: send ERR packet for non-tip objects, > 2019-04-13). It would be nice

Re: [PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Pratyush Yadav
On 30/08/19 02:00AM, Pratyush Yadav wrote: > On 29/08/19 04:07PM, Derrick Stolee wrote: > > On 8/29/2019 2:54 PM, Phillip Wood wrote: > > > Hi Stolee > > > > > > On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: > > >> +    > > >> +    if (argc == 3 && !strcmp(argv[1], "-b")) { > > >> + 

[PATCH] clarify documentation for remote helpers

2019-08-29 Thread David Turner
Signed-off-by: David Turner --- This doesn't address the connectivity-ok problem, which I continue to worry is a real bug. But it would have saved me a few minutes of debugging. Documentation/gitremote-helpers.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Docume

Re: [PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Pratyush Yadav
On 29/08/19 04:07PM, Derrick Stolee wrote: > On 8/29/2019 2:54 PM, Phillip Wood wrote: > > Hi Stolee > > > > On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: > >> +    > >> +    if (argc == 3 && !strcmp(argv[1], "-b")) { > >> +    /* > >> + * User ran 'git checkout -b ' and

Re: [PATCH] help: make help_unknown_ref() NORETURN

2019-08-29 Thread René Scharfe
Am 29.08.19 um 21:40 schrieb Martin Ågren: > On Thu, 29 Aug 2019 at 21:15, René Scharfe wrote: >> diff --git a/help.h b/help.h >> index b8780fbd0f..7a455beeb7 100644 >> --- a/help.h >> +++ b/help.h >> @@ -42,8 +42,8 @@ void list_commands(unsigned int colopts, struct cmdnames >> *main_cmds, struct

Re: [PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Derrick Stolee
On 8/29/2019 2:54 PM, Phillip Wood wrote: > Hi Stolee > > On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: >> +    >> +    if (argc == 3 && !strcmp(argv[1], "-b")) { >> +    /* >> + * User ran 'git checkout -b ' and expects > > What if the user ran 'git checkout -b'? Then a

Re: [PATCH] help: make help_unknown_ref() NORETURN

2019-08-29 Thread Martin Ågren
On Thu, 29 Aug 2019 at 21:15, René Scharfe wrote: > > Announce that calling help_unknown_ref() exits the program. > > Signed-off-by: René Scharfe > --- > Patch generated with --function-context for easier review. > > help.c | 3 ++- > help.h | 2 +- > 2 files changed, 3 insertions(+), 2 deletion

[PATCH] help: make help_unknown_ref() NORETURN

2019-08-29 Thread René Scharfe
Announce that calling help_unknown_ref() exits the program. Signed-off-by: René Scharfe --- Patch generated with --function-context for easier review. help.c | 3 ++- help.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/help.c b/help.c index 5261d83ecf..9ff2be6b18 10064

Re: [PATCH] fix segv with corrupt tag object

2019-08-29 Thread René Scharfe
Am 26.08.19 um 19:20 schrieb Junio C Hamano: > Stefan Sperling writes: > >> The root cause of this bug seems to be that the valid assumption >> that obj->parsed implies a successfully parsed object is broken by >> parse_tag_buffer() because this function sets the 'parsed' flag even >> if errors oc

Re: [PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Phillip Wood
Hi Stolee On 29/08/2019 18:01, Derrick Stolee via GitGitGadget wrote: From: Derrick Stolee The 'git switch' command was created to separate half of the behavior of 'git checkout'. It specifically has the mode to do nothing with the index and working directory if the user only specifies to crea

Re: [PATCH v2] gitk: Make web links clickable

2019-08-29 Thread Pratyush Yadav
On 29/08/19 11:27AM, Paul Mackerras wrote: > This makes gitk look for http or https URLs in the commit description > and make the URLs clickable. Clicking on them will invoke an external > web browser with the URL. > > The web browser command is by default "xdg-open" on Linux, "open" on > MacOS,

[PATCH v2 1/3] factor out refresh_and_write_cache function

2019-08-29 Thread Thomas Gummerer
Getting the lock for the index, refreshing it and then writing it is a pattern that happens more than once throughout the codebase. Factor out the refresh_and_write_cache function from builtin/am.c to read-cache.c, so it can be re-used in other places in a subsequent commit. Note that we return d

[PATCH v2 3/3] stash: make sure to write refreshed cache

2019-08-29 Thread Thomas Gummerer
When converting stash into C, calls to 'git update-index --refresh' were replaced with the 'refresh_cache()' function. That is fine as long as the index is only needed in-core, and not re-read from disk. However in many cases we do actually need the refreshed index to be written to disk, for exam

[PATCH v2 0/3] make sure stash refreshes the index properly

2019-08-29 Thread Thomas Gummerer
Thanks Martin for the review of the last round! Changes compared to the previous round: - always pass COMMIT_LOCK to write_locked_index - don't write the error message in repo_refresh_and_write_index, but let the caller handle that. This means that we no longer change any error messages. Pot

[PATCH v2 2/3] merge: use refresh_and_write_cache

2019-08-29 Thread Thomas Gummerer
Use the 'refresh_and_write_cache()' convenience function introduced in the last commit, instead of refreshing and writing the index manually in merge.c Signed-off-by: Thomas Gummerer --- builtin/merge.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/builtin/me

Re: [PATCH v3 3/4] Recommend git-filter-repo instead of git-filter-branch

2019-08-29 Thread Eric Sunshine
On Wed, Aug 28, 2019 at 8:07 PM Elijah Newren wrote: > filter-branch suffers from a deluge of disguised dangers that disfigure > history rewrites (i.e. deviate from the deliberate changes). [...] > Signed-off-by: Elijah Newren > --- > diff --git a/Documentation/git-filter-branch.txt > b/Document

Re: [PATCH 2/3] merge: use refresh_and_write_cache

2019-08-29 Thread Thomas Gummerer
On 08/28, Martin Ågren wrote: > On Tue, 27 Aug 2019 at 12:15, Thomas Gummerer wrote: > > > struct lock_file lock = LOCK_INIT; > > const char *head_arg = "HEAD"; > > > > - hold_locked_index(&lock, LOCK_DIE_ON_ERROR); > > - refresh_cache(REFRESH_QUIET); > > - if (w

Re: [PATCH 1/3] factor out refresh_and_write_cache function

2019-08-29 Thread Thomas Gummerer
On 08/28, Martin Ågren wrote: > On Tue, 27 Aug 2019 at 12:14, Thomas Gummerer wrote: > > > > Getting the lock for the index, refreshing it and then writing it is a > > pattern that happens more than once throughout the codebase. Factor > > out the refresh_and_write_cache function from builtin/am.

Re: How to track history of personal changes in a repository?

2019-08-29 Thread Matthew McClure
On Thu, Aug 29, 2019 at 1:04 PM Elijah Newren wrote: > > Perhaps put all the changes in a specific branch and run: > git config branch.${personalBranchName}.pushRemote > Do.Not.Push.Changes.From.This.Branch > ? (And make sure that push.default is not set to 'matching'.) I imagine putting all t

[BUG} stash show does not show untracked files stashed (reposted)

2019-08-29 Thread randall.s.becker
I don't know whether this is new behaviour following changes to stash, but here goes. Suppose I have files a,b,c,d modified, but only file d is in the index. After stash push (or save) --include-untracked, stash show only displays file d. A subsequent pop will restore files a,b,c,d. So functional

Re: [PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Elijah Newren
On Thu, Aug 29, 2019 at 10:04 AM Derrick Stolee via GitGitGadget wrote: > > From: Derrick Stolee > > The 'git switch' command was created to separate half of the > behavior of 'git checkout'. It specifically has the mode to > do nothing with the index and working directory if the user > only spec

Re: How to track history of personal changes in a repository?

2019-08-29 Thread Elijah Newren
On Thu, Aug 29, 2019 at 7:34 AM Matthew McClure wrote: > > Hi, > > I'm looking for a way to track history of personal changes in a repository. > I'd > like to protect against accidentally pushing the changes to a remote branch. I > imagine this working a little like `git ignore`, and a little lik

[PATCH 1/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git switch' command was created to separate half of the behavior of 'git checkout'. It specifically has the mode to do nothing with the index and working directory if the user only specifies to create a new branch and change HEAD to that branch. This is also the behavior

[PATCH 0/1] checkout: add simple check for 'git checkout -b'

2019-08-29 Thread Derrick Stolee via GitGitGadget
This series replaces "[RFC] Revert/delay performance regression in 'git checkout -b'" [1]. The community response to that series seems to be: 1. 'git switch' is still experimental, so don't warn that users should adopt it right away. 2. 'git checkout -b ' should do the fast thing,

[PATCH v5 2/2] builtin/rebase.c: Remove pointless message

2019-08-29 Thread Ben Wijen
When doing 'git rebase --autostash ' with a dirty worktree a 'HEAD is now at ...' message is emitted, which is pointless as it refers to the old active branch which isn't actually moved. This commit removes the 'HEAD is now at...' message. Signed-off-by: Ben Wijen --- builtin/rebase.c

[PATCH v5 1/2] builtin/rebase.c: make sure the active branch isn't moved when autostashing

2019-08-29 Thread Ben Wijen
Consider the following scenario: git checkout not-the-master work work work git rebase --autostash upstream master Here 'rebase --autostash ' incorrectly moves the active branch (not-the-master) to master (before the rebase). The expected behavior: (58794775:/git-rebase.sh:526) A

[PATCH v5 0/2] rebase.c: make sure current branch isn't moved when autostashing

2019-08-29 Thread Ben Wijen
Here are my "fix things without making unnecessary changes" Ben Wijen (2): builtin/rebase.c: make sure the active branch isn't moved when autostashing builtin/rebase.c: Remove obsolete message builtin/rebase.c| 13 + t/t3420-rebase-autostash.sh | 12

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-29 Thread Matheus Tavares Bernardino
On Thu, Aug 29, 2019 at 11:00 AM Jeff King wrote: > > On Thu, Aug 29, 2019 at 04:31:34PM +0700, Duy Nguyen wrote: > > > > If so, how could we get R there? I mean, we could pass it through this > > > chain, but the chain already passes a "struct config_options", which > > > carries the "commondir"

Re: error: cannot cherry-pick during a revert

2019-08-29 Thread Phillip Wood
Hi Mike On 29/08/2019 00:25, Mike Hommey wrote: Hi, This just happened to me while cherry-pick'ing: $ git cherry-pick HEAD@{1} error: could not apply 614fe5e629b84... try hint: after resolving the conflicts, mark the corrected paths hint: with 'git add ' or 'git rm ' hint: and commit the resul

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 10:27:16AM -0400, Derrick Stolee wrote: > > I don't think we should need such a call. For one thing, if it were > > necessary, that would mean we're not writing out the packet at all. But > > your whole problem is that we're writing the message twice, one of which > > comes

Re: git-diff passes : args to GIT_EXTERNAL_DIFF incorrectly?

2019-08-29 Thread Dmitry Nikulin
Thank you for the reply. On Thu, 29 Aug 2019 at 06:54, Junio C Hamano wrote: > $ git diff -M branch1 branch2 -- file1 file2 > > if file1 and file2 have similar-enough contents, may have a better > chance of what you wanted to ask Git (if I am guessing what it is, > that is). The context here

How to track history of personal changes in a repository?

2019-08-29 Thread Matthew McClure
Hi, I'm looking for a way to track history of personal changes in a repository. I'd like to protect against accidentally pushing the changes to a remote branch. I imagine this working a little like `git ignore`, and a little like a separate branch. It might be like a personal sub-branch that is ig

Re: [PATCH 2/2] list-objects-filter: handle unresolved sparse filter OID

2019-08-29 Thread Derrick Stolee
On 8/29/2019 9:44 AM, Jeff King wrote: > On Thu, Aug 29, 2019 at 09:12:38AM -0400, Derrick Stolee wrote: > >>> +test_expect_success 'partial clone with unresolvable sparse filter fails >>> cleanly' ' >>> + test_must_fail git clone --no-local --no-checkout >>> --filter=sparse:oid=master:sparse-

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Derrick Stolee
On 8/29/2019 10:13 AM, Jeff King wrote: > On Thu, Aug 29, 2019 at 08:58:55AM -0400, Derrick Stolee wrote: > >> However, I do have a theory: the process exits before flushing the >> packet line. Adding this line before exit(1) should fix it: >> >> packet_writer_flush(writer); >> >> I can send

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 08:58:55AM -0400, Derrick Stolee wrote: > However, I do have a theory: the process exits before flushing the > packet line. Adding this line before exit(1) should fix it: > > packet_writer_flush(writer); > > I can send this in a v2, but it would be nice if you could

Re: Is git clone followed by git verify-tag meaningful?

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 09:34:57AM -0400, Konstantin Ryabitsev wrote: > As you know, for the Linux kernel we provide both tag signatures and > detached PGP signatures on tarballs (and the same is true for git). The > argument I hear frequently is that providing detached tarball signatures is > red

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 04:31:34PM +0700, Duy Nguyen wrote: > > If so, how could we get R there? I mean, we could pass it through this > > chain, but the chain already passes a "struct config_options", which > > carries the "commondir" and "git_dir" fields. So it would probably be > > confusing to

Re: [PATCH] replace: stop replace lookup when reaching a self-reference

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 08:22:49PM +0900, Mike Hommey wrote: > It is possible to end up in situations where a replace ref points to > itself. In that case, it would seem better to stop the lookup rather > than try to follow the link infinitely and fail with "replace depth too > high". I don't thi

Re: [PATCH 2/2] list-objects-filter: handle unresolved sparse filter OID

2019-08-29 Thread Jeff King
On Thu, Aug 29, 2019 at 09:12:38AM -0400, Derrick Stolee wrote: > > +test_expect_success 'partial clone with unresolvable sparse filter fails > > cleanly' ' > > + test_must_fail git clone --no-local --no-checkout > > --filter=sparse:oid=master:sparse-filter "file://$(pwd)/sparse-src" sc1 > >

Re: Is git clone followed by git verify-tag meaningful?

2019-08-29 Thread Konstantin Ryabitsev
On Wed, Aug 28, 2019 at 07:47:06PM -0400, Jeff King wrote: On Wed, Aug 28, 2019 at 04:32:24PM -0400, Konstantin Ryabitsev wrote: If I know that a project uses tag signing, would "git clone" followed by "git verify-tag" be meaningful without a "git fsck" in-between? I.e. if an attacker has contr

Re: [PATCH 2/2] list-objects-filter: handle unresolved sparse filter OID

2019-08-29 Thread Derrick Stolee
On 8/28/2019 4:18 PM, Jon Simons wrote: > Handle a potential NULL 'sparse_oid_value' when attempting to load > sparse filter exclusions by blob, to avoid segfaulting later during > 'add_excludes_from_blob_to_list'. > > While here, uniquify the errors emitted to distinguish between the > case that

Re: [PATCH 1/1] upload-pack: fix race condition in error messages

2019-08-29 Thread Derrick Stolee
On 8/28/2019 12:15 PM, SZEDER Gábor wrote: > On Wed, Aug 28, 2019 at 11:39:44AM -0400, Jeff King wrote: >> On Wed, Aug 28, 2019 at 10:54:12AM -0400, Jeff King wrote: >> Unfortunately, however, while running './t5516-fetch-push.sh -r 1,79 --stress' to try to reproduce a failure caused by t

Re: [PATCH 1/1] git-p4: auto-delete named temporary file

2019-08-29 Thread Johannes Schindelin
Hi Junio, On Wed, 28 Aug 2019, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Yes, this was me trying to re-send the patch via GMail's web UI because > > the first time GitGitGadget sent it, it did not get through (only the > > cover letter did). > > As long as that was manual screw-u

[PATCH] replace: stop replace lookup when reaching a self-reference

2019-08-29 Thread Mike Hommey
It is possible to end up in situations where a replace ref points to itself. In that case, it would seem better to stop the lookup rather than try to follow the link infinitely and fail with "replace depth too high". Signed-off-by: Mike Hommey --- replace-object.c | 2 +- 1 file changed, 1 inser

Re: [PATCH v2] merge-options.txt: clarify meaning of various ff-related options

2019-08-29 Thread Sergey Organov
Martin Ågren writes: > Hiya, This one was new to me :-) > > On Wed, 28 Aug 2019 at 21:15, Sergey Organov wrote: >> > I was sort of expecting these to be listed in the order "--ff, --no-ff, >> > --ff-only", and I see Sergey suggested the same ordering. The way your >> > proposed text reads does

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-29 Thread Duy Nguyen
On Thu, Aug 29, 2019 at 11:24 AM Matheus Tavares Bernardino wrote: > > On Tue, Aug 27, 2019 at 8:46 PM Matheus Tavares Bernardino > wrote: > > > > Hi, Duy > > > > On Tue, Aug 27, 2019 at 6:26 AM Duy Nguyen wrote: > > > > > > On Tue, Aug 27, 2019 at 6:57 AM Matheus Tavares > > > wrote: > > > > >

Re: [PATCH v2] merge-options.txt: clarify meaning of various ff-related options

2019-08-29 Thread Sergey Organov
Elijah Newren writes: > On Wed, Aug 28, 2019 at 12:15 PM Sergey Organov wrote: >> >> Hi, >> > [...] >> Dunno if it helps, but here is what I came up with somewhere in previous >> discussions: >> >> --ff:: >> --no-ff:: >> --ff-only:: >> When the merge resolves as a fast-forward, only upda