What's cooking in git.git (Aug 2017, #07; Sat, 26)

2017-08-26 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. As I am preparing to go offline ne

Re: [PATCH 02/12] load_subtree(): remove unnecessary conditional

2017-08-26 Thread Michael Haggerty
On Sat, Aug 26, 2017 at 6:38 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> At this point in the code, len is *always* <= 20. > > This is the kind of log message that makes me unconfortable, as it > lacks "because", and the readers would need to find out themselves > by following the s

Re: [PATCH] Fix branch renaming not updating HEADs correctly

2017-08-26 Thread Junio C Hamano
Thanks. I'll merge this down to at least 'next' before I go offline for a week.

Re: cat-file timing window on Cygwin

2017-08-26 Thread Ramsay Jones
On 26/08/17 22:11, Adam Dinwoodie wrote: > On Sat, Aug 26, 2017 at 11:53:37AM -0700, Jeff King wrote: >> On Sat, Aug 26, 2017 at 01:57:18AM +0100, Ramsay Jones wrote: >> diff --git a/run-command.c b/run-command.c index 98621faca8..064ebd1995 100644 --- a/run-command.c +++ b/ru

Re: [PATCH 00/12] Clean up notes-related code around `load_subtree()`

2017-08-26 Thread Johan Herland
On Sat, Aug 26, 2017 at 10:28 AM, Michael Haggerty wrote: [...] > plenty that could be cleaned up in the area: > > * Make macro `GIT_NIBBLE` safer by adding some parentheses > * Remove some dead code > * Fix some memory leaks > * Fix some obsolete and incorrect comments > * Reject "notes" that are

Re: cat-file timing window on Cygwin

2017-08-26 Thread Adam Dinwoodie
On Sat, Aug 26, 2017 at 11:53:37AM -0700, Jeff King wrote: > On Sat, Aug 26, 2017 at 01:57:18AM +0100, Ramsay Jones wrote: > > > > diff --git a/run-command.c b/run-command.c > > > index 98621faca8..064ebd1995 100644 > > > --- a/run-command.c > > > +++ b/run-command.c > > > @@ -641,7 +641,6 @@ int

Re: [PATCH/RFC] push: anonymize URL in error output

2017-08-26 Thread Jeff King
On Fri, Aug 25, 2017 at 12:37:43PM -0700, Brandon Williams wrote: > > > My knee-jerk reaction is if it's worth writing after the dashes, it's > > > worth putting in the commit message. > > > > > > However, in the case I think it is OK as-is (the motivation of "we > > > already avoid leaking auth

Re: cat-file timing window on Cygwin

2017-08-26 Thread Jeff King
On Sat, Aug 26, 2017 at 01:57:18AM +0100, Ramsay Jones wrote: > > diff --git a/run-command.c b/run-command.c > > index 98621faca8..064ebd1995 100644 > > --- a/run-command.c > > +++ b/run-command.c > > @@ -641,7 +641,6 @@ int start_command(struct child_process *cmd) > > } > > > > trace_ar

Re: [PATCH 02/12] load_subtree(): remove unnecessary conditional

2017-08-26 Thread Junio C Hamano
Michael Haggerty writes: > At this point in the code, len is *always* <= 20. This is the kind of log message that makes me unconfortable, as it lacks "because", and the readers would need to find out themselves by following the same codepath the patch author already followed. There is an assert

Re: cat-file timing window on Cygwin

2017-08-26 Thread Adam Dinwoodie
On Sat, Aug 26, 2017 at 01:57:18AM +0100, Ramsay Jones wrote: > On 25/08/17 16:08, Jeff King wrote: > > On Fri, Aug 25, 2017 at 12:25:29PM +0100, Adam Dinwoodie wrote: > > > >> As of v2.10.0-rc1-4-g321459439 ("cat-file: support --textconv/--filters > >> in batch mode"), t8010-cat-file-filters.sh h

git describe and "the smallest number of commits possible"

2017-08-26 Thread Kévin Le Gouguec
Hi, I've asked this question on the git-users Google Groups list[1], and while the answers there were interesting, I still cannot figure whether my problem comes from an actual bug, a misleading manpage, my inability to understand the code and/or the manpage, or a combination of the three. I noti

Re: [PATCH 1/2] refs/files-backend: duplicate strings added to affected_refnames

2017-08-26 Thread Martin Ågren
On 25 August 2017 at 23:00, Junio C Hamano wrote: > Martin Ågren writes: > >> files_transaction_prepare() and the functions it calls add strings to a >> string list without duplicating them, i.e., we keep the original raw >> pointers we were given. That is "ok", since we keep them only for a >> s

Loan

2017-08-26 Thread CAPITAL FINANCE IN
UNSECURED BUSINESS/PERSONAL LOAN BY LOAN CAPITAL FINANCE - NO COLLATERAL - MINIMUM DOCUMENTATION - BUSINESS LOAN UP TO FIVE(5) MILLION US DOLLARS CONTACT US TODAY VIA EMAIL: finance.incapi...@hotmail.com

Re: git signed push server-side [and 3 more messages]

