Re: [PATCH] [GSOC] remove_temporary_files(): reimplement using iterators

2017-03-31 Thread Jeff King
On Sat, Apr 01, 2017 at 01:37:16AM -0400, Jeff King wrote: > We use that strbuf for the prefix-comparison, too, but the way it is > done is rather confusing. AFAICT, we could just be comparing against > "packtmp + strlen(packdir) + 1". Though it would be simpler still to > make "packtmp" just the

Re: [PATCH] [GSOC] remove_temporary_files(): reimplement using iterators

2017-03-31 Thread Jeff King
On Sat, Apr 01, 2017 at 03:24:58AM +0300, Robert Stanca wrote: > @@ -49,12 +51,7 @@ static void remove_temporary_files(void) > { > struct strbuf buf = STRBUF_INIT; > size_t dirlen, prefixlen; > - DIR *dir; > - struct dirent *e; > - > - dir = opendir(packdir); > - if

Re: Bug in "git am" when the body starts with spaces

2017-03-31 Thread Jeff King
On Fri, Mar 31, 2017 at 05:52:00PM -0700, Linus Torvalds wrote: > Ok, did a bisect, and this bisects to commit 6b4b013f1884 ("mailinfo: > handle in-body header continuations"). > > The continuation logic is oddly complex, and I can't follow the logic. > But it is completely broken in how it

Re: [PATCH v2 00/20] Separate `ref_cache` into a separate module

2017-03-31 Thread Michael Haggerty
On 03/31/2017 06:01 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> This version literally only contains a few commit message changes and >> one minor comment changes relative to v1. The code is identical. I >> wasn't sure whether it is even worth sending this

Re: [PATCH v7 00/28] Remove submodule from files-backend.c

2017-03-31 Thread Michael Haggerty
On 03/26/2017 04:42 AM, Nguyễn Thái Ngọc Duy wrote: > v7 is mostly about style changes except the one bug in > test-ref-store.c, missing setup_git_directory(). > > There's one new patch, 03/28, which maps to the "if (!refs)" deletion > in the interdiff. > > The one comment from v6 I haven't

Re: [PATCH v7 23/28] files-backend: avoid ref api targetting main ref store

2017-03-31 Thread Michael Haggerty
Nits: s/targetting/targeting/ in the subject line. On 03/26/2017 04:42 AM, Nguyễn Thái Ngọc Duy wrote: > A small step towards making files-backend works as a non-main ref store > using the newly added store-aware API. s/works/work/ > For the record, `join` and `nm` on refs.o and files-backend.o

Re: [PATCH v7 22/28] refs: new transaction related ref-store api

2017-03-31 Thread Michael Haggerty
On 03/26/2017 04:42 AM, Nguyễn Thái Ngọc Duy wrote: > The transaction struct now takes a ref store at creation and will > operate on that ref store alone. Having worked downstream of this patch series for a while, I started to wonder why a `ref_store` has to be baked into a `ref_transaction` at

[PATCH] contrib/git-resurrect.sh: do not write \t for HT in sed scripts

2017-03-31 Thread Junio C Hamano
Just like we did in 0d1d6e50 ("t/t7003: replace \t with literal tab in sed expression", 2010-08-12), avoid writing "\t" for HT in sed scripts, which is not portable. Signed-off-by: Junio C Hamano --- * This should hopefully kill the last instances of the same issue to make

Re: [PATCH] name-hash: fix buffer overrun

2017-03-31 Thread Junio C Hamano
Junio C Hamano writes: > Ah, of course. Avoid GNUism to spell HT as "\t" in a sed script. Here is what I replaced the original patch with. Let's see how well it fares with Travis tonight. -- >8 -- From: Kevin Willford Date: Fri, 31 Mar 2017 17:32:14

Re: [PATCH v7 19/28] files-backend: replace submodule_allowed check in files_downcast()

2017-03-31 Thread Michael Haggerty
On 03/26/2017 04:42 AM, Nguyễn Thái Ngọc Duy wrote: > files-backend.c is unlearning submodules. Instead of having a specific > check for submodules to see what operation is allowed, files backend > now takes a set of flags at init. Each operation will check if the > required flags is present

Re: [PATCH] [GSOC] prune_worktrees(): reimplement with dir_iterator

2017-03-31 Thread Junio C Hamano
Robert Stanca writes: > Replaces recursive traversing of opendir with dir_iterator The original code for this one, and also the other one, is not recursive traversing. This one enumerates all the _direct_ subdirectories of ".git/worktrees", and feeds them to

Re: [PATCH] Documentation: improve git ls-files -s manpage entry

2017-03-31 Thread Junio C Hamano
Mostyn Bramley-Moore writes: > List the fields in order of appearance in the command output. > > Signed-off-by: Mostyn Bramley-Moore > --- > Documentation/git-ls-files.txt | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

Preparing for the Upcoming Removal of UCB Utilities from the Next Version of Solaris

2017-03-31 Thread Jeffrey Walton
Preparing for the Upcoming Removal of UCB Utilities from the Next Version of Solaris, https://blogs.oracle.com/partnertech/entry/preparing_for_the_upcoming_removal . Sorry to keep beating the Solaris horse. Oracle charges forks for simple updates, like security bug fixes, and updates to cURL and

[PATCH] [GSOC] prune_worktrees(): reimplement with dir_iterator

2017-03-31 Thread Robert Stanca
Replaces recursive traversing of opendir with dir_iterator Signed-off-by: Robert Stanca --- builtin/worktree.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/builtin/worktree.c b/builtin/worktree.c index 9993ded..7cfd78c 100644

Re: Bug in "git am" when the body starts with spaces

2017-03-31 Thread Linus Torvalds
Ok, did a bisect, and this bisects to commit 6b4b013f1884 ("mailinfo: handle in-body header continuations"). The continuation logic is oddly complex, and I can't follow the logic. But it is completely broken in how it thinks empty lines are somehow "continuations". Jonathan?

[PATCH] Documentation: improve git ls-files -s manpage entry

2017-03-31 Thread Mostyn Bramley-Moore
List the fields in order of appearance in the command output. Signed-off-by: Mostyn Bramley-Moore --- Documentation/git-ls-files.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index

[PATCH] [GSOC] remove_temporary_files(): reimplement using iterators

2017-03-31 Thread Robert Stanca
Replaces recursive traversing of opendir with dir_iterator Signed-off-by: Robert Stanca --- builtin/repack.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/builtin/repack.c b/builtin/repack.c index 677bc7c81..dba465814 100644 ---

Bug in "git am" when the body starts with spaces

2017-03-31 Thread Linus Torvalds
Try applying the attached patch with git am 0001-Test-patch.patch in the git repository. At least for me, it results in a very odd commit that has one single line in the commit message: Test patch This should go in the body not in the subject line which is obviously bogus. I think the

Re: [PATCH v2 2/2] push: propagate push-options with --recurse-submodules

2017-03-31 Thread Jonathan Nieder
Brandon Williams wrote: > Teach push --recurse-submodules to propagate push-options recursively to > the pushes performed in the submodules. Some time in the future we may want "push --recurse-submodules" to do a dry run pass before doing the final push, so that if it is known that some of the

Re: [PATCH v2 1/2] push: unmark a local variable as static

2017-03-31 Thread Brandon Williams
On 03/31, Jonathan Nieder wrote: > Brandon Williams wrote: > > > Also, clear the push_options string_list to > > prevent memory leaking. > > That's not a real leak, right? Is the motivation to make it not show up > in valgrind output? well depends on what you classify

Re: [PATCH v2 1/2] push: unmark a local variable as static

2017-03-31 Thread Jonathan Nieder
Brandon Williams wrote: > Also, clear the push_options string_list to > prevent memory leaking. That's not a real leak, right? Is the motivation to make it not show up in valgrind output? At first it didn't look related to the other change but then the connection dawned

[RFC PATCH] git-news: obtain latest news for your favorite VCS

2017-03-31 Thread Stefan Beller
Today when a user is interested in news regarding the Git, their favorite version control, it is a challenging task to find out what is actually happening. If the user is using a Git in a distribution that packaged it nicely for them, they may find outdated information in their distribution using

[PATCH v2 2/2] push: propagate push-options with --recurse-submodules

2017-03-31 Thread Brandon Williams
Teach push --recurse-submodules to propagate push-options recursively to the pushes performed in the submodules. Signed-off-by: Brandon Williams --- submodule.c | 13 +++-- submodule.h | 1 + t/t5545-push-options.sh | 39

[PATCH v2 1/2] push: unmark a local variable as static

2017-03-31 Thread Brandon Williams
There isn't any obvious reason for the 'struct string_list push_options' and 'struct string_list_item *item' to be marked as static, so unmark them as being static. Also, clear the push_options string_list to prevent memory leaking. Signed-off-by: Brandon Williams ---

[PATCH v2 0/2] propagate push-options

2017-03-31 Thread Brandon Williams
v2 addresses Jonathan's comments as well as adds an additional patch to unmark a local variable as static. Brandon Williams (2): push: unmark a local variable as static push: propagate push-options with --recurse-submodules builtin/push.c | 5 +++-- submodule.c | 13

Re: [PATCH] push: propagate push-options with --recurse-submodules

2017-03-31 Thread Brandon Williams
On 03/31, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > Teach push --recurse-submodules to propagate push-options recursively to > > the pushes performed in the submodules. > > Sounds like a good change. > > [...] > > +++ b/submodule.c > [...] > > @@ -793,6 +794,12 @@ static

Re: [PATCH] push: propagate push-options with --recurse-submodules

2017-03-31 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > Teach push --recurse-submodules to propagate push-options recursively to > the pushes performed in the submodules. Sounds like a good change. [...] > +++ b/submodule.c [...] > @@ -793,6 +794,12 @@ static int push_submodule(const char *path, int dry_run) >

Re: [PATCH] name-hash: fix buffer overrun

2017-03-31 Thread Junio C Hamano
On Fri, Mar 31, 2017 at 2:18 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Will queue with ... >> >>> name-hash.c | 4 +++- >>> t/t3008-ls-files-lazy-init-name-hash.sh | 19 +++ >>> 2 files changed, 22

[PATCH 2/2] diff: recurse into nested submodules for inline diff

2017-03-31 Thread Stefan Beller
When fd47ae6a5b (diff: teach diff to display submodule difference with an inline diff, 2016-08-31) was introduced, we did not think of recursing into nested submodules. When showing the inline diff for submodules, automatically recurse into nested submodules as well with inline submodule diffs.

[PATCH 0/2] Re: git diff --submodule=diff fails with submodules in a submodule

2017-03-31 Thread Stefan Beller
I came up with a patch that fixes the issue locally. (It is the first patch, such that we can track the first patch down to maint) While doing so, I noticed 2 issues: * when having nested submodules, we probably want to have --submodule=diff to recurse into the nested submodules, so pass on the

[PATCH 1/2] diff: submodule inline diff to initialize env array.

2017-03-31 Thread Stefan Beller
David reported: > When I try to run `git diff --submodule=diff` in a submodule which has > it's own submodules that have changes I get the error: fatal: bad > object. This happens, because we do not properly initialize the environment in which the diff is run in the submodule. That means we

[PATCH] push: propagate push-options with --recurse-submodules

2017-03-31 Thread Brandon Williams
Teach push --recurse-submodules to propagate push-options recursively to the pushes performed in the submodules. Signed-off-by: Brandon Williams --- submodule.c | 14 +++--- submodule.h | 3 ++- t/t5545-push-options.sh | 39

Re: Very promising results with libpcre2

2017-03-31 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > That enables the new JIT support in pcre v2: > > s/iterrx fixed prx > rx 2.19-- -33% -44% > fixed 1.47 49%-- -17% > prx 1.22 79% 20%-- The numbers with JIT does look "interesting". I couldn't

Very promising results with libpcre2

2017-03-31 Thread Ævar Arnfjörð Bjarmason
The recent libpcre2 got me interested in seeing what the difference in v1 and v2 was. So I hacked up a *very basic* patch for libpcre2 that passes all tests, but obviously isn't ready for inclusion (I searched/replaced all the v1 usage with v2). I'm not even bothering sending this to the list

Re: [PATCH] name-hash: fix buffer overrun

2017-03-31 Thread Junio C Hamano
Junio C Hamano writes: > Will queue with ... > >> name-hash.c | 4 +++- >> t/t3008-ls-files-lazy-init-name-hash.sh | 19 +++ >> 2 files changed, 22 insertions(+), 1 deletion(-) >> create mode 100644

Re: SHA1 collision in production repo?! (probably not)

2017-03-31 Thread Junio C Hamano
Before we forget... -- >8 -- From: Jeff King When sha1_loose_object_info() finds that a loose object file cannot be stat(2)ed or mmap(2)ed, it returns -1 to signal an error to the caller. However, if it found that the loose object file is corrupt and the object data cannot be

[PATCH] remote.[ch]: parse_push_cas_option() can be static

2017-03-31 Thread Junio C Hamano
Since 068c77a5 ("builtin/send-pack.c: use parse_options API", 2015-08-19), there is no external user of this helper function. Signed-off-by: Junio C Hamano --- remote.c | 2 +- remote.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/remote.c b/remote.c

Re: [PATCH v3] http.postbuffer: allow full range of ssize_t values

2017-03-31 Thread Junio C Hamano
David Turner writes: > +static int git_parse_ssize_t(const char *value, ssize_t *ret) > +{ > + ssize_t tmp; > + if (!git_parse_signed(value, , > maximum_signed_value_of_type(ssize_t))) > + return 0; > + *ret = tmp; > + return 1; > +} > + >

Re: Add configuration options for some commonly used command-line options

2017-03-31 Thread Brandon McCaig
On Mon, Mar 20, 2017 at 02:18:01PM -0400, Jeff King wrote: > I think we've had similar proposals in the form of an > environment variable like "GIT_PLUMBING" (and your "command", > which I do like syntactically, would probably just end up > setting such an environment variable anyway). For

Re: [BUG?] iconv used as textconv, and spurious ^M on added lines on Windows

2017-03-31 Thread Jakub Narębski
W dniu 31.03.2017 o 14:38, Torsten Bögershausen pisze: > On 30.03.17 21:35, Jakub Narębski wrote: >> Hello, >> >> Recently I had to work on a project which uses legacy 8-bit encoding >> (namely cp1250 encoding) instead of utf-8 for text files (LaTeX >> documents). My terminal, that is Git Bash

Re: [PATCH] failure with diff --submodule=diff with moved nested submodule HEAD

2017-03-31 Thread Junio C Hamano
Stefan Beller writes: > This fails reliable for me. > > Signed-off-by: Stefan Beller > --- I take it that this is a WIP for the testing half of the patch you are working on (i.e. you are not just throwing a patch to document known breakage to be fixed

Re: [PATCH] name-hash: fix buffer overrun

2017-03-31 Thread Junio C Hamano
g...@jeffhostetler.com writes: > From: Kevin Willford > > Add check for the end of the entries for the thread partition. > Add test for lazy init name hash with specific directory structure > > The lazy init hash name was causing a buffer overflow when the last > entry in

Re: [PATCH v3 3/4] name-rev: provide debug output

2017-03-31 Thread Junio C Hamano
Michael J Gruber writes: >>What problem are you solving? > > Sorry, I forgot about that change and failed to mention it. > > It makes no difference in the non-debug case which cares about the > Boolean only. In the debug case, I want to distinguish between > annotated and

Re: [GSoC] Proposal: turn git-add--interactive.perl into a builtin

2017-03-31 Thread Daniel Ferreira (theiostream)
Well, Google requires me to have a draft on a Google Doc anyway for the proposal, and I am unsure who exactly it will reach. Since it *is* part of the discussion regarding my proposal, I suppose it is worth posting here for anyone to comment:

Re: SHA1 collision in production repo?! (probably not)

2017-03-31 Thread Jeff King
On Fri, Mar 31, 2017 at 11:19:54AM -0700, Junio C Hamano wrote: > > Er, no, that's totally wrong. "status' may be holding the type. It > > should really be: > > > > return status < 0 ? status : 0; > > Sounds more like it. The only caller will say "ah, that object is > not available to

[PATCH v2] git-gui: Error on systems with TK < 8.6.0

2017-03-31 Thread Peter van der Does
Using git-gui on systems that run a TK version below 8.6.0 results in a crash when checking for the current theme. Catch the error on those systems and use a different command to check for the current theme. Signed-off-by: Peter van der Does --- lib/themed.tcl | 6

Re: [PATCH v3 3/4] name-rev: provide debug output

2017-03-31 Thread Junio C Hamano
Junio C Hamano writes: > Michael J Gruber writes: > >>>The only case that this change may make a difference I can think of >>>is when you have a tag object pointed at from outside refs/tags >>>(e.g. refs/heads/foo is a tag object); if you are trying to change

Re: SHA1 collision in production repo?! (probably not)

2017-03-31 Thread Junio C Hamano
Jeff King writes: > On Fri, Mar 31, 2017 at 01:45:15PM -0400, Jeff King wrote: > >> I suspect this may improve things, but I haven't dug deeper to see if >> there are unwanted side effects, or if there are other spots that need >> similar treatment. >> >> diff --git a/sha1_file.c

Re: [PATCH] status: show in-progress info for short status

2017-03-31 Thread Junio C Hamano
Michael J Gruber writes: > Ordinary (long) status shows information about bisect, revert, am, > rebase, cherry-pick in progress, and so does git-prompt.sh. status > --short currently shows none of this information. > > Introduce an `--inprogress` argument to git status so that,

Re: [PATCH v3 3/4] name-rev: provide debug output

2017-03-31 Thread Junio C Hamano
Michael J Gruber writes: >>The only case that this change may make a difference I can think of >>is when you have a tag object pointed at from outside refs/tags >>(e.g. refs/heads/foo is a tag object); if you are trying to change >>the definition of "from_tag" from the current

Re: [PATCH v3 3/4] name-rev: provide debug output

2017-03-31 Thread Michael J Gruber
Am 31. März 2017 18:52:16 MESZ schrieb Junio C Hamano : >Michael J Gruber writes: > >> Currently, `git describe --contains --debug` does not create any >debug >> output because it does not pass the flag down to `git name-rev`, >which >> does not know that flag.

[PATCH] failure with diff --submodule=diff with moved nested submodule HEAD

2017-03-31 Thread Stefan Beller
This fails reliable for me. Signed-off-by: Stefan Beller --- t/t4060-diff-submodule-option-diff-format.sh | 16 1 file changed, 16 insertions(+) diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh index

Re: SHA1 collision in production repo?! (probably not)

2017-03-31 Thread Jeff King
On Fri, Mar 31, 2017 at 01:45:15PM -0400, Jeff King wrote: > I suspect this may improve things, but I haven't dug deeper to see if > there are unwanted side effects, or if there are other spots that need > similar treatment. > > diff --git a/sha1_file.c b/sha1_file.c > index 43990dec7..38411f90b

Re: SHA1 collision in production repo?! (probably not)

2017-03-31 Thread Jeff King
On Fri, Mar 31, 2017 at 10:35:06AM -0700, Junio C Hamano wrote: > Lars Schneider writes: > > > Hi, > > > > I just got a report with the following output after a "git fetch" operation > > using Git 2.11.0.windows.3 [1]: > > > > remote: Counting objects: 5922, done. > >

Re: SHA1 collision in production repo?! (probably not)

2017-03-31 Thread Junio C Hamano
Lars Schneider writes: > Hi, > > I just got a report with the following output after a "git fetch" operation > using Git 2.11.0.windows.3 [1]: > > remote: Counting objects: 5922, done. > remote: Compressing objects: 100% (14/14), done. > error: inflate: data stream

[PATCH] name-hash: fix buffer overrun

2017-03-31 Thread git
From: Kevin Willford Add check for the end of the entries for the thread partition. Add test for lazy init name hash with specific directory structure The lazy init hash name was causing a buffer overflow when the last entry in the index was multiple folder deep with

Re: git diff --submodule=diff fails with submodules in a submodule

2017-03-31 Thread Jacob Keller
On Fri, Mar 31, 2017 at 10:07 AM, Stefan Beller wrote: > +cc Jacob, who implemented --submodule=diff > > On Fri, Mar 31, 2017 at 8:40 AM, David Parrish wrote: >> When I try to run `git diff --submodule=diff` in a submodule which has >> it's own

[PATCH] name-hash: fix buffer overrun

2017-03-31 Thread git
From: Jeff Hostetler Fix buffer overrun in handle_range_dir() when the final entry in the index was the only file in the last directory, such as "a/b/foo.txt". The look ahead (k_start + 1) was invalid since (k_start + 1) == k_end. This bug was introduced by Jeff in

Re: SHA1 collision in production repo?! (probably not)

2017-03-31 Thread Jeff King
On Fri, Mar 31, 2017 at 06:05:17PM +0200, Lars Schneider wrote: > I just got a report with the following output after a "git fetch" operation > using Git 2.11.0.windows.3 [1]: > > remote: Counting objects: 5922, done. > remote: Compressing objects: 100% (14/14), done. > error: inflate: data

[PATCH v3] http.postbuffer: allow full range of ssize_t values

2017-03-31 Thread David Turner
Unfortunately, in order to push some large repos, the http postbuffer must sometimes exceed two gigabytes. On a 64-bit system, this is OK: we just malloc a larger buffer. Signed-off-by: David Turner --- This version fixes the definition of git_parse_ssize_t to return int.

Re: [PATCH] git-gui: Error on systems with TK < 8.6.0

2017-03-31 Thread Junio C Hamano
Peter van der Does writes: > Using git-gui on systems that run a TK version below 8.6.0 results in a > crash when checking for the current theme. > > Catch the error on those systems and use a different command to check > for the current theme. > --- Needs sign-off.

Re: [PATCH v2 01/20] get_ref_dir(): don't call read_loose_refs() for "refs/bisect"

2017-03-31 Thread Stefan Beller
On Fri, Mar 31, 2017 at 7:10 AM, Michael Haggerty wrote: > Since references under "refs/bisect/" are per-worktree, they have to > be sought in the worktree rather than in the main repository. But > since loose references are found by traversing directories, the > reference

Re: git diff --submodule=diff fails with submodules in a submodule

2017-03-31 Thread Stefan Beller
+cc Jacob, who implemented --submodule=diff On Fri, Mar 31, 2017 at 8:40 AM, David Parrish wrote: > When I try to run `git diff --submodule=diff` in a submodule which has > it's own submodules that have changes I get the error: fatal: bad > object Thanks for the bug

Re: [PATCH v3 3/4] name-rev: provide debug output

2017-03-31 Thread Junio C Hamano
Junio C Hamano writes: > The only case that this change may make a difference I can think of > is when you have a tag object pointed at from outside refs/tags > (e.g. refs/heads/foo is a tag object); if you are trying to change > the definition of "from_tag" from the current

Re: [PATCH v3 3/4] name-rev: provide debug output

2017-03-31 Thread Junio C Hamano
Michael J Gruber writes: > Currently, `git describe --contains --debug` does not create any debug > output because it does not pass the flag down to `git name-rev`, which > does not know that flag. > > Teach the latter that flag, so that the former can pass it down (in > the

Lieber Freund,

2017-03-31 Thread Dr.John Martin
Barclays Bank PLC 28 High Street Nottinghamshire Vereinigtes Königreich NG1 2bd Lieber Freund, Mein Name ist Doz k. Martins und ich bin der chief Officer der internationalen Transaktionen von der Barclays Bank London, Vereinigtes Königreich. Ich entdeckte einer Summe von £ 16,5 Millionen

Re: Terrible bad performance for it blame --date=iso -C -C master --

2017-03-31 Thread Samuel Lijin
Hi Ulrich, Is there any chance you could share the repo where this is coming from? This is actually something a colleague and I are looking into seeing if we can crunch out some performance gains since -C -C isn't threaded. Sam On Fri, Mar 31, 2017 at 10:52 AM, Junio C Hamano

SHA1 collision in production repo?! (probably not)

2017-03-31 Thread Lars Schneider
Hi, I just got a report with the following output after a "git fetch" operation using Git 2.11.0.windows.3 [1]: remote: Counting objects: 5922, done. remote: Compressing objects: 100% (14/14), done. error: inflate: data stream error (unknown compression method) error: unable to unpack

Re: [PATCH v2 00/20] Separate `ref_cache` into a separate module

2017-03-31 Thread Junio C Hamano
Michael Haggerty writes: > This version literally only contains a few commit message changes and > one minor comment changes relative to v1. The code is identical. I > wasn't sure whether it is even worth sending this patch series to the > ML again; Junio, if you'd prefer I

RE: [PATCH] http.postbuffer: make a size_t

2017-03-31 Thread David Turner
> -Original Message- > From: Torsten Bögershausen [mailto:tbo...@web.de] > Sent: Friday, March 31, 2017 12:22 AM > To: David Turner ; git@vger.kernel.org > Subject: Re: [PATCH] http.postbuffer: make a size_t > > > > On 30/03/17 22:29, David Turner wrote: > >

Re: Terrible bad performance for it blame --date=iso -C -C master --

2017-03-31 Thread Junio C Hamano
"Ulrich Windl" writes: > I was running "vc-annotate" in Emacs for a file from a large > repository (>4 files, a big percentage being binary, about 10 > commits). For the first file the result was presented rather soon, but > for a second file the command

Re: [PATCH v3 00/20] object_id part 7

2017-03-31 Thread Junio C Hamano
Thanks for these patches. I didn't see anything questionable in them (except a very minor thing I sent comments on separately). Will replace. Thanks.

Re: [PATCH v3 14/20] sha1-array: convert internal storage for struct sha1_array to object_id

2017-03-31 Thread Junio C Hamano
"brian m. carlson" writes: > for (i = 0; i < array->nr; i++) { > - strbuf_addstr(_hexs, sha1_to_hex(array->sha1[i])); > + strbuf_addstr(_hexs, oid_to_hex(array->oid + i)); As I said in the previous round (in my comment on the one that

git diff --submodule=diff fails with submodules in a submodule

2017-03-31 Thread David Parrish
When I try to run `git diff --submodule=diff` in a submodule which has it's own submodules that have changes I get the error: fatal: bad object Let me know if you need an example reproduce the issue. David

Re: ttk error when starting git gui

2017-03-31 Thread Konstantin Khomoutov
On Fri, 31 Mar 2017 13:29:04 +0200 "Jessie Hernandez" wrote: > > On Fri, 31 Mar 2017 09:53:38 +0200 > > "Jessie Hernandez" wrote: > > > > [...] > >> >> It's possible to have ttk with 8.5 as well (say, here on Debian > >> >> 8.5 ships with ttk

[PATCH v2 13/20] refs: handle "refs/bisect/" in `loose_fill_ref_dir()`

2017-03-31 Thread Michael Haggerty
That "refs/bisect/" has to be handled specially when filling the ref_cache for loose references is a peculiarity of the files backend, and the ref-cache code shouldn't need to know about it. So move this code to the callback function, `loose_fill_ref_dir()`. Signed-off-by: Michael Haggerty

[PATCH v2 18/20] commit_packed_refs(): use reference iteration

2017-03-31 Thread Michael Haggerty
Use reference iteration rather than do_for_each_entry_in_dir() in the definition of commit_packed_refs(). Note that an internal consistency check that was previously done in `write_packed_entry_fn()` is not there anymore. This is actually an improvement: The old error message was emitted when

[PATCH v2 17/20] cache_ref_iterator_begin(): make function smarter

2017-03-31 Thread Michael Haggerty
Change `cache_ref_iterator_begin()` to take two new arguments: * `prefix` -- to iterate only over references with the specified prefix. * `prime_dir` -- to "prime" (i.e., pre-load) the cache before starting the iteration. The new functionality makes it possible for

[PATCH v2 14/20] do_for_each_entry_in_dir(): eliminate `offset` argument

2017-03-31 Thread Michael Haggerty
It was never used. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 4 ++-- refs/ref-cache.c | 6 +++--- refs/ref-cache.h | 11 +-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c

[PATCH v2 20/20] do_for_each_entry_in_dir(): delete function

2017-03-31 Thread Michael Haggerty
Its only remaining caller was itself. Signed-off-by: Michael Haggerty --- refs/ref-cache.c | 21 - refs/ref-cache.h | 11 --- 2 files changed, 32 deletions(-) diff --git a/refs/ref-cache.c b/refs/ref-cache.c index b3a30350d7..6059362f1d 100644

[PATCH v2 10/20] ref-cache: introduce a new type, ref_cache

2017-03-31 Thread Michael Haggerty
For now, it just wraps a `ref_entry *` that points at the root of the tree. Soon it will hold more information. Add two new functions, `create_ref_cache()` and `free_ref_cache()`. Make `free_ref_entry()` private. Change files-backend to use this type to hold its caches. Signed-off-by: Michael

[PATCH v2 11/20] refs: record the ref_store in ref_cache, not ref_dir

2017-03-31 Thread Michael Haggerty
Instead of keeping a pointer to the ref_store in every ref_dir entry, store it once in `struct ref_cache`, and change `struct ref_dir` to include a pointer to its containing `ref_cache` instead. This makes it easier to add to the information that is accessible from a `ref_dir` without increasing

[PATCH v2 19/20] files_pack_refs(): use reference iteration

2017-03-31 Thread Michael Haggerty
Use reference iteration rather than do_for_each_entry_in_dir() in the definition of files_pack_refs(). Signed-off-by: Michael Haggerty --- refs/files-backend.c | 143 +-- 1 file changed, 60 insertions(+), 83 deletions(-)

[PATCH v2 12/20] ref-cache: use a callback function to fill the cache

2017-03-31 Thread Michael Haggerty
It is a leveling violation for `ref_cache` to know about `files_ref_store` or that it should call `read_loose_refs()` to lazily fill cache directories. So instead, have its constructor take as an argument a callback function that it should use for lazy-filling, and change `files_ref_store` to

[PATCH v2 08/20] ref-cache: rename `remove_entry()` to `remove_entry_from_dir()`

2017-03-31 Thread Michael Haggerty
This function's visibility is about to be increased, so give it a more distinctive name. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index

[PATCH v2 16/20] get_loose_ref_cache(): new function

2017-03-31 Thread Michael Haggerty
Extract a new function, `get_loose_ref_cache()`, from get_loose_ref_dir(). The function returns the `ref_cache` for the loose refs of a `files_ref_store`. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 9 +++-- 1 file changed, 7 insertions(+), 2

[PATCH v2 06/20] ref-cache: rename `add_ref()` to `add_ref_entry()`

2017-03-31 Thread Michael Haggerty
This function's visibility is about to be increased, so give it a more distinctive name. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index

[PATCH v2 00/20] Separate `ref_cache` into a separate module

2017-03-31 Thread Michael Haggerty
This is v2 of this patch series. Thanks to Peff, Junio, Stefan and Ævar for their comments about v1 [1]. This version literally only contains a few commit message changes and one minor comment changes relative to v1. The code is identical. I wasn't sure whether it is even worth sending this patch

[PATCH v2 04/20] refs_verify_refname_available(): implement once for all backends

2017-03-31 Thread Michael Haggerty
It turns out that we can now implement `refs_verify_refname_available()` based on the other virtual functions, so there is no need for it to be defined at the backend level. Instead, define it once in `refs.c` and remove the `files_backend` definition. Signed-off-by: Michael Haggerty

[PATCH v2 09/20] refs: split `ref_cache` code into separate files

2017-03-31 Thread Michael Haggerty
The `ref_cache` code is currently too tightly coupled to `files-backend`, making the code harder to understand and making it awkward for new code to use `ref_cache` (as we indeed have planned). Start loosening that coupling by splitting `ref_cache` into a separate module. This commit moves code,

[PATCH v2 15/20] get_loose_ref_dir(): function renamed from get_loose_refs()

2017-03-31 Thread Michael Haggerty
The new name is more analogous to `get_packed_ref_dir()`. Signed-off-by: Michael Haggerty --- 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 0ff5df6b46..0a16f6196c 100644 ---

[PATCH v2 02/20] refs_read_raw_ref(): new function

2017-03-31 Thread Michael Haggerty
Extract a new function from `refs_resolve_ref_unsafe()`. It will be useful elsewhere. Signed-off-by: Michael Haggerty --- refs.c | 11 +-- refs/refs-internal.h | 4 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c

[PATCH v2 07/20] ref-cache: rename `find_ref()` to `find_ref_entry()`

2017-03-31 Thread Michael Haggerty
This function's visibility is about to be increased, so give it a more distinctive name. Signed-off-by: Michael Haggerty --- 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

[PATCH v2 05/20] refs_verify_refname_available(): use function in more places

2017-03-31 Thread Michael Haggerty
Change `lock_raw_ref()` and `lock_ref_sha1_basic()` to use `refs_verify_refname_available()` instead of `verify_refname_available_dir()`. This means that those callsites now check for conflicts with all references rather than just packed refs, but the performance cost shouldn't be significant (and

[PATCH v2 01/20] get_ref_dir(): don't call read_loose_refs() for "refs/bisect"

2017-03-31 Thread Michael Haggerty
Since references under "refs/bisect/" are per-worktree, they have to be sought in the worktree rather than in the main repository. But since loose references are found by traversing directories, the reference iterator won't even get the idea to look for a "refs/bisect/" directory in the worktree

[PATCH v2 03/20] refs_ref_iterator_begin(): new function

2017-03-31 Thread Michael Haggerty
Extract a new function from `do_for_each_ref()`. It will be useful elsewhere. Signed-off-by: Michael Haggerty --- refs.c | 15 +-- refs/refs-internal.h | 11 +++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/refs.c

[PATCH] status: show in-progress info for short status

2017-03-31 Thread Michael J Gruber
Ordinary (long) status shows information about bisect, revert, am, rebase, cherry-pick in progress, and so does git-prompt.sh. status --short currently shows none of this information. Introduce an `--inprogress` argument to git status so that, when used with `--short --branch`, in-progress

[PATCH v3 3/4] name-rev: provide debug output

2017-03-31 Thread Michael J Gruber
Currently, `git describe --contains --debug` does not create any debug output because it does not pass the flag down to `git name-rev`, which does not know that flag. Teach the latter that flag, so that the former can pass it down (in the following commit). The output is patterned after that of

[PATCH v3 4/4] describe: pass --debug down to name-rev

2017-03-31 Thread Michael J Gruber
Now that name-rev knows --debug, pass that flag down to name-rev when we call it for doing describe --contains. Signed-off-by: Michael J Gruber --- builtin/describe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/describe.c b/builtin/describe.c index

[PATCH v3 2/4] name-rev: favor describing with tags and use committer date to tiebreak

2017-03-31 Thread Michael J Gruber
From: Junio C Hamano "git name-rev" assigned a phony "far in the future" date to tips of refs that are not pointing at tag objects, and favored names based on a ref with the oldest date. This made it almost impossible for an unannotated tags and branches to be counted as a

  1   2   >