Re: [PATCH] pretty: Add "%aU"|"%au" option to output author's username

2019-10-22 Thread brian m. carlson
b, mail, maillen); > return placeholder_len; > } > + if (part == 'u' || part == 'U') { /* username */ > + maillen = strstr(s.mail_begin, "@") - s.mail_begin; > + strbuf_add(sb, mail, maillen); > +

Re: Commits with --no-verify option

2019-10-17 Thread brian m. carlson
for advanced users to make a series of temporary commits to save state and then squash them later. It wouldn't be reasonable for a pre-commit hook to enforce certain policies, such as a commit message syntax policy, in such a case, so --no-verify exists for users who know what they

Re: git smart http + apache mod_auth_openidc

2019-10-17 Thread brian m. carlson
tructure and users better than I do, but I don't recommend having a web-based sign-on as your only form of authentication for a Git server. It's going to cause a lot of pain and inconvenience on all sides. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

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 +0000, 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 > &

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

2019-10-16 Thread brian m. carlson
tion instead. Signed-off-by: brian m. carlson --- Documentation/git-commit-tree.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt index 4b90b9c12a..c794843634 100644 --- a/Documentation/git-commit-tree.txt +++

[PATCH v2 2/3] doc: dissuade users from trying to ignore tracked files

2019-10-16 Thread brian m. carlson
and confusion, let's document the existing behavior and the pitfalls in the documentation for git update-index so that users know they should explore alternate solutions. Signed-off-by: brian m. carlson --- Documentation/git-update-index.txt | 10 ++ 1 file changed, 10 insertions(+)

[PATCH v2 3/3] docs: mention when increasing http.postBuffer is valuable

2019-10-16 Thread brian m. carlson
what it actually does, and discourage people from using it as a general solution for push problems, since it is not effective there. Signed-off-by: brian m. carlson --- Documentation/config/http.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/config/http.txt b

[PATCH v2 0/3] Documentation for common user misconceptions

2019-10-16 Thread brian m. carlson
ve. Changes from v1: * Remove parenthetical which was confusing. * Add two more patches. brian m. carlson (3): doc: provide guidance on user.name format doc: dissuade users from trying to ignore tracked files docs: mention when increasing http.postBuffer is valuable Documentation/config/http.txt

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

2019-10-16 Thread brian m. carlson
mic transaction failed", while our own checking rejects pushes with the message "atomic push failed". Document the atomic option in the remote helper documentation, so other implementers can implement it if they like. Signed-off-by: brian m. carlson --- Changes from v1: * Use

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

2019-10-16 Thread brian m. carlson
On 2019-10-15 at 16:40:29, Jeff King wrote: > On Tue, Oct 15, 2019 at 01:07:59AM +0000, brian m. carlson wrote: > > diff --git a/Documentation/gitremote-helpers.txt > > b/Documentation/gitremote-helpers.txt > > index a5c3c04371..670d72c174 100644 > > --- a/Document

Re: git smart http + apache mod_auth_openidc

2019-10-16 Thread brian m. carlson
a way to use some sort of external credential. I know next to nothing about Azure AD, but it claims to support Kerberos, so you may be able to use that in conjunction with libcurl's GSS-Negotiate support and Apache's mod_auth_kerb (which is shipped in Debian). I use Kerberos-based aut

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

2019-10-14 Thread brian m. carlson
mic transaction failed", while our own checking rejects pushes with the message "atomic push failed". Document the atomic option in the remote helper documentation, so other implementers can implement it if they like. Signed-off-by: brian m. carlson --- I discovered this at work when i

Re: [PATCH 1/1] commit: add support to provide --coauthor

2019-10-10 Thread brian m. carlson
r example, you could abbreviate "Co-authored-by" as "cab", and if you used that alias, you could write "git commit --trailer='cab=peff'" and then have your command look up "peff" and find the proper identification either from your repo or from your

Re: [PATCH 1/1] commit: add support to provide --coauthor

2019-10-09 Thread brian m. carlson
e when folks have worked together on a patch. An option to git commit such as --trailer would allow folks to add whatever trailers they wish, including this one, without us needing to bless particular options. I, for one, would be excited to see a series which did this. -- brian m. carlson: Hous

Re: [PATCH 07/15] t4011: abstract away SHA-1-specific constants

2019-10-08 Thread brian m. carlson
On 2019-10-08 at 12:33:43, Bert Wesarg wrote: > On Tue, Oct 8, 2019 at 2:21 PM Derrick Stolee wrote: > > > > On 10/5/2019 5:12 PM, brian m. carlson wrote: > > > Adjust the test so that it computes variables for object IDs instead of > > > using

Re: [PATCH 03/15] rev-parse: add an --object-format option

2019-10-08 Thread brian m. carlson
On 2019-10-08 at 11:51:45, Derrick Stolee wrote: > On 10/5/2019 5:11 PM, brian m. carlson wrote: > > Add an option to print the object format used for input, output, or > > storage. This allows shell scripts to discover the hash algorithm in > > use. > > Why put thi

[PATCH 13/15] t4044: update test to work with SHA-256

2019-10-05 Thread brian m. carlson
e can be tested for failure. Signed-off-by: brian m. carlson --- t/t4044-diff-index-unique-abbrev.sh | 46 +++-- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/t/t4044-diff-index-unique-abbrev.sh b/t/t4044-diff-index-unique-abbrev.sh index 64790

[PATCH 06/15] t4010: abstract away SHA-1-specific constants

2019-10-05 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/t4010-diff-pathspec.sh | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/t/t4010-diff-pathspec.sh b/t/t4010-diff

[PATCH 12/15] t4039: abstract away SHA-1-specific constants

2019-10-05 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/t4039-diff-assume-unchanged.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t4039-diff-assume-unchanged.sh b/t/t4039-diff-assume

[PATCH 05/15] t3429: remove SHA1 annotation

2019-10-05 Thread brian m. carlson
This test passes successfully with SHA-256, so remove the annotation which limits it to SHA-1. Signed-off-by: brian m. carlson --- t/t3429-rebase-edit-todo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t3429-rebase-edit-todo.sh b/t/t3429-rebase-edit-todo.sh index

[PATCH 04/15] t1305: avoid comparing extensions

2019-10-05 Thread brian m. carlson
A repository using a hash other than SHA-1 will need to have an extension in the config file. Ignore any extensions when comparing config files, since they don't usefully contribute to the goal of the test. Signed-off-by: brian m. carlson --- t/t1305-config-include.sh | 2 +- 1 file chang

[PATCH 10/15] t4034: abstract away SHA-1-specific constants

2019-10-05 Thread brian m. carlson
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Move some expected result heredocs around so that they can use computed variables. Signed-off-by: brian m. carlson --- t/t4034-diff-words.sh | 93 +-- 1 file

[PATCH 08/15] t4015: abstract away SHA-1-specific constants

2019-10-05 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/t4015-diff-whitespace.sh | 89 +++--- 1 file changed, 53 insertions(+), 36 deletions(-) diff --git a/t/t4015-diff-whitespace.sh

[PATCH 09/15] t4027: make hash-size independent

2019-10-05 Thread brian m. carlson
Instead of hard-coding the length of an object ID, look this value up using the translation tables. Similarly, compute input data for invalid submodule entries using the tables as well. Signed-off-by: brian m. carlson --- t/t4027-diff-submodule.sh | 16 1 file changed, 8

[PATCH 07/15] t4011: abstract away SHA-1-specific constants

2019-10-05 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/t4011-diff-symlink.sh | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/t/t4011-diff-symlink.sh b/t/t4011

[PATCH 15/15] t4048: abstract away SHA-1-specific constants

2019-10-05 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/t4048-diff-combined-binary.sh | 58 ++--- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/t/t4048-diff-combined

[PATCH 03/15] rev-parse: add an --object-format option

2019-10-05 Thread brian m. carlson
may take. While we don't support this now, documenting it early means that script authors can future-proof their scripts for when we do. Signed-off-by: brian m. carlson --- Documentation/git-rev-parse.txt | 7 +++ builtin/rev-parse.c | 11 +++ t/t1500-rev-par

[PATCH 14/15] t4045: make hash-size independent

2019-10-05 Thread brian m. carlson
Replace a hard-coded all-zeros object ID with a use of $ZERO_OID. Signed-off-by: brian m. carlson --- t/t4045-diff-relative.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4045-diff-relative.sh b/t/t4045-diff-relative.sh index 36f8ed8a81..258808708e 100755 --- a/t

[PATCH 11/15] t4038: abstract away SHA-1 specific constants

2019-10-05 Thread brian m. carlson
Compute several object IDs that exist in expected output, since we don't care about the specific object IDs, only that the format of the output is syntactically correct. Signed-off-by: brian m. carlson --- t/t4038-diff-combined.sh | 19 +-- 1 file changed, 13 insertions(

[PATCH 00/15] SHA-256 test fixes, part 6

2019-10-05 Thread brian m. carlson
ame, so whatever the consensus is works for me. [0] Possibilities include --object-format, --show-object-format, --hash, --show-hash, --hash-algorithm, --show-hash-algorithm, and more. brian m. carlson (15): t/oid-info: allow looking up hash algorithm name t/oid-info: add empty tree and empty blob val

[PATCH 01/15] t/oid-info: allow looking up hash algorithm name

2019-10-05 Thread brian m. carlson
pecific lookup table that prints the algorithm in use. Signed-off-by: brian m. carlson --- t/oid-info/hash-info | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/oid-info/hash-info b/t/oid-info/hash-info index ccdbfdf974..6b5ded0b34 100644 --- a/t/oid-info/hash-info +++ b/t/oid-info/ha

[PATCH 02/15] t/oid-info: add empty tree and empty blob values

2019-10-05 Thread brian m. carlson
The testsuite will eventually learn how to run using an algorithm other than SHA-1. In preparation for this, teach the test_oid family of functions how to look up the empty blob and empty tree values so they can be used. Signed-off-by: brian m. carlson --- t/oid-info/hash-info | 6 ++ 1

Re: What's cooking in git.git (Sep 2019, #01; Sat, 7)

2019-09-28 Thread brian m. carlson
On 2019-09-28 at 23:31:33, Junio C Hamano wrote: > "brian m. carlson" writes: > > > On 2019-09-07 at 17:26:53, Junio C Hamano wrote: > >> * bc/object-id-part17 (2019-08-19) 26 commits > >> ... > >> - builtin/replace: make hash size indepe

Re: Feature request: different exit codes for git stash depending on whether stash was created or not

2019-09-27 Thread brian m. carlson
bout in this case. If you want to ignore untracked files, a suitable grep invocation can do that for you as well. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH] add a Code of Conduct document

