[PATCH 03/24] refs: convert delete_ref and refs_delete_ref to struct object_id

2017-10-01 Thread brian m. carlson
Convert delete_ref and refs_delete_ref to take a pointer to struct object_id. Update the documentation accordingly, including referring to null_oid in lowercase, as it is not a #define constant. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/branch.c

[PATCH 06/24] Convert check_connected to use struct object_id

2017-10-01 Thread brian m. carlson
Convert check_connected and the callbacks it takes to use struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/clone.c| 4 ++-- builtin/fetch.c| 4 ++-- builtin/receive-pack.c | 10 +- connected.c

[PATCH 01/24] walker: convert to struct object_id

2017-10-01 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- walker.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/walker.c b/walker.c index 274f1a4935..2d83254bc0 100644 --- a/walker.c +++ b/walker.c @@ -7,7 +7,7 @@ #include &

[PATCH 05/24] refs: update ref transactions to use struct object_id

2017-10-01 Thread brian m. carlson
Update the ref transaction code to use struct object_id. Remove one NULL pointer check which was previously inserted around a dereference; since we now pass a pointer to struct object_id directly through, the code we're calling handles this for us. Signed-off-by: brian m. carlson <s

[PATCH 00/24] object_id part 10

2017-10-01 Thread brian m. carlson
from the following URL: https://github.com/bk2204/git.git object-id-part10 brian m. carlson (24): walker: convert to struct object_id refs/files-backend: convert struct ref_to_prune to object_id refs: convert delete_ref and refs_delete_ref to struct object_id refs: convert update_ref

[PATCH 02/24] refs/files-backend: convert struct ref_to_prune to object_id

2017-10-01 Thread brian m. carlson
Change the member of this struct to be a struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- refs/files-backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index fec77744b4..e396

Re: is there a "symlink" option for cloning a repo in a separate filesystem?

2017-09-23 Thread brian m. carlson
you're going to be making many clones. As Torsten pointed out, --reference is available. If your source repository is ephemeral (or otherwise won't last as long the destination repository), then you won't want to use that option, as you'll lose data. The --shared option documents all the sharp edges.

Re: [PATCH] repository: fix a sparse 'using integer a NULL pointer' warning

2017-08-21 Thread brian m. carlson
; > Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com> > --- > > Hi Brian, > > If you need to re-roll your 'bc/hash-algo' branch, could you please > squash this into the relevant patch. Of course, thanks. I'll almost certainly be doing a reroll since it's an RFC series and I

Re: [Patch size_t V3 15/19] Convert archive functions to size_t

2017-08-21 Thread brian m. carlson
f_t. These could be up to 2^33 and size_t may only be 32 bits. > > xsnprintf(header->mtime, sizeof(header->mtime), "%011lo", (unsigned > > long) args->time); > > > > xsnprintf(header->uid, sizeof(header->uid), "%07o", 0); > > @@ -219,7 +219,7 @@ static void prepare_header(struct archiver_args *args, > > > > static void write_extended_header(struct archiver_args *args, > > const unsigned char *sha1, > > - const void *buffer, unsigned long size) > > + const void *buffer, size_t size) This is fine as it points to a strbuf length. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

[RFC PATCH 3/6] setup: expose enumerated repo info

2017-08-20 Thread brian m. carlson
since they're intricately intertwined with how things work at the moment, but this improves things for the future. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- setup.c | 46 +- 1 file changed, 25 insertions(+), 21 deletions(-)

[RFC PATCH 5/6] Integrate hash algorithm support with repo setup

2017-08-20 Thread brian m. carlson
-by: brian m. carlson <sand...@crustytoothpaste.net> --- cache.h | 4 repository.c | 7 +++ repository.h | 5 + setup.c | 2 ++ 4 files changed, 18 insertions(+) diff --git a/cache.h b/cache.h index 375a7fb15e..d759824803 100644 --- a/cache.h +++ b/cache.h @@ -13,6

