Re: [PATCH] sequencer: pass absolute GIT_WORK_TREE to exec commands

2018-07-13 Thread Jeff King
On Sat, Jul 14, 2018 at 12:35:05AM +, brian m. carlson wrote: > diff --git a/sequencer.c b/sequencer.c > index 5354d4d51e..c8e16f9168 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -2636,6 +2636,8 @@ static int do_exec(const char *command_line) > fprintf(stderr, "Executing: %s\n",

[PATCH] send-email: Fix tls AUTH when sending batch

2018-07-13 Thread Jules Maselbas
The variable smtp_encryption must keep it's value between two batches. Otherwise the authentication is skipped after the first batch. Signed-off-by: Jules Maselbas --- git-send-email.perl | 1 - 1 file changed, 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index

Re: rev-parse --show-toplevel broken during exec'ed rebase?

2018-07-13 Thread Jeff King
On Fri, Jul 13, 2018 at 06:47:32PM +, brian m. carlson wrote: > > >> git rebase 18404434bf406f6a6f892ed73320c5cf9cc187dd -x "(cd xdiff; git > > >> rev-parse --show-toplevel)" > > > ... path to git repository/xdiff !!! > > > > > > This seems like incorrect behaviour to me since it's a weird >

Re: [PATCH 2/2] repack -ad: prune the list of shallow commits

2018-07-13 Thread Jeff King
On Thu, Jul 12, 2018 at 12:23:28AM +0200, Johannes Schindelin via GitGitGadget wrote: > This is particularly important to keep in mind when looking at the > `.git/shallow` file: if any commits listed in that file become > unreachable, it is not a problem, but if they go missing, it *is* a >

[PATCH] blame: prefer xsnprintf to strcpy for colors

2018-07-13 Thread Jeff King
Our color buffers are all COLOR_MAXLEN, which fits the largest possible color. So we can never overflow the buffer by copying an existing color. However, using strcpy() makes it harder to audit the code-base for calls that _are_ problems. We should use something like xsnprintf(), which shows the

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

2018-07-13 Thread Olga Telezhnaya
Inline get_obj(): it would be easier to edit the code without this split. Signed-off-by: Olga Telezhnaia --- ref-filter.c | 36 +++- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 27733ef013bed..f04169f0ea0e3

[PATCH v2 2/4] ref-filter: fill empty fields with empty values

2018-07-13 Thread Olga Telezhnaya
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. It is important to mention that we fill

[PATCH v2 1/4] ref-filter: add info_source to valid_atom

2018-07-13 Thread Olga Telezhnaya
Add the source of object data to prevent parsing of unneeded data. The goal is to improve performance by avoiding calling expensive functions when we don't need the information they provide or when we could get it by using a cheaper function. It is stored in valid_atoms because it depends on the

[PATCH v2 4/4] ref-filter: use oid_object_info() to get object

2018-07-13 Thread Olga Telezhnaya
Use oid_object_info_extended() to get object info instead of read_object_file(). It will help to handle some requests faster (e.g., we do not need to parse whole object if we need to know %(objectsize)). It could also help us to add new atoms such as %(objectsize:disk) and %(deltabase).

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

2018-07-13 Thread Оля Тележная
2018-07-09 11:27 GMT+03:00 Оля Тележная : > 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. > > The goal (still) is to improve performance by avoiding calling expensive > functions

[PATCH v3 2/7] t/t7510: check the validation of the new config gpg.format

2018-07-13 Thread Henning Schild
Test setting gpg.format to both invalid and valid values. Signed-off-by: Henning Schild --- t/t7510-signed-commit.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh index 6e2015ed9..1b6a1dd90 100755 --- a/t/t7510-signed-commit.sh

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

2018-07-13 Thread Henning Schild
Replies to this one have been ignored for v3. I do not know how to proceed here. Henning Am Tue, 10 Jul 2018 10:52:29 +0200 schrieb 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. > >

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

2018-07-13 Thread Henning Schild
Am Tue, 10 Jul 2018 10:16:39 -0700 schrieb 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

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

2018-07-13 Thread Henning Schild
Am Tue, 10 Jul 2018 12:23:32 -0400 schrieb 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

[PATCH v3 1/7] gpg-interface: add new config to select how to sign a commit

2018-07-13 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 v3 5/7] gpg-interface: introduce new config to select per gpg format program

