[PATCH 2/2] read-cache: fix directory/file conflict handling in read_index_unmerged()

2018-07-10 Thread Elijah Newren
read_index_unmerged() has two intended purposes: * return 1 if there are any unmerged entries, 0 otherwise * drops any higher-stage entries down to stage #0 There are several callers of read_index_unmerged() that check the return value to see if it is non-zero, all of which then die() if that

[PATCH 0/2] Address recovery failures with directory/file conflicts

2018-07-10 Thread Elijah Newren
Several "recovery" commands outright fail or do not fully recover when directory-file conflicts are present. This includes: * git read-tree --reset HEAD * git am --skip * git am --abort * git merge --abort (or git reset --merge) * git reset --hard It turns out that multiple

[PATCH 1/2] t1015: demonstrate directory/file conflict recovery failures

2018-07-10 Thread Elijah Newren
Several "recovery" commands outright fail or do not fully recover when directory-file conflicts are present. This includes: * git read-tree --reset HEAD * git am --skip * git am --abort * git merge --abort * git reset --hard Add testcases documenting these shortcomings. Signed-off-by:

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

2018-07-10 Thread Elijah Newren
On Mon, Jul 9, 2018 at 1:22 PM, Elijah Newren wrote: > 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 >>>

[PATCH v2 3/3] t7405: verify 'merge --abort' works after submodule/path conflicts

2018-07-10 Thread Elijah Newren
Signed-off-by: Elijah Newren --- t/t7405-submodule-merge.sh | 31 +++ 1 file changed, 31 insertions(+) diff --git a/t/t7405-submodule-merge.sh b/t/t7405-submodule-merge.sh index 45d1779d2..7855bd864 100755 --- a/t/t7405-submodule-merge.sh +++

[PATCH v2 2/3] t7405: add a directory/submodule conflict

2018-07-10 Thread Elijah Newren
For a directory/submodule conflict, we want contents from both the directory and the submodule to be present for the user to use to resolve the conflict, but we do not want paths under the directory being written into the submodule and we do not want the merge being confused by paths under the

[PATCH v2 0/3] Add testcases showing suboptimal submodule/path conflict handling

