Re: [RFC PATCH 10/10] pack-objects: improve partial packfile reuse

2019-10-17 Thread Junio C Hamano
Jeff King writes: >> Hmm, I am kind of surprised that the decoding side allowed such a >> padding. > > IIRC, the "padding" is just a sequence of 0-length-plus-continuation-bit > varint bytes. And for some reason it worked for the size but not for the > delta offset value. I think the reason is b

Re: [PATCH] remote-curl: pass on atomic capability to remote side

2019-10-17 Thread Junio C Hamano
"brian m. carlson" writes: > Yeah, my default editor configuration for AsciiDoc is two spaces. I > noticed that Junio's already picked it up for next, but I'll send a v2 > with this fixed in case he wants to merge the fixed version to master > instead. > > If it's more convenient, I can send a f

Re: [PATCH 2/2] git_path(): handle `.lock` files correctly

2019-10-17 Thread Junio C Hamano
SZEDER Gábor writes: > However, I'm not sure what the right path should be in the first > place, given that each working tree has its own 'logs' directory, but > only for HEAD's reflog, while everything else goes to the main working > tree's 'logs' directory. As all worktrees should share the sa

Re: [RFC PATCH 10/10] pack-objects: improve partial packfile reuse

2019-10-17 Thread Jeff King
On Thu, Oct 17, 2019 at 04:03:00PM +0900, Junio C Hamano wrote: > Jeff King writes: > > >> Hmm, I am kind of surprised that the decoding side allowed such a > >> padding. > > > > IIRC, the "padding" is just a sequence of 0-length-plus-continuation-bit > > varint bytes. And for some reason it wor

Re: [PATCH 0/1] builtin/blame.c: bit field constants into bit shift format