2018-07-13 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

[PATCH v3 6/7] gpg-interface: introduce new signature format "x509" using gpgsm

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

[PATCH v3 3/7] gpg-interface: introduce an abstraction for multiple gpg formats

2018-07-13 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 | 84

[PATCH v3 4/7] gpg-interface: do not hardcode the key string len anymore

2018-07-13 Thread Henning Schild
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 space and calculate it. Input that does not match the expected format will

[PATCH v3 0/7] X509 (gpgsm) commit signing support

2018-07-13 Thread Henning Schild
Changes in v3: - drop patches 1 and 2 known from < v3, see pu hs/push-cert-check-cleanup - dropped some testcases from p6, added two t7004 bad key/sig - ship a binary x509 certificate for tests, no generation anymore - silence gpgsm in tests - switch all tests to use test_config instead of

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

2018-07-13 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

Re: [PATCH v3 2/2] Fix use of strategy options with interactive rebases

2018-07-13 Thread Elijah Newren
Hi Dscho, On Thu, Jul 12, 2018 at 8:41 AM, Johannes Schindelin wrote: > Hi Elijah, > > On Wed, 27 Jun 2018, Elijah Newren wrote: > ... >> diff --git a/git-rebase.sh b/git-rebase.sh >> index 19bdebb480..f3b10c7f62 100755 >> --- a/git-rebase.sh >> +++ b/git-rebase.sh >> @@ -328,7 +328,7 @@ do >>

Re: [GSoC] GSoC with git, week 10

2018-07-13 Thread Paul-Sebastian Ungureanu
Hello, I am back with a new (and updated) blog entry, in which I talked more about the bugs I mentioned in the previous post. https://ungps.github.io/ Best regards, Paul

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

2018-07-13 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 v2 1/2] t1015: demonstrate directory/file conflict recovery failures

2018-07-13 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:

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

2018-07-13 Thread Elijah Newren
This patch series fixes several "recovery" commands that 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

[PATCH v11] json_writer: new routines to create JSON data

2018-07-13 Thread git
From: Jeff Hostetler Add "struct json_writer" and a series of jw_ routines to compose JSON data into a string buffer. The resulting string may then be printed by commands wanting to support a JSON-like output format. The json_writer is limited to correctly formatting structured data for

[PATCH v11] json_writer V10

2018-07-13 Thread git
From: Jeff Hostetler Here is V11 of my json-writer patch. I fixed a minor initialization bug in V10 and rebased it onto v2.18.0 (from an 2.18.0-RC version). Jeff Hostetler (1): json_writer: new routines to create JSON data Makefile| 2 + json-writer.c |

Re: [PATCH] fsck: check skiplist for object in fsck_blob()

