Re: [PATCH V2 2/2] Convert size datatype to size_t

2017-08-10 Thread Johannes Schindelin
Hi Martin, On Thu, 10 Aug 2017, Martin Koegler wrote: > From: Martin Koegler > > It changes the signature of the core object access function > including any other functions to assure a clean compile if > sizeof(size_t) != sizeof(unsigned long). > > Signed-off-by:

Re: [PATCH] apply: remove prefix_length member from apply_state

2017-08-10 Thread Christian Couder
On Wed, Aug 9, 2017 at 5:54 PM, René Scharfe wrote: > Use a NULL-and-NUL check to see if we have a prefix and consistently use > C string functions on it instead of storing its length in a member of > struct apply_state. This avoids strlen() calls and simplifies the code. This

Re: fatal: Out of memory, getdelim failed under NFS mounts

2017-08-10 Thread René Scharfe
Am 09.08.2017 um 19:39 schrieb Yaroslav Halchenko: > More context (may be different issue(s)) could be found at > http://git-annex.branchable.com/forum/git-annex_add_out_of_memory_error/ > but currently I am consistently reproducing it while running > git (1:2.11.0-3 debian stretch build) within

Re: fatal: Out of memory, getdelim failed under NFS mounts

2017-08-10 Thread Yaroslav Halchenko
Thank you René! comments/answers embedded below On Thu, 10 Aug 2017, René Scharfe wrote: > Am 09.08.2017 um 19:39 schrieb Yaroslav Halchenko: > > More context (may be different issue(s)) could be found at > > http://git-annex.branchable.com/forum/git-annex_add_out_of_memory_error/ > > but

Re: [PATCH] t4062: stop using repetition in regex

2017-08-10 Thread René Scharfe
Am 09.08.2017 um 19:47 schrieb Junio C Hamano: > René Scharfe writes: > >> There could be any characters except NUL and LF between the 4096 zeros >> and "0$" for the latter to match wrongly, no? So there are 4095 >> opportunities for the misleading pattern in a page, with

[PATCH V2 2/2] Convert size datatype to size_t

2017-08-10 Thread Martin Koegler
From: Martin Koegler It changes the signature of the core object access function including any other functions to assure a clean compile if sizeof(size_t) != sizeof(unsigned long). Signed-off-by: Martin Koegler --- For next. As this touches

[PATCH V2 1/2] Fix delta integer overflows

2017-08-10 Thread Martin Koegler
From: Martin Koegler The current delta code produces incorrect pack objects for files > 4GB. Signed-off-by: Martin Koegler --- For next. diff-delta.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff

Re: [PATCH 0/5] make interpret-trailers useful for parsing