2018-07-10 Thread Elijah Newren
This patch series documents a few problems with submodules and merging, first mentioned at [1]. Changes since v1 (full range-diff below): - Incorporate suggestions from Stefan: use test_commit and git submodule add (note that git submodule add means there will also be a .gitmodules

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

2018-07-10 Thread Elijah Newren
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 Newren --- t/t7405-submodule-merge.sh | 54

Re: [RFC PATCH 2/7] t6044: add a testcase for index matching head, when head doesn't match HEAD

2018-07-10 Thread Elijah Newren
On Tue, Jul 10, 2018 at 1:39 PM, SZEDER Gábor wrote: >> diff --git a/t/t6044-merge-unrelated-index-changes.sh >> b/t/t6044-merge-unrelated-index-changes.sh >> index f9c2f8179..92ec55255 100755 >> --- a/t/t6044-merge-unrelated-index-changes.sh >> +++ b/t/t6044-merge-unrelated-index-changes.sh >>

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

2018-07-10 Thread brian m. carlson
On Tue, Jul 10, 2018 at 02:08:28PM -0400, Ben Peart wrote: > > > On 7/9/2018 7:39 PM, brian m. carlson wrote: > > On Mon, Jul 09, 2018 at 10:45:33AM -0700, Junio C Hamano wrote: > > > As Brandon alludes to downthread, we probably should use strbuf for > > > things like this these days, so a

Re: [GSoC][PATCH v3 11/13] rebase--interactive: remove unused modes and functions

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > This removes the modes `--skip-unnecessary-picks`, `--append-todo-help`, > `--checkout-onto`, `--shorten-ids` and `--expand-ids` from > rebase--helper.c, the functions of git-rebase--interactive.sh that were > rendered useless by the rewrite of complete_action(), and >

Re: [GSoC][PATCH v3 10/13] rebase--interactive: rewrite complete_action() in C

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > This rewrites complete_action() from shell to C. > > A new mode is added to rebase--helper (`--complete-action`), as well as > a new flag (`--autosquash`). > > Finally, complete_action() is stripped from git-rebase--interactive.sh. > > The original complete_action() checked

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

2018-07-10 Thread Jonathan Nieder
A quick correction: Jonathan Nieder wrote: > Similarly, various features of other tools (like bash's > support for <(echo hi)) also rely on /proc. That relies on /dev/fd, not /proc, but same idea. Tools like "ps" rely on /proc. Sorry for the noise, Jonathan

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

2018-07-10 Thread Jonathan Nieder
Hi, Jeff King wrote: > My point is that aside from RUNTIME_PREFIX, we don't need /proc. So > somebody who currently builds Git with a static path like > "/usr/libexec/git-core" and runs it inside a chroot will be just fine as > long as /usr/libexec/git-core is available at that name inside the >

Important Notice...Reply Now

2018-07-10 Thread Richard & Angela Maxwell
My wife and I won the Euro Millions Lottery of £53 Million British Pounds and we have voluntarily decided to donate €1,000,000EUR(One Million Euros) to 5 individuals randomly as part of our own charity project. To verify our lottery winnings,please see our interview by visiting the web page

[PATCH] ws: do not reset and set color twice

2018-07-10 Thread Stefan Beller
When outputting lines that are checked for white space, we first use emit_line_0 to emit the prefix, and then the ws specific code. The code at each site carefully sets the color and then resets it, though it is the same color. Avoid setting the color twice by passing a newly introduced flag that

Re: [PATCH v2 00/10] rerere: handle nested conflicts

2018-07-10 Thread Thomas Gummerer
On 07/06, Junio C Hamano wrote: > Thomas Gummerer writes: > > > On 06/05, Thomas Gummerer wrote: > >> The previous round was at > >> <20180520211210.1248-1-t.gumme...@gmail.com>. > >> > >> Thanks Junio for the comments on the previous round. > >> > >> Changes since v2: > >> - lowercase the

Re: [PATCH v1] convert log_ref_write_fd() to use strbuf

2018-07-10 Thread Ben Peart
On 7/10/2018 4:21 PM, Jeff King wrote: On Tue, Jul 10, 2018 at 12:41:52PM -0700, Junio C Hamano wrote: Jeff King writes: - while (buf < cp && isspace(cp[-1])) - cp--; - *cp++ = '\n'; - return cp - buf; + strbuf_rtrim(sb); Using rtrim is a nice

Re: [PATCH v2] convert log_ref_write_fd() to use strbuf

2018-07-10 Thread Junio C Hamano
Ben Peart writes: > diff --git a/refs/files-backend.c b/refs/files-backend.c > index a9a066dcfb..054306d779 100644 > --- a/refs/files-backend.c > +++ b/refs/files-backend.c > @@ -1582,26 +1582,17 @@ static int log_ref_write_fd(int fd, const struct > object_id *old_oid, >

Re: [PATCH v2 9/9] gpg-interface t: extend the existing GPG tests with GPGSM

2018-07-10 Thread Junio C Hamano
Henning Schild writes: > Add test cases to cover the new X509/gpgsm support. Most of them > resemble existing ones. They just switch the format to x509 and set the > signingkey when creating signatures. Validation of signatures does not > need any configuration of git, it does need gpgsm to be

[PATCH v2] convert log_ref_write_fd() to use strbuf

2018-07-10 Thread Ben Peart
Since we don't care about how many bytes were written, simplify the return value logic. log_ref_write_fd() was written long before strbuf was fleshed out. Remove the old manual buffer management code and replace it with strbuf(). Also update copy_reflog_msg() which is called only by

Re: [PATCH v2 4/9] t6044: add a testcase for index matching head, when head doesn't match HEAD

2018-07-10 Thread SZEDER Gábor
> diff --git a/t/t6044-merge-unrelated-index-changes.sh > b/t/t6044-merge-unrelated-index-changes.sh > index f9c2f8179..92ec55255 100755 > --- a/t/t6044-merge-unrelated-index-changes.sh > +++ b/t/t6044-merge-unrelated-index-changes.sh > @@ -126,6 +126,17 @@ test_expect_failure 'recursive, when

Re: git log --shortstat doesn't respect -c (but --stat does)

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 03:46:14PM -0400, David Turner wrote: > This seems inconsistent: > > $ git log --oneline --stat 91ccfb85176 -c > 91ccfb8517 Merge branch 'sb/diff-color-move' > > diff.c | 28 +++- > t/t4015-diff-whitespace.sh | 9 + >

Re: [PATCH v1] convert log_ref_write_fd() to use strbuf

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 12:41:52PM -0700, Junio C Hamano wrote: > Jeff King writes: > > >> - while (buf < cp && isspace(cp[-1])) > >> - cp--; > >> - *cp++ = '\n'; > >> - return cp - buf; > >> + strbuf_rtrim(sb); > > > > Using rtrim is a nice reduction in complexity. A pure

info!!

2018-07-10 Thread Lee Morrow
Top of the day to you, this is in respect of a very beneficial transaction which you would not want to let go reply for more details, Regards, Lee

[PATCH] diff.c: clarify emit_line_0

2018-07-10 Thread Stefan Beller
emit_line_0 grew complicated again, so here is an attempt to make it a bit simpler. emit_line_0 is called for all lines that are added, removed or context lines, and it follows the format: \ with each of the components optional. Another follow up cleanup (that also touches the

[PATCH 1/2] diff.c: convert emit_line_ws_markup to take string for sign

2018-07-10 Thread Stefan Beller
For the diff of diffs, we have more than one character at the beginning of the line with special meaning, so let's pass around a string that contains all the markup for the line Signed-off-by: Stefan Beller --- diff.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

git log --shortstat doesn't respect -c (but --stat does)

2018-07-10 Thread David Turner
This seems inconsistent: $ git log --oneline --stat 91ccfb85176 -c 91ccfb8517 Merge branch 'sb/diff-color-move' diff.c | 28 +++- t/t4015-diff-whitespace.sh | 9 + 2 files changed, 24 insertions(+), 13 deletions(-) d1114d87c7 Merge branch

Re: [PATCH v1] convert log_ref_write_fd() to use strbuf

2018-07-10 Thread Junio C Hamano
Jeff King writes: >> -while (buf < cp && isspace(cp[-1])) >> -cp--; >> -*cp++ = '\n'; >> -return cp - buf; >> +strbuf_rtrim(sb); > > Using rtrim is a nice reduction in complexity. A pure translation would > include a final strbuf_addch(sb, '\n'). It looks like you

[PATCH v2] unpack-trees: do not fail reset because of unmerged skipped entry

2018-07-10 Thread Max Kirillov
After modify/delete merge conflict happens in a file skipped by sparse checkout, "git reset --merge", which implements the "--abort" actions, and "git reset --hard" fail with message "Entry * not uptodate. Cannot update sparse checkout." As explained in [1], the up-to-date checker mistakenly

Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-07-10 Thread Max Kirillov
On Fri, Jun 15, 2018 at 12:58:40PM -0700, Junio C Hamano wrote: > Do we want to verify the state after the 'hard' reset succeeds as > well? Things like > > - all paths in the HEAD and all paths in the index are identical; > > - paths that do exist in the working tree are all identical to

Re: [PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-07-10 Thread Max Kirillov
On Sat, Jun 16, 2018 at 07:14:44AM +0200, Duy Nguyen wrote: > -- 8< -- > diff --git a/unpack-trees.c b/unpack-trees.c > index 3a85a02a77..eb544ee1b3 100644 > --- a/unpack-trees.c > +++ b/unpack-trees.c > @@ -1246,7 +1246,7 @@ static void mark_new_skip_worktree(struct exclude_list > *el, >

Re: [PATCH v2 7/9] gpg-interface: introduce new config to select per gpg format program

2018-07-10 Thread Junio C Hamano
Jeff King writes: > Should we allow: > > [gpg "OpenPGP"] > program = whatever > > given that we allow: > > [gpg] > format = OpenPGP If the latter is allowed then we should allow the former. But because allowing the former is cumbersome, we may be better off not parsing the value

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

2018-07-10 Thread Jeremy Huddleston Sequoia
> On Jul 10, 2018, at 5:27 AM, Ævar Arnfjörð Bjarmason wrote: > > On Tue, Jul 3, 2018 at 3:36 PM, Jeff King wrote: >> 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

Re: [PATCH] sha1-name.c: for ":/", find detached HEAD commits

2018-07-10 Thread Junio C Hamano
William Chargin writes: > This patch broadens the set of commits matched by ":/" pathspecs to > include commits reachable from HEAD but not any named ref. This avoids > surprising behavior when working with a detached HEAD and trying to > refer to a commit that was recently created and only

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

2018-07-10 Thread Johannes Schindelin
Hi Peff, On Mon, 2 Jul 2018, 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 got in touch with Apple

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

2018-07-10 Thread Stefan Beller
This is developed on top of 4a68b95ce2a6 (your series here) This is an attempt to explain the previous email better, specially the second (yet unfinished) patch, but the resulting emit_line_0 is way clearer in my mind, dropping the 'first' character and instead having a 'char *sign' that (a) we

Re: [GSoC][PATCH v3 09/13] sequencer: change the way skip_unnecessary_picks() returns its result

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > - if (command == SKIP_UNNECESSARY_PICKS && argc == 1) > - return !!skip_unnecessary_picks(); > + if (command == SKIP_UNNECESSARY_PICKS && argc == 1) { > + ret = !!skip_unnecessary_picks(); > + if (!ret && oid) > +

Re: [GSoC][PATCH v3 08/13] sequencer: refactor append_todo_help() to write its message to a buffer

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > diff --git a/rebase-interactive.h b/rebase-interactive.h > index 155219e74..c0ba83be3 100644 > --- a/rebase-interactive.h > +++ b/rebase-interactive.h > @@ -1,7 +1,12 @@ > #ifndef REBASE_INTERACTIVE_H > #define REBASE_INTERACTIVE_H > > -int append_todo_help(unsigned

Re: [GSoC][PATCH v3 04/13] rebase-interactive: rewrite the edit-todo functionality in C

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > This rewrites the edit-todo functionality from shell to C. > > To achieve that, a new command mode, `edit-todo`, is added, and the > `write-edit-todo` flag is removed, as the shell script does not need to > write the edit todo help message to the todo list anymore. > > The

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

2018-07-10 Thread Elijah Newren
On Tue, Jul 10, 2018 at 8:53 AM, Stefan Beller wrote: > On Tue, Jul 10, 2018 at 8:28 AM Elijah Newren wrote: >> 2) I didn't just check what was currently failing but other things >> that should be true for this test. >> >> For item 2, I've had multiple cases in the past where I created a >>

[PATCH 1/2] diff.c: convert emit_line_ws_markup to take string for sign

2018-07-10 Thread Stefan Beller
For the diff of diffs, we have more than one character at the beginning of the line with special meaning, so let's pass around a string that contains all the markup for the line Signed-off-by: Stefan Beller --- diff.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

Re: [PATCH v1] convert log_ref_write_fd() to use strbuf

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 06:20:22PM +, Ben Peart wrote: > log_ref_write_fd() was written long before strbuf was fleshed out. Remove > the old manual buffer management code and replace it with strbuf(). Also > update copy_reflog_msg() which is called only by log_ref_write_fd() to use > strbuf

Re: [PATCH v2 8/9] gpg-interface: introduce new signature format "x509" using gpgsm

2018-07-10 Thread Junio C Hamano
Jeff King writes: >> @@ -16,13 +16,18 @@ struct gpg_format_data { >> >> #define PGP_SIGNATURE "-BEGIN PGP SIGNATURE-" >> #define PGP_MESSAGE "-BEGIN PGP MESSAGE-" >> +#define X509_SIGNATURE "-BEGIN SIGNED MESSAGE-" >> >> -enum gpgformats { PGP_FMT }; >> +enum

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

2018-07-10 Thread Jonathan Tan
> > - if (!core_commit_graph) > > + if (repo_config_get_bool(r, "core.commitgraph", _value) || > > + !config_value) > > + /* > > +* This repository is not configured to use commit graphs, so > > +* do not load one. (But report commit_graph_attempted

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

2018-07-10 Thread Ben Peart
On 7/9/2018 7:39 PM, brian m. carlson wrote: 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 ---

Re: [GSoC][PATCH v3 09/13] sequencer: change the way skip_unnecessary_picks() returns its result

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > @@ -4467,7 +4467,7 @@ int skip_unnecessary_picks(void) > } > > todo_list_release(_list); > - printf("%s\n", oid_to_hex(oid)); > + *output_oid = oid_to_hex(oid); The return value from oid_to_hex() is volatile and does not survive across multiple calls

[PATCH 2/2] WIP diff.c: clarify emit_line_0

2018-07-10 Thread Stefan Beller
This breaks t4034 (word diffs), but all other tests pass. emit_line_0 grew complicated again, so here is an attempt to make it a bit simpler. emit_line_0 is called for all lines that are added, removed or context lines, and it follows the format: with each of the components optional.

Re: [GSoC][PATCH v3 02/13] rebase--interactive: rewrite append_todo_help() in C

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > This rewrites append_todo_help() from shell to C. It also incorporates > some parts of initiate_action() and complete_action() that also write > help texts to the todo file. > > This also introduces the source file rebase-interactive.c. This file > will contain functions

Re: [GSoC][PATCH v3 07/13] rebase -i: rewrite checkout_onto() in C

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > This rewrites checkout_onto() from shell to C. > > A new command (“checkout-onto”) is added to rebase--helper.c. The shell > version is then stripped. > > Signed-off-by: Alban Gruin > --- The only change relative to the previous round seems to be that this round does not

Re: [PATCH] sha1-name.c: for ":/", find detached HEAD commits

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 08:41:06AM -0700, William Chargin wrote: > This patch broadens the set of commits matched by ":/" pathspecs to > include commits reachable from HEAD but not any named ref. This avoids > surprising behavior when working with a detached HEAD and trying to > refer to a commit

[PATCH v1] convert log_ref_write_fd() to use strbuf

2018-07-10 Thread Ben Peart
log_ref_write_fd() was written long before strbuf was fleshed out. Remove the old manual buffer management code and replace it with strbuf(). Also update copy_reflog_msg() which is called only by log_ref_write_fd() to use strbuf as it keeps things consistent. Signed-off-by: Ben Peart --- Notes:

Re: [GSoC][PATCH v3 06/13] rebase -i: rewrite setup_reflog_action() in C

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > This rewrites (the misnamed) setup_reflog_action() from shell to C. The > new version is called prepare_branch_to_be_rebased(). > > A new command is added to rebase--helper.c, “checkout-base”, as well as > a new flag, “verbose”, to avoid silencing the output of the checkout

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

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 08:42:04AM -0700, Elijah Newren wrote: > > test-lint is supposed to be run automatically as part of "make test" (or > > "make prove"), unless you've specifically disabled it by setting > > TEST_LINT. And it does complain for me with your patches. If it doesn't > > for you,

Re: [GSoC][PATCH v3 03/13] editor: add a function to launch the sequence editor

2018-07-10 Thread Junio C Hamano
For those reading from sidelines, this is unchanged from the previous round, and looking good. Alban Gruin writes: > +const char *git_sequence_editor(void) > { > - const char *editor = git_editor(); > + const char *editor = getenv("GIT_SEQUENCE_EDITOR"); > + > + if (!editor) > +

Re: [GSoC][PATCH v3 05/13] sequencer: add a new function to silence a command, except if it fails

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > This adds a new function, run_command_silent_on_success(), to > redirect the stdout and stderr of a command to a strbuf, and then to run > that command. This strbuf is printed only if the command fails. It is > functionnaly similar to output() from git-rebase.sh. > >

Re: [GSoC][PATCH v3 01/13] sequencer: make two functions and an enum from sequencer.c public

2018-07-10 Thread Junio C Hamano
Alban Gruin writes: > This makes rebase_path_todo(), get_missing_commit_check_level() and the > enum check_level accessible outside sequencer.c. check_level is renamed > missing_commit_check_level, and its value names are prefixed by > MISSING_COMMIT_ to avoid namespace pollution. It is not

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

2018-07-10 Thread Jonathan Tan
On Tue, Jul 10, 2018 at 6:18 AM, Johannes Schindelin wrote: >> 32-bit builds complain about this: >> >> t/helper/test-repository.c: In function 'test_parse_commit_in_graph': >> t/helper/test-repository.c:28:9: error: format '%lu' expects argument of >> type 'long unsigned int', but argument

Re: [PATCH v2 8/9] gpg-interface: introduce new signature format "x509" using gpgsm

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 10:40:22AM -0700, Junio C Hamano wrote: > > Extremely minor nit, but if there are no other uses of PGP_SIGNATURE etc > > outside of this array (as I hope there wouldn't be after this series), > > would it make more sense to just include the literals inline in the > > array

Re: [PATCH v2 5/9] gpg-interface: introduce an abstraction for multiple gpg formats

2018-07-10 Thread Junio C Hamano
Henning Schild writes: > Create a struct that holds the format details for the supported formats. > At the moment that is still just "openpgp". This commit prepares for the > introduction of more formats, that might use other programs and match > other signatures. > > Signed-off-by: Henning

Re: [PATCH v2 9/9] gpg-interface t: extend the existing GPG tests with GPGSM

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 01:09:01PM -0400, Jeff King wrote: > > + gpgsm --homedir "${GNUPGHOME}" --import > > "$TEST_DIRECTORY"/lib-gpg/gpgsm.crt.user && > > + gpgsm --homedir "${GNUPGHOME}" -K | grep fingerprint: | cut -d" > > " -f4 | tr -d '\n' > ${GNUPGHOME}/trustlist.txt

Re: [PATCH 4/8] gpg-interface: introduce an abstraction for multiple gpg formats

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 08:58:32AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Fri, Jul 06, 2018 at 10:24:58AM -0700, Junio C Hamano wrote: > > > >> What we've been avoiding was the comma after the last element in the > >> enum (in other words, if PGP_FMT had ',' after it in the

Re: [PATCH v2 0/9] X509 (gpgsm) commit signing support

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 10:52:22AM +0200, Henning Schild wrote: > This series adds support for signing commits with gpgsm. Thanks for working on this. I left a bunch of comments, but overall the direction looks good. We talked about this a bit off-list, but just for the public record: > This

Re: [PATCH v2 9/9] gpg-interface t: extend the existing GPG tests with GPGSM

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 10:52:31AM +0200, Henning Schild wrote: > diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh > index a5d3b2cba..9dcb4e990 100755 > --- a/t/lib-gpg.sh > +++ b/t/lib-gpg.sh > @@ -38,7 +38,14 @@ then > "$TEST_DIRECTORY"/lib-gpg/ownertrust && > gpg

Re: [PATCH v2 8/9] gpg-interface: introduce new signature format "x509" using gpgsm

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 10:52:30AM +0200, Henning Schild wrote: > diff --git a/Documentation/config.txt b/Documentation/config.txt > index c0bd80954..b6f9b47d5 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -1830,7 +1830,7 @@ gpg.program:: > > gpg.format:: >

Re: [PATCH v2 7/9] gpg-interface: introduce new config to select per gpg format program

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 12:54:13PM -0400, Jeff King wrote: > Should we allow: > > [gpg "OpenPGP"] > program = whatever > > given that we allow: > > [gpg] > format = OpenPGP > > ? I think just using strcasecmp() here would be sufficient. But I wonder > if it is a symptom of using the

Re: [PATCH v2 4/9] t/t7510: check the validation of the new config gpg.format

2018-07-10 Thread Junio C Hamano
Henning Schild writes: > Test setting gpg.format to both invalid and valid values. > > Signed-off-by: Henning Schild > --- > t/t7510-signed-commit.sh | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh > index

Re: [PATCH v2 7/9] gpg-interface: introduce new config to select per gpg format program

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 10:52:29AM +0200, Henning Schild wrote: > diff --git a/Documentation/config.txt b/Documentation/config.txt > index ac373e3f4..c0bd80954 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -1832,6 +1832,11 @@ gpg.format:: > Specifies which

Re: [PATCH v2 2/9] gpg-interface: make parse_gpg_output static and remove from interface header

2018-07-10 Thread Junio C Hamano
Henning Schild writes: > This commit turns parse_gpg_output into an internal function, the only > outside user was migrated in an earlier commit. It is not too big a deal but as we prefer to see our history speak in consistent voice, we would usually phrase the above as if we are giving an

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

2018-07-10 Thread Junio C Hamano
"brian m. carlson" writes: >> As Brandon alludes to downthread, we probably should use strbuf for >> things like this these days, so a preliminary clean-up to do so is >> probably a welcome change to sneak in and rebase this series on top >> of. > > Sure, I agree that would be a better change,

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

2018-07-10 Thread Stefan Beller
On Tue, Jul 10, 2018 at 3:08 AM Johannes Schindelin wrote: > > Hi Junio, > > On Mon, 9 Jul 2018, Junio C Hamano wrote: > > > I also wonder if we should be feeding the context lines to ws.c > > machinery in the first place though. > > It *is* confusing, I know. The entire "diff of diffs" concept

Re: [PATCH v1 2/2] convert: add alias support for 'working-tree-encoding' attributes

2018-07-10 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > In 107642fe26 ("convert: add 'working-tree-encoding' attribute", > 2018-04-15) we added an attribute which defines the working tree > encoding of a file. > > Some platforms might spell the name of a certain encoding differently or >

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

2018-07-10 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > 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 Schneider > --- The change unfortunately makes everything indented one

Re: [PATCH v2 5/9] gpg-interface: introduce an abstraction for multiple gpg formats

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 10:52:27AM +0200, Henning Schild wrote: > Create a struct that holds the format details for the supported formats. > At the moment that is still just "openpgp". This commit prepares for the > introduction of more formats, that might use other programs and match > other

[GSoC] GSoC with git, week 10

2018-07-10 Thread Alban Gruin
Hi, I published a new blog post: https://blog.pa1ch.fr/posts/2018/07/10/en/gsoc2018-week-10.html Cheers, Alban

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

2018-07-10 Thread Junio C Hamano
Daniel Jacques writes: > All things considered, I think executable path self-location is markedly more > fragile than using static paths, both with increased dependencies and added > inconsistent behavior and limitations, and should not be the default > on any platform. > > Both Johannes'

Re: [PATCH 4/8] gpg-interface: introduce an abstraction for multiple gpg formats

2018-07-10 Thread Junio C Hamano
Jeff King writes: > On Fri, Jul 06, 2018 at 10:24:58AM -0700, Junio C Hamano wrote: > >> What we've been avoiding was the comma after the last element in the >> enum (in other words, if PGP_FMT had ',' after it in the above >> quoted addition, that would have been violation of that rule), as >>

Re: [PATCH v2 3/9] gpg-interface: add new config to select how to sign a commit

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 10:52:25AM +0200, Henning Schild wrote: > @@ -138,6 +139,12 @@ int git_gpg_config(const char *var, const char *value, > void *cb) > return 0; > } > > + if (!strcmp(var, "gpg.format")) { > + if (strcasecmp(value, "openpgp")) > +

Re: [PATCH v2 4/9] t/t7510: check the validation of the new config gpg.format

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 10:52:26AM +0200, Henning Schild wrote: > diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh > index 6e2015ed9..7e1e9caf4 100755 > --- a/t/t7510-signed-commit.sh > +++ b/t/t7510-signed-commit.sh > @@ -227,4 +227,14 @@ test_expect_success GPG

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

2018-07-10 Thread Stefan Beller
On Tue, Jul 10, 2018 at 8:28 AM Elijah Newren wrote: > > On Mon, Jul 9, 2018 at 2:11 PM, Stefan Beller wrote: > > 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

Re: [PATCH 4/8] gpg-interface: introduce an abstraction for multiple gpg formats

2018-07-10 Thread Junio C Hamano
Jeff King writes: > On Fri, Jul 06, 2018 at 10:24:58AM -0700, Junio C Hamano wrote: > >> What we've been avoiding was the comma after the last element in the >> enum (in other words, if PGP_FMT had ',' after it in the above >> quoted addition, that would have been violation of that rule), as >>

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

2018-07-10 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Junio, > > On Mon, 9 Jul 2018, Junio C Hamano wrote: > >> I also wonder if we should be feeding the context lines to ws.c >> machinery in the first place though. > > It *is* confusing, I know. The entire "diff of diffs" concept *is* > confusing. I just don't know

Re: [PATCH v2 6/9] gpg-interface: do not hardcode the key string len anymore

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 10:52:28AM +0200, Henning Schild wrote: > gnupg does print the keyid followed by a space and the signer comes > next. The same pattern is also used in gpgsm, but there the key length > would be 40 instead of 16. Instead of hardcoding the expected length, > find the first

[PATCH] sha1-name.c: for ":/", find detached HEAD commits

2018-07-10 Thread William Chargin
This patch broadens the set of commits matched by ":/" pathspecs to include commits reachable from HEAD but not any named ref. This avoids surprising behavior when working with a detached HEAD and trying to refer to a commit that was recently created and only exists within the detached state.

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

2018-07-10 Thread Elijah Newren
On Mon, Jul 9, 2018 at 9:44 PM, Jeff King wrote: > 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

Re: [PATCH 4/8] gpg-interface: introduce an abstraction for multiple gpg formats

2018-07-10 Thread Jeff King
On Fri, Jul 06, 2018 at 10:24:58AM -0700, Junio C Hamano wrote: > What we've been avoiding was the comma after the last element in the > enum (in other words, if PGP_FMT had ',' after it in the above > quoted addition, that would have been violation of that rule), as > having such a trailing

Re: git-gui ignores core.hooksPath

2018-07-10 Thread Philip Oakley
From: "Johannes Schindelin" Hi Phillip, On Wed, 14 Jun 2017, Philipp Gortan wrote: thanks for following up, > Indeed. Why don't you give it a try? Actually, I already did: https://github.com/patthoyts/git-gui/pull/12 You might want to post your analysis and patch there as well... I

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

2018-07-10 Thread Elijah Newren
On Mon, Jul 9, 2018 at 2:11 PM, Stefan Beller wrote: > 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

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

2018-07-10 Thread Daniel Jacques
Perry Hutchison wrote: > If we need /proc, wouldn't we _already_ be unhappy inside a chroot > that didn't mount /proc, even _with_ fallback to static paths? > Last I knew, the whole point of chroots/containers/jails/etc. was to > prevent access, from a process running inside the container, to any

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

2018-07-10 Thread Jeff King
On Tue, Jul 10, 2018 at 12:13:42AM -0700, Perry Hutchison wrote: > Jeff King wrote: > > > If I understand correctly, the Linux implementation requires reading > > from /proc. So an executable that only did RUNTIME_PREFIX (with no > > fallback to static paths) would be unhappy inside a chroot or

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

2018-07-10 Thread Daniel Harding
Hi Johannes, On Tue, 10 Jul 2018 at 16:08:57 +0300, Johannes Schindelin wrote:> On Tue, 10 Jul 2018, Daniel Harding wrote: On Mon, 09 Jul 2018 at 22:14:58 +0300, Johannes Schindelin wrote: On Mon, 9 Jul 2018, Daniel Harding wrote: On Mon, 09 Jul 2018 at 00:02:00 +0300, brian m. carlson

Re: [PATCH 0/2] Fix --rebase-merges with custom commentChar

2018-07-10 Thread Daniel Harding
On Mon, 09 Jul 2018 at 10:53:14 +0300, Johannes Schindelin wrote> On Sun, 8 Jul 2018, Daniel Harding wrote: I have core.commentChar set in my .gitconfig, and when I tried to run git rebase -i -r, I received an error message like the following: error: invalid line 3: # Branch To fix this, I

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

2018-07-10 Thread Johannes Schindelin
Hi, On Tue, 10 Jul 2018, SZEDER Gábor wrote: > > diff --git a/t/helper/test-repository.c b/t/helper/test-repository.c > > new file mode 100644 > > index 00..5fff540a26 > > --- /dev/null > > +++ b/t/helper/test-repository.c > > @@ -0,0 +1,88 @@ > > +#include "test-tool.h" > > +#include

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

2018-07-10 Thread Johannes Schindelin
Hi Daniel, On Tue, 10 Jul 2018, Daniel Harding wrote: > On Mon, 09 Jul 2018 at 22:14:58 +0300, Johannes Schindelin wrote: > > > > On Mon, 9 Jul 2018, Daniel Harding wrote: > > > > > > On Mon, 09 Jul 2018 at 00:02:00 +0300, brian m. carlson wrote: > > > > > > > > Should this affect the "# Merge

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

2018-07-10 Thread Daniel Harding
On Mon, 09 Jul 2018 at 22:14:58 +0300, Johannes Schindelin wrote: On Mon, 9 Jul 2018, Daniel Harding wrote: 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

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

2018-07-10 Thread Ævar Arnfjörð Bjarmason
On Tue, Jul 3, 2018 at 3:36 PM, Jeff King wrote: > 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

Re: [GSoC][PATCH v3 03/13] editor: add a function to launch the sequence editor

2018-07-10 Thread Alban Gruin
Le 10/07/2018 à 14:15, Alban Gruin a écrit : > As part of the rewrite of interactive rebase, the sequencer will need to > open the sequence editor to allow the user to edit the todo list. > Instead of duplicating the existing launch_editor() function, this > refactors it to a new function,

Re: [GSoC][PATCH v3 02/13] rebase--interactive: rewrite append_todo_help() in C

2018-07-10 Thread Alban Gruin
Le 10/07/2018 à 14:15, Alban Gruin a écrit : > This rewrites append_todo_help() from shell to C. It also incorporates > some parts of initiate_action() and complete_action() that also write > help texts to the todo file. > > This also introduces the source file rebase-interactive.c. This file >

Re: Git log command doesn't run as expected.

2018-07-10 Thread Ævar Arnfjörð Bjarmason
On Tue, Jul 10, 2018 at 1:16 PM, 周应天 wrote: > Hi, > I’m using following command to do some search work: > git log --all -G 'some regexp' -p — path/to/my/file. > But the output could miss some commit. (For example, I grep a little piece of > code from a commit diff

[GSoC][PATCH v3 04/13] rebase-interactive: rewrite the edit-todo functionality in C

2018-07-10 Thread Alban Gruin
This rewrites the edit-todo functionality from shell to C. To achieve that, a new command mode, `edit-todo`, is added, and the `write-edit-todo` flag is removed, as the shell script does not need to write the edit todo help message to the todo list anymore. The shell version is then stripped in

  1   2   >