2018-07-13 Thread Jeff King
On Fri, Jul 13, 2018 at 08:37:46PM +0100, Ramsay Jones wrote: > OK, so I found some time to test this tonight. It is not good > news (assuming that I haven't messed up the testing, of course). :( I think you may have. :) > not ok 18 - push rejects corrupt .gitmodules (policy) > # > #

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

2018-07-13 Thread William Chargin
> Junio typically applies bugfixes as close to the bug-source as possible, > which allows them to be merged-up into various releases (rather than > cherry-picked, which would be required if built on top of 'master'). > > Ideally this is directly on top of the commit that introduced the bug, >

[PATCH] coccinelle: update commit.cocci

2018-07-13 Thread Derrick Stolee
A recent patch series renamed the get_commit_tree_from_graph method but forgot to update the coccinelle script that excempted it from rules regarding accesses to 'maybe_tree'. This fixes that oversight to bring the coccinelle scripts back to a good state. Signed-off-by: Derrick Stolee ---

Re: [PATCH 0/3] rebase -r: support octopus merges

2018-07-13 Thread Johannes Sixt
Am 12.07.2018 um 18:26 schrieb Junio C Hamano: Johannes Schindelin writes: A much more meaningful measure would be: how many octopus merge commits have been pushed to GitHub in the past two weeks. I don't think I have the technical means to answer that question, though. It does not mean that

Re: [PATCH] coccinelle: update commit.cocci

2018-07-13 Thread Eric Sunshine
On Fri, Jul 13, 2018 at 12:30 PM Derrick Stolee wrote: > A recent patch series renamed the get_commit_tree_from_graph method but > forgot to update the coccinelle script that excempted it from rules s/excempted/exempted/ > regarding accesses to 'maybe_tree'. This fixes that oversight to bring >

Re: rev-parse --show-toplevel broken during exec'ed rebase?

2018-07-13 Thread brian m. carlson
On Thu, Jul 12, 2018 at 08:23:02AM -0700, Junio C Hamano wrote: > Vitali Lovich writes: > > > Repro (starting with cwd within git project): > >> (cd xdiff; git rev-parse --show-toplevel) > > ... path to git repository > >> git rebase -i 18404434bf406f6a6f892ed73320c5cf9cc187dd > > # Stop at some

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

2018-07-13 Thread Jeff King
On Thu, Jul 12, 2018 at 01:01:23PM -0700, William Chargin wrote: > Contents look good to me. I don't understand why the file name in your > patch is sha1_name.c as opposed to sha1-name.c (I see e5e5e0883 from > 2018-04-10, but that sounds pretty old), but I trust that whatever > you're doing

Re: [PATCH] fsck: check skiplist for object in fsck_blob()

2018-07-13 Thread Jeff King
On Fri, Jul 13, 2018 at 03:41:19PM -0400, Jeff King wrote: > > not ok 18 - push rejects corrupt .gitmodules (policy) > > # > > # rm -rf dst.git && > > # git init --bare dst.git && > > # git -C dst.git config transfer.fsckObjects true && > > # git -C

Re: [PATCH v2] git-rebase--merge: modernize "git-$cmd" to "git $cmd"

2018-07-13 Thread Elijah Newren
Hi Dscho, On Thu, Jul 12, 2018 at 8:49 AM, Johannes Schindelin wrote: > Hi Elijah, > > On Wed, 27 Jun 2018, Elijah Newren wrote: > >> Signed-off-by: Elijah Newren >> --- >> >> Changes since v1: >> - Fixed up commit message (move below comment to below diffstat as >> originally intended)

[PATCH v1 05/25] structured-logging: set sub_command field for branch command

2018-07-13 Thread git
From: Jeff Hostetler Set sub-command field for the various forms of the branch command. Signed-off-by: Jeff Hostetler --- builtin/branch.c | 8 1 file changed, 8 insertions(+) diff --git a/builtin/branch.c b/builtin/branch.c index 5217ba3..fba516f 100644 --- a/builtin/branch.c +++

[PATCH v1 09/25] structured-logging: add detail-event for lazy_init_name_hash

2018-07-13 Thread git
From: Jeff Hostetler Teach git to generate a structured logging detail-event for lazy_init_name_hash(). This is marked as an "index" category event and includes time and size data for the hashmaps. Signed-off-by: Jeff Hostetler --- name-hash.c | 26 ++ 1 file changed,

Re: What's cooking in git.git (Jul 2018, #01; Wed, 11)

2018-07-13 Thread Jeff King
On Wed, Jul 11, 2018 at 12:02:42PM -0700, Junio C Hamano wrote: > * jk/fsck-gitmodules-gently (2018-07-03) 5 commits > - fsck: silence stderr when parsing .gitmodules > - fsck: silence stderr when parsing .gitmodules > - config: add options parameter to git_config_from_mem > - config: add

Git standup on IRC

2018-07-13 Thread Jonathan Nieder
Hi, Some of us have been informally doing a "git standup" on #git-devel on irc.freenode.net on IRC every two weeks at 17:00-17:30 UTC. It's a way for people to say what they're working on and ask questions. It generally goes into a lot less depth than on-list discussions like

Re: [PATCH] fsck: check skiplist for object in fsck_blob()

2018-07-13 Thread Jeff King
On Wed, Jul 11, 2018 at 08:31:34PM +0100, Ramsay Jones wrote: > >> Simply, I have found (for many different reasons) that, if there > >> is no good reason to execute some code, it is _far_ better to not > >> do so! ;-) > > > > Heh. I also agree with that as a guiding principle. But I _also_ like

Re: [PATCH] fsck: check skiplist for object in fsck_blob()

2018-07-13 Thread Ramsay Jones
On 11/07/18 20:31, Ramsay Jones wrote: > On 07/07/18 02:32, Jeff King wrote: [snip] >> Hmm, we seem to have "info" these days, so maybe that would do what I >> want. I.e., I wonder if the patch below does everything we'd want. It's >> late here and I probably won't get back to this until