2019-10-17 Thread Junio C Hamano
"Hariom Verma via GitGitGadget" writes: > we are looking at bitfield constants, and elsewhere in the Git source code, > such cases are handled via bit shift operators rather than octal numbers, > which also makes it easier to spot holes in the range (if, say, 1<<5 was > missing, it is easier to s

Re: [PATCH 1/1] builtin/blame.c: constants into bit shift format

2019-10-17 Thread Junio C Hamano
"Hariom Verma via GitGitGadget" writes: > -#define OUTPUT_SHOW_AGE_WITH_COLOR 04000 > +#define OUTPUT_ANNOTATE_COMPAT (1<<0) > +#define OUTPUT_LONG_OBJECT_NAME (1<<1) > +#define OUTPUT_RAW_TIMESTAMP(1<<2) > +#define OUTPUT_PORCELAIN(1<<3) > +#define OUTPUT_SHOW_NAME

Re: [PATCH v2 1/3] doc: provide guidance on user.name format

2019-10-17 Thread Junio C Hamano
Jeff King writes: > I think this is a good distinction to draw, but... > >> Documentation/git-commit-tree.txt | 6 ++ >> 1 file changed, 6 insertions(+) > > ...I was surprised to see it here, where I think most users wouldn't > find it. Would it make sense in git-commit(1), or in the descrip

Commits with --no-verify option

2019-10-17 Thread Manoj Sterex
Hi all, Currently, AFAIK, there is no way to know if a commit was done with or without using the '--no-verify' option. That is, git does not track if hooks were skipped when the commit happened. Is there some way to track this in the log? Regards, Manoj

Re: [PATCH 0/1] ci: update caskroom/cask/perforce to new location

2019-10-17 Thread Johannes Schindelin
Hi Stolee, On Tue, 15 Oct 2019, Derrick Stolee via GitGitGadget wrote: > Running CI on Mac OS X in Azure Pipelines is currently broken due to a moved > homebrew package. It seems that the exact problem we tried to avoid by staying on caskroom rears its ugly head: all of the macOS jobs are failin

[RFC/WIP] range-diff: show old/new blob OIDs in comments

2019-10-17 Thread Eric Wong
(WIP, mostly stream-of-concious notes + reasoning) When using "git format-patch --range-diff", the pre and post-image blob OIDs are in each email, while the exact commit OIDs are rarely shared via emails (only the tip commit from "git request-pull"). These blob OIDs make it easy to search for or

Re: email as a bona fide git transport

2019-10-17 Thread Vegard Nossum
On 10/16/19 5:00 PM, Pratyush Yadav wrote: On 16/10/19 12:22PM, Vegard Nossum wrote: Just to play the devil's advocate, even though I'm in favor of something like this, I'll add in another disadvantage: - The maintainer can't make small edits before pushing the changes out. I do that every no

Re: [PATCH v3 07/13] graph: example of graph output that can be simplified

2019-10-17 Thread Derrick Stolee
On 10/15/2019 7:47 PM, James Coglan via GitGitGadget wrote: > diff --git a/t/t4215-log-skewed-merges.sh b/t/t4215-log-skewed-merges.sh > new file mode 100755 > index 00..4582ba066a > --- /dev/null > +++ b/t/t4215-log-skewed-merges.sh > @@ -0,0 +1,43 @@ > +#!/bin/sh > + > +test_description='

Re: [PATCH v3 08/13] graph: tidy up display of left-skewed merges

2019-10-17 Thread Derrick Stolee
On 10/16/2019 12:00 AM, Junio C Hamano wrote: > "James Coglan via GitGitGadget" writes: > >> This effect is applied to both "normal" two-parent merges, and to >> octopus merges. It also reduces the vertical space needed for pre-commit >> lines, as the merge occupies one less column than usual. >>

[PATCH v2 0/1] ci: update caskroom/cask/perforce to new location

2019-10-17 Thread Derrick Stolee via GitGitGadget
Running CI on Mac OS X in Azure Pipelines is currently broken due to a moved homebrew package. Updates in V2: Johannes helped to make the step even more robust. Thanks, -Stolee Johannes Schindelin (1): ci(osx): use new location of the `perforce` cask ci/install-dependencies.sh | 5 + 1 f

[PATCH v2 1/1] ci(osx): use new location of the `perforce` cask

2019-10-17 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The CI builds are failing for Mac OS X due to a change in the location of the perforce cask. The command outputs the following error: + brew install caskroom/cask/perforce Error: caskroom/cask was moved. Tap homebrew/cask-cask instead. So let's try to call `bre

Re: email as a bona fide git transport

2019-10-17 Thread Vegard Nossum
On 10/16/19 10:57 PM, Jonathan Nieder wrote: Hi, A few small points. Vegard Nossum wrote: * git am (or an alternative command) needs to recreate the commit perfectly when applied, including applying it to the correct parent Interesting. "git format-patch" has a --base option to do some

Re: email as a bona fide git transport

2019-10-17 Thread Theodore Y. Ts'o
On Thu, Oct 17, 2019 at 02:23:58PM +0200, Vegard Nossum wrote: > Of course, this relies strongly on actually having (correct) sha1 > references to previous versions inside the changelog. In my original > idea, this reference would only appear inside the merge commit that > binds the patchset togeth

Re: email as a bona fide git transport

2019-10-17 Thread Vegard Nossum
On 10/17/19 5:17 AM, Junio C Hamano wrote: Vegard Nossum writes: Step 1: * git send-email needs to include parent SHA1s and generally all the information needed to perfectly recreate the commit when applied so that all the SHA1s remain the same * git am (or an alternative command) need

Re: Raise your hand to Ack jk/code-of-conduct if your Ack fell thru cracks

2019-10-17 Thread Philip Oakley
Hi all, On 11/10/2019 06:58, Jeff King wrote: I snipped your concerns with some of the language. I do agree with you that a lot of is open to interpretation. But I also think it's impossible to get it 100% airtight. My feeling was that it was a good idea to go with some existing, well-establishe

Re: email as a bona fide git transport

2019-10-17 Thread Vegard Nossum
On 10/17/19 3:11 PM, Theodore Y. Ts'o wrote: On Thu, Oct 17, 2019 at 02:23:58PM +0200, Vegard Nossum wrote: Of course, this relies strongly on actually having (correct) sha1 references to previous versions inside the changelog. In my original idea, this reference would only appear inside the m

Re: git smart http + apache mod_auth_openidc

2019-10-17 Thread Ralph Ewig
Interesting ... I have not looked at access tokens before, but did find some documentation online that describes how Azure AD Jason Web Tokens can be used to authenticate a headless API (https://docs.microsoft.com/en-us/azure/active-directory/develop/id-tokens), This seems to be a fit in thi

Re: git smart http + apache mod_auth_openidc

2019-10-17 Thread Ralph Ewig
Quick follow up question: can the git client pass a token read from a cookie with a request? That would enable users to sign-in via a browser, store the cookie, and then use that as the access token to authenticate a git request. On 10/16/2019 11:03 PM, Jeff King wrote: > On Thu, Oct 17, 2019

Re: email as a bona fide git transport

2019-10-17 Thread Theodore Y. Ts'o
On Thu, Oct 17, 2019 at 04:01:33PM +0200, Vegard Nossum wrote: > > In your example, couldn't Darrick simply base his xfs work on the latest > xfs branch that was pulled by Linus? That should be up to date with all > things xfs without having any of the things that made Linus's tree not > work for

Re: email as a bona fide git transport

2019-10-17 Thread Steven Rostedt
On Thu, 17 Oct 2019 16:01:33 +0200 Vegard Nossum wrote: > In your example, couldn't Darrick simply base his xfs work on the latest > xfs branch that was pulled by Linus? That should be up to date with all > things xfs without having any of the things that made Linus's tree not > work for him. Su

feature request on git-merge-recursive

2019-10-17 Thread GOSSENT, Kevin
Hi, I've seen recently some development with a special development flow that is the source of my feature request. Description of the feature: For each treated file, in case of an empty ancestor (file created on both branches or orphan branch), I found that usually the best way to help (or even

[PATCH 2/2] Make "git branch -d" prune missing worktrees automatically.

2019-10-17 Thread Peter Jones
Currently, if you do: $ git branch zonk origin/master $ git worktree add zonk zonk $ rm -rf zonk $ git branch -d zonk You get the following error: $ git branch -d zonk error: Cannot delete branch 'zonk' checked out at '/home/pjones/devel/kernel.org/git/zonk' It isn't meaningfully checked out,

[PATCH 1/2] Make die_if_checked_out() ignore missing worktree checkouts.

2019-10-17 Thread Peter Jones
Currently if you do, for example: $ git worktree add path foo And "foo" has already been checked out at some other path, but the user has removed it without pruning, you'll get an error that the branch is already checked out. It isn't meaningfully checked out, the repo's data is just stale and n

Re: [PATCH 1/2] Make die_if_checked_out() ignore missing worktree checkouts.

2019-10-17 Thread SZEDER Gábor
On Thu, Oct 17, 2019 at 12:28:25PM -0400, Peter Jones wrote: > Currently if you do, for example: > > $ git worktree add path foo > > And "foo" has already been checked out at some other path, but the user > has removed it without pruning, you'll get an error that the branch is > already checked o

Re: [PATCH 2/2] Make "git branch -d" prune missing worktrees automatically.

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 12:28 PM Peter Jones wrote: > Currently, if you do: > > $ git branch zonk origin/master > $ git worktree add zonk zonk > $ rm -rf zonk > $ git branch -d zonk > > You get the following error: > > $ git branch -d zonk > error: Cannot delete branch 'zonk' checked out at > '/h

[PATCH 4/6] completion: simplify completing 'git worktree' subcommands and options

2019-10-17 Thread SZEDER Gábor
The completion function for 'git worktree' uses separate but very similar case arms to complete --options for each subcommand. Combine these into a single case arm to avoid repetition. Note that after this change we won't complete 'git worktree remove's '--force' option, but that is consistent wi

[PATCH 3/6] completion: return the index of found word from __git_find_on_cmdline()

2019-10-17 Thread SZEDER Gábor
When using the __git_find_on_cmdline() helper function so far we've only been interested in which one of a set of words appear on the command line. To complete options for some of 'git worktree's subcommands in the following patches we'll need not only that, but the index of that word on the comma

[PATCH 5/6] completion: list existing working trees for 'git worktree' subcommands

2019-10-17 Thread SZEDER Gábor
Complete the paths of existing working trees for 'git worktree's 'move', 'remove', 'lock', and 'unlock' subcommands. Note that 'git worktree list --porcelain' shows absolute paths, so for simplicity's sake we'll complete full absolute paths as well (as opposed to turning them into relative paths b

[PATCH 6/6] completion: list paths and refs for 'git worktree add'

2019-10-17 Thread SZEDER Gábor
Complete paths after 'git worktree add ' and refs after 'git worktree add -b ' and 'git worktree add some/dir '. Uncharacteristically for a Git command, 'git worktree add' takes a mandatory path parameter before a commit-ish as its optional last parameter. In addition, it has both standalone --op

[PATCH 2/6] completion: clean up the __git_find_on_cmdline() helper function

2019-10-17 Thread SZEDER Gábor
The __git_find_on_cmdline() helper function started its life as __git_find_subcommand() [1], but it served a more general purpose than looking for subcommands, so later it was renamed accordingly [2]. However, that rename didn't touch the body of the function, and left the $subcommand local variabl

[PATCH 1/6] t9902-completion: add tests for the __git_find_on_cmdline() helper

2019-10-17 Thread SZEDER Gábor
The following two patches will refactor and extend the __git_find_on_cmdline() helper function, so let's add a few tests first to make sure that its basic behavior doesn't change. Signed-off-by: SZEDER Gábor --- t/t9902-completion.sh | 28 1 file changed, 28 insertio

[PATCH 0/6] completion: improve completion for 'git worktree'

2019-10-17 Thread SZEDER Gábor
Complete paths of working trees and refs for 'git worktree's various subcommands. The last two patches do the actual improvements, the first four are preparatory steps. An early version of the last patch was already sent to the list as a PoC over four years ago [1], but I didn't like the part com

[PATCH v2 1/1] builtin/blame.c: constants into bit shift format

2019-10-17 Thread Hariom Verma via GitGitGadget
From: Hariom Verma We are looking at bitfield constants, and elsewhere in the Git source code, such cases are handled via bit shift operators rather than octal numbers, which also makes it easier to spot holes in the range (if, say, 1<<5 was missing, it is easier to spot it between 1<<4 and 1<<6

[PATCH v2 0/1] builtin/blame.c: bit field constants into bit shift format

2019-10-17 Thread Hariom Verma via GitGitGadget
we are looking at bitfield constants, and elsewhere in the Git source code, such cases are handled via bit shift operators rather than octal numbers, which also makes it easier to spot holes in the range (if, say, 1<<5 was missing, it is easier to spot it between 1<<4 and 1<<6 than it is to spot a

Re: [PATCH 3/6] completion: return the index of found word from __git_find_on_cmdline()

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 1:35 PM SZEDER Gábor wrote: > When using the __git_find_on_cmdline() helper function so far we've > only been interested in which one of a set of words appear on the > command line. To complete options for some of 'git worktree's > subcommands in the following patches we'l

Re: [RFC PATCH 1/7] Makefile: alphabetically sort += lists

2019-10-17 Thread Junio C Hamano
Denton Liu writes: > There are many += lists in the Makefile and, over time, they have gotten > slightly out of order, alphabetically. Alphabetically sort all += lists > to bring them back in order. > ... Hmm. I like the general thrust, but ... > LIB_OBJS += combine-diff.o > -LIB_OBJS += comm

Re: [PATCH 5/6] completion: list existing working trees for 'git worktree' subcommands

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 1:35 PM SZEDER Gábor wrote: > Complete the paths of existing working trees for 'git worktree's > 'move', 'remove', 'lock', and 'unlock' subcommands. > [...] > Arguably 'git worktree unlock ' should only complete locked > working trees, but 'git worktree list --porcelain' do

Re: [PATCH 1/2] git-gui: implement proc select_path_in_widget

2019-10-17 Thread Pratyush Yadav
On 17/10/19 07:08AM, Birger Skogeng Pedersen wrote: > Hi Pratyush, > > On Wed, Oct 16, 2019 at 9:28 PM Pratyush Yadav wrote: > > I mentioned this earlier, and I'll mention this again: I'm not sure > > whether this feature would be a good thing for the larger population. So > > this _might_ not en

Re: [PATCH v4 1/1] Make gitdir work with worktrees, respect core.hooksPath, etc

2019-10-17 Thread Pratyush Yadav
On 14/10/19 12:18AM, Johannes Schindelin wrote: > Hi Pratyush, > > On Mon, 14 Oct 2019, Pratyush Yadav wrote: > > > On 12/10/19 11:24PM, Johannes Schindelin wrote: > > > Hi Pratyush, > > > > > > On Sat, 12 Oct 2019, Pratyush Yadav wrote: > > > > > > > On 08/10/19 04:33AM, Johannes Schindelin via

Set default strategy options for merge/rebase

2019-10-17 Thread Yuri D'Elia
Is it (or would it be) possible to set the default strategy and strategy options as provided by merge/rebase ``-s`` and ``-X`` in gitconfig? I found myself comparing several conflicts using recursive's -Xpatience, and in some cases the difference is quite staggering, changing from a jumbled mess t

[PATCH v2 0/7] Better threaded delta resolution in index-pack

2019-10-17 Thread Jonathan Tan
Thanks, Stolee and Peff, for taking a look at it. Here is a v2. It is mostly unchanged, except for expanded commit messages and code comments. I've also added a documentation clarification that core.deltaBaseCacheLimit is per-thread, appearing as the first patch in this patch series. >From patch

[PATCH v2 1/7] Documentation: deltaBaseCacheLimit is per-thread

2019-10-17 Thread Jonathan Tan
Clarify that core.deltaBaseCacheLimit is per-thread, as can be seen from the fact that cache usage (base_cache_used in struct thread_local in builtin/index-pack.c) is tracked individually for each thread and compared against delta_base_cache_limit. Signed-off-by: Jonathan Tan --- Documentation/c

[PATCH v2 2/7] index-pack: unify threaded and unthreaded code

2019-10-17 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- builtin/index-pack.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 60a5591039..df6b3b8cf6 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1210,15 +1210,7 @@ static vo

[PATCH v2 4/7] index-pack: remove redundant child field

2019-10-17 Thread Jonathan Tan
This is refactoring 1 of 2 to simplify struct base_data. In index-pack, each thread maintains a doubly-linked list of the delta chain that it is currently processing (the "base" and "child" pointers in struct base_data). When a thread exceeds the delta base cache limit and needs to reclaim memory,

[PATCH v2 5/7] index-pack: calculate {ref,ofs}_{first,last} early

2019-10-17 Thread Jonathan Tan
This is refactoring 2 of 2 to simplify struct base_data. Whenever we make a struct base_data, immediately calculate its delta children. This eliminates confusion as to when the {ref,ofs}_{first,last} fields are initialized. Before this patch, the delta children were calculated at the last possibl

[PATCH v2 6/7] index-pack: make resolve_delta() assume base data

2019-10-17 Thread Jonathan Tan
A subsequent commit will make the quantum of work smaller, necessitating more locking. This commit allows resolve_delta() to be called outside the lock. Signed-off-by: Jonathan Tan --- builtin/index-pack.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/builtin/index-

[PATCH v2 3/7] index-pack: remove redundant parameter

2019-10-17 Thread Jonathan Tan
find_{ref,ofs}_delta_{,children} take an enum object_type parameter, but the object type is already present in the name of the function. Remove that parameter from these functions. Signed-off-by: Jonathan Tan --- builtin/index-pack.c | 26 -- 1 file changed, 12 insertions

[PATCH v2 7/7] index-pack: make quantum of work smaller

2019-10-17 Thread Jonathan Tan
Currently, when index-pack resolves deltas, it does not split up delta trees into threads: each delta base root (an object that is not a REF_DELTA or OFS_DELTA) can go into its own thread, but all deltas on that root (direct or indirect) are processed in the same thread. This is a problem when a r

Re: email as a bona fide git transport

2019-10-17 Thread Greg KH
On Wed, Oct 16, 2019 at 10:45:19AM -0400, Santiago Torres Arias wrote: > Hi Willy, Vegard. > > On Wed, Oct 16, 2019 at 01:10:09PM +0200, Willy Tarreau wrote: > > Hi Vegard, > > > > On Wed, Oct 16, 2019 at 12:22:54PM +0200, Vegard Nossum wrote: > > > (cross-posted to git, LKML, and the kernel work

Re: email as a bona fide git transport

2019-10-17 Thread Konstantin Ryabitsev
On Thu, Oct 17, 2019 at 01:43:43PM -0700, Greg KH wrote: I wonder if it'd be also possible to then embed gpg signatures over send-mail payloads so as they can be transparently transferred to the commit. That's a crazy idea. It would be nice if we could do that, I like it :) It could only po

Re: [PATCH 2/2] git_path(): handle `.lock` files correctly

2019-10-17 Thread Johannes Schindelin
Hi Gábor, On Wed, 16 Oct 2019, SZEDER Gábor wrote: > On Wed, Oct 16, 2019 at 07:07:17AM +, Johannes Schindelin via > GitGitGadget wrote: > > From: Johannes Schindelin > > > > Ever since worktrees were introduced, the `git_path()` function _really_ > > needed to be called e.g. to get at the

[PATCH v2 0/2] Handle git_path() with lock files correctly in worktrees

2019-10-17 Thread Johannes Schindelin via GitGitGadget
I stumbled over this during my recent work in Git GUI [https://github.com/gitgitgadget/git/pull/361] that was originally really only intended to use the correct hooks directory. It turns out that my fears that index.lock was mishandled were unfounded, hence this patch series has a lot lower priori

[PATCH v2 1/2] t1400: wrap setup code in test case

2019-10-17 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without this, you cannot use `--run=<...>` to skip that part, and a run with `--run=0` (which is a common way to determine the test case number corresponding to a given test case title). Signed-off-by: Johannes Schindelin --- t/t1400-update-ref.sh | 18 ++-

[PATCH v2 2/2] git_path(): handle `.lock` files correctly

2019-10-17 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Ever since worktrees were introduced, the `git_path()` function _really_ needed to be called e.g. to get at the path to `logs/HEAD` (`HEAD` is specific to the worktree). However, the wrong path is returned for `logs/HEAD.lock`. This does not matter as long as the Git ex

Re: [PATCH v2 1/3] doc: provide guidance on user.name format

2019-10-17 Thread brian m. carlson
On 2019-10-17 at 05:40:52, Jeff King wrote: > On Thu, Oct 17, 2019 at 12:53:28AM +, brian m. carlson wrote: > > > It's a frequent misconception that the user.name variable controls > > authentication in some way, and as a result, beginning users frequently > > attempt to change it when they're

Re: git smart http + apache mod_auth_openidc

2019-10-17 Thread brian m. carlson
On 2019-10-17 at 14:33:38, Ralph Ewig wrote: > Quick follow up question: can the git client pass > a token read from a cookie with a request? That > would enable users to sign-in via a browser, store > the cookie, and then use that as the access token > to authenticate a git request. Git has an op

bug: Directory replaced by submodule -> checkout fails

2019-10-17 Thread Christopher Collins
Hello all, ### Environment: $ git --version git version 2.21.0 ### Reproduce: git clone g...@github.com:JuulLabs-OSS/mcuboot.git cd mcuboot git submodule init git submodule update git checkout ae01f153b11637feaedbc9d9042172fba2e080c0 ### Discussion: In the above sequence, the last step (check

[PATCH 07/12] t5520: replace test -{n,z} with test-lib functions

2019-10-17 Thread Denton Liu
Instead of using `test -n` or `test -z`, replace them respectively with invocations of test_file_not_empty() and test_must_be_empty(). Signed-off-by: Denton Liu --- t/t5520-pull.sh | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh

[PATCH 06/12] t5520: use test_line_count where possible

2019-10-17 Thread Denton Liu
Instead of rolling our own functionality to test the number of lines a command outputs, use test_line_count() which provides better debugging information in the case of a failure. Signed-off-by: Denton Liu --- t/t5520-pull.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

[PATCH 08/12] t5520: use test_cmp_rev where possible

2019-10-17 Thread Denton Liu
In case an invocation of `git rev-list` fails within the subshell, the failure will be masked. Remove the subshell and use test_cmp_rev() so that failures can be discovered. This change was done with the following sed expressions: s/test "$(git rev-parse.* \([^)]*\))" = "$(git rev-parse

[PATCH 09/12] t5520: test single-line files by git with test_cmp

2019-10-17 Thread Denton Liu
In case an invocation of a Git command fails within the subshell, the failure will be masked. Replace the subshell with a file-redirection and a call to test_cmp. This change was done with the following GNU sed expressions: s/\(\s*\)test \([^ ]*\) = "$(\(git [^)]*\))"/\1echo \2 >expect \

[PATCH 12/12] t5520: replace `! git` with `test_must_fail git`

2019-10-17 Thread Denton Liu
Currently, if a Git command fails in an unexpected way, such as a segfault, it will be masked and ignored. Replace the ! with test_must_fail so that only expected failures pass. Signed-off-by: Denton Liu --- t/t5520-pull.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/

[PATCH 04/12] t5520: replace test -f with test_path_is_file

2019-10-17 Thread Denton Liu
Although `test -f` has the same functionality as test_path_is_file(), in the case where test_path_is_file() fails, we get much better debugging information. Replace `test -f` with test_path_is_file so that future developers will have a better experience debugging these test cases. Signed-off-by: D

[PATCH 11/12] t5520: replace subshell cat comparison with test_cmp

2019-10-17 Thread Denton Liu
We currently have many instances of `test = $(cat )` and `test $(cat ) = `. In the case where this fails, it will be difficult for a developer to debug since the output will be masked. Replace these instances with invocations of test_cmp(). This change was done with the following GNU sed express

[PATCH 10/12] t5520: don't put git in upstream of pipe

2019-10-17 Thread Denton Liu
Before, if the invocation of git failed, it would be masked by the pipe since only the return code of the last element of a pipe is used. Rewrite the test to put the Git command on its own line so its return code is not masked. Signed-off-by: Denton Liu --- t/t5520-pull.sh | 3 ++- 1 file change

[PATCH 02/12] t5520: use sq for test case names

2019-10-17 Thread Denton Liu
The usual convention is for test case names to be written between single-quotes. Change all double-quoted test case names to single-quotes except for two test case names that use variables within. Signed-off-by: Denton Liu --- t/t5520-pull.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[PATCH 00/12] t5520: various test cleanup

2019-10-17 Thread Denton Liu
Like earlier patchsets, I want to implement a feature that involves modifications to the test suite. Since that feature will probably take a while to polish up, however, let's clean up the test suite in a separate patchset first so it's not blocked by the feature work. Denton Liu (12): t5520: im

[PATCH 01/12] t5520: improve test style

2019-10-17 Thread Denton Liu
Improve the test style by removing leading and trailing empty lines within test cases. Also, reformat multi-line subshells to conform to the existing style. Signed-off-by: Denton Liu --- t/t5520-pull.sh | 88 + 1 file changed, 45 insertions(+), 43

[PATCH 05/12] t5520: remove spaces after redirect operator

2019-10-17 Thread Denton Liu
The style for tests in Git is to have the redirect operator attached to the filename with no spaces. Fix test cases where this is not the case. Signed-off-by: Denton Liu --- t/t5520-pull.sh | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t5520-pull.sh b/t/t5520-p

[PATCH 03/12] t5520: let sed open its own input

2019-10-17 Thread Denton Liu
We were using a redirection operator to feed input into sed. However, since sed is capable of opening its own files, make sed open its own files instead of redirecting input into it. Signed-off-by: Denton Liu --- t/t5520-pull.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

Re: [PATCH 04/12] t5520: replace test -f with test_path_is_file

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:17 PM Denton Liu wrote: > Although `test -f` has the same functionality as test_path_is_file(), in > the case where test_path_is_file() fails, we get much better debugging > information. Replace `test -f` with test_path_is_file so that future > developers will have a bett

Re: [PATCH 07/12] t5520: replace test -{n,z} with test-lib functions

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:17 PM Denton Liu wrote: > Instead of using `test -n` or `test -z`, replace them respectively with > invocations of test_file_not_empty() and test_must_be_empty(). > > Signed-off-by: Denton Liu > --- > diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh > @@ -206,15 +206,18 @@

[PATCH 4.5/12] t5520: replace test -f with test-lib functions

2019-10-17 Thread Denton Liu
Although `test -f` has the same functionality as test_path_is_file(), in the case where test_path_is_file() fails, we get much better debugging information. Replace `test -f` with test_path_is_file() so that future developers will have a better experience debugging these test cases. Also, in the c

Re: [PATCH 08/12] t5520: use test_cmp_rev where possible

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:17 PM Denton Liu wrote: > In case an invocation of `git rev-list` fails within the subshell, the > failure will be masked. Remove the subshell and use test_cmp_rev() so > that failures can be discovered. > > Signed-off-by: Denton Liu > --- > diff --git a/t/t5520-pull.sh

Re: [PATCH 09/12] t5520: test single-line files by git with test_cmp

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:17 PM Denton Liu wrote: > In case an invocation of a Git command fails within the subshell, the > failure will be masked. Replace the subshell with a file-redirection and > a call to test_cmp. > > Signed-off-by: Denton Liu > --- > diff --git a/t/t5520-pull.sh b/t/t5520-p

Re: [PATCH v4 00/17] New sparse-checkout builtin and "cone" mode

2019-10-17 Thread Jon Simons
On 10/15/19 6:55 AM, Derrick Stolee via GitGitGadget wrote: V4 UPDATE: Rebased on latest master to include ew/hashmap and ds/include-exclude in the base. I did a partial review of the v4 patches out of curiosity and I notice in sparse-checkout.c there are a couple of unchecked `fopen` call site

[PATCH 1/1] config: add documentation to config.h

2019-10-17 Thread Heba Waly via GitGitGadget
From: Heba Waly This commit is copying and summarizing the documentation from documentation/technical/api-config.txt to comments in config.h Signed-off-by: Heba Waly --- config.h | 327 +++ 1 file changed, 327 insertions(+) diff --git a/conf

[PATCH 0/1] config: add documentation to config.h

2019-10-17 Thread Heba Waly via GitGitGadget
This commit is copying and summarizing the documentation from documentation/technical/api-config.txt to comments in config.h Signed-off-by: Heba Waly heba.w...@gmail.com [heba.w...@gmail.com] Thanks for taking the time to contribute to Git! Please be advised that the Git community does not use gi

Re: [PATCH 4.5/12] t5520: replace test -f with test-lib functions

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:35 PM Denton Liu wrote: > Although `test -f` has the same functionality as test_path_is_file(), in > the case where test_path_is_file() fails, we get much better debugging > information. > > Replace `test -f` with test_path_is_file() so that future developers > will have

Re: Commits with --no-verify option

2019-10-17 Thread brian m. carlson
On 2019-10-17 at 08:56:34, Manoj Sterex wrote: > Hi all, > > Currently, AFAIK, there is no way to know if a commit was done with or > without using the '--no-verify' option. That is, git does not track if > hooks were skipped when the commit happened. > > Is there some way to track this in the lo

Re: [PATCH 1/2] t3301: test diagnose messages for too few/many paramters

2019-10-17 Thread Junio C Hamano
Doan Tran Cong Danh writes: > If we accidentally lifted the check inside our code base, the test may > still failed because the provided parameter is not a valid ref. Makes sense. Another option would be to use a valid ref to make sure there are no other possible reason for the command to fail,

Re: [PATCH 2/2] notes: fix minimum number of parameters to "copy" subcommand

2019-10-17 Thread Junio C Hamano
Doan Tran Cong Danh writes: > Documentation/git-notes.txt | 6 +++--- > builtin/notes.c | 2 +- > t/t3301-notes.sh| 40 +++-- > 3 files changed, 42 insertions(+), 6 deletions(-) Thanks, makes sense.

Re: [PATCH v3 08/13] graph: tidy up display of left-skewed merges

2019-10-17 Thread Junio C Hamano
Derrick Stolee writes: > I hit this very situation recently when I was experimenting with > 'git fast-import' and accidentally created many parallel, independent > histories. Running "git log --graph --all --simplify-by-decoration" > made it look like all the refs were in a line, but they were no

[Outreachy] Intro

2019-10-17 Thread Heba Waly
Hello everyone, My name is Heba and I’m one of the Outreachy applicants. I’ve selected the ‘moving the doc to comments’ microproject, and I’ll be submitting several patches addressing this area during the next week or two. The first one is already out there waiting for feedback (yey) https://publi

Re: git smart http + apache mod_auth_openidc

2019-10-17 Thread Ralph Ewig
Understood (and agree). We do use git for source code (where we use SSH and key authentication for CI/CD), but also for configuration control of other files like financial reports, engineering drawings, etc. where access is via HTTPS.  In that 2nd group the challenge is to make it as "not cod

Re: [PATCH v2 2/2] git_path(): handle `.lock` files correctly

2019-10-17 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > Ever since worktrees were introduced, the `git_path()` function _really_ > needed to be called e.g. to get at the path to `logs/HEAD` (`HEAD` is > specific to the worktree). However, the wrong path is returned for > `

Re: email as a bona fide git transport

2019-10-17 Thread Greg KH
On Thu, Oct 17, 2019 at 04:45:32PM -0400, Konstantin Ryabitsev wrote: > On Thu, Oct 17, 2019 at 01:43:43PM -0700, Greg KH wrote: > > > I wonder if it'd be also possible to then embed gpg signatures over > > > send-mail payloads so as they can be transparently transferred to the > > > commit. > > >

Re: [PATCH v1] config/branch: state that .merge is the remote ref

2019-10-17 Thread Junio C Hamano
Philip Oakley writes: > branch..merge:: > Defines, together with branch..remote, the upstream branch > - for the given branch. It tells 'git fetch'/'git pull'/'git rebase' which > + for the given branch. It defines the branch name _on the remote_, > + which may be different fro

Re: [PATCH v2 2/3] grep: make PCRE2 aware of custom allocator

2019-10-17 Thread Junio C Hamano
"Carlo Marcelo Arenas Belón via GitGitGadget" writes: > builtin/grep.c | 1 + > grep.c | 34 +- > grep.h | 1 + > 3 files changed, 35 insertions(+), 1 deletion(-) > > +#if defined(USE_LIBPCRE2) > + if (!pcre2_global_context) > +

Re: email as a bona fide git transport

2019-10-17 Thread Konstantin Ryabitsev
On Thu, Oct 17, 2019 at 06:30:29PM -0700, Greg KH wrote: It could only possibly work if nobody ever adds their own "Signed-Off-By" or any other bylines. I expect this is a deal-breaker for most maintainers. Yeah it is :( But, if we could just have the signature on the code change, not the cha

[PATCH 04/23] remember commit/tag parse failures

2019-10-17 Thread Jeff King
If we can't parse a commit, then parse_commit() will return an error code. But it _also_ sets the "parsed" flag, which tells us not to bother trying to re-parse the object. That means that subsequent parses have no idea that the information in the struct may be bogus. I.e., doing this: parse_co

[PATCH 08/23] fsck: require an actual buffer for non-blobs

2019-10-17 Thread Jeff King
The fsck_object() function takes in a buffer, but also a "struct object". The rules for using these vary between types: - for a commit, we'll use the provided buffer; if it's NULL, we'll fall back to get_commit_buffer(), which loads from either an in-memory cache or from disk. If the lat

[PATCH 05/23] fsck: stop checking commit->tree value

2019-10-17 Thread Jeff King
We check in fsck_commit_buffer() that commit->tree isn't NULL, which in turn generally comes from a previous parse by parse_commit(). But this isn't really accomplishing anything. The two things we might care about are: - was there a syntactically valid "tree " line in the object? But we've

[PATCH 06/23] fsck: stop checking commit->parent counts

2019-10-17 Thread Jeff King
In 4516338243 (builtin-fsck: reports missing parent commits, 2008-02-25), we added code to check that fsck found the same number of parents from parsing the commit itself as we see in the commit struct we got from parse_commit_buffer(). Back then the rationale was that the normal commit parser migh

[PATCH 09/23] fsck: unify object-name code

2019-10-17 Thread Jeff King
Commit 90cf590f53 (fsck: optionally show more helpful info for broken links, 2016-07-17) added a system for decorating objects with names. The code is split across builtin/fsck.c (which gives the initial names) and fsck.c (which adds to the names as it traverses the object graph). This leads to som

[PATCH 10/23] fsck_describe_object(): build on our get_object_name() primitive

2019-10-17 Thread Jeff King
This isolates the implementation detail of using the decoration code to our put/get functions. Signed-off-by: Jeff King --- Arguably this could be squashed into the previous commit. By not doing so, it made describe_object() more of a pure code movement. fsck.c | 5 + 1 file changed, 1 inse

  1   2   >