Re: [PATCH 0/6] Add merge recursive testcases with undetected conflicts

2018-07-09 Thread Jeff King
On Mon, Jul 09, 2018 at 01:22:29PM -0700, Elijah Newren wrote: > Oh, I didn't know about test-lint. Is there a place that documents > the various checks you run, so I can avoid slowing you down? Ones I > know about: > > Already documented: > * `make DEVELOPER=1` (from CodingGuidelines) > *

[PATCH v2 0/2] de-confuse git cherry-pick --author

2018-07-09 Thread Jeff King
On Mon, Jul 09, 2018 at 10:15:05PM -0400, Jeff King wrote: > > Should this not rather be > > > > - if (!cmit || get_revision(opts->revs)) > > - return error("BUG: expected exactly one commit from > > walk"); > > + if (!cmit) > > + return

[PATCH v2 2/2] sequencer: don't say BUG on bogus input

2018-07-09 Thread Jeff King
When cherry-picking a single commit, we go through a special code path that avoids creating a sequencer todo list at all. This path expects our revision parsing to turn up exactly one commit, and dies with a BUG if it doesn't. But it's actually quite easy to fool. For example: $ git

[PATCH v2 1/2] sequencer: handle empty-set cases consistently

2018-07-09 Thread Jeff King
If the user gives us a set that prepare_revision_walk() takes to be empty, like: git cherry-pick base..base then we report an error. It's nonsense, and there's nothing to pick. But if they use revision options that later cull the list, like: git cherry-pick --author=nobody base~2..base

Re: Git 2.18: RUNTIME_PREFIX... is it working?

2018-07-09 Thread Jeff King
On Mon, Jul 09, 2018 at 03:58:22PM -0400, Jeff King wrote: > On Sun, Jul 08, 2018 at 11:52:22PM +0200, Johannes Schindelin wrote: > > > Now, if you care to have a look at Dan's (and my) patches to implement > > RUNTIME_PREFIX so that it looks for a directory *relative to the Git > > binary*, you

Re: Git 2.18: RUNTIME_PREFIX... is it working?