[PATCH v1 21/25] structured-logging: add detail-events for child processes

2018-07-13 Thread git
From: Jeff Hostetler Teach git to emit "detail" events with category "child" before a child process is started and after it finishes. These events can be used to infer time spent by git waiting for child processes to complete. These events are controlled by the slog.detail config setting. Set

[PATCH v1 25/25] structured-logging: add config data facility

2018-07-13 Thread git
From: Jeff Hostetler Add "config" section to "cmd_exit" event to record important configuration settings in the log. Add the value of "slog.detail", "slog.timers", and "slog.aux" config settings to the log. These values control the filtering of the log. Knowing the filter settings can help

[PATCH v1 13/25] structured-logging: add timer around wt-status functions

2018-07-13 Thread git
From: Jeff Hostetler Use a SLOG timer to record the time spend in wt_status_collect_worktree(), wt_status_collect_changes_initial(), wt_status_collect_changes_index(), and wt_status_collect_untracked(). These are reported in the "cmd_exit" event. Signed-off-by: Jeff Hostetler --- wt-status.c

[PATCH v1 24/25] structured-logging: t0420 tests for interacitve child_summary

2018-07-13 Thread git
From: Jeff Hostetler Test running a command with a fake pager and verify that a child_summary is generated. Signed-off-by: Jeff Hostetler --- t/t0420-structured-logging.sh | 30 ++ 1 file changed, 30 insertions(+) diff --git a/t/t0420-structured-logging.sh

[PATCH v1 12/25] structured-logging: add timer around do_write_index

2018-07-13 Thread git
From: Jeff Hostetler Use a SLOG timer to record the time spend in do_write_index() and report it in the "cmd_exit" event. Signed-off-by: Jeff Hostetler --- read-cache.c | 5 + 1 file changed, 5 insertions(+) diff --git a/read-cache.c b/read-cache.c index df5dc87..7fe66b5 100644 ---

[PATCH v1 15/25] structured-logging: t0420 tests for timers

2018-07-13 Thread git
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/t0420-structured-logging.sh | 48 +++ 1 file changed, 48 insertions(+) diff --git a/t/t0420-structured-logging.sh b/t/t0420-structured-logging.sh index a594af3..37c7e83 100755 ---

[PATCH v1 17/25] structured-logging: add aux-data for index size

2018-07-13 Thread git
From: Jeff Hostetler Teach do_read_index() and do_write_index() to record the size of the index in aux-data. This will be reported in the "cmd_exit" event. Signed-off-by: Jeff Hostetler --- read-cache.c | 4 1 file changed, 4 insertions(+) diff --git a/read-cache.c b/read-cache.c index

[PATCH v1 10/25] structured-logging: add timer facility

2018-07-13 Thread git
From: Jeff Hostetler Add timer facility to structured logging. This allows stopwatch-like operations over the life of the git process. Timer data is summarized in the "cmd_exit" event. Signed-off-by: Jeff Hostetler --- Documentation/config.txt | 6 ++ structured-logging.c | 180

[PATCH v1 22/25] structured-logging: add child process classification

2018-07-13 Thread git
From: Jeff Hostetler Teach git to classify child processes as "editor", "pager", "subprocess", "alias", "shell", or "other". Add the child process classification to the child detail events. Mark child processes of class "editor" or "pager" as interactive in the child detail event. Add child

[PATCH v1 08/25] structured-logging: add detail-event facility

2018-07-13 Thread git
From: Jeff Hostetler Add a generic "detail-event" to structured logging. This can be used to emit context-specific events for performance or debugging purposes. These are conceptually similar to the various GIT_TRACE_ messages. Signed-off-by: Jeff Hostetler --- Documentation/config.txt | 13

[PATCH v1 07/25] structured-logging: t0420 basic tests

2018-07-13 Thread git
From: Jeff Hostetler Add structured logging prereq definition "SLOG" to test-lib.sh. Create t0420 test script with some basic tests. Signed-off-by: Jeff Hostetler --- t/t0420-structured-logging.sh | 143 ++ t/t0420/parse_json.perl | 52

[PATCH v1 14/25] structured-logging: add timer around preload_index

2018-07-13 Thread git
From: Jeff Hostetler Use a SLOG timer to record the time spend in preload_index() and report it in the "cmd_exit" event. Signed-off-by: Jeff Hostetler --- preload-index.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/preload-index.c b/preload-index.c index 4d08d44..572bb56 100644