[RFC PATCH 4/6] Add structure representing hash algorithm

2017-08-20 Thread brian m. carlson
on a per-hash basis. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- cache.h | 36 sha1_file.c | 29 + 2 files changed, 65 insertions(+) diff --git a/cache.h b/cache.h index 1c69d2a05a..375a7fb15e

[RFC PATCH 2/6] vcs-svn: rename repo functions to "svn_repo"

2017-08-20 Thread brian m. carlson
There were several functions in the Subversion code that started with "repo_". This namespace is also used by the Git struct repository code. Rename these functions to start with "svn_repo" to avoid any future conflicts. Signed-off-by: brian m. carlson <sand...@crustytooth

[RFC PATCH 0/6] Hash Abstraction

2017-08-20 Thread brian m. carlson
for the API calls. That would probably obviate the need for ctxsz. We could expose hex versions of the blob constants if desired. This might make converting the remaining pieces of code that use them easier. There are probably dozens of other things I haven't thought of yet as well. brian m.

[RFC PATCH 6/6] Switch empty tree and blob lookups to use hash abstraction

2017-08-20 Thread brian m. carlson
Switch the uses of empty_tree_oid and empty_blob_oid to use the current_hash abstraction that represents the current hash algorithm in use. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/am.c | 2 +- builtin/checkout.c | 2 +- builtin/diff.c | 2 +- b

[RFC PATCH 1/6] vcs-svn: remove unused prototypes

2017-08-20 Thread brian m. carlson
The Subversion code had prototypes for several functions which were not ever defined or used. These functions all had names starting with "repo_", some of which conflict with those in repository.h. To avoid the conflict, remove those unused prototypes. Signed-off-by: brian m. car

Re: [PATCH 5/6] sha1_file: convert hash_sha1_file_literally to struct object_id

2017-08-20 Thread brian m. carlson
We probably want to rename this function, since it no longer handles exclusively SHA-1. When I've made changes to the "_sha1_file" functions, I've converted them to "_object_file" instead. However, if people like "_oid_file", we could do that instead. -- brian m. carls

Re: [PATCH 0/6] Convert hash-object to struct object_id

2017-08-20 Thread brian m. carlson
ct-id-part11 branches (based on an older next). However, having said that, I don't mind if you or others pick up various parts of the codebase. At worst, I drop a few patches for things others have already converted. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoo

Re: [PATCH 3/5] commit: replace the raw buffer with strbuf in read_graft_line

2017-08-16 Thread brian m. carlson
statements. I agree that ideally we should make as much of the code as possible ignorant of the hash size, because that will generally result in more robust, less brittle code. I've noticed in this series the use of parse_oid_hex, and I agree that's one tool we can use to accomplish that goal. --

Re: [RFC] clang-format: outline the git project's coding style

2017-08-14 Thread brian m. carlson
, which lets humans optimize for readability. Of course, clang-format could have dramatically improved since I last looked (which was around clang 3.4 or 3.6, I think). Overall, I do like the idea of using tidy tools, because it does reduce quibbling over style quite a bit. I just like the tools t

Re: Error: Permition denied. git should not try to access root account if I work under common user

2017-08-12 Thread brian m. carlson
r home directory, and it's trying to read that file. You should find out whoever is running that remote server and tell them that their server is misconfigured. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://

Re: [PATCH v2] tree-walk: convert fill_tree_descriptor() to object_id

2017-08-12 Thread brian m. carlson
t; does them for us. > > Helped-by: Johannes Sixt <j...@kdbg.org> > Signed-off-by: Rene Scharfe <l@web.de> This looks good to me. I had written a very similar patch for a later series, and they're pretty much identical. -- brian m. carlson / brian with

Re: [PATCH] tests: don't give unportable ">" to "test" built-in, use -gt