2018-07-09 Thread Jeff King
On Mon, Jul 09, 2018 at 10:26:54PM +0200, Johannes Schindelin wrote: > > Would it be reasonable to make RUNTIME_PREFIX the default on systems > > where we _do_ have that support? AFAIK there is no downside to having it > > enabled (minus a few syscalls to find the prefix, I suppose, but I > >

Re: [RFC PATCH 2/6] refs/refs-internal.h: avoid forward declaration of an enum

2018-07-09 Thread Jeff King
On Mon, Jul 09, 2018 at 09:30:12PM +0200, Beat Bolli wrote: > > Other than this minor quibble, the whole series looks good to me, modulo > > the existing review. > > Ooosp, I've just sent the non-RFC reroll without this change. > > Junio, would you squash this into [1/6] and [2/6], please (if

Re: [PATCH 2/2] sequencer: don't say BUG on bogus input

2018-07-09 Thread Jeff King
On Mon, Jul 09, 2018 at 10:24:25PM +0200, Johannes Schindelin wrote: > > diff --git a/sequencer.c b/sequencer.c > > index f692b2ef44..234666b980 100644 > > --- a/sequencer.c > > +++ b/sequencer.c > > @@ -3637,7 +3637,7 @@ int sequencer_pick_revisions(struct replay_opts *opts) > >

Re: [PATCH v2 6/6] commit-graph: add repo arg to graph readers

2018-07-09 Thread Derrick Stolee
On 7/9/2018 4:44 PM, Jonathan Tan wrote: Add a struct repository argument to the functions in commit-graph.h that read the commit graph. (This commit does not affect functions that write commit graphs.) Because the commit graph functions can now read the commit graph of any repository, the

Re: [PATCH v2 on ds/commit-graph-fsck 0/6] Object store refactoring: commit graph

2018-07-09 Thread Derrick Stolee
On 7/9/2018 8:30 PM, Derrick Stolee wrote: On 7/9/2018 6:27 PM, Junio C Hamano wrote: Jonathan Tan writes: This is on ds/commit-graph-fsck. I saw that ds/commit-graph-fsck has been updated to the latest version (v7, including "gc.writeCommitGraph"), so I've rebased my changes on top of

Re: [PATCH v2 on ds/commit-graph-fsck 0/6] Object store refactoring: commit graph

2018-07-09 Thread Derrick Stolee
On 7/9/2018 6:27 PM, Junio C Hamano wrote: Jonathan Tan writes: This is on ds/commit-graph-fsck. I saw that ds/commit-graph-fsck has been updated to the latest version (v7, including "gc.writeCommitGraph"), so I've rebased my changes on top of that branch. There were some mechanical changes

Re: [PATCH v2 1/6] commit-graph: refactor preparing commit graph

2018-07-09 Thread Derrick Stolee
On 7/9/2018 5:41 PM, Stefan Beller wrote: Hi Jonathan, On Mon, Jul 9, 2018 at 1:44 PM Jonathan Tan wrote: Two functions in the code (1) check if the repository is configured for commit graphs, (2) call prepare_commit_graph(), and (3) check if the graph exists. Move (1) and (3) into

Re: I can do past and feature commits. It is a bug?

2018-07-09 Thread Jonathan Nieder
+the public git mailing list, git-secur...@googlegroups.com -> bcc Hi, Lin Terry wrote: > I can do past and feature commits. It is a bug? > > Check out my gitgub page. > https://github.com/terrylinooo > > You can see a LOVE, they are past commits I commited yesterday. The ability to set the

Re: [PATCH 2/2] t3430: update to test with custom commentChar

2018-07-09 Thread brian m. carlson
On Mon, Jul 09, 2018 at 09:48:55PM +0300, Daniel Harding wrote: > Hello brian, > > On Mon, 09 Jul 2018 at 00:02:00 +0300, brian m. carlson wrote: > > Should this affect the "# Merge the topic branch" line (and the "# C", > > "# E", and "# H" lines in the next test) that appears below this? It >

Re: [PATCH 07/17] commit: increase commit message buffer size

2018-07-09 Thread brian m. carlson
On Mon, Jul 09, 2018 at 10:45:33AM -0700, Junio C Hamano wrote: > Derrick Stolee writes: > > > On 7/8/2018 7:36 PM, brian m. carlson wrote: > >> diff --git a/refs/files-backend.c b/refs/files-backend.c > >> index a9a066dcfb..252f835bae 100644 > >> --- a/refs/files-backend.c > >> +++

Re: [PATCH 01/17] cache: update object ID functions for the_hash_algo

2018-07-09 Thread brian m. carlson
On Sun, Jul 08, 2018 at 09:31:42PM -0700, Jacob Keller wrote: > On Sun, Jul 8, 2018 at 9:05 PM Eric Sunshine wrote: > > > > On Sun, Jul 8, 2018 at 10:38 PM Jacob Keller wrote: > > > On Sun, Jul 8, 2018 at 4:39 PM brian m. carlson > > > wrote: > > > > static inline int oidcmp(const struct

Re: Subscribing Apple people to git-secur...@googlegroups.com

2018-07-09 Thread Jonathan Nieder
+git@vger Jeff King wrote: > On Tue, Jul 03, 2018 at 08:48:14AM -0700, Jonathan Nieder wrote: >> Administrivia: do you mind if I bounce these messages to some archived >> list, either git@vger.kernel.org or git-security? Or if we'd prefer >> to avoid the noise from that, do you mind if I work

Re: [PATCH 0/4] Use oid_object_info() instead of read_object_file()

2018-07-09 Thread Junio C Hamano
Оля Тележная writes: > Hello everyone, > This is my new attempt to start using oid_object_info_extended() in > ref-filter. You could look at previous one [1] [2] but it is not > necessary. Yup, it sounds like a sensible thing to do to try asking object-info helper instead of reading the whole

Re: [PATCH 2/4] ref-filter: add empty values to technical fields

2018-07-09 Thread Junio C Hamano
Olga Telezhnaya writes: > Atoms like "align" or "end" do not have string representation. > Earlier we had to go and parse whole object with a hope that we > could fill their string representations. It's easier to fill them > with an empty string before we start to work with whole object. > >

Re: Subscribing Apple people to git-secur...@googlegroups.com

2018-07-09 Thread Jeff King
On Tue, Jul 03, 2018 at 08:48:14AM -0700, Jonathan Nieder wrote: > Administrivia: do you mind if I bounce these messages to some archived > list, either git@vger.kernel.org or git-security? Or if we'd prefer > to avoid the noise from that, do you mind if I work with Eric Wong to > get them

Re: Subscribing Apple people to git-secur...@googlegroups.com

2018-07-09 Thread Jeff King
On Mon, Jul 02, 2018 at 01:58:21PM -0700, Akilsrin wrote: > Could “ProdsecOSS " also be added to the > git-security mailing list. It’s another account I control to ensure my > team and I track open source bugs. > > The git repo: could you add https://github.com/product-security-OSS >

Re: Subscribing Apple people to git-secur...@googlegroups.com

2018-07-09 Thread Jonathan Nieder
Administrivia: do you mind if I bounce these messages to some archived list, either git@vger.kernel.org or git-security? Or if we'd prefer to avoid the noise from that, do you mind if I work with Eric Wong to get them injected in the https://public-inbox.org/ archive? Hi, Jeff King wrote: > On

Re: Subscribing Apple people to git-secur...@googlegroups.com

2018-07-09 Thread Jeff King
On Mon, Jul 02, 2018 at 09:29:41PM +0200, Christian Couder wrote: > When people complained a month ago about the MacOS package on > https://git-scm.com/ not being up-to-date after the Git security > release, I got in touch with Apple people GitLab has been working with > to see if they could help

Re: Subscribing Apple people to git-secur...@googlegroups.com

2018-07-09 Thread Jeff King
On Mon, Jul 02, 2018 at 01:15:19PM -0700, Jeremy Huddleston Sequoia wrote: > > I hope that maybe they're also interested in reducing the overall > > diff between upstream Git and what ships with XCode. Last time I > > looked (which was admittedly a while ago), a lot of the changes > > seemed like

Re: Subscribing Apple people to git-secur...@googlegroups.com

2018-07-09 Thread Jeremy Huddleston Sequoia
+Akila Hi, Replies inline. > On Jul 2, 2018, at 12:50, Jeff King wrote: > > On Mon, Jul 02, 2018 at 09:29:41PM +0200, Christian Couder wrote: > >> When people complained a month ago about the MacOS package on >> https://git-scm.com/ not being up-to-date after the Git security >> release, I

Subscribing Apple people to git-secur...@googlegroups.com

2018-07-09 Thread Christian Couder
Hi Peff (and Jonathan), When people complained a month ago about the MacOS package on https://git-scm.com/ not being up-to-date after the Git security release, I got in touch with Apple people GitLab has been working with to see if they could help on this. As the urgent issue was resolved when

Re: [PATCH v2 on ds/commit-graph-fsck 0/6] Object store refactoring: commit graph

2018-07-09 Thread Junio C Hamano
Jonathan Tan writes: > This is on ds/commit-graph-fsck. > > I saw that ds/commit-graph-fsck has been updated to the latest version > (v7, including "gc.writeCommitGraph"), so I've rebased my changes on top > of that branch. There were some mechanical changes needed during the > rebase, so I'm

Re: [PATCH v3 01/20] linear-assignment: a function to solve least-cost assignment problems

2018-07-09 Thread Junio C Hamano
Johannes Schindelin writes: > Speaking of GitGitGadget: I just encoutered a problem with your > `refs/notes/amlog` and I hope you can help me with that. > ... > When I ask `git notes --ref=refs/notes/gitster-amlog show > 4cec3986f017d84c8d6a2c4233d2eba4a3ffa60d` (the SHA-1 is the one >

refs/notes/amlog problems, was Re: [PATCH v3 01/20] linear-assignment: a function to solve least-cost assignment problems

2018-07-09 Thread Johannes Schindelin
Hi Junio, On Sun, 8 Jul 2018, Johannes Schindelin wrote: > I just encoutered a problem with your `refs/notes/amlog` and I hope you > can help me with that. > > Concretely, I want GitGitGadget to be able to identify the commit that > corresponds to a given mail that contained a patch (if it ever

Re: [PATCH 0/6] Compile cleanly in pedantic mode

2018-07-09 Thread Beat Bolli
On 09.07.18 23:45, Junio C Hamano wrote: > Beat Bolli writes: > >> While developing 6aaded550 ("builtin/config: work around an unsized >> array forward declaration", 2018-07-05), I have compiled Git with >> CFLAGS="-std=c99 -pedantic". > > Nicely done. > > With these 6 patches and the

Re: [PATCH v2 on ds/commit-graph-fsck 0/6] Object store refactoring: commit graph

2018-07-09 Thread Stefan Beller
Hi Jonathan, > This is on ds/commit-graph-fsck. > [...] > I've also added a patch (patch 1) that removes some duplication of > implementation that Junio talked about in [1]. I think this series is good; Thanks, Stefan

Re: [PATCH 0/6] Compile cleanly in pedantic mode

2018-07-09 Thread Junio C Hamano
Beat Bolli writes: > While developing 6aaded550 ("builtin/config: work around an unsized > array forward declaration", 2018-07-05), I have compiled Git with > CFLAGS="-std=c99 -pedantic". Nicely done. With these 6 patches and the USE_PARENCE_AROUND_GETTEXT_N hack, the forward decl of the

Re: [PATCH v2 1/6] commit-graph: refactor preparing commit graph

2018-07-09 Thread Stefan Beller
Hi Jonathan, On Mon, Jul 9, 2018 at 1:44 PM Jonathan Tan wrote: > > Two functions in the code (1) check if the repository is configured for > commit graphs, (2) call prepare_commit_graph(), and (3) check if the > graph exists. Move (1) and (3) into prepare_commit_graph(), reducing > duplication

Re: [PATCH 4/6] sequencer.c: avoid empty statements at top level

2018-07-09 Thread Junio C Hamano
Beat Bolli writes: > The macro GIT_PATH_FUNC expands to a function definition that ends with > a closing brace. Remove two extra semicolons. Good. Thanks. > > While at it, fix the example in path.h. > > Signed-off-by: Beat Bolli > --- > path.h | 2 +- > sequencer.c | 4 ++-- > 2 files

Re: [RFC PATCH 4/6] sequencer.c: avoid empty statements at top level

2018-07-09 Thread Beat Bolli
On 09.07.18 23:34, Junio C Hamano wrote: > Beat Bolli writes: > >> The marco GIT_PATH_FUNC expands to a complete statement including the >> semicolon. Remove two extra trailing semicolons. > > Wait a bit. The observation in the log message and the > implementation of GIT_PATH_FUNC() do not

Re: [RFC PATCH 4/6] sequencer.c: avoid empty statements at top level

2018-07-09 Thread Junio C Hamano
Beat Bolli writes: > The marco GIT_PATH_FUNC expands to a complete statement including the > semicolon. Remove two extra trailing semicolons. Wait a bit. The observation in the log message and the implementation of GIT_PATH_FUNC() do not match. #define GIT_PATH_FUNC(func, filename) \

Re: [PATCH 1/3] t7405: add a file/submodule conflict

2018-07-09 Thread Stefan Beller
On Sat, Jul 7, 2018 at 1:44 PM Elijah Newren wrote: > > In the case of a file/submodule conflict, although both cannot exist at > the same path, we expect both to be present somewhere for the user to be > able to resolve the conflict with. Add a testcase for this. > > Signed-off-by: Elijah

Re: [PATCH 2/2] sequencer: don't say BUG on bogus input

2018-07-09 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Peff, > > On Mon, 9 Jul 2018, Jeff King wrote: > >> diff --git a/sequencer.c b/sequencer.c >> index f692b2ef44..234666b980 100644 >> --- a/sequencer.c >> +++ b/sequencer.c >> @@ -3637,7 +3637,7 @@ int sequencer_pick_revisions(struct replay_opts *opts) >>

Re: [PATCH] gc --auto: release pack files before auto packing

2018-07-09 Thread Junio C Hamano
Duy Nguyen writes: > On Sun, Jul 8, 2018 at 1:16 AM Kim Gybels wrote: >> Should I post a v3 that goes back to the original fix, but uses >> test_i18ngrep instead of grep? > > Yes please. In my comment I did write we didn't need the repo anymore > (or something along that line) which turns out

Re: Git 2.18: RUNTIME_PREFIX... is it working?

2018-07-09 Thread Junio C Hamano
Jeff King writes: > On Sun, Jul 08, 2018 at 11:52:22PM +0200, Johannes Schindelin wrote: > >> Now, if you care to have a look at Dan's (and my) patches to implement >> RUNTIME_PREFIX so that it looks for a directory *relative to the Git >> binary*, you will see that it is far from portable. In

Re: [PATCH v3 16/20] range-diff --dual-color: work around bogus white-space warning

2018-07-09 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Jul 3, 2018 at 4:26 AM Johannes Schindelin via GitGitGadget > wrote: >> >> From: Johannes Schindelin >> >> When displaying a diff of diffs, it is possible that there is an outer >> `+` before a context line. That happens when the context changed between >> old

Re: Unexpected behavior with :/ references

2018-07-09 Thread William Chargin
Yep, I agree with your analysis. I'd be happy to test and commit this, probably later today. Thanks for your input, and for the patch! Best, WC

[PATCH v2 6/6] commit-graph: add repo arg to graph readers

2018-07-09 Thread Jonathan Tan
Add a struct repository argument to the functions in commit-graph.h that read the commit graph. (This commit does not affect functions that write commit graphs.) Because the commit graph functions can now read the commit graph of any repository, the global variable core_commit_graph has been

[PATCH v2 4/6] commit-graph: add free_commit_graph

2018-07-09 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- builtin/commit-graph.c | 2 ++ commit-graph.c | 24 ++-- commit-graph.h | 2 ++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c index c7d0db5ab4..0bf0c48657

[PATCH v2 5/6] commit-graph: store graph in struct object_store

2018-07-09 Thread Jonathan Tan
Instead of storing commit graphs in static variables, store them in struct object_store. There are no changes to the signatures of existing functions - they all still only support the_repository, and support for other instances of struct repository will be added in a subsequent commit.

[PATCH v2 3/6] commit-graph: add missing forward declaration

2018-07-09 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- commit-graph.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commit-graph.h b/commit-graph.h index 506cb45fb1..674052bef4 100644 --- a/commit-graph.h +++ b/commit-graph.h @@ -5,6 +5,8 @@ #include "repository.h" #include "string-list.h" +struct commit;

[PATCH v2 on ds/commit-graph-fsck 0/6] Object store refactoring: commit graph

2018-07-09 Thread Jonathan Tan
This is on ds/commit-graph-fsck. I saw that ds/commit-graph-fsck has been updated to the latest version (v7, including "gc.writeCommitGraph"), so I've rebased my changes on top of that branch. There were some mechanical changes needed during the rebase, so I'm sending the rebased patches out.

[PATCH v2 1/6] commit-graph: refactor preparing commit graph

2018-07-09 Thread Jonathan Tan
Two functions in the code (1) check if the repository is configured for commit graphs, (2) call prepare_commit_graph(), and (3) check if the graph exists. Move (1) and (3) into prepare_commit_graph(), reducing duplication of code. Signed-off-by: Jonathan Tan --- commit-graph.c | 28

[PATCH v2 2/6] object-store: add missing include

2018-07-09 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- object-store.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/object-store.h b/object-store.h index d683112fd7..f0b77146e4 100644 --- a/object-store.h +++ b/object-store.h @@ -2,6 +2,9 @@ #define OBJECT_STORE_H #include "oidmap.h" +#include "list.h"

Re: [PATCH v3 17/20] range-diff: add a man page

2018-07-09 Thread Johannes Schindelin
Hi Stefan, On Mon, 9 Jul 2018, Stefan Beller wrote: > On Mon, Jul 9, 2018 at 1:00 PM Johannes Schindelin > wrote: > > > > On Mon, 9 Jul 2018, Stefan Beller wrote: > > > > > On Tue, Jul 3, 2018 at 4:26 AM Johannes Schindelin via GitGitGadget > > > wrote: > > > > > > > +'git range-diff'

[PATCH v3] gc --auto: release pack files before auto packing

2018-07-09 Thread Kim Gybels
Teach gc --auto to release pack files before auto packing the repository to prevent failures when removing them. Also teach the test 'fetching with auto-gc does not lock up' to complain when it is no longer triggering an auto packing of the repository. Fixes

Re: [PATCH v4] grep.c: teach 'git grep --only-matching'

2018-07-09 Thread Taylor Blau
On Mon, Jul 09, 2018 at 03:33:47PM -0500, Taylor Blau wrote: > [ ... ] > --- > Documentation/git-grep.txt | 7 +- > builtin/grep.c | 6 + > grep.c | 51 ++ > grep.h | 1 + > t/t7810-grep.sh

Re: [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-07-09 Thread Junio C Hamano
Brandon Williams writes: > On 07/09, Junio C Hamano wrote: >> Brandon Williams writes: >> >> > I agree with this observation, though I'm a bit sad about it. I think >> > that having tag auto-following the default is a little confusing (and >> > hurts perf[1] when using proto v2) but since

[PATCH v4] grep.c: teach 'git grep --only-matching'

2018-07-09 Thread Taylor Blau
Teach 'git grep --only-matching', a new option to only print the matching part(s) of a line. For instance, a line containing the following (taken from README.md:27): (`man gitcvs-migration` or `git help cvs-migration` if git is Is printed as follows: $ git grep --line-number --column

Re: Git 2.18: RUNTIME_PREFIX... is it working?

2018-07-09 Thread Johannes Schindelin
Hi Peff, On Mon, 9 Jul 2018, Jeff King wrote: > On Sun, Jul 08, 2018 at 11:52:22PM +0200, Johannes Schindelin wrote: > > > Now, if you care to have a look at Dan's (and my) patches to implement > > RUNTIME_PREFIX so that it looks for a directory *relative to the Git > > binary*, you will see

Re: [PATCH 0/6] Compile cleanly in pedantic mode

2018-07-09 Thread Beat Bolli
On 09.07.18 21:25, Beat Bolli wrote: > While developing 6aaded550 ("builtin/config: work around an unsized > array forward declaration", 2018-07-05), I have compiled Git with > CFLAGS="-std=c99 -pedantic". > > This series fixes a few compiler warnings when compiling with these > options. As a

Re: [PATCH v3 17/20] range-diff: add a man page

2018-07-09 Thread Stefan Beller
On Mon, Jul 9, 2018 at 1:00 PM Johannes Schindelin wrote: > > Hi Stefan, > > On Mon, 9 Jul 2018, Stefan Beller wrote: > > > On Tue, Jul 3, 2018 at 4:26 AM Johannes Schindelin via GitGitGadget > > wrote: > > > > > +'git range-diff' [--color=[]] [--no-color] [] > > > + [--dual-color]

Re: [PATCH 2/2] sequencer: don't say BUG on bogus input

2018-07-09 Thread Johannes Schindelin
Hi Peff, On Mon, 9 Jul 2018, Jeff King wrote: > diff --git a/sequencer.c b/sequencer.c > index f692b2ef44..234666b980 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -3637,7 +3637,7 @@ int sequencer_pick_revisions(struct replay_opts *opts) > return error(_("revision

Re: [PATCH 0/6] Add merge recursive testcases with undetected conflicts

2018-07-09 Thread Elijah Newren
On Mon, Jul 9, 2018 at 10:53 AM, Junio C Hamano wrote: > Elijah Newren writes: > >> When a merge succeeds, we expect the resulting contents to depend only >> upon the trees and blobs of the branches involved and of their merge >> base(s). Unfortunately, there are currently about half a dozen

Re: [PATCH 1/2] sequencer: handle empty-set cases consistently

2018-07-09 Thread Johannes Schindelin
Hi Peff, On Mon, 9 Jul 2018, Jeff King wrote: > If the user gives us a set that prepare_revision_walk() > takes to be empty, like: > > git cherry-pick base..base > > then we report an error. It's nonsense, and there's nothing > to pick. > > But if they use revision options that later cull

Re: [PATCH 1/2] sequencer: handle empty-set cases consistently

2018-07-09 Thread Junio C Hamano
Jeff King writes: > If the user gives us a set that prepare_revision_walk() > takes to be empty, like: > > git cherry-pick base..base > > then we report an error. It's nonsense, and there's nothing > to pick. > > But if they use revision options that later cull the list, > like: > > git

Re: [PATCH 0/2] Avoiding errors when partial cloning a tagged blob

2018-07-09 Thread Jonathan Tan
> > An argument could be made that we should not merge patch 2 just yet due > > to the fact that some server implementations (such as Git and JGit) > > still exhibit the old behavior, and the resulting clones (albeit failing > > fsck) are still usable, because when attempting to load the blob, Git

Re: [PATCH 2/2] t3430: update to test with custom commentChar

2018-07-09 Thread Junio C Hamano
Daniel Harding writes: > One question about my original patch - there I had replaced a "grep > -v" call with a "git stripspace" call in the 'generate correct todo > list' test. Is relying on "git stripspace" in a test acceptable, or > should external text manipulation tools like grep, sed etc.

Re: [RFC PATCH 6/6] utf8.c: avoid char overflow

2018-07-09 Thread Johannes Schindelin
Hi Beat, On Mon, 9 Jul 2018, Beat Bolli wrote: > Am 09.07.2018 15:14, schrieb Johannes Schindelin: > > > > On Sun, 8 Jul 2018, Beat Bolli wrote: > > > > > In ISO C, char constants must be in the range -128..127. Change the BOM > > > constants to unsigned char to avoid overflow. > > > > > >

Re: [PATCH v1 1/2] convert: refactor conversion driver config parsing

2018-07-09 Thread Junio C Hamano
Lars Schneider writes: >> On Jul 8, 2018, at 8:30 PM, larsxschnei...@gmail.com wrote: >> >> From: Lars Schneider >> >> Refactor conversion driver config parsing to ease the parsing of new >> configs in a subsequent patch. >> >> No functional change intended. >> >> Signed-off-by: Lars

Re: [PATCH v3 17/20] range-diff: add a man page

2018-07-09 Thread Johannes Schindelin
Hi Stefan, On Mon, 9 Jul 2018, Stefan Beller wrote: > On Tue, Jul 3, 2018 at 4:26 AM Johannes Schindelin via GitGitGadget > wrote: > > > +'git range-diff' [--color=[]] [--no-color] [] > > + [--dual-color] [--creation-factor=] > > + ( | ... |) > > + > > +DESCRIPTION > >

Re: Git 2.18: RUNTIME_PREFIX... is it working?

2018-07-09 Thread Jeff King
On Sun, Jul 08, 2018 at 11:52:22PM +0200, Johannes Schindelin wrote: > Now, if you care to have a look at Dan's (and my) patches to implement > RUNTIME_PREFIX so that it looks for a directory *relative to the Git > binary*, you will see that it is far from portable. In fact, it is very >

[PATCH 2/2] sequencer: don't say BUG on bogus input

2018-07-09 Thread Jeff King
When cherry-picking a single commit, we go through a special code path that avoids creating a sequencer todo list at all. This path expects our revision parsing to turn up exactly one commit, and dies with a BUG if it doesn't. But it's actually quite easy to fool. For example: $ git

[PATCH 1/2] sequencer: handle empty-set cases consistently

2018-07-09 Thread Jeff King
If the user gives us a set that prepare_revision_walk() takes to be empty, like: git cherry-pick base..base then we report an error. It's nonsense, and there's nothing to pick. But if they use revision options that later cull the list, like: git cherry-pick --author=nobody base~2..base

[PATCH 0/2] de-confuse git cherry-pick --author behavior

2018-07-09 Thread Jeff King
On Mon, Jul 09, 2018 at 03:16:07PM -0400, Jeff King wrote: > I agree that having something similar to commit's "--author" (or even > just "--reset-author") would be useful. When I've had to do this before, > I usually just cherry-pick and then follow-up with "commit --amend > --author" (or use

[PATCH] unicode: update the width tables to Unicode 11

2018-07-09 Thread Beat Bolli
Now that Unicode 11 has been announced[0], update the character width tables to the new version. [0] http://blog.unicode.org/2018/06/announcing-unicode-standard-version-110.html Signed-off-by: Beat Bolli --- unicode-width.h | 41 - 1 file changed, 28

Re: [PATCH v3 16/20] range-diff --dual-color: work around bogus white-space warning

2018-07-09 Thread Stefan Beller
On Tue, Jul 3, 2018 at 4:26 AM Johannes Schindelin via GitGitGadget wrote: > > From: Johannes Schindelin > > When displaying a diff of diffs, it is possible that there is an outer > `+` before a context line. That happens when the context changed between > old and new commit. When that context

Re: [PATCH 0/2] Avoiding errors when partial cloning a tagged blob

2018-07-09 Thread Junio C Hamano
Jonathan Tan writes: > When cloning a repository with a tagged blob (like the Git repository) > with --filter=blob:none, the following message appears: > > error: missing object referenced by 'refs/tags/junio-gpg-pub' > > and the resulting repository also fails fsck. > > Patch 1 fixes

Re: [RFC PATCH 2/6] refs/refs-internal.h: avoid forward declaration of an enum

2018-07-09 Thread Beat Bolli
On 09.07.18 20:46, Jeff King wrote: > On Sun, Jul 08, 2018 at 04:43:38PM +0200, Beat Bolli wrote: > >> diff --git a/refs/refs-internal.h b/refs/refs-internal.h >> index dd834314bd..a78b5cb803 100644 >> --- a/refs/refs-internal.h >> +++ b/refs/refs-internal.h >> @@ -1,6 +1,8 @@ >> #ifndef

Re: [PATCH v3 14/20] diff: add an internal option to dual-color diffs of diffs

2018-07-09 Thread Stefan Beller
On Tue, Jul 3, 2018 at 4:27 AM Johannes Schindelin via GitGitGadget wrote: > > From: Johannes Schindelin > > When diffing diffs, it can be quite daunting to figure out what the heck > is going on, as there are nested +/- signs. > > Let's make this easier by adding a flag in diff_options that

[PATCH 5/6] string-list.c: avoid conversion from void * to function pointer

2018-07-09 Thread Beat Bolli
ISO C forbids the conversion of void pointers to function pointers. Introduce a context struct that encapsulates the function pointer. Signed-off-by: Beat Bolli --- string-list.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/string-list.c

[PATCH 4/6] sequencer.c: avoid empty statements at top level

2018-07-09 Thread Beat Bolli
The macro GIT_PATH_FUNC expands to a function definition that ends with a closing brace. Remove two extra semicolons. While at it, fix the example in path.h. Signed-off-by: Beat Bolli --- path.h | 2 +- sequencer.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 6/6] utf8.c: avoid char overflow

2018-07-09 Thread Beat Bolli
In ISO C, char constants must be in the range -128..127. Change the BOM constants to char literals to avoid overflow. Signed-off-by: Beat Bolli --- utf8.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utf8.c b/utf8.c index d55e20c641..982217eec9 100644 --- a/utf8.c

[PATCH 2/6] refs/refs-internal.h: avoid forward declaration of an enum

2018-07-09 Thread Beat Bolli
Include iterator.h to define enum iterator_selection. Signed-off-by: Beat Bolli --- refs/refs-internal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/refs/refs-internal.h b/refs/refs-internal.h index dd834314bd..a78b5cb803 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@

[PATCH 3/6] convert.c: replace "\e" escapes with "\033".

2018-07-09 Thread Beat Bolli
The "\e" escape is not defined in ISO C. While on this line, add a missing space after the comma. Signed-off-by: Beat Bolli --- convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert.c b/convert.c index 64d0d30e08..edebb946f5 100644 --- a/convert.c +++

[PATCH 1/6] connect.h: avoid forward declaration of an enum

2018-07-09 Thread Beat Bolli
Include protocol.h to define enum protocol_version. Signed-off-by: Beat Bolli --- connect.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connect.h b/connect.h index 0e69c6709c..c86f862f2f 100644 --- a/connect.h +++ b/connect.h @@ -1,6 +1,8 @@ #ifndef CONNECT_H #define CONNECT_H

[PATCH 0/6] Compile cleanly in pedantic mode

2018-07-09 Thread Beat Bolli
While developing 6aaded550 ("builtin/config: work around an unsized array forward declaration", 2018-07-05), I have compiled Git with CFLAGS="-std=c99 -pedantic". This series fixes a few compiler warnings when compiling with these options. Note that all warnings were produced by -pedantic; the

Re: [BUG] git cherry-pick does not complain about unknown options

2018-07-09 Thread Jeff King
On Mon, Jul 09, 2018 at 04:16:16PM +0200, Andrei Rybak wrote: > I was trying to cherry pick commits, while simultaneously changing the > author. Unfortunately, cherry-pick doesn't have the same --author > option as git-commit. However, instead of complaining about unknown > option: Yeah, its

Re: [PATCH 2/2] t3430: update to test with custom commentChar

2018-07-09 Thread Johannes Schindelin
Hi Daniel, On Mon, 9 Jul 2018, Daniel Harding wrote: > On Mon, 09 Jul 2018 at 00:02:00 +0300, brian m. carlson wrote: > > On Sun, Jul 08, 2018 at 09:41:11PM +0300, Daniel Harding wrote: > > > Signed-off-by: Daniel Harding > > > > > diff --git a/t/t3430-rebase-merges.sh

Re: [PATCH 2/2] t3430: update to test with custom commentChar

2018-07-09 Thread Johannes Schindelin
Hi Daniel, On Mon, 9 Jul 2018, Daniel Harding wrote: > One question about my original patch - there I had replaced a "grep -v" > call with a "git stripspace" call in the 'generate correct todo list' > test. Is relying on "git stripspace" in a test acceptable, or should > external text

Re: [PATCH v3 06/24] multi-pack-index: load into memory

2018-07-09 Thread Junio C Hamano
Derrick Stolee writes: > +struct multi_pack_index *load_multi_pack_index(const char *object_dir) > +{ > + struct multi_pack_index *m = NULL; > + int fd; > + struct stat st; > + size_t midx_size; > + void *midx_map = NULL; > + uint32_t hash_version; > + char *midx_name

Re: [PATCH 2/2] t3430: update to test with custom commentChar

2018-07-09 Thread Daniel Harding
Hello brian, On Mon, 09 Jul 2018 at 00:02:00 +0300, brian m. carlson wrote: On Sun, Jul 08, 2018 at 09:41:11PM +0300, Daniel Harding wrote: Signed-off-by: Daniel Harding diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh index 78f7c9958..ff474d033 100755 ---

Re: [RFC PATCH 2/6] refs/refs-internal.h: avoid forward declaration of an enum

2018-07-09 Thread Jeff King
On Sun, Jul 08, 2018 at 04:43:38PM +0200, Beat Bolli wrote: > diff --git a/refs/refs-internal.h b/refs/refs-internal.h > index dd834314bd..a78b5cb803 100644 > --- a/refs/refs-internal.h > +++ b/refs/refs-internal.h > @@ -1,6 +1,8 @@ > #ifndef REFS_REFS_INTERNAL_H > #define REFS_REFS_INTERNAL_H

Re: [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-07-09 Thread Brandon Williams
On 07/09, Junio C Hamano wrote: > Brandon Williams writes: > > > I agree with this observation, though I'm a bit sad about it. I think > > that having tag auto-following the default is a little confusing (and > > hurts perf[1] when using proto v2) but since thats the way its always been > >

Re: [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-07-09 Thread Junio C Hamano
Brandon Williams writes: > I agree with this observation, though I'm a bit sad about it. I think > that having tag auto-following the default is a little confusing (and > hurts perf[1] when using proto v2) but since thats the way its always been > we'll have to live with it for now. I think

Re: [PATCH 2/2] t3430: update to test with custom commentChar

2018-07-09 Thread Daniel Harding
Hi Johannes, On Mon, 09 Jul 2018 at 10:52:13 +0300, Johannes Schindelin wrote: Hi Brian, On Sun, 8 Jul 2018, brian m. carlson wrote: On Sun, Jul 08, 2018 at 09:41:11PM +0300, Daniel Harding wrote: Signed-off-by: Daniel Harding I think maybe, as you suggested, a separate test for this

Re: [PATCH v3 17/20] range-diff: add a man page

2018-07-09 Thread Stefan Beller
On Tue, Jul 3, 2018 at 4:26 AM Johannes Schindelin via GitGitGadget wrote: > +'git range-diff' [--color=[]] [--no-color] [] > + [--dual-color] [--creation-factor=] > + ( | ... |) > + > +DESCRIPTION > +--- > + > +This command shows the differences between two versions of

Re: [RFC PATCH 6/6] utf8.c: avoid char overflow

2018-07-09 Thread Junio C Hamano
Junio C Hamano writes: > Beat Bolli writes: > -static const char utf16_be_bom[] = {0xFE, 0xFF}; -static const char utf16_le_bom[] = {0xFF, 0xFE}; -static const char utf32_be_bom[] = {0x00, 0x00, 0xFE, 0xFF}; -static const char utf32_le_bom[] = {0xFF, 0xFE, 0x00, 0x00};

Re: What's cooking in git.git (Jun 2018, #07; Thu, 28)

2018-07-09 Thread Junio C Hamano
Jonathan Tan writes: >> * jt/fetch-pack-negotiator (2018-06-15) 7 commits >> - fetch-pack: introduce negotiator API >> - fetch-pack: move common check and marking together >> - fetch-pack: make negotiation-related vars local >> - fetch-pack: use ref adv. to prune "have" sent >> -

Re: Unexpected behavior with :/ references

2018-07-09 Thread Jeff King
On Sun, Jul 08, 2018 at 10:13:12PM -0700, William Chargin wrote: > After further investigation, it appears that ":/foo" indeed resolves to > the commit with message "foobar" (in the above example) if the commits > are not all created at the same time: e.g., by adding `sleep 1` between > the

Re: [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-07-09 Thread Brandon Williams
On 07/09, Jonathan Nieder wrote: > Hi, > > Jonathan Tan wrote: > > > --- a/builtin/fetch.c > > +++ b/builtin/fetch.c > > @@ -359,7 +359,7 @@ static struct ref *get_ref_map(struct transport > > *transport, > > refspec_ref_prefixes(>remote->fetch, _prefixes); > > > > if

Re: [RFC PATCH 6/6] utf8.c: avoid char overflow

2018-07-09 Thread Beat Bolli
On 09.07.18 18:33, Junio C Hamano wrote: > Beat Bolli writes: > -static const char utf16_be_bom[] = {0xFE, 0xFF}; -static const char utf16_le_bom[] = {0xFF, 0xFE}; -static const char utf32_be_bom[] = {0x00, 0x00, 0xFE, 0xFF}; -static const char utf32_le_bom[] = {0xFF, 0xFE,

Re: [PATCH 0/6] Add merge recursive testcases with undetected conflicts

2018-07-09 Thread Junio C Hamano
Elijah Newren writes: > SPOILER ALERT: This series contains answers to the "fun puzzle" at > > https://public-inbox.org/git/CABPp-BFc1OLYKzS5rauOehvEugPc0oGMJp-NMEAmVMW7QR=4...@mail.gmail.com/ > > When a merge succeeds, we expect the resulting contents to depend only > upon the trees and

Re: [PATCH 07/17] commit: increase commit message buffer size

2018-07-09 Thread Junio C Hamano
Derrick Stolee writes: > On 7/8/2018 7:36 PM, brian m. carlson wrote: >> 100 bytes is not sufficient to ensure we can write a commit message >> buffer when using a 32-byte hash algorithm. Increase the buffer size to >> ensure we have sufficient space. >> >> Signed-off-by: brian m. carlson >>

Re: [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-07-09 Thread Jonathan Nieder
Hi, Jonathan Tan wrote: > --- a/builtin/fetch.c > +++ b/builtin/fetch.c > @@ -359,7 +359,7 @@ static struct ref *get_ref_map(struct transport > *transport, > refspec_ref_prefixes(>remote->fetch, _prefixes); > > if (ref_prefixes.argc && > - (tags == TAGS_SET ||

  1   2   >