[PATCH v1 00/25] RFC: structured logging

2018-07-13 Thread git
From: Jeff Hostetler This RFC patch series adds structured logging to git. The motivation, background, and limitations of this feature are described at the beginning of the design document in the first commit. The design document also contains a section comparing this feature with the existing

[PATCH v1 02/25] structured-logging: add STRUCTURED_LOGGING=1 to Makefile

2018-07-13 Thread git
From: Jeff Hostetler Teach the Makefile to take STRUCTURED_LOGGING=1 variable to compile in/out structured logging feature. Signed-off-by: Jeff Hostetler --- Makefile | 8 structured-logging.c | 9 + structured-logging.h | 13 + 3 files changed, 30

[PATCH v1 01/25] structured-logging: design document

2018-07-13 Thread git
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- Documentation/technical/structured-logging.txt | 816 + 1 file changed, 816 insertions(+) create mode 100644 Documentation/technical/structured-logging.txt diff --git

[PATCH v1 06/25] structured-logging: set sub_command field for checkout command

2018-07-13 Thread git
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- builtin/checkout.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/builtin/checkout.c b/builtin/checkout.c index 2e1d237..d05890b 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -249,6 +249,8 @@ static int

[PATCH v1 19/25] structured-logging: t0420 tests for aux-data

2018-07-13 Thread git
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/t0420-structured-logging.sh | 33 + 1 file changed, 33 insertions(+) diff --git a/t/t0420-structured-logging.sh b/t/t0420-structured-logging.sh index 37c7e83..2e06cd7 100755 ---

[PATCH v1 03/25] structured-logging: add structured logging framework

2018-07-13 Thread git
From: Jeff Hostetler Teach git to optionally generate structured logging data in JSON using the json-writer API. "cmd_start" and "cmd_end" events are generated. Structured logging is only available when git is built with STRUCTURED_LOGGING=1. Structured logging is only enabled when the config

[PATCH v1 16/25] structured-logging: add aux-data facility

2018-07-13 Thread git
From: Jeff Hostetler Add facility to add extra data to the structured logging data allowing arbitrary key/value pair data to be added to the "cmd_exit" event. Signed-off-by: Jeff Hostetler --- Documentation/config.txt | 6 +++ structured-logging.c | 116

[PATCH v1 20/25] structured-logging: add structured logging to remote-curl

2018-07-13 Thread git
From: Jeff Hostetler remote-curl is not a builtin command and therefore, does not inherit the common cmd_main() startup in git.c Wrap cmd_main() with slog_cmd_main() in remote-curl to initialize logging. Add slog timers around push, fetch, and list verbs. Signed-off-by: Jeff Hostetler ---

[PATCH v1 11/25] structured-logging: add timer around do_read_index

2018-07-13 Thread git
From: Jeff Hostetler Use a SLOG timer to record the time spent in do_read_index() and report it in the "cmd_exit" event. Signed-off-by: Jeff Hostetler --- read-cache.c | 5 + 1 file changed, 5 insertions(+) diff --git a/read-cache.c b/read-cache.c index 3725882..df5dc87 100644 ---

[PATCH v1 18/25] structured-logging: add aux-data for size of sparse-checkout file

2018-07-13 Thread git
From: Jeff Hostetler Teach unpack_trees() to record the number of entries in the sparse-checkout file in the aux-data. This will be reported in the "cmd_exit" event. Signed-off-by: Jeff Hostetler --- unpack-trees.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v1 23/25] structured-logging: t0420 tests for child process detail events

2018-07-13 Thread git
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/t0420-structured-logging.sh | 39 +++ 1 file changed, 39 insertions(+) diff --git a/t/t0420-structured-logging.sh b/t/t0420-structured-logging.sh index 2e06cd7..4ac404d 100755 ---

[PATCH v1 04/25] structured-logging: add session-id to log events

2018-07-13 Thread git
From: Jeff Hostetler Teach git to create a unique session id (SID) during structured logging initialization and use that SID in all log events. This SID is exported into a transient environment variable and inherited by child processes. This allows git child processes to be related back to the

[PATCH v3 4/9] remote-odb: implement remote_odb_get_many_direct()