2017-08-06 Thread brian m. carlson
NetBSD will also want DIR_HAS_BSD_GROUP_SEMANTICS. MirBSD will also, according to its man pages. As I understand it, the only consequence of not setting this flag on BSD systems is that some directories will be setgid, which, while ugly and useless, should have no negative effect. -- brian m. carl

Re: [RFC] imap-send: escape backslash in password

2017-08-04 Thread brian m. carlson
er that's LOGIN or CRAM-MD5. I don't think we'd want to encode the password here before sending it through the CRAM-MD5 authenticator. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 2/2] t6500: mark tests as SHA1 reliant

2017-07-31 Thread brian m. carlson
On Mon, Jul 31, 2017 at 01:26:40PM -0700, Stefan Beller wrote: > On Sun, Jul 30, 2017 at 4:24 PM, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > > I realize this was worded poorly. So for my example, in this case, we'd > > do: > > > > test-helper-h

Re: [PATCH 2/2] t6500: mark tests as SHA1 reliant

2017-07-30 Thread brian m. carlson
On Sun, Jul 30, 2017 at 11:00:19PM +, brian m. carlson wrote: > Yes, basically, but a bit more generally. There will always be cases in > which we need to specify an object ID or an arbitrary string and the > behavior will need to vary based on the hash. That can be somethi

Re: [PATCH 2/2] t6500: mark tests as SHA1 reliant

2017-07-30 Thread brian m. carlson
On Sun, Jul 30, 2017 at 02:21:50PM -0700, Junio C Hamano wrote: > "brian m. carlson" <sand...@crustytoothpaste.net> writes: > > > One approach I had considered taking is having a helper of some sort > > that wrapped a simple key/value store. We could pa

Re: [PATCH 2/2] t6500: mark tests as SHA1 reliant

2017-07-29 Thread brian m. carlson
ave the downsides that the values may not present in the tests themselves, and that people adding new tests will of course need to run the test suite twice. But it does make the tests easier to read. Opinions on the desirability of this approach are of course welcome. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [RFC PATCH 0/4] Some patches for fsck for missing objects

2017-07-26 Thread brian m. carlson
. This lets us change the way we speak to the tool without breaking backwards compatibility, and it also allows us to simply check the lazyObject script for supported protocols up front. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc |

Re: [ANNOUNCE] Git v2.14.0-rc1

2017-07-26 Thread brian m. carlson
also change the order to suit your liking; SHA-384 and SHA-512 support still goes back to at least 2007 (CentOS 5). -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH 30/33] tree-diff: convert diff_tree_paths to struct object_id

2017-07-15 Thread brian m. carlson
); > + tptree[i] = fill_tree_descriptor([i], > + parents_oid[i] ? parents_oid[i]->hash : NULL); > + ttree = fill_tree_descriptor(, oid ? oid->hash : NULL); Good catch. This seems obviously correct. -- brian m. carlson / brian with s

[PATCH v2 03/13] submodule: convert submodule config lookup to use object_id

2017-07-13 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/grep.c | 4 ++-- builtin/submodule--helper.c | 8 config.c | 12 ++-- config.h | 4 ++-- repository.c

[PATCH v2 00/13] object_id part 9

2017-07-13 Thread brian m. carlson
, in which case patch 9 can be dropped. Changes from v1: * Restore the check for length in get_sha1_basic. * Add a patch converting some uses of 40 to GIT_SHA1_HEXSZ as suggested. This is a separate patch because I wanted to minimize the non-automated portions of the patch in question. brian m

[PATCH v2 12/13] sha1_name: convert GET_SHA1* flags to GET_OID*

2017-07-13 Thread brian m. carlson
Convert the flags for get_oid_with_context and friends to use "OID" instead of "SHA1" in their names. This transform was made by running the following one-liner on the affected files: perl -pi -e 's/GET_SHA1/GET_OID/g' Signed-off-by: brian m. carlson <sand.

[PATCH v2 04/13] remote: convert struct push_cas to struct object_id