2019-09-24 Thread brian m. carlson
gree with > it. It might give it more weight if many members have publicly endorsed > it. I've already mentioned that I think this is a good idea, and I appreciate your thorough rationale in the commit message. Acked-by: brian m. carlson -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH] name-rev: avoid cutoff timestamp underflow

2019-09-22 Thread brian m. carlson
"commit-slab.h" > > -#define CUTOFF_DATE_SLOP 86400 /* one day */ > +/* > + * One day. See the 'name a rev close to epoch' test in t6120 when This piece of code says "close to"… > +test_expect_success 'name-rev a rev shortly after epoch' ' …but th

Re: [DISCUSSION] Growing the Git community

2019-09-20 Thread brian m. carlson
ks from underrepresented groups in tech feel more comfortable when there's a code of conduct because it signals to them that the project cares about fostering a respectful, healthy community and that their contributions are likely to be welcomed. I recommend the Contributor Covenant for t

Re: [PATCH] doc: provide guidance on user.name format

2019-09-15 Thread brian m. carlson
On 2019-09-15 at 22:18:07, Junio C Hamano wrote: > "brian m. carlson" writes: > > diff --git a/Documentation/git-commit-tree.txt > > b/Documentation/git-commit-tree.txt > > index 4b90b9c12a..34a8496b0e 100644 > > --- a/Documentation/git-commit-tree.txt > &

