[PATCH] packfile.h: drop extern from function declaration

2019-08-18 Thread Denton Liu
In 336226c259 (packfile.h: drop extern from function declarations, 2019-04-05), `extern` was removed from function declarations because it's redundant. However, in 8434e85d5f (repack: refactor pack deletion for future use, 2019-06-10), an `extern` was mistakenly included. Remove this spurious `ext

[PATCH 2/3] Doc: add more detail for git-format-patch

2019-08-18 Thread Denton Liu
In git-format-patch.txt, we were missing some key user information. First of all, using the `--to` and `--cc` options don't override `format.to` and `format.cc` variables, respectively. They add on to each other. Document this. In addition, document the special value of `--base=auto`. Next, while

[PATCH 0/3] format-patch: teach --infer-cover-subject option

2019-08-18 Thread Denton Liu
Currently, format-patch only puts "*** SUBJECT HERE ***" when a cover letter is generated. However, it is already smart enough to be able to populate the cover letter with the branch description so there's no reason why it cannot populate the subject as well. Teach format-patch the --infer-cover-s

[PATCH 1/3] t4014: clean up style

2019-08-18 Thread Denton Liu
In Git's tests, there is typically no space between the redirection operator and the filename. Remove these spaces. Since output is silenced when running without `-v` and debugging output is useful with `-v`, remove redirections to /dev/null. Change here-docs from `<<\EOF` to `<<-\EOF` so that th

[PATCH 3/3] format-patch: infer cover letter from branch description