2017-07-13 Thread brian m. carlson
This gets rid of one use of get_sha1. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- remote.c | 6 +++--- remote.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/remote.c b/remote.c index d87482573d..9da9040bf0 100644 --- a/remote.c +++ b/re

[PATCH v2 13/13] sha1_name: convert uses of 40 to GIT_SHA1_HEXSZ

2017-07-13 Thread brian m. carlson
There are several uses of the constant 40 in find_unique_abbrev_r. Convert them to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sha1_name.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sha1_name.c b/sha1_name.c index b493

[PATCH v2 02/13] builtin/merge-tree: convert remaining caller of get_sha1 to object_id

2017-07-13 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/merge-tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index bad6735c76..f12da292cf 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-

[PATCH v2 11/13] sha1_name: convert get_sha1* to get_oid*

2017-07-13 Thread brian m. carlson
ntext(E1, E2, , E4) @@ expression E1, E2, E3, E4; @@ - get_sha1_with_context(E1, E2, E3->hash, E4) + get_oid_with_context(E1, E2, E3, E4) Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- apply.c | 4 +- archive.c | 2 +- builtin/am.c

[PATCH v2 06/13] builtin/update_ref: convert to struct object_id

2017-07-13 Thread brian m. carlson
Convert the uses of unsigned char * to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/update-ref.c | 69 ++-- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/builtin/update-r

[PATCH v2 08/13] builtin/unpack-file: convert to struct object_id

2017-07-13 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/unpack-file.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c index 73f1334191..281ca1db6c 100644 --- a/builtin/unpack-file.c +++ b/b

[PATCH v2 09/13] builtin/verify-tag: convert to struct object_id

2017-07-13 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/verify-tag.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c index f9a5f7535a..30e4c826ed 100644 --- a/builtin/verify-tag.c +++ b/builtin/verify

[PATCH v2 01/13] builtin/fsck: convert remaining caller of get_sha1 to object_id

2017-07-13 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/fsck.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/fsck.c b/builtin/fsck.c index 99dea7adf6..0e5a18e843 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -738,12 +738,12

[PATCH v2 07/13] bisect: convert bisect_checkout to struct object_id

2017-07-13 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- bisect.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bisect.c b/bisect.c index a9fd9fbc61..2549eaf7b1 100644 --- a/bisect.c +++ b/bisect.c @@ -680,16 +680,16 @@ static int is_expect

[PATCH v2 10/13] Convert remaining callers of get_sha1 to get_oid.

2017-07-13 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/receive-pack.c | 4 ++-- mailmap.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 71c0c768db..1efa48fec4 100644 --- a/b

[PATCH v2 05/13] sequencer: convert to struct object_id

2017-07-13 Thread brian m. carlson
Convert the remaining instances of unsigned char * to struct object_id. This removes several calls to get_sha1. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sequencer.c | 59 ++- 1 file changed, 30 insertions(

Re: [PATCH 2/2] tag: convert gpg_verify_tag to use struct object_id

2017-07-13 Thread brian m. carlson
gt; I can also send my patches to Brian, as you (both) like. I'm literally about to send my series out; I rebased and tested it last night. I don't care whose patch gets applied, but to avoid needing to rebase and retest my series, I'm going to send it out as it is. Junio can apply my series on top

Re: [PATCH 1/2] commit: convert lookup_commit_graft to struct object_id

2017-07-12 Thread brian m. carlson
On Wed, Jul 12, 2017 at 05:44:14PM -0700, Stefan Beller wrote: > With this patch, commit.h doesn't contain the string 'sha1' any more. From a relatively quick look, these look sane to me. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc |

Re: [PATCH] strbuf: use designated initializers in STRBUF_INIT

2017-07-11 Thread brian m. carlson
On Tue, Jul 11, 2017 at 07:24:07AM +0200, Johannes Sixt wrote: > Am 11.07.2017 um 02:05 schrieb brian m. carlson: > > I have tried compiling Git with a C++ compiler, so that I could test > > whether that was a viable alternative for MSVC in case its C++ mode > > supported fe

Re: pre-rebase hook: capture documentation in a <

2017-07-10 Thread brian m. carlson
to do so myself so I could easily automate building Git packages based on the Debian packaging, but I never got around to it. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH] strbuf: use designated initializers in STRBUF_INIT