[PATCH v4] Documentation: fix build with Asciidoctor 2

2019-09-15 Thread brian m. carlson
e ID generation. While this doesn't affect our current CI images since they use Ubuntu 16.04 which lacks this patch, if we upgrade to Ubuntu 18.04 or a modern Debian, these messages will appear and, like the above messages, cause a CI failure. Signed-off-by: brian m. carlson --- Changes since v3

Re: [PATCH v3] Documentation: fix build with Asciidoctor 2

2019-09-15 Thread brian m. carlson
On 2019-09-15 at 22:05:55, SZEDER Gábor wrote: > On Sun, Sep 15, 2019 at 09:26:21PM +0000, brian m. carlson wrote: > > > > diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh > > > > index d49089832d..b3e76ef863 100755 > > > > --- a/ci/test

Re: [PATCH v3] Documentation: fix build with Asciidoctor 2

2019-09-15 Thread brian m. carlson
On 2019-09-15 at 09:59:52, SZEDER Gábor wrote: > On Sat, Sep 14, 2019 at 07:49:19PM +0000, brian m. carlson wrote: > > test -n "$ALREADY_HAVE_ASCIIDOCTOR" || > > gem install --version 1.5.8 asciidoctor > > So, since the documentation can now be built with

Re: [PATCH 2/2] sha1-name: check for overflow of N in "foo^N" and "foo~N"