2017-08-26 Thread Ian Jackson
Hi. Thanks to both of you for your helpful comments. Jonathan Nieder writes ("Re: git signed push server-side"): > Ian Jackson wrote[1]: > > 2. git-receive-pack calls gpg (Debian #852684) > > > > It would be better if it called gpgv. ... > think respecting gpg.program would be nicer. Is there a

[PATCH 12/12] load_subtree(): declare some variables to be `size_t`

2017-08-26 Thread Michael Haggerty
* `prefix_len` * `path_len` * `i` It's good hygiene. Signed-off-by: Michael Haggerty --- notes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notes.c b/notes.c index d5409b55e3..7f5bfa19c7 100644 --- a/notes.c +++ b/notes.c @@ -406,7 +406,7 @@ static void load_subtr

[PATCH 05/12] load_subtree(): separate logic for internal vs. terminal entries

2017-08-26 Thread Michael Haggerty
There are only two legitimate notes path components: * A hexadecimal string that fills the rest of the SHA-1 * A two-digit hexadecimal string that constitutes another internal node. So handle those two cases at the top level, and reject others as non-notes without trying to parse them. The log

[PATCH 10/12] get_oid_hex_segment(): don't pad the rest of `oid`

2017-08-26 Thread Michael Haggerty
Remove the feature of `get_oid_hex_segment()` that it pads the rest of the `oid` argument with zeros. Instead, do this at the caller who needs it. This makes the functionality of this function more coherent and removes the need for its `oid_len` argument. Signed-off-by: Michael Haggerty --- not

[PATCH 07/12] load_subtree(): only consider blobs to be potential notes

2017-08-26 Thread Michael Haggerty
The old code converted any entry whose path constituted a full SHA-1 as a leaf node, without regard for the type of the entry. But only blobs can be notes. So treat entries whose paths *look like* notes paths but that are not blobs as non-notes. Signed-off-by: Michael Haggerty --- notes.c | 5 ++

[PATCH 02/12] load_subtree(): remove unnecessary conditional

2017-08-26 Thread Michael Haggerty
At this point in the code, len is *always* <= 20. Signed-off-by: Michael Haggerty --- notes.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/notes.c b/notes.c index 00630a9396..f7ce64ff48 100644 --- a/notes.c +++ b/notes.c @@ -446,25 +44

[PATCH 11/12] hex_to_bytes(): simpler replacement for `get_oid_hex_segment()`

2017-08-26 Thread Michael Haggerty
Now that `get_oid_hex_segment()` does less, it makes sense to rename it and simplify its semantics: * Instead of a `hex_len` parameter, which was the number of hex characters (and had to be even), use a `len` parameter, which is the number of resulting bytes. This removes then need for the che

[PATCH 09/12] load_subtree(): combine some common code

2017-08-26 Thread Michael Haggerty
Write the length into `object_oid` (before copying) rather than `l->key_oid` (after copying). Then combine some code from the two `if` blocks. Signed-off-by: Michael Haggerty --- notes.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/notes.c b/notes.c index 6c

[PATCH 08/12] get_oid_hex_segment(): return 0 on success

2017-08-26 Thread Michael Haggerty
Nobody cares about the return value of get_oid_hex_segment() except to check whether it failed. So just return 0 on success. And while we're updating its docstring, update it for some argument renaming that happened a while ago. Signed-off-by: Michael Haggerty --- notes.c | 15 +++

[PATCH 03/12] load_subtree(): reduce the scope of some local variables

2017-08-26 Thread Michael Haggerty
Declare the variables inside the loop, to make it more obvious that their values are not carried across loop iterations. Signed-off-by: Michael Haggerty --- notes.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notes.c b/notes.c index f7ce64ff48..fbed8c3013 100644 -

[PATCH 00/12] Clean up notes-related code around `load_subtree()`

2017-08-26 Thread Michael Haggerty
While putzing around in the notes code quite some time ago, I found this comment: /* * Determine full path for this non-note entry: * The filename is already found in entry.path, but the * directory part of the path must be deduced from the subtree * containing this entry.

[PATCH 01/12] notes: make GET_NIBBLE macro more robust

2017-08-26 Thread Michael Haggerty
Put parentheses around sha1. Otherwise it could fail for something like GET_NIBBLE(n, (unsigned char *)data); Signed-off-by: Michael Haggerty --- notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes.c b/notes.c index f090c88363..00630a9396 100644 --- a/notes.c +

[PATCH 04/12] load_subtree(): fix incorrect comment

2017-08-26 Thread Michael Haggerty
This comment was added in 851c2b3791 (Teach notes code to properly preserve non-notes in the notes tree, 2010-02-13) when the corresponding code was added. But I believe it was incorrect even then. The condition `path_len != 2` a dozen lines up prevents a path like "dead/beef" from being converted

[PATCH 06/12] load_subtree(): check earlier whether an internal node is a tree entry

2017-08-26 Thread Michael Haggerty
If an entry is not a tree entry, then it cannot possibly be an internal node. But the old code checked this condition only after allocating a leaf_node object and therefore leaked that memory. Instead, check before even entering this branch of the code. Signed-off-by: Michael Haggerty --- notes.