2017-08-10 Thread Jacob Keller
On Wed, Aug 9, 2017 at 10:19 AM, Junio C Hamano wrote: > Jeff King writes: > >> Parsing trailers out of a commit message is _mostly_ easy, but there >> area a lot of funny corner cases (e.g., heuristics for how many >> non-trailers must be present before a final

Re: [PATCH 2/5] interpret-trailers: add an option to show only the trailers

2017-08-10 Thread Jeff King
On Wed, Aug 09, 2017 at 11:35:27AM -0700, Jonathan Tan wrote: > > -static void print_all(FILE *outfile, struct list_head *head, int > > trim_empty) > > +static void print_all(FILE *outfile, struct list_head *head, > > + struct process_trailer_options *opts) > > This can be

[PATCH 5/5] interpret-trailers: add --parse convenience option

2017-08-10 Thread Jeff King
The last few commits have added command line options that can turn interpret-trailers into a parsing tool. Since they'd most often be used together, let's provide a convenient single option for callers to invoke this mode. This is implemented as a callback rather than a boolean so that its effect

[PATCH 2/5] interpret-trailers: add an option to show only the trailers

2017-08-10 Thread Jeff King
In theory it's easy for any reader who wants to parse trailers to do so. But there are a lot of subtle corner cases around what counts as a trailer, when the trailer block begins and ends, etc. Since interpret-trailers already has our parsing logic, let's let callers ask it to just output the

[PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
The point of "--only-trailers" is to give a caller an output that's easy for them to parse. Getting rid of the non-trailer material helps, but we still may see more complicated syntax like whitespace continuation. Let's add an option to normalize the output into one "key: value" line per trailer.

[PATCH 3/5] interpret-trailers: add an option to show only existing trailers

2017-08-10 Thread Jeff King
It can be useful to invoke interpret-trailers for the primary purpose of parsing existing trailers. But in that case, we don't want to apply existing ifMissing or ifExists rules from the config. Let's add a special mode where we avoid applying those rules. Coupled with --only-trailers, this gives

[PATCH 1/5] trailer: put process_trailers() options into a struct

2017-08-10 Thread Jeff King
We already have two options and are about to add a few more. To avoid having a huge number of boolean arguments, let's convert to an options struct which can be passed in. Signed-off-by: Jeff King --- builtin/interpret-trailers.c | 13 ++--- trailer.c|

Re: [PATCH 0/5] make interpret-trailers useful for parsing

2017-08-10 Thread Jeff King
On Wed, Aug 09, 2017 at 08:21:47AM -0400, Jeff King wrote: > This series teaches interpret-trailers to parse and output just the > trailers. So now you can do: > > $ git log --format=%B -1 8d44797cc91231cd44955279040dc4a1ee0a797f | > git interpret-trailers --parse > Signed-off-by:

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Johannes Schindelin
Hi Peff, On Wed, 9 Aug 2017, Jeff King wrote: > On Wed, Aug 09, 2017 at 11:42:12PM +0200, Johannes Schindelin wrote: > > > > This is a resurrection of the thread from April: > > > > > > > > > https://public-inbox.org/git/20170404025438.bgxz5sfmrawqs...@sigill.intra.peff.net/ > > > > As

Re: [PATCH 0/5] make interpret-trailers useful for parsing

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 12:04:49AM -0700, Jacob Keller wrote: > >> $ git log --format=%B -1 8d44797cc91231cd44955279040dc4a1ee0a797f | > >> git interpret-trailers --parse > >> Signed-off-by: Hartmut Henkel > >> Helped-by: Stefan Beller > >>

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

2017-08-10 Thread Johannes Schindelin
Hi Stefan, On Wed, 9 Aug 2017, Stefan Beller wrote: > > I am sure that something even better will be possible: a Continuous > > "Integration" that fixes the coding style automatically by using > > `filter-branch` (avoiding the merge conflicts that would arise if > > `rebase -i` was used). > > I

Re: [PATCH 3/5] interpret-trailers: add an option to show only existing trailers

2017-08-10 Thread Jeff King
On Wed, Aug 09, 2017 at 11:38:20AM -0700, Jonathan Tan wrote: > > diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh > > index e5b0718ef6..525fd53e5b 100755 > > --- a/t/t7513-interpret-trailers.sh > > +++ b/t/t7513-interpret-trailers.sh > > @@ -1312,4 +1312,19 @@

Re: [PATCH 3/5] interpret-trailers: add an option to show only existing trailers

2017-08-10 Thread Jeff King
On Wed, Aug 09, 2017 at 11:18:19AM -0700, Stefan Beller wrote: > On Wed, Aug 9, 2017 at 5:24 AM, Jeff King wrote: > > It can be useful to invoke interpret-trailers for the > > primary purpose of parsing existing trailers. But in that > > case, we don't want to apply existing

Re: [PATCH 5/5] interpret-trailers: add --parse convenience option

2017-08-10 Thread Jeff King
On Wed, Aug 09, 2017 at 11:20:12AM -0700, Stefan Beller wrote: > > +--parse:: > > + A convenience alias for `--only-trailers --only-existing > > + --normalize`. > > Somewhere in this series, we'd want to not just describe each > of the new knobs, but reword the initial description,

[PATCH] sha1_file: release delta_stack on error in unpack_entry()

2017-08-10 Thread René Scharfe
When unpack_entry() encounters a broken packed object, it returns early. It adjusts the reference count of the pack window, but leaks the buffer for a big delta stack in case the small automatic one was not enough. Jump to the cleanup code at end instead, which takes care of that. Signed-off-by:

[PATCH] fsck: free buffers on error in fsck_obj()

2017-08-10 Thread René Scharfe
Move the code for releasing tree buffers and commit buffers in fsck_obj() to the end of the function and make sure it's executed no matter of an error is encountered or not. Signed-off-by: Rene Scharfe --- builtin/fsck.c | 22 +++--- 1 file changed, 11

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

2017-08-10 Thread Junio C Hamano
Brandon Williams writes: > On 08/10, Junio C Hamano wrote: > >> I vaguely recall that there was a discussion to have SubmitGit wait >> for success from Travis CI; if that is already in place, then I can >> sort of see how it would help individual contributors to have the >>

Re: [PATCH 3/5] interpret-trailers: add an option to show only existing trailers

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 10:27:19AM -0700, Stefan Beller wrote: > > I'm not fond of that, as it's vague about which exact trailers we're > > talking about. I also thought of something like --verbatim, but I'd > > worry that would seem to conflict with --normalize. > > > > I dunno. All of the names

[PATCH] merge: use skip_prefix()

2017-08-10 Thread René Scharfe
Get rid of a magic string length constant by using skip_prefix() instead of starts_with(). Signed-off-by: Rene Scharfe --- builtin/merge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/merge.c b/builtin/merge.c index 900bafdb45..4facb6fdd0 100644

Re: [PATCH 3/5] interpret-trailers: add an option to show only existing trailers

2017-08-10 Thread Stefan Beller
On Thu, Aug 10, 2017 at 12:32 AM, Jeff King wrote: > On Wed, Aug 09, 2017 at 11:18:19AM -0700, Stefan Beller wrote: > >> On Wed, Aug 9, 2017 at 5:24 AM, Jeff King wrote: >> > It can be useful to invoke interpret-trailers for the >> > primary purpose of parsing

Re: [PATCH] cache-tree: remove use of strbuf_addf in update_one

2017-08-10 Thread Kevin Willford
On 8/10/2017 3:03 PM, Jeff King wrote: On Thu, Aug 10, 2017 at 11:58:34AM -0700, Stefan Beller wrote: On Thu, Aug 10, 2017 at 11:47 AM, Kevin Willford wrote: String formatting can be a performance issue when there are hundreds of thousands of trees. When changing

Re: fatal: Out of memory, getdelim failed under NFS mounts

2017-08-10 Thread René Scharfe
Am 10.08.2017 um 20:56 schrieb Junio C Hamano: > René Scharfe writes: > >> I doubt the type of file system matters. The questions are: How much >> main memory do you have, what is git trying to cram into it, is there >> a way to reduce the memory footprint or do you need to add

Re: [PATCH v1 1/1] dir: teach status to show ignored directories

2017-08-10 Thread Stefan Beller
On Thu, Aug 10, 2017 at 11:49 AM, Jameson Miller wrote: Welcome to the Git mailing list. :) > Teach Git to optionally show ignored directories when showing all > untracked files. The git status command exposes the options to report > ignored and/or untracked files.

Re: fatal: Out of memory, getdelim failed under NFS mounts

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 09:58:37PM +0200, René Scharfe wrote: > > So the function is returning -1 and leaving ENOMEM in errno on > > Yaroslav's system. > > > > I wonder if we are truly hitting out of memory, though. The same > > symptom could bee seen if getdelim() does not touch errno when it

Re: [PATCH V2 1/2] Fix delta integer overflows

2017-08-10 Thread Junio C Hamano
Martin Koegler writes: > From: Martin Koegler Just a nitpick on the patch title. As "git shortlog --no-merges" output would tell you, we try to prefix the title with a short name of the area of codebase we are touching, followed by a colon

[ANNOUNCE] Git for Windows 2.14.1

2017-08-10 Thread Johannes Schindelin
Dear Git users, It is my pleasure to announce that Git for Windows 2.14.1 is available from: https://git-for-windows.github.io/ Changes since Git for Windows v2.14.0(2) (August 7th 2017) Note: there have been MinGit-only releases v2.12.2(3) and v2.13.1(3) with backports of the

Product Inquiry

2017-08-10 Thread Tina Wang
Dear Sir/Madam We are interested in your product, can we have your MOQ and FOB prices for consideration and purchase waiting for your response. Best Regards, Ms Tina Wang (Purchasing Manager) Email:purchasing.sale...@gmail.com

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Christian Couder
On Thu, Aug 10, 2017 at 9:42 PM, Jeff King wrote: > On Thu, Aug 10, 2017 at 09:39:21PM +0200, Christian Couder wrote: > >> > If you prefer the normalized form (and the input was line-broken in a >> > way that you don't like), then this would convert to your preferred >> > form. I

Re: fatal: Out of memory, getdelim failed under NFS mounts

2017-08-10 Thread Yaroslav Halchenko
On Thu, 10 Aug 2017, Jeff King wrote: > On Thu, Aug 10, 2017 at 09:58:37PM +0200, René Scharfe wrote: > > > So the function is returning -1 and leaving ENOMEM in errno on > > > Yaroslav's system. > > > I wonder if we are truly hitting out of memory, though. The same > > > symptom could bee

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Tom G. Christensen
[I am resending this since the original does not seem to have made it to the list, at least I cannot find it in any archives] On 09/08/17 23:47, Jeff King wrote: On Wed, Aug 09, 2017 at 11:42:12PM +0200, Johannes Schindelin wrote: I mean, if we even go out of our way to support the completely

Re: [PATCH] cache-tree: remove use of strbuf_addf in update_one

2017-08-10 Thread Stefan Beller
On Thu, Aug 10, 2017 at 12:57 PM, Kevin Willford wrote: > Here are some of the performance numbers from the windows repo. > I will work on writing a perf test for this change so that we > have a better idea on smaller repo what the impact of this change > is on them. > >

Re: [PATCH V2 1/2] Fix delta integer overflows

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 01:07:07PM -0700, Junio C Hamano wrote: > Perhaps we should teach the receiving end to notice that the varint > data it reads encodes a size that is too large for it to grok and > die. With that, we can safely move forward with whatever size_t > each platform uses. Yes,

Re: [PATCH 4/4] Fix delta offset overflow

2017-08-10 Thread Junio C Hamano
Martin Koegler writes: > From: Martin Koegler > > Prevent generating delta offsets beyond 4G. > > Signed-off-by: Martin Koegler > --- > diff-delta.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git

[PATCH] strbuf: clear errno before calling getdelim(3)

2017-08-10 Thread René Scharfe
getdelim(3) returns -1 at the end of the file and if it encounters an error, but sets errno only in the latter case. Set errno to zero before calling it to avoid misdiagnosing an out-of-memory condition due to a left-over value from some other function call. Reported-by: Yaroslav Halchenko

Re: [PATCH] strbuf: clear errno before calling getdelim(3)

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 10:56:40PM +0200, René Scharfe wrote: > getdelim(3) returns -1 at the end of the file and if it encounters an > error, but sets errno only in the latter case. Set errno to zero before > calling it to avoid misdiagnosing an out-of-memory condition due to a > left-over

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Tom G. Christensen
On 09/08/17 23:47, Jeff King wrote: On Wed, Aug 09, 2017 at 11:42:12PM +0200, Johannes Schindelin wrote: I mean, if we even go out of our way to support the completely outdated and obsolete .git/branches/ for what is likely a single user, it may not be the worst to keep those couple of #ifdef

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Christian Couder
On Thu, Aug 10, 2017 at 9:44 PM, Stefan Beller wrote: > On Thu, Aug 10, 2017 at 12:39 PM, Christian Couder > wrote: >> On Thu, Aug 10, 2017 at 8:37 PM, Jeff King wrote: >>> On Thu, Aug 10, 2017 at 11:35:00AM -0700, Stefan Beller

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 11:06:40PM +0200, Christian Couder wrote: > >> Related to this, I wonder if people might want to "normalize" in > >> different ways later. If that happens, we might regret having called > >> this option "--normalize" instead of "--one-per-line" for example. > > > > What is

Re: [PATCH v2 00/25] Move exported packfile funcs to its own file

2017-08-10 Thread Junio C Hamano
Jonathan Tan writes: > Here is the complete patch set. I have only moved the exported functions > that operate with packfiles and their static helpers - for example, > static functions like freshen_packed_object() that are used only by > non-pack-specific functions are

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

2017-08-10 Thread Brandon Williams
On 08/10, Junio C Hamano wrote: > Brandon Williams writes: > > > On 08/10, Junio C Hamano wrote: > > > >> I vaguely recall that there was a discussion to have SubmitGit wait > >> for success from Travis CI; if that is already in place, then I can > >> sort of see how it would

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 10:33:18PM +0200, Tom G. Christensen wrote: > > You've totally ignored the argument I made back then[1], and which I > > reiterated in this thread. So I'll say it one more time: the more > > compelling reason is not the #ifdefs, but the fact that the older > > versions are

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 11:36:41AM +0200, Johannes Schindelin wrote: > Hopefully I had better luck expressing my concerns this time? I understand your argument much better now. I'm still not sure I agree. -Peff

Re: [PATCH] strbuf: clear errno before calling getdelim(3)

2017-08-10 Thread Yaroslav Halchenko
On Thu, 10 Aug 2017, Jeff King wrote: > On Thu, Aug 10, 2017 at 10:56:40PM +0200, René Scharfe wrote: > > getdelim(3) returns -1 at the end of the file and if it encounters an > > error, but sets errno only in the latter case. Set errno to zero before > > calling it to avoid misdiagnosing an

Re: [PATCH] strbuf: clear errno before calling getdelim(3)

2017-08-10 Thread Junio C Hamano
René Scharfe writes: > getdelim(3) returns -1 at the end of the file and if it encounters an > error, but sets errno only in the latter case. Set errno to zero before > calling it to avoid misdiagnosing an out-of-memory condition due to a > left-over value from some other function

Re: [PATCH 3/4] Convert zlib.c to size_t

2017-08-10 Thread Junio C Hamano
Martin Koegler writes: > From: Martin Koegler > > Signed-off-by: Martin Koegler > --- Thanks. I haven't thought things through but this looks sensible. Will queue.

Re: [PATCH v2 00/25] Move exported packfile funcs to its own file

2017-08-10 Thread Jonathan Tan
On Thu, 10 Aug 2017 14:19:59 -0700 Junio C Hamano wrote: > Jonathan Tan writes: > > > Here is the complete patch set. I have only moved the exported functions > > that operate with packfiles and their static helpers - for example, > > static

Re: [PATCH V2 2/2] Convert size datatype to size_t

2017-08-10 Thread Junio C Hamano
Martin Koegler writes: > For next. As this touches core functions, it will likely produce > conflicts with other changes. Please provide the commit you want > to rebase the patch on and I'll produce a V3. No matter what base you pick, by the time the series is merged

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Junio C Hamano
Jeff King writes: > On Thu, Aug 10, 2017 at 11:36:41AM +0200, Johannes Schindelin wrote: > >> Hopefully I had better luck expressing my concerns this time? > > I understand your argument much better now. I'm still not sure I agree. > > -Peff I do not think "there are a dozen

Re: [PATCH] commit: skip discarding the index if there is no pre-commit hook

2017-08-10 Thread Junio C Hamano
Kevin Willford writes: > If there is not a pre-commit hook, there is no reason to discard > the index and reread it. > > This change checks to presence of a pre-commit hook and then only > discards the index if there was one. > > Signed-off-by: Kevin Willford

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Tom G. Christensen
On 10/08/17 23:32, Jeff King wrote: On Thu, Aug 10, 2017 at 10:33:18PM +0200, Tom G. Christensen wrote: You've totally ignored the argument I made back then[1], and which I reiterated in this thread. So I'll say it one more time: the more compelling reason is not the #ifdefs, but the fact that

Re: [PATCH 5/9] Convert sha1_file.c to size_t

2017-08-10 Thread Junio C Hamano
Martin Koegler writes: > From: Martin Koegler > > Signed-off-by: Martin Koegler > --- Please do not start your patch series from 5/9 when there is no 1/9, 2/9, 3/9, and 4/9. It is seriously confusing. I am

Re: [PATCH v2 00/25] Move exported packfile funcs to its own file

2017-08-10 Thread Junio C Hamano
Jonathan Tan writes: > On Thu, 10 Aug 2017 14:19:59 -0700 > Junio C Hamano wrote: > >> Jonathan Tan writes: >> >> > Here is the complete patch set. I have only moved the exported functions >> > that operate with packfiles

Re: [PATCH v2 0/2] Add progress for format-patch and rebase

2017-08-10 Thread Junio C Hamano
Kevin Willford writes: > Changes since last patch: > 1. Use start_progress_delay so progress isn't shown if generating >the patches is fast enough > 2. Updated to have text of "Generating patches" > 3. Only show progress when the --progress flag is passed > 4. In the

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Jeff King
On Fri, Aug 11, 2017 at 12:23:42AM +0200, Tom G. Christensen wrote: > > > I just built a pristine 2.14.0 on CentOS 5 with curl 7.15.5. No problems > > > at > > > all neither with building nor with running the testsuite. > > > > As you can see, this does not compile for me. What's going on? > >

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Ramsay Jones
On 10/08/17 22:10, Jeff King wrote: > On Thu, Aug 10, 2017 at 11:06:40PM +0200, Christian Couder wrote: > Related to this, I wonder if people might want to "normalize" in different ways later. If that happens, we might regret having called this option "--normalize" instead of

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 03:17:06PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Thu, Aug 10, 2017 at 11:36:41AM +0200, Johannes Schindelin wrote: > > > >> Hopefully I had better luck expressing my concerns this time? > > > > I understand your argument much better

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
On Fri, Aug 11, 2017 at 12:02:49AM +0100, Ramsay Jones wrote: > > But some of those things are not 1:1 mappings with normalization. For > > instance, --json presumably implies --only-trailers. Or are we proposing > > to break the whole commit message down into components and output it all > > as

Re: [PATCH v2 0/2] Add progress for format-patch and rebase

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 03:48:31PM -0700, Junio C Hamano wrote: > Kevin Willford writes: > > > Changes since last patch: > > 1. Use start_progress_delay so progress isn't shown if generating > >the patches is fast enough > > 2. Updated to have text of "Generating

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Tom G. Christensen
On 11/08/17 00:54, Jeff King wrote: On Fri, Aug 11, 2017 at 12:23:42AM +0200, Tom G. Christensen wrote: Er, sorry if I'm being dense, but how? Are you suggesting that by removing the callsite of get_curl_allowed_protocols(), the compiler might elide the now-dead code completely? I could

Re: [PATCH v2 1/2] format-patch: have progress option while generating patches

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 02:32:55PM -0400, Kevin Willford wrote: > @@ -1493,6 +1496,8 @@ int cmd_format_patch(int argc, const char **argv, const > char *prefix) > OPT_FILENAME(0, "signature-file", _file, > N_("add a signature from a file")), >

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Jeff King
On Fri, Aug 11, 2017 at 01:17:51AM +0200, Tom G. Christensen wrote: > > OK, thanks for double-checking. I'm still puzzled why your build > > succeeds and mine does not. > > I know what's going on now and it's so simple. > Red Hats version of curl 7.15.5 includes a number of patches including one

Re: [PATCH 0/4] dropping support for older curl

2017-08-10 Thread Tom G. Christensen
On 11/08/17 01:23, Jeff King wrote: On Fri, Aug 11, 2017 at 01:17:51AM +0200, Tom G. Christensen wrote: OK, thanks for double-checking. I'm still puzzled why your build succeeds and mine does not. I know what's going on now and it's so simple. Red Hats version of curl 7.15.5 includes a

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Ramsay Jones
On 11/08/17 00:10, Jeff King wrote: > On Fri, Aug 11, 2017 at 12:02:49AM +0100, Ramsay Jones wrote: > >>> But some of those things are not 1:1 mappings with normalization. For >>> instance, --json presumably implies --only-trailers. Or are we proposing >>> to break the whole commit message

Re: [PATCH] apply: remove prefix_length member from apply_state

2017-08-10 Thread Jeff King
On Wed, Aug 09, 2017 at 05:54:46PM +0200, René Scharfe wrote: > Use a NULL-and-NUL check to see if we have a prefix and consistently use > C string functions on it instead of storing its length in a member of > struct apply_state. This avoids strlen() calls and simplifies the code. I had to

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

2017-08-10 Thread Junio C Hamano
Johannes Schindelin writes: > On Wed, 9 Aug 2017, Stefan Beller wrote: > >> > I am sure that something even better will be possible: a Continuous >> > "Integration" that fixes the coding style automatically by using >> > `filter-branch` (avoiding the merge conflicts

Not understanding with git wants to copy one file to another

2017-08-10 Thread Harry Putnam
I ran into a line in git commit ouput I had not see before #copied: d0/etc/hosts -> misc/old-readerHOSTvcs-files/etc/hosts So googling I learned that this might happen if git thinks the two files are the same. I was pretty sure they were not the same so checked them> diff d0/etc/host

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

2017-08-10 Thread Brandon Williams
On 08/10, Junio C Hamano wrote: > Johannes Schindelin writes: > > > On Wed, 9 Aug 2017, Stefan Beller wrote: > > > >> > I am sure that something even better will be possible: a Continuous > >> > "Integration" that fixes the coding style automatically by using > >> >

Re: [PATCH v2 00/25] Move exported packfile funcs to its own file

2017-08-10 Thread Stefan Beller
On Tue, Aug 8, 2017 at 6:22 PM, Jonathan Tan wrote: > Here is the complete patch set. I have only moved the exported functions > that operate with packfiles and their static helpers - for example, > static functions like freshen_packed_object() that are used only by >

Re: Not understanding with git wants to copy one file to another

2017-08-10 Thread Stefan Beller
On Thu, Aug 10, 2017 at 10:03 AM, Harry Putnam wrote: > I ran into a line in git commit ouput I had not see before > > #copied: d0/etc/hosts -> misc/old-readerHOSTvcs-files/etc/hosts > > So googling I learned that this might happen if git thinks the two > files are the

Re: [PATCH 0/5] make interpret-trailers useful for parsing

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 04:02:46AM -0400, Jeff King wrote: > On Wed, Aug 09, 2017 at 08:21:47AM -0400, Jeff King wrote: > > > This series teaches interpret-trailers to parse and output just the > > trailers. So now you can do: > > > > $ git log --format=%B -1

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Stefan Beller
On Thu, Aug 10, 2017 at 1:03 AM, Jeff King wrote: > The point of "--only-trailers" is to give a caller an output > that's easy for them to parse. Getting rid of the > non-trailer material helps, but we still may see more > complicated syntax like whitespace continuation. Let's add

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 11:35:00AM -0700, Stefan Beller wrote: > On Thu, Aug 10, 2017 at 1:03 AM, Jeff King wrote: > > The point of "--only-trailers" is to give a caller an output > > that's easy for them to parse. Getting rid of the > > non-trailer material helps, but we still

Re: [PATCH 3/5] interpret-trailers: add an option to show only existing trailers

2017-08-10 Thread Junio C Hamano
Jeff King writes: > Perhaps "--exact-input" hits all of those. Or maybe "--only-input" to > match the other "--only". > > I think I like that last one the best. It makes it clear that we are > looking just at the input, and not anything else. Which is exactly what > the feature

[PATCH] commit: skip discarding the index if there is no pre-commit hook

2017-08-10 Thread Kevin Willford
If there is not a pre-commit hook, there is no reason to discard the index and reread it. This change checks to presence of a pre-commit hook and then only discards the index if there was one. Signed-off-by: Kevin Willford --- builtin/commit.c | 29

Re: [PATCH v3 2/5] interpret-trailers: add an option to show only the trailers

2017-08-10 Thread Stefan Beller
On Thu, Aug 10, 2017 at 11:04 AM, Jeff King wrote: > In theory it's easy for any reader who wants to parse > trailers to do so. But there are a lot of subtle corner > cases around what counts as a trailer, when the trailer > block begins and ends, etc. Since interpret-trailers

[PATCH v2 1/2] format-patch: have progress option while generating patches

2017-08-10 Thread Kevin Willford
When generating patches for the rebase command if the user does not realize the branch they are rebasing onto is thousands of commits different there is no progress indication after initial rewinding message. The progress meter as presented in this patch assumes the thousands of patches to have a

[PATCH v2 2/2] rebase: turn on progress option by default for format-patch

2017-08-10 Thread Kevin Willford
This change passes the progress option of format-patch checking that stderr is attached and rebase is not being run in quiet mode. Signed-off-by: Kevin Willford --- git-rebase--am.sh | 1 + git-rebase.sh | 6 ++ 2 files changed, 7 insertions(+) diff --git

[PATCH v2 0/2] Add progress for format-patch and rebase

2017-08-10 Thread Kevin Willford
Changes since last patch: 1. Use start_progress_delay so progress isn't shown if generating the patches is fast enough 2. Updated to have text of "Generating patches" 3. Only show progress when the --progress flag is passed 4. In the rebase script check stderr and the quiet option is not set

Re: [PATCH 0/5] make interpret-trailers useful for parsing

2017-08-10 Thread Junio C Hamano
Jeff King writes: >> > The above example made me wonder if we also want a format specifier >> > to do the above without piping, but it turns out that we already >> > have "log --format=%(trailers)", so we are good ;-) >> >> I was going to say, I thought we had a way to get

[PATCH] cache-tree: remove use of strbuf_addf in update_one

2017-08-10 Thread Kevin Willford
String formatting can be a performance issue when there are hundreds of thousands of trees. Change to stop using the strbuf_addf and just add the strings or characters individually. There are a limited number of modes so added a switch for the known ones and a default case if something comes

[PATCH v1 1/1] dir: teach status to show ignored directories

2017-08-10 Thread Jameson Miller
Teach Git to optionally show ignored directories when showing all untracked files. The git status command exposes the options to report ignored and/or untracked files. However, when reporting all untracked files (--untracked-files=all), all individual ignored files are reported as well. It is not

Re: [PATCH v3 2/5] interpret-trailers: add an option to show only the trailers

2017-08-10 Thread Junio C Hamano
Jeff King writes: > On Thu, Aug 10, 2017 at 11:28:52AM -0700, Stefan Beller wrote: > >> > +test_expect_success 'only trailers' ' >> > + git config trailer.sign.command "echo config-value" && >> >> You may want to use 'test_config' here, which keeps the config >> only for

[PATCH v1 0/1] Teach status to show ignored directories

2017-08-10 Thread Jameson Miller
Our application (Visual Studio) needs to run git status with options to report untracked and ignored files. It needs all untracked files reported individually, but would rather not have all individual ignored files under explicitly ignored directories reported. Directories that match an ignore

Re: fatal: Out of memory, getdelim failed under NFS mounts

2017-08-10 Thread Junio C Hamano
René Scharfe writes: > I doubt the type of file system matters. The questions are: How much > main memory do you have, what is git trying to cram into it, is there > a way to reduce the memory footprint or do you need to add more RAM? > >> any recommendations on how to pin point

Re: [PATCH] cache-tree: remove use of strbuf_addf in update_one

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 11:58:34AM -0700, Stefan Beller wrote: > On Thu, Aug 10, 2017 at 11:47 AM, Kevin Willford wrote: > > String formatting can be a performance issue when there are > > hundreds of thousands of trees. > > When changing this for the sake of performance,

[ANNOUNCE] Git v2.14.1, v2.13.5, and others

2017-08-10 Thread Junio C Hamano
The latest maintenance release Git v2.14.1 is now available at the usual places, together with releases for older maintenance track for the same issue: v2.7.6, v2.8.6, v2.9.5, v2.10.4, v2.11.3, v2.12.4, and v2.13.5. These contain a security fix for CVE-2017-1000117, and are released in

[PATCH v3 1/5] trailer: put process_trailers() options into a struct

2017-08-10 Thread Jeff King
We already have two options and are about to add a few more. To avoid having a huge number of boolean arguments, let's convert to an options struct which can be passed in. Signed-off-by: Jeff King --- builtin/interpret-trailers.c | 13 ++--- trailer.c|

[PATCH v3 2/5] interpret-trailers: add an option to show only the trailers

2017-08-10 Thread Jeff King
In theory it's easy for any reader who wants to parse trailers to do so. But there are a lot of subtle corner cases around what counts as a trailer, when the trailer block begins and ends, etc. Since interpret-trailers already has our parsing logic, let's let callers ask it to just output the

[PATCH v3 3/5] interpret-trailers: add an option to show only existing trailers

2017-08-10 Thread Jeff King
It can be useful to invoke interpret-trailers for the primary purpose of parsing existing trailers. But in that case, we don't want to apply existing ifMissing or ifExists rules from the config. Let's add a special mode where we avoid applying those rules. Coupled with --only-trailers, this gives

[PATCH v3 5/5] interpret-trailers: add --parse convenience option

2017-08-10 Thread Jeff King
The last few commits have added command line options that can turn interpret-trailers into a parsing tool. Since they'd most often be used together, let's provide a convenient single option for callers to invoke this mode. This is implemented as a callback rather than a boolean so that its effect

[PATCH v3 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
The point of "--only-trailers" is to give a caller an output that's easy for them to parse. Getting rid of the non-trailer material helps, but we still may see more complicated syntax like whitespace continuation. Let's add an option to normalize the output into one "key: value" line per trailer.

[PATCH 3/4] Convert zlib.c to size_t

2017-08-10 Thread Martin Koegler
From: Martin Koegler Signed-off-by: Martin Koegler --- builtin/pack-objects.c | 10 +- cache.h| 12 ++-- pack-check.c | 6 +++--- pack.h | 2 +- sha1_file.c| 6 +++---

[PATCH 4/4] Fix delta offset overflow

2017-08-10 Thread Martin Koegler
From: Martin Koegler Prevent generating delta offsets beyond 4G. Signed-off-by: Martin Koegler --- diff-delta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/diff-delta.c b/diff-delta.c index 3d5e1ef..633883e 100644 ---

  1   2   >