2019-09-15 Thread brian m. carlson
ix == '~') -- goes without saying */ This approach seems reasonable. I must admit some curiosity as to how you discovered this issue, though. Did you have a cat assisting you in typing revisions? -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

[PATCH] doc: provide guidance on user.name format

2019-09-14 Thread brian m. carlson
tion instead. Signed-off-by: brian m. carlson --- There are a *lot* of users on Stack Overflow who have difficulty with what user.name controls, such that it may be one of the top questions. Additionally, we occasionally see issues from new contributors to Git as well. Furthermore, other VCS sys

[PATCH v3] Documentation: fix build with Asciidoctor 2

2019-09-14 Thread brian m. carlson
need to revisit its use in the future, in which case this problem may go away, but this can be delayed until a future patch. Signed-off-by: brian m. carlson --- Range-diff against v2: 1: 6f11a79d03 ! 1: c4935af5de Documentation: fix build with Asciidoctor 2 @@ Commit message docume

Re: [PATCH v2] Documentation: fix build with Asciidoctor 2

2019-09-14 Thread brian m. carlson
book.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl > Makefile:375: recipe for target 'git-revert.1' failed > > https://travis-ci.org/git/git/jobs/584794387#L1552 Ah, I forgot to install the packages in CI. I'll send a v3 with that fixed. -- brian m. carlson: Ho

Re: Git versioning policy - PatchMyPC compatibility on Windows

2019-09-14 Thread brian m. carlson
is "File version" > on Windows: > 2.23.0.1 > > What are your thoughts? And can you answer to Justin Chalfant on PatchMyPC > forum? Since this is a custom build, you'd be better off reaching out to the Git for Windows project at https://github.com/git-for-windows

Re: git-am fails for emails with UTF8 characters in email header

2019-09-13 Thread brian m. carlson
t; I was able to get git-am to work with modifications to read_one_header_line() > in mailinfo.c need your view on whether a patch is necessary for this. If so, > I can > send a patch for this. I don't think such a patch would be a good idea. I definitely think we should support SMT

[PATCH v2] Documentation: fix build with Asciidoctor 2

2019-09-12 Thread brian m. carlson
isit its use in the future, in which case this problem may go away, but this can be delayed until a future patch. Signed-off-by: brian m. carlson --- Documentation/Makefile| 4 +++- Documentation/manpage.xsl | 3 +++ ci/test-documentation.sh | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(

Re: [PATCH] Documentation: fix build with Asciidoctor 2

2019-09-11 Thread brian m. carlson
for us to do this. And anyway, DocBook 5 isn't exactly new: it's been around since 2009, IIRC, so distros will have it. I know Homebrew doesn't have this problem, since they fetch the prebuilt docs, even for HEAD (master) builds. I'll try to get the patch written up an

Re: What's cooking in git.git (Sep 2019, #01; Sat, 7)

2019-09-09 Thread brian m. carlson
grade continues. > > Looked mostly OK, with a possible update. > cf. <20190820223606.gj365...@genre.crustytoothpaste.net> Just to update on the status of this, I wasn't planning on a reroll, although I'm happy to do so if folks have feedback. Opinions for or ag

Re: [PATCH] Documentation: fix build with Asciidoctor 2

2019-09-08 Thread brian m. carlson
add an environment variable to your shell configuration to enable them. Of course, if you're doing _anything_ with XML, you'll have them enabled. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH] rebase: introduce --update-branches option

2019-09-08 Thread brian m. carlson
nteractive operation, and I'm fine with adopting this solution for now and then focusing on optimizing a bit more in the future. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH] Documentation: fix build with Asciidoctor 2

2019-09-08 Thread brian m. carlson
docbook-xsl-ns) stylesheets, but that doesn't appear to make a difference in doc-diff. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

[PATCH] Documentation: fix build with Asciidoctor 2

2019-09-07 Thread brian m. carlson
ect substantive content. Signed-off-by: brian m. carlson --- Documentation/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 76f2ecfc1b..485f365cbf 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@

Re: [PATCH v2 0/2] asciidoctor-extensions: provide ``

2019-09-07 Thread brian m. carlson
On 2019-09-07 at 04:40:22, Jeff King wrote: > On Fri, Sep 06, 2019 at 11:29:47PM +0000, brian m. carlson wrote: > > I'll look into this. I requested the upgrade in sid. > > > > If it's the lack of DocBook 4.5 support, then I'll probably need to > >