2018-07-13 Thread Christian Couder
From: Christian Couder This function will be used to get many objects from a promisor remote. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- odb-helper.c | 15 +++ odb-helper.h | 3 +++ remote-odb.c | 17 + remote-odb.h | 1 + 4 files changed,

[PATCH v3 9/9] Documentation/config: add odb..promisorRemote

2018-07-13 Thread Christian Couder
From: Christian Couder Signed-off-by: Junio C Hamano --- Documentation/config.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 1cc18a828c..066858886b 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@

[PATCH v3 7/9] Use odb.origin.partialclonefilter instead of core.partialclonefilter

2018-07-13 Thread Christian Couder
From: Christian Couder Let's make the partial clone filter specific to one odb instead of general to all the odbs. This makes it possible to have different partial clone filters for different odbs. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- builtin/fetch.c

[PATCH v3 6/9] Use remote_odb_get_direct() and has_remote_odb()

2018-07-13 Thread Christian Couder
From: Christian Couder Instead of using the repository_format_partial_clone global and fetch_object() directly, let's use has_remote_odb() and remote_odb_get_direct(). Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- builtin/cat-file.c| 5 +++-- builtin/fetch.c

[PATCH v3 8/9] t0410: test fetching from many promisor remotes

2018-07-13 Thread Christian Couder
From: Christian Couder Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- t/t0410-partial-clone.sh | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh index 71a9b9a3e8..9d513ebf57

[PATCH v3 3/9] remote-odb: implement remote_odb_get_direct()

2018-07-13 Thread Christian Couder
From: Christian Couder This is implemented only in the promisor remote mode for now by calling fetch_object(). Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- odb-helper.c | 14 ++ odb-helper.h | 3 ++- remote-odb.c | 17 + remote-odb.h | 1 +

[PATCH v3 1/9] fetch-object: make functions return an error code

2018-07-13 Thread Christian Couder
From: Christian Couder The callers of the fetch_object() and fetch_objects() might be interested in knowing if these functions succeeded or not. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- fetch-object.c | 15 +-- fetch-object.h | 6 +++--- sha1-file.c|

[PATCH v3 2/9] Add initial remote odb support

2018-07-13 Thread Christian Couder
From: Christian Couder The remote-odb.{c,h} files will contain the functions that are called by the rest of Git mostly from "sha1-file.c" to access the objects managed by the remote odbs. The odb-helper.{c,h} files will contain the functions to actually implement communication with either the

[PATCH v3 0/9] Introducing remote ODBs

2018-07-13 Thread Christian Couder
This path series is a follow up from the patch series called "odb remote" that I sent earlier this year, which was itself a follow up from previous series. See the links section for more information. As with the previous "odb remote" series, this series is only about integrating with the

[PATCH v3 5/9] remote-odb: add remote_odb_reinit()

2018-07-13 Thread Christian Couder
From: Christian Couder We will need to reinitialize the remote odb configuration as we will make some changes to it in a later commit when we will detect that a remote is also a remote odb. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- remote-odb.c | 14 --

[PATCH 2/2] fsck: downgrade gitmodulesParse default to "info"

2018-07-13 Thread Jeff King
We added an fsck check in ed8b10f631 (fsck: check .gitmodules content, 2018-05-02) as a defense against the vulnerability from 0383bbb901 (submodule-config: verify submodule names as paths, 2018-04-30). With the idea that up-to-date hosting sites could protect downstream unpatched clients that

[PATCH 1/2] fsck: split ".gitmodules too large" error from parse failure

2018-07-13 Thread Jeff King
Since ed8b10f631 (fsck: check .gitmodules content, 2018-05-02), we'll report a gitmodulesParse error for two conditions: - a .gitmodules entry is not syntactically valid - a .gitmodules entry is larger than core.bigFileThreshold with the intent that we can detect malicious files and protect

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

2018-07-13 Thread Elijah Newren
On Fri, Jul 13, 2018 at 9:33 AM, Elijah Newren wrote: > This patch series fixes several "recovery" commands that 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 >*

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

2018-07-13 Thread brian m. carlson
On Tue, Jul 10, 2018 at 09:08:22PM +, Ben Peart wrote: > 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

Re: [PATCH v1 00/25] RFC: structured logging

2018-07-13 Thread David Lang
Please make an option for git to write these logs to syslog, not just a local file. Every modern syslog daemon has lots of tools to be able to deal with json messages well. David Lang