2017-07-10 Thread brian m. carlson
On Mon, Jul 10, 2017 at 05:07:43PM -0700, Stefan Beller wrote: > On Mon, Jul 10, 2017 at 5:05 PM, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > > On Mon, Jul 10, 2017 at 09:57:40PM +0200, Johannes Sixt wrote: > >> It's a pity, though, that you do not suggest

Re: [PATCH] strbuf: use designated initializers in STRBUF_INIT

2017-07-10 Thread brian m. carlson
+ mode supported features its C mode did not. Let's just say that the compilation aborted very quickly and I gave up after a few minutes. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signatu

Re: Bug - Dirty submodule differences between OSX/Ubuntu

2017-07-10 Thread brian m. carlson
ENSIONS", as there's already a file system object. It therefore sees it as deleted, since git tracks only files (and not really directories, but trees of files). This repository is always going to show as modified on a case-insensitive file system. You can either ask the maintainers to change it, o

Re: [PATCH 11/12] sha1_name: convert get_sha1* to get_oid*

2017-07-07 Thread brian m. carlson
; > > omitting the length check here? > > Good eyes. It probably should check with the possible oid lengths. I'll reroll. This may have been a bad conflict resolution on my part. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: Truncating HEAD reflog on branch move

2017-07-04 Thread brian m. carlson
On Tue, Jul 04, 2017 at 05:24:08PM -0400, Jeff King wrote: > On Tue, Jul 04, 2017 at 07:58:06PM +0000, brian m. carlson wrote: > > I've looked at your original patch, which modified reflog-walk.c, and it > > does fix the issue. I'm happy to send in a patch with that and a tes

Re: Truncating HEAD reflog on branch move