Re: [PATCH v2 0/2] asciidoctor-extensions: provide ``

2019-09-06 Thread brian m. carlson
has been around for a decade now, so it's time for xmlto to support it properly. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH v2 0/2] asciidoctor-extensions: provide ``

2019-09-03 Thread brian m. carlson
esigned for DocBook 4. Avoiding it where possible seems like the right choice. I looked at this series and it seems sane. I agree that adding a dependency on nokogiri isn't really desirable. It is an extremely common Ruby package, but it has native extensions, which causes problems for so

Re: [PATCH] rebase: introduce --update-branches option

2019-09-02 Thread brian m. carlson
ository with easily 80,000 refs, and I wonder if the current technique will perform adequately there. I'm interested to hear others' opinions on this series and am looking forward to seeing it progress. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

[PATCH v6 2/2] am: reload .gitattributes after patching it

2019-09-02 Thread brian m. carlson
hes a path ending in ".gitattributes". Since we load these attributes in multiple separate files, we must expire them accordingly. Verify that both the am and rebase code paths work correctly, including the conflict marker size with am -3. Signed-off-by: brian m. carlson --- apply.c

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

2019-09-02 Thread brian m. carlson
a new function, ends_with_path_components, to meet this need. Signed-off-by: brian m. carlson --- path.c | 39 ++- path.h | 3 +++ 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/path.c b/path.c index 25e97b8c3f..e3da1f3c4e 100644 --- a/path.c +++ b/p

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

2019-09-02 Thread brian m. carlson
arate commit. brian m. carlson (2): path: add a function to check for path suffix am: reload .gitattributes after patching it apply.c | 11 ++ convert.c | 21 ++- convert.h | 6 ++ ll-merge.c| 19 + ll-merge.h

Re: [PATCH 1/1] rebase -r: let `label` generate safer labels

2019-09-02 Thread brian m. carlson
; > percent encoding non-alphanumeric characters would avoid the problem > > entirely. > > I see there are "lets make sure it is unique by suffixing "-%d" in > other codepaths; would that help if this piece of code yields a > label that is not unique? I was thinking

Re: [PATCH v5 2/2] am: reload .gitattributes after patching it

2019-08-29 Thread brian m. carlson
onvert`: it seems never to be re-set. Yeah, it looks like I'll need to reset that as well. The only consequence is that we leak a small amount of memory if there are filter attributes, but it's better to avoid that leak if we can. > Also, how thread-safe do we need `reset_parsed_

Re: Is git clone followed by git verify-tag meaningful?

2019-08-28 Thread brian m. carlson
r to produce valid data, then you can verify the tag and know that the data is correct. If not, then you probably need git fsck to verify that the data is usable and meets Git's standards. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 0/5] New signing interface API with pluggable drivers

2019-08-26 Thread brian m. carlson
g future tools, we'd like the drivers to be configuration-based so that Git need not learn about every signing tool. I think such a change would be welcome if done right. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 5/5] Signing API: Duplicated signing tests using new config aliases

2019-08-26 Thread brian m. carlson
duplicate all of these tests. Perhaps we could add a small number of additional tests in an existing signing test that makes sure both the new and the old configuration work as expected, and assume that the entire codebase will honor those config settings. -- brian m. carlson: Houston, T

Re: [PATCH 2/5] Signing API: Added new signing interface API

2019-08-26 Thread brian m. carlson
ric, won't we have to add support for each individual tool in the codebase so tool->parse is defined? Having to do that would defeat the point of having a pluggable interface set up in the configuration. > + buf = xstrdup(var); > + t1 = strtok(buf, "."); > + t2 =

Re: [PATCH 1/5] Signing API: Added documentation for the new signing interface

2019-08-26 Thread brian m. carlson
for it by default. > diff --git a/Documentation/technical/signing-interface.png > b/Documentation/technical/signing-interface.png > new file mode 100644 > index > ..1a44a7f665d4a546ac6f18fb10208547e6a5fced > GIT binary patch > literal 76116 Th

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

2019-08-25 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 v2 10/14] t3800: make hash-size independent

2019-08-25 Thread brian m. carlson
-off-by: brian m. carlson --- t/t3800-mktag.sh | 49 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh index 8eb47942e2..64dcc5ec28 100755 --- a/t/t3800-mktag.sh +++ b/t/t3800-mktag.sh @@ -23,6 +23,7

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

2019-08-25 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

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