2019-08-18 Thread Denton Liu
We used to populate the subject of the cover letter generated by git-format-patch with "*** SUBJECT HERE ***". However, if a user submits multiple patchsets, they may want to keep a consistent subject between rerolls. If git-format-patch is run with `--infer-cover-letter` or `format.inferCoverSubj

[SOLVED] (was: git log --graph with a sort of local revision number)

2019-08-18 Thread Uwe Brauer
>>> "UB" == Uwe Brauer writes: >>> "RA" == Rafael Ascensão writes: >> You can achieve something close (on small repos, more on that later) with: >> $ git log --graph --color \ >> --format='%C(auto)changeset: %h:%H%nuser: %an%ndate: %ad%nsummary: %s%n' \ >> | git name-rev

Re: git log --graph with a sort of local revision number

2019-08-18 Thread Uwe Brauer
>>> "RA" == Rafael Ascensão writes: > You can achieve something close (on small repos, more on that later) with: > $ git log --graph --color \ > --format='%C(auto)changeset: %h:%H%nuser: %an%ndate: %ad%nsummary: %s%n' \ > | git name-rev --refs=$(git rev-parse --abbrev

Re: [PATCH 11/14] t3903: abstract away SHA-1-specific constants

2019-08-18 Thread brian m. carlson
On 2019-08-18 at 20:27:41, Eric Sunshine wrote: > For safety, it would probably be a good idea to check the exit status > of the 'sed' invocation in the for-loop: > > for i in "$1" "$2" > do > sed -e ... "$i" >"$i.compare" || return 1 > done && > ... I'll do that. > (Note

Re: [PATCH 13/14] t4002: make hash independent

2019-08-18 Thread Eric Sunshine
On Sun, Aug 18, 2019 at 3:21 PM brian m. carlson wrote: > Refactor out the hard-coded object IDs and use test_oid to provide > values for both SHA-1 and SHA-256. s/Refactor out/Factor out/ > Signed-off-by: brian m. carlson

Re: [PATCH 11/14] t3903: abstract away SHA-1-specific constants

2019-08-18 Thread Eric Sunshine
On Sun, Aug 18, 2019 at 3:21 PM brian m. carlson wrote: > Abstract away the SHA-1-specific constants by sanitizing diff output to > remove the index lines, since it's clear from the assertions in question > that we are not interested in the specific object IDs. > > Signed-off-by: brian m. carlson

[PATCH] grep: under --debug, show whether PCRE JIT is enabled

2019-08-18 Thread Beat Bolli
This information is useful and not visible anywhere else, so show it. Signed-off-by: Beat Bolli Suggested-by: Johannes Schindelin --- This applies on top of 'ab/pcre-jit-fixes', currently in pu. grep.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/grep.c b/grep.c index 9bc589720b

[PATCH 26/26] midx: switch to using the_hash_algo

2019-08-18 Thread brian m. carlson
Instead of hard-coding the hash size, use the_hash_algo to look up the hash size at runtime. Remove the #define constant which was used to hold the hash length, since writing the expression with the_hash_algo provide enough documentary value on its own. Signed-off-by: brian m. carlson --- midx.

[PATCH 23/26] builtin/receive-pack: replace sha1_to_hex

2019-08-18 Thread brian m. carlson
Since sha1_to_hex is limited to SHA-1, replace it with hash_to_hex. Rename several variables to indicate that they can contain any hash. Signed-off-by: brian m. carlson --- builtin/receive-pack.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/receive-pack.c b

[PATCH 08/26] show-index: switch hard-coded constants to the_hash_algo

2019-08-18 Thread brian m. carlson
show-index uses a variety of hard-coded constants to enumerate the values in pack indices. Switch these hard-coded constants to use the_hash_algo or GIT_MAX_RAWSZ, as appropriate, and convert one instance of an unsigned char array to struct object_id. Signed-off-by: brian m. carlson --- builtin

[PATCH 13/26] sha1-lookup: switch hard-coded constants to the_hash_algo

2019-08-18 Thread brian m. carlson
Switch a hard-coded 18 to be a reference to the_hash_algo. Rename the sha1 parameter to be called hash instead. Signed-off-by: brian m. carlson --- sha1-lookup.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sha1-lookup.c b/sha1-lookup.c index 796ab68da8..93d9af080

[PATCH 24/26] rerere: replace sha1_to_hex

2019-08-18 Thread brian m. carlson
Replace the uses of sha1_to_hex in this function with hash_to_hex to allow the use of SHA-256 as well. Rename a variable since it is no longer limited to SHA-1. Signed-off-by: brian m. carlson --- rerere.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rerere.c b/re

[PATCH 09/26] connected: switch GIT_SHA1_HEXSZ to the_hash_algo

2019-08-18 Thread brian m. carlson
Switch various uses of GIT_SHA1_HEXSZ to reference the_hash_algo instead. Signed-off-by: brian m. carlson --- connected.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/connected.c b/connected.c index cd9b324afa..7cd3bc9979 100644 --- a/connected.c +++ b/connected.c @

[PATCH 00/26] object_id part 17

2019-08-18 Thread brian m. carlson
This is the seventeenth and final object_id series. The patches mostly switch sha1_to_hex to hash_to_hex, remove null_sha1 in favor of null_oid, and replace some hard-coded constants (along with GIT_SHA1_HEXSZ) to use the_hash_algo. This series may downloaded from the normal places as "object-id-p

[PATCH 25/26] builtin/show-index: replace sha1_to_hex

2019-08-18 Thread brian m. carlson
In this code path, we use sha1_to_hex to display the contents of a v1 pack index. While we plan to switch to v3 indices for SHA-256, the v1 pack indices still function, so to support both algorithms, switch sha1_to_hex to hash_to_hex. Signed-off-by: brian m. carlson --- builtin/show-index.c | 2

[PATCH 18/26] builtin/worktree: switch null_sha1 to null_oid

2019-08-18 Thread brian m. carlson
Switch the remaining use of null_sha1 to null_oid. Signed-off-by: brian m. carlson --- builtin/worktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/worktree.c b/builtin/worktree.c index a5bb02b207..0c0df3b0b8 100644 --- a/builtin/worktree.c +++ b/builtin/worktre

[PATCH 05/26] builtin/blame: switch uses of GIT_SHA1_HEXSZ to the_hash_algo

2019-08-18 Thread brian m. carlson
Switch several uses of GIT_SHA1_HEXSZ to the_hash_algo. Signed-off-by: brian m. carlson --- builtin/blame.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index b6534d4dea..5a0c0c2312 100644 --- a/builtin/blame.c +++ b/builtin/blame.c

[PATCH 01/26] builtin/replace: make hash size independent

2019-08-18 Thread brian m. carlson
Instead of using GIT_SHA1_HEXSZ and hard-coded constants, switch to using the_hash_algo. Signed-off-by: brian m. carlson --- builtin/replace.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c index 644b21ca8d..4b00f1d84e 100644 ---

[PATCH 15/26] sequencer: convert to use the_hash_algo

2019-08-18 Thread brian m. carlson
Convert several uses of GIT_SHA1_HEXSZ constants to be references to the_hash_algo. Signed-off-by: brian m. carlson --- sequencer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index 34ebf8ed94..4d25e79137 100644 --- a/sequencer.c +++ b/sequ

[PATCH 20/26] wt-status: convert struct wt_status to object_id

2019-08-18 Thread brian m. carlson
Change struct wt_status to use struct object_id instead of an array of unsigned char. Signed-off-by: brian m. carlson --- builtin/commit.c | 4 ++-- wt-status.c | 2 +- wt-status.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.

[PATCH 19/26] cache: remove null_sha1

2019-08-18 Thread brian m. carlson
All of the existing uses of null_sha1 can be converted into uses of null_oid, so do so. Remove null_sha1 and is_null_sha1, and define is_null_oid in terms of null_oid. This also has the additional benefit of removing several uses of sha1_to_hex. Signed-off-by: brian m. carlson --- builtin/clon

[PATCH 21/26] packfile: replace sha1_to_hex

2019-08-18 Thread brian m. carlson
Replace a use of sha1_to_hex with hash_to_hex so that this code works with a hash algorithm other than SHA-1. Signed-off-by: brian m. carlson --- packfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packfile.c b/packfile.c index fc43a6c52c..52dea88997 100644 --- a/p

[PATCH 02/26] patch-id: convert to use the_hash_algo

2019-08-18 Thread brian m. carlson
Convert the two separate patch-id implementations to use the_hash_algo in their implementation. Signed-off-by: brian m. carlson --- builtin/patch-id.c | 11 ++- diff.c | 46 +++--- diff.h | 2 +- 3 files changed, 30 inserti

[PATCH 16/26] pack-write: use hash_to_hex when writing checksums

2019-08-18 Thread brian m. carlson
Pack checksums always use the current hash algorithm in use, so switch from sha1_to_hex to hash_to_hex. Signed-off-by: brian m. carlson --- pack-write.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pack-write.c b/pack-write.c index 29d17a9bec..f0017beb9d 100644 ---

[PATCH 03/26] fetch-pack: use parse_oid_hex

2019-08-18 Thread brian m. carlson
Instead of hard-coding constants, use parse_oid_hex to compute a pointer and use it in further parsing operations. Signed-off-by: brian m. carlson --- fetch-pack.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fetch-pack.c b/fetch-pack.c index 65be043f2a..1f56b

[PATCH 12/26] config: use the_hash_algo in abbrev comparison

2019-08-18 Thread brian m. carlson
Switch one use of a hard-coded 40 constant to use the_hash_algo. Signed-off-by: brian m. carlson --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.c b/config.c index 3900e4947b..b0f79aab21 100644 --- a/config.c +++ b/config.c @@ -1204,7 +1204,7 @@ static int

[PATCH 07/26] blame: remove needless comparison with GIT_SHA1_HEXSZ

2019-08-18 Thread brian m. carlson
When faking a working tree commit, we read in lines from MERGE_HEAD into a strbuf. Because the strbuf is NUL-terminated and get_oid_hex will fail if it unexpectedly encounters a NUL, the check for the length of the line is unnecessary. There is no optimization benefit from this case, either, sinc

[PATCH 11/26] combine-diff: replace GIT_SHA1_HEXSZ with the_hash_algo

2019-08-18 Thread brian m. carlson
Signed-off-by: brian m. carlson --- combine-diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/combine-diff.c b/combine-diff.c index 3e49f3bda8..d5c4d839dc 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -930,7 +930,7 @@ static void show_combined_header(struct combine_

[PATCH 06/26] builtin/rev-parse: switch to use the_hash_algo

2019-08-18 Thread brian m. carlson
Switch several hard-coded uses of the constant 40 to references to the_hash_algo. Signed-off-by: brian m. carlson --- builtin/rev-parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index f8bbe6d47e..308c67e4fc 100644 --- a/b

[PATCH 22/26] builtin/index-pack: replace sha1_to_hex

2019-08-18 Thread brian m. carlson
Since sha1_to_hex is limited to SHA-1, replace it with hash_to_hex so this code works with other algorithms. Signed-off-by: brian m. carlson --- builtin/index-pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 0d55f73b

[PATCH 04/26] builtin/receive-pack: switch to use the_hash_algo

2019-08-18 Thread brian m. carlson
The push cert code uses HMAC-SHA-1 to create a nonce. This is a secure use of SHA-1 which is not affected by its collision resistance (or lack thereof). However, it makes sense for us to use a better algorithm if one is available, one which may even be more performant. Futhermore, until we have

[PATCH 17/26] builtin/repack: write object IDs of the proper length

2019-08-18 Thread brian m. carlson
Use the_hash_algo when calling xwrite with a hex object ID so that the proper amount of data is written. Signed-off-by: brian m. carlson --- builtin/repack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/repack.c b/builtin/repack.c index 632c0c0a79..5830f796e0 10064

[PATCH 14/26] bisect: switch to using the_hash_algo

2019-08-18 Thread brian m. carlson
Instead of using GIT_SHA1_HEXSZ, use the_hash_algo so that the code is hash size independent. Signed-off-by: brian m. carlson --- bisect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bisect.c b/bisect.c index e87ac29a51..e81c91d02c 100644 --- a/bisect.c +++ b/bisect.c @@

[PATCH 10/26] bundle: switch to use the_hash_algo

2019-08-18 Thread brian m. carlson
Switch a use of the constant 40 and a use of GIT_SHA1_HEXSZ to use the_hash_algo instead. Signed-off-by: brian m. carlson --- bundle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle.c b/bundle.c index b5d21cd80f..a85ed3f7bc 100644 --- a/bundle.c +++ b/bundle.c @@

[PATCH 03/14] t3301: abstract away SHA-1-specific constants

2019-08-18 Thread brian m. carlson
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Move some invocations of test_commit around so that we can compute the object IDs for these commits. Compute several object IDs in the tests instead of using hard-coded values so that the test works w

[PATCH 04/14] t3305: make hash size independent

2019-08-18 Thread brian m. carlson
Instead of hard-coding 40-character shell patterns, use grep to determine if all of the paths have either zero or one levels of fanout, as appropriate. Note that the final test is implicitly dependent on the hash algorithm. Depending on the algorithm in use, the fanout may or may not completely co

[PATCH 12/14] t4000: make hash size independent

2019-08-18 Thread brian m. carlson
Use $ZERO_OID instead of hard-coding a fixed size all-zeros object ID. Signed-off-by: brian m. carlson --- t/t4000-diff-format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh index 8de36b7d12..e5116a76a1 100755 --- a/t/t4000-

[PATCH 11/14] t3903: abstract away SHA-1-specific constants

2019-08-18 Thread brian m. carlson
Abstract away the SHA-1-specific constants by sanitizing diff output to remove the index lines, since it's clear from the assertions in question that we are not interested in the specific object IDs. Signed-off-by: brian m. carlson --- t/t3903-stash.sh | 32 ++-- 1 fi

[PATCH 10/14] t3800: make hash-size independent

2019-08-18 Thread brian m. carlson
Replace references to several hard-coded object IDs with a variable referring to the generated commit. Avoid matching on exact character positions, which will be different depending on the hash in use. In the test for a valid object ID, use an obviously invalid one from the lookup table. Signed-

[PATCH 01/14] t3201: abstract away SHA-1-specific constants

2019-08-18 Thread brian m. carlson
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t3201-branch-contains.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh inde

[PATCH 08/14] t3506: make hash independent

2019-08-18 Thread brian m. carlson
This test uses a hard-coded object ID to ensure that the result of cherry-pick --ff is correct. Use test_oid to make this work for both SHA-1 and SHA-256. Signed-off-by: brian m. carlson --- t/t3506-cherry-pick-ff.sh | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/t/

[PATCH 00/14] Hash-independent tests, part 5

2019-08-18 Thread brian m. carlson
This is the fifth series of test fixes for SHA-256 compatibility. It consists of 15 patches fixing various tests from t3201 through t4009 and has only test fixes: no test helper changes are included. There are approximately 75 remaining test patches (plus some additional code changes) required fo

[PATCH 05/14] t3306: abstract away SHA-1-specific constants

2019-08-18 Thread brian m. carlson
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Convert some single-line heredocs into inline uses of echo now that they can be expressed succinctly. Signed-off-by: brian m. carlson --- t/t3306-notes-prune.sh | 45

[PATCH 13/14] t4002: make hash independent

2019-08-18 Thread brian m. carlson
Refactor out the hard-coded object IDs and use test_oid to provide values for both SHA-1 and SHA-256. Signed-off-by: brian m. carlson --- t/t4002-diff-basic.sh | 367 +- 1 file changed, 258 insertions(+), 109 deletions(-) diff --git a/t/t4002-diff-basic.s

[PATCH 07/14] t3430: avoid hard-coded object IDs

2019-08-18 Thread brian m. carlson
Compute the object IDs used in the todo list instead of hard-coding them. Signed-off-by: brian m. carlson --- t/t3430-rebase-merges.sh | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh index 7b6c4847ad

[PATCH 14/14] t4009: make hash size independent

2019-08-18 Thread brian m. carlson
Instead of hard-coding object IDs, compute them and use those in the comparison. Note that the comparison code ignores the actual object IDs, but does check that they're the right size, so computing them is the easiest way to ensure that they are. Signed-off-by: brian m. carlson --- t/t4009-dif

[PATCH 02/14] t3206: abstract away hash size constants

2019-08-18 Thread brian m. carlson
The various short object IDs in the range-diff output differ between hash algorithms. Use test_oid_cache to look up values for both SHA-1 and SHA-256. Signed-off-by: brian m. carlson --- t/t3206-range-diff.sh | 227 +++--- 1 file changed, 167 insertions(+), 6

[PATCH 09/14] t3600: make hash size independent

2019-08-18 Thread brian m. carlson
Instead of hard-coding a fixed length invalid object ID in the test, compute one using the lookup tables. Signed-off-by: brian m. carlson --- t/t3600-rm.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh index 66282a720e..8c8cca5bfb 100755 ---

[PATCH 06/14] t3404: abstract away SHA-1-specific constants

2019-08-18 Thread brian m. carlson
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Add a use of $EMPTY_TREE instead of a hard-coded value. Remove a comment about hard-coded hashes which is no longer applicable. Signed-off-by: brian m. carlson --- t/t3404-rebase-interactive.sh | 2

Re: git log --graph with a sort of local revision number

2019-08-18 Thread Uwe Brauer
>>> "RA" == Rafael Ascensão writes: > You can achieve something close (on small repos, more on that later) with: > $ git log --graph --color \ > --format='%C(auto)changeset: %h:%H%nuser: %an%ndate: %ad%nsummary: %s%n' \ > | git name-rev --refs=$(git rev-parse --abbrev

Re: git log --graph with a sort of local revision number

2019-08-18 Thread Rafael Ascensão
You can achieve something close (on small repos, more on that later) with: $ git log --graph --color \ --format='%C(auto)changeset: %h:%H%nuser: %an%ndate: %ad%nsummary: %s%n' \ | git name-rev --refs=$(git rev-parse --abbrev-ref HEAD) --name-only --stdin * changeset: 5fa0f52

[PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-18 Thread brian m. carlson
When applying multiple patches with git am, or when rebasing using the am backend, it's possible that one of our patches has updated a gitattributes file. Currently, we cache this information, so if a file in a subsequent patch has attributes applied, the file will be written out with the attribute

[PATCH v4 1/2] path: add a function to check for path suffix

2019-08-18 Thread brian m. carlson
We have a function to strip the path suffix from a commit, but we don't have one to check for a path suffix. For a plain filename, we can use basename, but that requires an allocation, since POSIX allows it to modify its argument. Refactor strip_path_suffix into a helper function and a new function

[PATCH v4 0/2] Honor .gitattributes with rebase --am

2019-08-18 Thread brian m. carlson
This series makes rebase --am honor the .gitattributes file for subsequent patches when a patch changes it. Changes from v3: * Check for both addition and removal of .gitattributes files. * Switch from "test_config" to "git config". Changes from v2: * Rename has_path_suffix to ends_with_path_comp

[RFC PATCH 5/5] line-log: try to use generation number-based topo-ordering

2019-08-18 Thread SZEDER Gábor
The previous patch made it possible to perform line-level filtering during history traversal instead of in an expensive preprocessing step, but it still requires some simpler preprocessing steps, notably topo-ordering. However, nowadays we have commit-graphs storing generation numbers, which make

[RFC PATCH 2/5] line-log: remove unused fields from 'struct line_log_data'

2019-08-18 Thread SZEDER Gábor
Remove the unused fields 'status', 'arg_alloc', 'arg_nr' and 'args' from 'struct line_log_data'. They were already part of the struct when it was introduced in commit 12da1d1f6 (Implement line-history search (git log -L), 2013-03-28), but as far as I can tell none of them have ever been actually u

[RFC PATCH 4/5] line-log: more responsive, incremental 'git log -L'

2019-08-18 Thread SZEDER Gábor
The current line-level log implementation performs a preprocessing step in prepare_revision_walk(), during which the line_log_filter() function filters and rewrites history to keep only commits modifying the given line range. This preprocessing affects both responsiveness and correctness: - Git

[RFC PATCH 3/5] t4211-line-log: add tests for parent oids

2019-08-18 Thread SZEDER Gábor
None of the tests in 't4211-line-log.sh' really check which parent object IDs are shown in the output, either implicitly as part of "Merge: ..." lines [1] or explicitly via the '%p' or '%P' format specifiers in a custom pretty format. Add two tests to 't4211-line-log.sh' to check which parent obje

[RFC PATCH 0/5] line-log: towards a more responsive, incremental 'git log -L'

2019-08-18 Thread SZEDER Gábor
Line-level log performs a preprocessing step in prepare_revision_walk(), during which it filters and rewrites history to keep only commits modifying the given line range. This preprocessing causes significant delay before the first commit is shown, wastes CPU time when the user asks only for a few

[RFC PATCH 1/5] completion: offer '--(no-)patch' among 'git log' options

2019-08-18 Thread SZEDER Gábor
Signed-off-by: SZEDER Gábor --- contrib/completion/git-completion.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index e087c4bf00..57f984340e 100644 --- a/contrib/completion/git-completion.bash +++ b/contri

Re: Updates on centos7 break git access via git-http-backend

2019-08-18 Thread brian m. carlson
On 2019-08-18 at 13:53:28, Gaeseric Vandal wrote: > > This a is a clarification of an earlier post. I thought gitweb was the > problem. > > > The actual problem appears to be with /usr/libexec/git-core/git-http-backend. > > Gitweb provides a list to unauthenticated users of available repos

Missing file in 2.23 (p5302-pack-index.subtests)?

2019-08-18 Thread Theodore Y. Ts'o
I was trying to run "make profile" on the master branch (commit 5fa0f5238b: "Git 2.23") and it died in the $(MAKE) PROFILE=GEN perf dies with: cannot open test-results/p5302-pack-index.subtests: No such file or directory at ./aggregate.perl line 153. I presume that's becuase th

Updates on centos7 break git access via git-http-backend

2019-08-18 Thread Gaeseric Vandal
This a is a clarification of an earlier post. I thought gitweb was the problem. The actual problem appears to be with /usr/libexec/git-core/git-http-backend. Gitweb provides a list to unauthenticated users of available repositories. I don't need that function so I have removed that p

[PATCH 1/2] t3420: never change upstream branch

2019-08-18 Thread Ben Wijen
When using `git rebase --autostash ` and the workarea is dirty, the active branch is incorrectly reset to the rebase branch. This test will check for such behavior. Signed-off-by: Ben Wijen --- t/t3420-rebase-autostash.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/t/t3420-re

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

2019-08-18 Thread Ben Wijen
The rebase --autostash incorrectly moved the current branch to orig_head, where orig_head -- commit object name of tip of the branch before rebasing It seems this was incorrectly taken over from git-legacy-rebase.sh Signed-off-by: Ben Wijen --- builtin/rebase.c| 18 ++---

[PATCH 0/2] git rebase: Make sure upstream branch is left alone.

2019-08-18 Thread Ben Wijen
I found an issue with git rebase --autostash with an dirty worktree/index. It seems the currently active branch is moved, which is not correct. The following patches contain both a test and a fix. Ben Wijen (2): t3420: never change upstream branch rebase.c: make sure current branch isn't mo