2017-07-04 Thread brian m. carlson
I've looked at your original patch, which modified reflog-walk.c, and it does fix the issue. I'm happy to send in a patch with that and a test (provided you're okay with me adding your sign-off), or if you wanted to send in something a bit more complete, like the series of patches here, that's fine,

Re: [PATCH 06/12] builtin/update_ref: convert to struct object_id

2017-07-04 Thread brian m. carlson
On Mon, Jul 03, 2017 at 10:49:39PM +0200, Ævar Arnfjörð Bjarmason wrote: > On Mon, Jul 03 2017, brian m. carlson jotted: > > [...] > > 1 file changed, 34 insertions(+), 35 deletions(-) > > [...] > > struct strbuf err = STRBUF_INIT; > > char *refname;

[PATCH 10/12] Convert remaining callers of get_sha1 to get_oid.

2017-07-03 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/receive-pack.c | 4 ++-- mailmap.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 71c0c768d..1efa48fec 100644 --- a/b

[PATCH 08/12] builtin/unpack-file: convert to struct object_id

2017-07-03 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/unpack-file.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c index 73f133419..281ca1db6 100644 --- a/builtin/unpack-file.c +++ b/b

[PATCH 11/12] sha1_name: convert get_sha1* to get_oid*

2017-07-03 Thread brian m. carlson
_sha1_with_context(E1, E2, E3->hash, E4) + get_oid_with_context(E1, E2, E3, E4) Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- apply.c | 4 +- archive.c | 2 +- builtin/am.c | 6 +- builtin/cat-file.c| 6 +- builtin/comm

[PATCH 12/12] sha1_name: convert GET_SHA1* flags to GET_OID*

2017-07-03 Thread brian m. carlson
Convert the flags for get_oid_with_context and friends to use "OID" instead of "SHA1" in their names. This transform was made by running the following one-liner on the affected files: perl -pi -e 's/GET_SHA1/GET_OID/g' Signed-off-by: brian m. carlson <sand.

[PATCH 09/12] builtin/verify-tag: convert to struct object_id

2017-07-03 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/verify-tag.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c index f9a5f7535..30e4c826e 100644 --- a/builtin/verify-tag.c +++ b/builtin/verify

[PATCH 03/12] submodule: convert submodule config lookup to use object_id

2017-07-03 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/grep.c | 4 ++-- builtin/submodule--helper.c | 8 config.c | 12 ++-- config.h | 4 ++-- submodule-config.c

[PATCH 06/12] builtin/update_ref: convert to struct object_id

2017-07-03 Thread brian m. carlson
Convert the uses of unsigned char * to struct object_id. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/update-ref.c | 69 ++-- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/builtin/update-r

[PATCH 04/12] remote: convert struct push_cas to struct object_id

2017-07-03 Thread brian m. carlson
This gets rid of one use of get_sha1. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- remote.c | 6 +++--- remote.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/remote.c b/remote.c index d87482573..9da9040bf 100644 --- a/remote.c +++ b/re

[PATCH 00/12] object_id part 9

2017-07-03 Thread brian m. carlson
in his earlier series touching the notes code. brian m. carlson (12): builtin/fsck: convert remaining caller of get_sha1 to object_id builtin/merge-tree: convert remaining caller of get_sha1 to object_id submodule: convert submodule config lookup to use object_id remote: convert struct push_cas

[PATCH 02/12] builtin/merge-tree: convert remaining caller of get_sha1 to object_id

2017-07-03 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/merge-tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index bad6735c7..f12da292c 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-

[PATCH 05/12] sequencer: convert to struct object_id

2017-07-03 Thread brian m. carlson
Convert the remaining instances of unsigned char * to struct object_id. This removes several calls to get_sha1. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sequencer.c | 59 ++- 1 file changed, 30 insertions(

[PATCH 01/12] builtin/fsck: convert remaining caller of get_sha1 to object_id

2017-07-03 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/fsck.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/fsck.c b/builtin/fsck.c index 87c675689..d601d07fd 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -738,12 +738,12

[PATCH 07/12] bisect: convert bisect_checkout to struct object_id

2017-07-03 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- bisect.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bisect.c b/bisect.c index a9fd9fbc6..2549eaf7b 100644 --- a/bisect.c +++ b/bisect.c @@ -680,16 +680,16 @@ static int is_expect

Re: Using '--help' for aliases

2017-06-24 Thread brian m. carlson
$@\" && git sui; \ fi; };f" If this alias were to run on a Git with that option but without checkout --recurse-submodules, then it would print help and then update submodles, which isn't what I want. [0] sui is an alias for submodule update --init. -- brian m. carlson / brian

Truncating HEAD reflog on branch move

2017-06-21 Thread brian m. carlson
reflog entries. A colleague reported this to me as a bug. I don't see anything in the release notes about this as a desired behavior change, and it does seem undesirable to truncate the reflog this way. If this isn't intentional, I'm happy to work up a patch. -- brian m. carlson / brian

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread brian m. carlson
On Fri, Jun 16, 2017 at 01:36:13AM +0200, Ævar Arnfjörð Bjarmason wrote: > On Fri, Jun 16, 2017 at 12:41 AM, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > > SHA-256 acceleration exists for some existing Intel platforms already. > > However, they're not practic

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread brian m. carlson
the longest life and good unaccelerated performance, and for that reason, I've preferred it. But if AGL says that they're all secure (and I generally think he knows what he's talking about), we could consider performance more. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www

Re: What does this output of git supposed to mean ?

2017-06-05 Thread brian m. carlson
we could consider changing it, but seeing as this is the first question I've ever seen about it, I think most people understand it pretty well. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: What does this output of git supposed to mean ?

2017-06-05 Thread brian m. carlson
) won't work as expected. In addition, many people want to commit certain files (such as .gitignore) in their initial commit, and this may jog their memory. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH] git-p4: remove obsolete version check

2017-06-04 Thread brian m. carlson
least 2009, so I think it's fine to drop support for earlier versions at this point. But I agree an explanation in the commit message of what exactly makes it syntactically invalid would be beneficial. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpas

Re: Unaligned accesses in sha1dc

2017-06-01 Thread brian m. carlson
b, c, d, e, m, W, 0, > temp); > (gdb) > git(21728): unaligned access to 0x6009f8d5, ip=0x403336d0 > 423 SHA1COMPRESS_FULL_ROUND2_STEP(e, a, b, c, d, W, 26, temp); What architecture are you seeing this on? -- brian m. carlson / brian with sandals: Housto

Re: [PATCH 00/33] object id conversion (grep and diff)

2017-05-31 Thread brian m. carlson
s function for some time. I'm glad you got around to it. Other than the issue I pointed out, the fact that I'm obviously not qualified to review my own patches, and the issue that Stefan pointed out with GIT_MAX_HEXSZ, this looks good to me. -- brian m. carlson / brian with sandals: Houston, Texas,

Re: [PATCH 22/33] notes-merge: convert notes_merge* to struct object_id

2017-05-31 Thread brian m. carlson
esult_oid'. The unmerged entries are written into the > *.git/NOTES_MERGE_WORKTREE directory with conflict markers. > *-1 is returned. > * Did you want to change the comment to say "object ID" or "OID" instead of "SHA1" like you did in an earlier patch? -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [WIP/RFC 00/23] repository object

2017-05-21 Thread brian m. carlson
a lot of things that could really benefit from this. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

Re: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-15 Thread brian m. carlson
such fixups turned off and will just SIGBUS. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204 signature.asc Description: PGP signature

[PATCH v3] builtin/log: honor log.decorate

2017-05-14 Thread brian m. carlson
if the user had already overridden it. Instead of setting the option in config parsing, set it in init_log_defaults instead. Add a test for this case. The actual additional config option doesn't matter, but it needs to be something not already set in the configuration file. Signed-off-by: brian m

Re: [PATCH v2] builtin/log: honor log.decorate

2017-05-12 Thread brian m. carlson
it, but we don't always succeed. I appreciate your review on my patch and suggestion on how to improve it, and I hope this won't put you off from further contributions. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My o

Re: [PATCH v2] builtin/log: honor log.decorate

2017-05-12 Thread brian m. carlson
On Fri, May 12, 2017 at 04:48:14PM -0700, Jonathan Nieder wrote: > Hi, > > brian m. carlson wrote: > > > Does anyone else have views on whether this is good thing to test for? > > I know you don't mean to be rude, but this comes across as a bit of > a dismissive quest

Re: [PATCH v2] builtin/log: honor log.decorate

2017-05-12 Thread brian m. carlson
On Fri, May 12, 2017 at 04:32:14PM -0700, Jonathan Nieder wrote: > brian m. carlson wrote: > > > The recent change that introduced autodecorating of refs accidentally > > broke the ability of users to set log.decorate = false to override it. > > Yikes. It sounds t

[PATCH v2] builtin/log: honor log.decorate

2017-05-12 Thread brian m. carlson
if the user had already overridden it. Instead of setting the option in config parsing, set it in init_log_defaults instead. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/l

Re: [PATCH] builtin/log: honor log.decorate

2017-05-12 Thread brian m. carlson
/* maybe warn? */ > > return 0; > > - } else { > > + } else if (decoration_style == -1) { > > decoration_style = auto_decoration_style(); > > } > > if (!strcmp(var, "log.showroot")) { > > Sorry for the mista

[PATCH] builtin/log: honor log.decorate

2017-05-12 Thread brian m. carlson
if the user had already overridden it. Only set the option to its default value if we haven't set it already. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/log.c b/builtin/log.c

Re: PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-08 Thread brian m. carlson
On Tue, May 09, 2017 at 02:00:18AM +0200, Ævar Arnfjörð Bjarmason wrote: > On Tue, May 9, 2017 at 1:32 AM, brian m. carlson > <sand...@crustytoothpaste.net> wrote: > > PCRE and PCRE2 also tend to have a lot of security updates, so I would > > prefer if we didn't i

Re: PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-08 Thread brian m. carlson
if they're using an old Git. We shouldn't consider shipping anything with a remotely frequent history of security updates in our tree, since people very frequently run old or ancient versions of Git. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoo

[PATCH v3 52/53] tree: convert parse_tree_indirect to struct object_id

2017-05-06 Thread brian m. carlson
not handled by the semantic patch. @@ expression E1; @@ - parse_tree_indirect(E1.hash) + parse_tree_indirect() @@ expression E1; @@ - parse_tree_indirect(E1->hash) + parse_tree_indirect(E1) Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- archive.c

[PATCH v3 46/53] builtin/ls-files: convert overlay_tree_on_cache to object_id

2017-05-06 Thread brian m. carlson
This is another caller of parse_tree_indirect. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/ls-files.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index a6c70dbe9..da0ff849f 100644 --- a/b

[PATCH v3 50/53] diff-lib: convert do_diff_cache to struct object_id

2017-05-06 Thread brian m. carlson
This is needed to convert parse_tree_indirect. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/am.c| 2 +- builtin/blame.c | 6 +++--- builtin/reset.c | 2 +- diff-lib.c | 12 ++-- diff.h | 2 +- 5 files changed, 12 insertions(

[PATCH v3 53/53] object: convert parse_object* to take struct object_id

2017-05-06 Thread brian m. carlson
E4, E5; @@ - parse_object_buffer(E1.hash, E2, E3, E4, E5) + parse_object_buffer(, E2, E3, E4, E5) @@ expression E1, E2, E3, E4, E5; @@ - parse_object_buffer(E1->hash, E2, E3, E4, E5) + parse_object_buffer(E1, E2, E3, E4, E5) Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --

[PATCH v3 51/53] sequencer: convert do_recursive_merge to struct object_id

2017-05-06 Thread brian m. carlson
This conversion is required to convert parse_tree_indirect. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sequencer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index dcc56a2b6..adcc0a953 100644 --- a/sequencer.c

[PATCH v3 49/53] builtin/ls-tree: convert to struct object_id

2017-05-06 Thread brian m. carlson
This is a prerequisite to convert do_diff_cache, which is required to convert parse_tree_indirect. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/ls-tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/ls-tree.c b/builtin/ls-

[PATCH v3 44/53] sha1_name: convert internals of peel_onion to object_id

2017-05-06 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- sha1_name.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sha1_name.c b/sha1_name.c index b7e09ac13..72e72ab9a 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -798,7 +798,7 @@ struct object *peel_t

[PATCH v3 29/53] Convert lookup_blob to struct object_id

2017-05-06 Thread brian m. carlson
off-by: brian m. carlson <sand...@crustytoothpaste.net> --- blob.c | 6 +++--- blob.h | 2 +- builtin/fast-export.c| 2 +- builtin/fsck.c | 2 +- builtin/index-pack.c | 2 +- builtin/merge-tree.c | 2 +- builtin/unpack-objects.c | 2 +

[PATCH v3 31/53] builtin/reflog: convert tree_is_complete to take struct object_id

2017-05-06 Thread brian m. carlson
Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- builtin/reflog.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index 4831116ea..7866a0341 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -55,14

[PATCH v3 40/53] http-push: convert process_ls_object and descendants to object_id

2017-05-06 Thread brian m. carlson
the data to be NUL-terminated. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- http-push.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/http-push.c b/http-push.c index 7781f4078..4e7bd9e42 100644 --- a/http-push.c +++ b/http-

<    6   7   8   9   10   11   12   13   14   15   >