2019-08-25 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 v2 14/14] t4009: make hash size independent

2019-08-25 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/

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

2019-08-25 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 ++

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

2019-08-25 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 v2 04/14] t3305: make hash size independent

2019-08-25 Thread brian m. carlson
compress. In its current state, this is not a problem, but it could be if the hash algorithm changes again. Signed-off-by: brian m. carlson --- t/t3305-notes-fanout.sh | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/t/t3305-notes-fanout.sh b/t/t3305

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

2019-08-25 Thread brian m. carlson
redirection operator and file name. * Change "Refactor out" to "Factor out". brian m. carlson (14): t3201: abstract away SHA-1-specific constants t3206: abstract away hash size constants t3301: abstract away SHA-1-specific constants t3305: make hash size independent t3306:

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

2019-08-25 Thread brian m. carlson
with any hash algorithm. Since the actual values are sorted by the object ID of the object being annotated, sort the expected values accordingly as well. Signed-off-by: brian m. carlson --- t/t3301-notes.sh | 140 ++- 1 file changed, 90 insertions

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

2019-08-25 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

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

2019-08-25 Thread brian m. carlson
Factor 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.sh

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

2019-08-25 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

[PATCH v2 08/14] t3506: make hash independent

2019-08-25 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 v2 02/14] t3206: abstract away hash size constants

2019-08-25 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

[PATCH v5 2/2] am: reload .gitattributes after patching it

2019-08-25 Thread brian m. carlson
hes a path ending in ".gitattributes". Since we load these attributes in multiple separate files, we must expire them accordingly. Verify that both the am and rebase code paths work correctly, including the conflict marker size with am -3. Signed-off-by: brian m. carlson --- apply.c

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

2019-08-25 Thread brian m. carlson
a new function, ends_with_path_components, to meet this need. Signed-off-by: brian m. carlson --- path.c | 39 ++- path.h | 3 +++ 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/path.c b/path.c index 25e97b8c3f..e3da1f3c4e 100644 --- a/path.c +++ b/p

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

2019-08-25 Thread brian m. carlson
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_components. Changes from v1: * Add has_path_suffix in a separate commit. brian m. carlson (2): path

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

2019-08-22 Thread brian m. carlson
On 2019-08-22 at 14:04:16, Derrick Stolee wrote: > On 8/18/2019 4:04 PM, brian m. carlson wrote: > > diff --git a/midx.c b/midx.c > > index d649644420..f29afc0d2d 100644 > > --- a/midx.c > > +++ b/midx.c > > @@ -19,8 +19,7 @@ > > #define MIDX_BYTE_NUM_P

Feedback on git switch and git restore

2019-08-20 Thread brian m. carlson
I just wanted to let folks know that I've seen multiple positive comments on Twitter today (at least 3) about "git switch" and "git restore". Folks seem to really like these new commands and are excited about the improved UI. -- brian m. carlson: Houston, Texas, US Op

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

2019-08-20 Thread brian m. carlson
On 2019-08-20 at 21:12:00, René Scharfe wrote: > So perhaps this on top? (Or squash it in, if you like, but it's > certainly not worth a re-roll.) Yeah, this seems sensible. I'll include it if I do a re-roll. -- brian m. carlson: Houston, Texas, US OpenPGP: https://k

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

2019-08-19 Thread brian m. carlson
h) or > just the ones for filtering files? It resets "crlf", "ident", "filter", "eol", "text", and "working-tree-encoding". Things it doesn't reset include "whitespace", "export-ignore", "export-subst", "merge", and "conflict-marker-size". Of these, I think only the latter two are relevant. I'll update that in v5. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

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

2019-08-19 Thread brian m. carlson
On 2019-08-19 at 09:41:42, Phillip Wood wrote: > Hi Brian > > On 18/08/2019 19:44, brian m. carlson wrote: > > 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 > > gitattr

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

2019-08-18 Thread brian m. carlson
quot;$i.compare" || return 1 > done && > ... I'll do that. > (Note, also, that I dropped the whitespace after the '>' operator.) Ah, good catch. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

[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

[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

[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

[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

[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

[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
een in the "transition-stage-4" branch. brian m. carlson (26): builtin/replace: make hash size independent patch-id: convert to use the_hash_algo fetch-pack: use parse_oid_hex builtin/receive-pack: switch to use the_hash_algo builtin/blame: switch uses of GIT_SHA1_HEXSZ to the_has

[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

  1   2   3   4   5   6   7   8   9   10   >