Re: [PATCH 2/2] fsck: downgrade gitmodulesParse default to "info"

2018-07-13 Thread Stefan Beller
> Considering both sets of arguments, it makes sense to loosen > this check for now. > I agree with this reasoning, > > Signed-off-by: Jeff King This and the previous patch are Reviewed-by: Stefan Beller

Re: [PATCH] blame: prefer xsnprintf to strcpy for colors

2018-07-13 Thread Jeff King
On Fri, Jul 13, 2018 at 01:58:05PM -0700, Stefan Beller wrote: > > I'm sad that this strcpy() wasn't caught in review. IMHO we should avoid > > that function altogether, even when we _think_ it can't trigger an > > overflow. That's easier to reason about (and makes auditing easier). > > Can we

Re: [PATCH] blame: prefer xsnprintf to strcpy for colors

2018-07-13 Thread Stefan Beller
On Fri, Jul 13, 2018 at 2:04 PM Jeff King wrote: > > On Fri, Jul 13, 2018 at 01:58:05PM -0700, Stefan Beller wrote: > > > > I'm sad that this strcpy() wasn't caught in review. IMHO we should avoid > > > that function altogether, even when we _think_ it can't trigger an > > > overflow. That's

Re: [PATCH] fsck: check skiplist for object in fsck_blob()

2018-07-13 Thread Ramsay Jones
On 13/07/18 20:46, Jeff King wrote: > On Fri, Jul 13, 2018 at 03:41:19PM -0400, Jeff King wrote: > >>> not ok 18 - push rejects corrupt .gitmodules (policy) >>> # >>> # rm -rf dst.git && >>> # git init --bare dst.git && >>> # git -C dst.git config

[PATCH 1/2] repack: point out a bug handling stale shallow info

2018-07-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin A `git fetch --prune` can turn previously-reachable objects unreachable, even commits that are in the `shallow` list. A subsequent `git repack -ad` will then unceremoniously drop those unreachable commits, and the `shallow` list will become stale. This means that when

[PATCH 2/2] repack -ad: prune the list of shallow commits

2018-07-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin While it is true that we never add unreachable commits into pack files intentionally (as `git repack`'s documentation states), we must not forget that a `git fetch --prune` (or even a `git fetch` when a ref was force-pushed in the meantime) can make a commit unreachable

[PATCH 0/2] repack -ad: fix after `fetch --prune` in a shallow repository

2018-07-13 Thread Johannes Schindelin via GitGitGadget
Under certain circumstances, commits that were reachable can be made unreachable, e.g. via `git fetch --prune`. These commits might have been packed already, in which case `git repack -adlf` will just drop them without giving them the usual grace period before an eventual `git prune` (via `git

Re: rev-parse --show-toplevel broken during exec'ed rebase?

2018-07-13 Thread brian m. carlson
On Fri, Jul 13, 2018 at 04:19:49PM -0400, Jeff King wrote: > Just reading over this thread, I suspect the simplest fix is to pass > GIT_DIR and GIT_WORK_TREE together, which is almost always the right > thing to do. I agree. I'll write up a patch. -- brian m. carlson: Houston, Texas, US

[PATCH] sequencer: pass absolute GIT_WORK_TREE to exec commands

2018-07-13 Thread brian m. carlson
The sequencer currently passes GIT_DIR, but not GIT_WORK_TREE, to exec commands. In that configuration, we assume that whatever directory we're in is the top level of the work tree, and git rev-parse --show-toplevel responds accordingly. However, when we're in a subdirectory, that isn't correct:

Re: [PATCH] blame: prefer xsnprintf to strcpy for colors

2018-07-13 Thread Stefan Beller
On Fri, Jul 13, 2018 at 1:43 PM Jeff King wrote: > --- > Another option would just be color_parse(repeated_meta_color, "cyan"). > The run-time cost is slightly higher, but it probably doesn't matter > here, and perhaps it's more readable. > Thanks for posting this again; this looks good to me!

Re: [PATCH] blame: prefer xsnprintf to strcpy for colors

2018-07-13 Thread Jeff King
On Fri, Jul 13, 2018 at 02:10:24PM -0700, Stefan Beller wrote: > > I'd be happy to declare strcpy() totally banned (and it more or less > > is). I found this with a simple "git grep", though it seems like a > > trivial application of coccinelle to find it. The question is what to > > convert it