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

2018-07-10 Thread Alban Gruin
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 operation called by

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

2018-07-10 Thread Alban Gruin
This refactors append_todo_help() to write its message to a buffer instead of the todo-list. This is needed for the rewrite of complete_action(), which will come after the next commit. As rebase--helper still needs the file manipulation part of append_todo_help(), it is extracted to a temporary

[GSoC][PATCH v3 00/13] rebase -i: rewrite some parts in C

2018-07-10 Thread Alban Gruin
This patch series rewrites some parts of interactive rebase from shell to C: - append_todo_help(). The C version covers a bit more than the shell version. - The edit-todo functionnality. - The reflog operations. - complete_action(). - init_revisions_and_shortrevisions(). This patch

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

2018-07-10 Thread Alban Gruin
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 append_todo_help_to_file() from

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

2018-07-10 Thread Alban Gruin
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 twice that the todo-list had at

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

2018-07-10 Thread Alban Gruin
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. This function and this enum will

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

2018-07-10 Thread Alban Gruin
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 --- builtin/rebase--helper.c | 7 ++- git-rebase--interactive.sh | 25 - sequencer.c

[GSoC][PATCH v3 13/13] rebase -i: rewrite the rest of init_revisions_and_shortrevisions in C

2018-07-10 Thread Alban Gruin
This rewrites the part of init_revisions_and_shortrevisions() needed by `--complete-action` (which initialize $shortrevisions) from shell to C. When `upstream` is empty, it means that the user launched a `rebase --root`, and `onto` contains the ID of an empty commit. As a range between an empty

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

2018-07-10 Thread Alban Gruin
Instead of skip_unnecessary_picks() printing its result to stdout, it returns it into a const char *, as the rewrite of complete_action() (to come in the next commit) will need it. rebase--helper then is modified to fit this change. Signed-off-by: Alban Gruin --- builtin/rebase--helper.c | 11

[GSoC][PATCH v3 12/13] rebase -i: implement the logic to initialize the variable $revision in C

2018-07-10 Thread Alban Gruin
This rewrites the part of init_revisions_and_shortrevisions() needed by `--make-script` from shell to C. The new version is called get_revision_ranges(), and is a static function inside of rebase--helper.c. Unlike init_revisions_and_shortrevisions(), get_revision_ranges() doesn’t write

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

2018-07-10 Thread Alban Gruin
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 necessary for interactive rebase

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

2018-07-10 Thread Alban Gruin
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. run_git_commit() is then refactored to

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

2018-07-10 Thread Alban Gruin
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, launch_specified_editor(), which takes the editor as a

Re: git-gui ignores core.hooksPath

2018-07-10 Thread 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 wonder what good

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

2018-07-10 Thread SZEDER Gábor
> 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 "cache.h" > +#include "commit-graph.h" > +#include "commit.h" >

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

2018-07-10 Thread Johannes Schindelin
Hi Peff, On Mon, 9 Jul 2018, Jeff King wrote: > 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

Git log command doesn't run as expected.

2018-07-10 Thread 周应天
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 message(properly handled for regexp), but when I use the command

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

2018-07-10 Thread Johannes Schindelin
Hi Junio, On Mon, 9 Jul 2018, Junio C Hamano wrote: > 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 > >

Re: [PATCH 3/4] ref-filter: merge get_obj and get_object

2018-07-10 Thread Оля Тележная
Fully agree, thank you so much. I have fixed it. Waiting for other issues that need to be fixed, then I will re-send the patch. Thank you!

Re: [PATCH 3/4] ref-filter: merge get_obj and get_object

2018-07-10 Thread SZEDER Gábor
> This causes GCC to complain thusly: > > > ``` > 2018-07-10T04:59:38.6368270Z ref-filter.c:1477:6: error: variable 'eaten' is > used uninitialized whenever 'if' condition is false > [-Werror,-Wsometimes-uninitialized] > 2018-07-10T04:59:38.6468620Z if (oi->info.contentp) { >

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

2018-07-10 Thread Johannes Schindelin
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 about a better alternative. So hear me

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

2018-07-10 Thread Johannes Schindelin
Hi Olga, On Mon, 9 Jul 2018, Оля Тележная wrote: > [2] > https://public-inbox.org/git/010201637254c969-a346030e-0b75-41ad-8ef3-2ac7e04ba4fb-000...@eu-west-1.amazonses.com/ This type of Message-Id makes me think that you used SubmitGit to send this patch series. The main problem I see here is

Re: [PATCH 3/4] ref-filter: merge get_obj and get_object

2018-07-10 Thread Johannes Schindelin
Hi Olga, On Mon, 9 Jul 2018, Olga Telezhnaya wrote: > diff --git a/ref-filter.c b/ref-filter.c > index 27733ef013bed..f04169f0ea0e3 100644 > --- a/ref-filter.c > +++ b/ref-filter.c > @@ -1437,20 +1419,24 @@ static const char *get_refname(struct used_atom > *atom, struct ref_array_item *re > }

Re: [PATCH 3/4] ref-filter: merge get_obj and get_object

2018-07-10 Thread SZEDER Gábor
> static int get_object(struct ref_array_item *ref, const struct object_id > *oid, > -int deref, struct object **obj, struct strbuf *err) > + int deref, struct object **obj, struct strbuf *err) > { > int eaten; Here the variable 'eaten' is

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

2018-07-10 Thread Henning Schild
Add "gpg.format" where the user can specify which type of signature to use for commits. At the moment only "openpgp" is supported and the value is not even used. This commit prepares for a new types of signatures. Signed-off-by: Henning Schild --- Documentation/config.txt | 4

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

2018-07-10 Thread Henning Schild
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 configured to trust the

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

2018-07-10 Thread Henning Schild
This commit turns parse_gpg_output into an internal function, the only outside user was migrated in an earlier commit. Signed-off-by: Henning Schild --- gpg-interface.c | 2 +- gpg-interface.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/gpg-interface.c

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

2018-07-10 Thread Henning Schild
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 Schild --- gpg-interface.c | 74

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

2018-07-10 Thread Henning Schild
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 6e2015ed9..7e1e9caf4 100755 ---

[PATCH v2 1/9] builtin/receive-pack: use check_signature from gpg-interface

2018-07-10 Thread Henning Schild
The combination of verify_signed_buffer followed by parse_gpg_output is available as check_signature. Use that instead of implementing it again. Signed-off-by: Henning Schild --- builtin/receive-pack.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git

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

2018-07-10 Thread Henning Schild
Changes in v2: - removed trailing commas in array initializers and add leading space - replaced assert(0) with BUG in p5 - consolidated 2 format lookups reusing get_format_data p5 - changed from format "PGP" to "openpgp", later X509 to "x509" - use strcasecmp instead of strcmp for format

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

2018-07-10 Thread Henning Schild
This commit allows git to create and check x509 type signatures using gpgsm. Signed-off-by: Henning Schild --- Documentation/config.txt | 2 +- gpg-interface.c | 10 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt

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

2018-07-10 Thread Henning Schild
Supporting multiple signing formats we will have the need to configure a custom program each. Add a new config value to cater for that. Signed-off-by: Henning Schild --- Documentation/config.txt | 5 + gpg-interface.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff

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

2018-07-10 Thread Perry Hutchison
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 other > container that didn't mount /proc. If we need /proc, wouldn't we

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

2018-07-10 Thread Оля Тележная
2018-07-10 1:39 GMT+03:00 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

[no subject]

2018-07-10 Thread oeplmktg

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

2018-07-10 Thread Beat Bolli
Hi Junio Am 09.07.2018 23:45, schrieb 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

<    1   2