Re: RFC: Design and code of partial clones (now, missing commits and trees OK)

2017-09-18 Thread Junio C Hamano
Jonathan Tan writes: > For those interested in partial clones and/or missing objects in repos, > I've updated my original partialclone patches to not require an explicit > list of promises. Fetch/clone still only permits exclusion of blobs, but > the infrastructure is

Re: [OUTREACHY] pack: make packed_git_mru global a value instead of a pointer

2017-09-18 Thread Jeff King
On Mon, Sep 18, 2017 at 04:17:24PM -0700, Jonathan Nieder wrote: > phionah bugosi wrote: > > > Just to reecho a previous change requested before in one of the mail > > threads, we currently have two global variables declared: > > > > struct mru packed_git_mru_storage; > > struct mru

Re: [PATCH 2/2] read_info_alternates: warn on non-trivial errors

2017-09-18 Thread Jeff King
On Mon, Sep 18, 2017 at 07:46:24PM -0700, Jonathan Nieder wrote: > Jeff King wrote: > > > When we fail to open $GIT_DIR/info/alternates, we silently > > assume there are no alternates. This is the right thing to > > do for ENOENT, but not for other errors. > > > > A hard error is probably

Re: [PATCH 1/2] read_info_alternates: read contents into strbuf

2017-09-18 Thread Jeff King
On Mon, Sep 18, 2017 at 07:42:53PM -0700, Jonathan Nieder wrote: > Jeff King wrote: > > > Reported-by: Michael Haggerty > > Signed-off-by: Jeff King > > --- > > sha1_file.c | 29 + > > 1 file changed, 9 insertions(+), 20

Re: [PATCH 0/2] fix read past end of array in alternates files

2017-09-18 Thread Jeff King
On Mon, Sep 18, 2017 at 07:36:03PM -0700, Jonathan Nieder wrote: > Jeff King wrote: > > > This series fixes a regression in v2.11.1 where we might read past the > > end of an mmap'd buffer. It was introduced in cf3c635210, > > The above information is super helpful. Can it go in one of the

Re: [PATCH v2] Improve performance of git status --ignored

2017-09-18 Thread Junio C Hamano
Jameson Miller writes: > Improve the performance of the directory listing logic when it wants to list > non-empty ignored directories. In order to show non-empty ignored directories, > the existing logic will recursively iterate through all contents of an ignored >

Re: [PATCH] rev-parse: rev-parse: add --is-shallow-repository

2017-09-18 Thread Junio C Hamano
Jonathan Nieder writes: >> test_expect_success 'showing the superproject correctly' ' > > With the two tweaks mentioned above, > Reviewed-by: Jonathan Nieder I agree with the fixes to the test titles suggested, so I'll queue the patch with the fixes

Re: [PATCH] t/README: fix typo and grammatically improve a sentence

2017-09-18 Thread Junio C Hamano
Kaartic Sivaraam writes: > Signed-off-by: Kaartic Sivaraam > --- > t/README | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/t/README b/t/README > index 2f95860369751..4b079e4494d93 100644 > ---

Re: [RFC PATCH 0/2] Add named reference to latest push cert

2017-09-18 Thread Junio C Hamano
Junio C Hamano writes: > But the point is that we do not want such an overhead in core, as > all of that is a useless waste of the cycle for a site that wants to > store the push certificate away outside of the repository itself. By this I do not mean that cert blobs

Re: [PATCH v2 1/4] mktag: add option which allows the tagger field to be omitted

2017-09-18 Thread Junio C Hamano
Ian Campbell writes: > This can be useful e.g. in `filter-branch` when rewritting tags produced by > older versions of Git, such as v2.6.12-rc2..v2.6.13-rc3 in the Linux kernel > source tree: > > $ git cat-file tag v2.6.12-rc2 > object

Re: [PATCH 2/2] t9010-*.sh: skip all tests if the PIPE prereq is missing

2017-09-18 Thread Jonathan Nieder
Ramsay Jones wrote: > Every test in this file, except one, is marked with the PIPE prereq. > However, that lone test ('set up svn repo'), only performs some setup > work and checks whether the following test should be executed (by > setting an additional SVNREPO prerequisite). Since the following

Re: [PATCH 1/2] test-lib: use more compact expression in PIPE prerequisite

2017-09-18 Thread Jonathan Nieder
Ramsay Jones wrote: > Signed-off-by: Ramsay Jones > --- > t/test-lib.sh | 10 ++ > 1 file changed, 2 insertions(+), 8 deletions(-) Reviewed-by: Jonathan Nieder

Re: [PATCH 2/2] read_info_alternates: warn on non-trivial errors

2017-09-18 Thread Jonathan Nieder
Jeff King wrote: > When we fail to open $GIT_DIR/info/alternates, we silently > assume there are no alternates. This is the right thing to > do for ENOENT, but not for other errors. > > A hard error is probably overkill here. If we fail to read > an alternates file then either we'll complete our

Re: [PATCH 1/2] read_info_alternates: read contents into strbuf

2017-09-18 Thread Jonathan Nieder
Jeff King wrote: > Reported-by: Michael Haggerty > Signed-off-by: Jeff King > --- > sha1_file.c | 29 + > 1 file changed, 9 insertions(+), 20 deletions(-) Thanks for tracking it down. Reviewed-by: Jonathan Nieder

Re: [PATCH 0/2] fix read past end of array in alternates files

2017-09-18 Thread Jonathan Nieder
Jeff King wrote: > This series fixes a regression in v2.11.1 where we might read past the > end of an mmap'd buffer. It was introduced in cf3c635210, The above information is super helpful. Can it go in one of the commit messages? > but

Re: [PATCH] rev-parse: rev-parse: add --is-shallow-repository

2017-09-18 Thread Jonathan Nieder
Hi, Øystein Walle wrote: > Running `git fetch --unshallow` on a repo that is not in fact shallow > produces a fatal error message. Hm, can you say more about the context? From a certain point of view, it might make sense for that command to succeed instead: if the repo is already unshallow,

Re: What's cooking in git.git (Aug 2017, #05; Tue, 22)

2017-09-18 Thread Junio C Hamano
Johannes Schindelin writes: >> Do you have a concrete suggestion to make these individual entries more >> helpful for people who may want go back to the original thread in doing >> so? In-reply-to: or References: fields of the "What's cooking" report >> would not

Re: What's cooking in git.git (Sep 2017, #03; Fri, 15)

2017-09-18 Thread Junio C Hamano
Lars Schneider writes: > SZEDER noticing a bug in this series that I was about to fix: > https://public-inbox.org/git/3b175d35-5b1c-43cd-a7e9-85693335b...@gmail.com/ > > I assume at this point a new patch is better than a re-roll, right? Thanks, yes indeed.

Re: [RFC PATCH 0/2] Add named reference to latest push cert

2017-09-18 Thread Junio C Hamano
Santiago Torres writes: > - *if there is a hook* the blob is computed, but it is up to the > hook itself to store it *somewhere*. This makes me feel like it's > somewhat of a useless waste of computation if the hook is not > meant to handle it anyway(which

Re: [PATCH 1/3] sha1_name: Create perf test for find_unique_abbrev()

2017-09-18 Thread Junio C Hamano
Derrick Stolee writes: >> But I do not think we want this "clever" optimization that involves >> 'n' in the first place. + while (count++ < 10) { >>> + for (i = 0; i < n; i++) >>> + ((unsigned int*)oid.hash)[i] = hash_base; >> >> Does it

Re: [PATCH] describe: teach --match to handle branches and remotes

2017-09-18 Thread Jacob Keller
On Mon, Sep 18, 2017 at 4:52 PM, Junio C Hamano wrote: > Max Kirillov writes: > >> --match :: >> Only consider tags matching the given `glob(7)` pattern, >> - excluding the "refs/tags/" prefix. This can be used to avoid >> - leaking private

Re: [PATCH 1/2] read_info_alternates: read contents into strbuf

2017-09-18 Thread Junio C Hamano
Jeff King writes: > We could also just make a NUL-terminated copy of the input > bytes and operate on that. But since all but one caller > already is passing a string, instead let's just fix that > caller to provide NUL-terminated input in the first place, > by swapping out mmap

Re: [PATCH] for_each_string_list_item(): behave correctly for empty list

2017-09-18 Thread Stefan Beller
> I am hoping that this last one is not allowed and we can use the > "same condition is checked every time we loop" version that hides > the uglyness inside the macro. By which you are referring to Jonathans solution posted. Maybe we can combine the two solutions (checking for thelist to not be

Re: [PATCH] describe: teach --match to handle branches and remotes

2017-09-18 Thread Junio C Hamano
Max Kirillov writes: > --match :: > Only consider tags matching the given `glob(7)` pattern, > - excluding the "refs/tags/" prefix. This can be used to avoid > - leaking private tags from the repository. If given multiple times, a > - list of patterns will be

Re: [OUTREACHY] pack: make packed_git_mru global a value instead of a pointer

2017-09-18 Thread Jonathan Nieder
Hi, phionah bugosi wrote: > Just to reecho a previous change requested before in one of the mail > threads, we currently have two global variables declared: > > struct mru packed_git_mru_storage; > struct mru *packed_git_mru = _git_mru_storage; > > We normally use pointers in C to point or refer

Re: RFC v3: Another proposed hash function transition plan

2017-09-18 Thread Jonathan Nieder
Hi, Gilles Van Assche wrote: > Hi Johannes, >> SHA-256 got much more cryptanalysis than SHA3-256 […]. > > I do not think this is true. Keccak/SHA-3 actually got (and is still > getting) a lot of cryptanalysis, with papers published at renowned > crypto conferences [1]. > > Keccak/SHA-3 is

Re: RFC v3: Another proposed hash function transition plan

2017-09-18 Thread Johannes Schindelin
Hi Gilles, On Mon, 18 Sep 2017, Gilles Van Assche wrote: > > SHA-256 got much more cryptanalysis than SHA3-256 […]. > > I do not think this is true. Please read what I said again: SHA-256 got much more cryptanalysis than SHA3-256. I never said that SHA3-256 got little cryptanalysis.

Re: [PATCH 2/8] protocol: introduce protocol extention mechanisms

2017-09-18 Thread Stefan Beller
>> instead compared to the proposed configuration above. >> (Even better yet, then people could play around with "v1 only" >> and see how it falls apart on old servers) > > Except we can't start with an explicit whitelist because we must > fallback to v0 if v1 isn't supported otherwise we would

Re: [PATCH v2] add test for bug in git-mv for recursive submodules

2017-09-18 Thread Stefan Beller
>> Took a little while but here is a more clean patch creating individual >> submodules for the nesting. >> >> Cheers Heiko Thanks for writing this test! > > Thanks. Stefan, does this look good to you now? Yes, though there are nits below. > It is not quite clear which step is expected to

Re: [PATCH 2/8] protocol: introduce protocol extention mechanisms

2017-09-18 Thread Brandon Williams
On 09/18, Stefan Beller wrote: > >> From a users POV this may be frustrating as I would imagine that > >> people want to run > >> > >> git config --global protocol.version 2 > >> > >> to try it out and then realize that some of their hosts do not speak > >> 2, so they have to actually configure

Re: [PATCH 2/8] protocol: introduce protocol extention mechanisms

2017-09-18 Thread Stefan Beller
>> From a users POV this may be frustrating as I would imagine that >> people want to run >> >> git config --global protocol.version 2 >> >> to try it out and then realize that some of their hosts do not speak >> 2, so they have to actually configure it per repo/remote. > > The point would be to

RE: [PATCH v6 12/12] fsmonitor: add a performance test

2017-09-18 Thread Ben Peart
> -Original Message- > From: Johannes Schindelin [mailto:johannes.schinde...@gmx.de] > Sent: Monday, September 18, 2017 10:25 AM > To: Ben Peart > Cc: david.tur...@twosigma.com; ava...@gmail.com; > christian.cou...@gmail.com; git@vger.kernel.org;

Re: [RFC PATCH 0/2] Add named reference to latest push cert

2017-09-18 Thread Stefan Beller
On Mon, Sep 18, 2017 at 7:22 AM, Santiago Torres wrote: > Hello, everyone. > > Sorry for being late in this thread, I was making sure I didn't say > anything outrageously wrong. > >> That's Stefan; I wouldn't have suggested any approach that uses the >> blob whose sole purpose

Re: [PATCH] pack: make packed_git_mru global a value instead of a pointer

2017-09-18 Thread Stefan Beller
On Sun, Sep 17, 2017 at 1:44 PM, Christian Couder wrote: > On Sun, Sep 17, 2017 at 10:42 PM, Christian Couder > wrote: >> On Sun, Sep 17, 2017 at 10:17 PM, phionah bugosi wrote: >>> Signed-off-by: phionah bugosi

[PATCH v2] Improve performance of git status --ignored

2017-09-18 Thread Jameson Miller
Improve the performance of the directory listing logic when it wants to list non-empty ignored directories. In order to show non-empty ignored directories, the existing logic will recursively iterate through all contents of an ignored directory. This change introduces the optimization to stop

[PATCH v2] Improve performance of git status --ignored

2017-09-18 Thread Jameson Miller
This is the second version of my patches to improve handling of ignored files I have decided to break the original patch series into two parts: 1) Perf improvements to handling ignored directories 2) Expose extra options to control which ignored files are displayed by git status. This patch

[OUTREACHY] pack: make packed_git_mru global a value instead of a pointer

2017-09-18 Thread phionah bugosi
Just to reecho a previous change requested before in one of the mail threads, we currently have two global variables declared: struct mru packed_git_mru_storage; struct mru *packed_git_mru = _git_mru_storage; We normally use pointers in C to point or refer to the same location or space in

[PATCH] rev-parse: rev-parse: add --is-shallow-repository

2017-09-18 Thread Øystein Walle
Running `git fetch --unshallow` on a repo that is not in fact shallow produces a fatal error message. Add a helper to rev-parse that scripters can use to determine whether a repo is shallow or not. Signed-off-by: Øystein Walle --- Documentation/git-rev-parse.txt | 3 +++

Re: [PATCH 2/8] protocol: introduce protocol extention mechanisms

2017-09-18 Thread Brandon Williams
On 09/13, Stefan Beller wrote: > On Wed, Sep 13, 2017 at 2:54 PM, Brandon Williams wrote: > > Create protocol.{c,h} and provide functions which future servers and > > clients can use to determine which protocol to use or is being used. > > > > Also introduce the 'GIT_PROTOCOL'

Re: [PATCH 3/8] daemon: recognize hidden request arguments

2017-09-18 Thread Brandon Williams
On 09/13, Stefan Beller wrote: > On Wed, Sep 13, 2017 at 2:54 PM, Brandon Williams wrote: > > A normal request to git-daemon is structured as > > "command path/to/repo\0host=..\0" and due to a bug in an old version of > > git-daemon 73bb33a94 (daemon: Strictly parse the "extra

Re: [PATCH 2/4] push, fetch: error out for submodule entries not pointing to commits

2017-09-18 Thread Brandon Williams
On 09/12, Jonathan Nieder wrote: > From: Stefan Beller > > The check_has_commit helper uses resolves a submodule entry to a > commit, when validating its existence. As a side effect this means > tolerates a submodule entry pointing to a tag, which is not a valid > submodule

Re: [RFC PATCH v2 1/2] implement fetching of moved submodules

2017-09-18 Thread Brandon Williams
On 09/15, Heiko Voigt wrote: > We store the changed submodules paths to calculate which submodule needs > fetching. This does not work for moved submodules since their paths do > not stay the same in case of a moved submodules. In case of new > submodules we do not have a path in the current

Re: [RFC PATCH v2 2/2] submodule: simplify decision tree whether to or not to fetch

2017-09-18 Thread Brandon Williams
On 09/15, Heiko Voigt wrote: > To make extending this logic later easier. > > Signed-off-by: Heiko Voigt I like the result of this patch, its much cleaner. > --- > submodule.c | 74 > ++--- > 1 file changed, 37

Re: [PATCH] protocol: make parse_protocol_version() private

2017-09-18 Thread Brandon Williams
On 09/17, Ramsay Jones wrote: > > Signed-off-by: Ramsay Jones > --- > > Hi Brandon, > > If you need to re-roll your 'bw/protocol-v1' branch, could you please > squash this into the relevant patch (commit 45954f179e, "protocol: > introduce protocol extention

RE: [PATCH v6 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-18 Thread Ben Peart
> -Original Message- > From: Torsten Bögershausen [mailto:tbo...@web.de] > Sent: Monday, September 18, 2017 11:43 AM > To: Ben Peart ; Junio C Hamano > ; Ben Peart > Cc: david.tur...@twosigma.com; ava...@gmail.com; >

[PATCH 2/2] read_info_alternates: warn on non-trivial errors

2017-09-18 Thread Jeff King
When we fail to open $GIT_DIR/info/alternates, we silently assume there are no alternates. This is the right thing to do for ENOENT, but not for other errors. A hard error is probably overkill here. If we fail to read an alternates file then either we'll complete our operation anyway, or we'll

[PATCH 1/2] read_info_alternates: read contents into strbuf

2017-09-18 Thread Jeff King
The link_alt_odb_entries() function has always taken a ptr/len pair as input. Until cf3c635210 (alternates: accept double-quoted paths, 2016-12-12), we made a copy of those bytes in a string. But after that commit, we switched to parsing the input left-to-right, and we ignore "len" totally,

[PATCH 0/2] fix read past end of array in alternates files

2017-09-18 Thread Jeff King
This series fixes a regression in v2.11.1 where we might read past the end of an mmap'd buffer. It was introduced in cf3c635210, but I didn't base the patch on there, for a few reasons: 1. There's a trivial conflict when merging up (because of git_open_noatime() becoming just git_open() in

Re: [PATCH v6 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-18 Thread Torsten Bögershausen
On 2017-09-18 15:38, Ben Peart wrote: > > > On 9/17/2017 4:02 AM, Junio C Hamano wrote: >> Ben Peart writes: >> >>> diff --git a/t/helper/test-dump-fsmonitor.c b/t/helper/test-dump-fsmonitor.c >>> new file mode 100644 >>> index 00..482d749bb9 >>> --- /dev/null

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-18 Thread Ben Peart
On 9/17/2017 12:47 AM, Junio C Hamano wrote: Ben Peart writes: +write_integration_script() { + write_script .git/hooks/fsmonitor-test<<-\EOF + if [ "$#" -ne 2 ]; then + echo "$0: exactly 2 arguments expected" + exit 2 +

Re: What's cooking in git.git (Aug 2017, #05; Tue, 22)

2017-09-18 Thread Johannes Schindelin
Hi Junio, On Sat, 16 Sep 2017, Junio C Hamano wrote: > And as you alluded to, we may need to see if we can help making it > easier to do the latter when needed. That mistakes it for "Someone Else's Problem". > Johannes Schindelin writes: > > > That's what you are

Re: [PATCH v6 12/12] fsmonitor: add a performance test

2017-09-18 Thread Johannes Schindelin
Hi Ben, sorry for not catching this earlier: On Fri, 15 Sep 2017, Ben Peart wrote: > [...] > + > +int cmd_dropcaches(void) > +{ > + HANDLE hProcess = GetCurrentProcess(); > + HANDLE hToken; > + int status; > + > + if (!OpenProcessToken(hProcess, TOKEN_QUERY |

Re: [RFC PATCH 0/2] Add named reference to latest push cert

2017-09-18 Thread Santiago Torres
Hello, everyone. Sorry for being late in this thread, I was making sure I didn't say anything outrageously wrong. > That's Stefan; I wouldn't have suggested any approach that uses the > blob whose sole purpose is to serve as a temporary storage area to > pass the information to the hook as part

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-18 Thread Ben Peart
On 9/16/2017 11:27 AM, Torsten Bögershausen wrote: On 2017-09-15 21:20, Ben Peart wrote: +if [ "$1" != 1 ] +then + echo -e "Unsupported core.fsmonitor hook version.\n" >&2 + exit 1 +fi The echo -e not portable (It was detected by a tighter version of the lint script, which I

Re: [PATCH v6 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-18 Thread Ben Peart
On 9/18/2017 9:32 AM, David Turner wrote: -Original Message- From: Ben Peart [mailto:peart...@gmail.com] Sent: Monday, September 18, 2017 9:07 AM To: David Turner ; 'Ben Peart' Cc: ava...@gmail.com; christian.cou...@gmail.com;

Re: [PATCH v6 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-18 Thread Ben Peart
On 9/17/2017 4:02 AM, Junio C Hamano wrote: Ben Peart writes: diff --git a/t/helper/test-dump-fsmonitor.c b/t/helper/test-dump-fsmonitor.c new file mode 100644 index 00..482d749bb9 --- /dev/null +++ b/t/helper/test-dump-fsmonitor.c @@ -0,0 +1,21 @@ +#include

Re: [PATCH] t2018: remove unwanted empty line

2017-09-18 Thread Kaartic Sivaraam
On Monday 18 September 2017 12:52 AM, Kevin Daudt wrote: Why is this empty line unwanted? This kind of whitespace can help separate logical sections, just like paragraphs would. You're right. I seem to have sent a fix precariously because I haven't such separation before (forgetting the fact

RE: [PATCH v6 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-18 Thread David Turner
> -Original Message- > From: Ben Peart [mailto:peart...@gmail.com] > Sent: Monday, September 18, 2017 9:07 AM > To: David Turner ; 'Ben Peart' > > Cc: ava...@gmail.com; christian.cou...@gmail.com; git@vger.kernel.org; > gits...@pobox.com;

Re: [PATCH v6 05/12] fsmonitor: add documentation for the fsmonitor extension.

2017-09-18 Thread Ben Peart
On 9/17/2017 4:03 AM, Junio C Hamano wrote: Ben Peart writes: +[[fsmonitor-watchman]] +fsmonitor-watchman +~~~ I've queued a mini squash on top to make sure the line aligns with the length of the string above it by adding three ~'s here. Thanks,

Re: [PATCH v6 05/12] fsmonitor: add documentation for the fsmonitor extension.

2017-09-18 Thread Ben Peart
On 9/15/2017 3:43 PM, David Turner wrote: -Original Message- From: Ben Peart [mailto:benpe...@microsoft.com] Sent: Friday, September 15, 2017 3:21 PM To: benpe...@microsoft.com Cc: David Turner ; ava...@gmail.com; christian.cou...@gmail.com;

Re: [PATCH v6 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-18 Thread Ben Peart
Thanks for taking the time to review/provide feedback! On 9/15/2017 5:35 PM, David Turner wrote: -Original Message- From: Ben Peart [mailto:benpe...@microsoft.com] Sent: Friday, September 15, 2017 3:21 PM To: benpe...@microsoft.com Cc: David Turner ;

Re: [PATCH] test-drop-caches: mark file local symbols with static

2017-09-18 Thread Ben Peart
On 9/17/2017 12:14 PM, Ramsay Jones wrote: Signed-off-by: Ramsay Jones --- Hi Ben, If you need to re-roll your 'bp/fsmonitor' branch, could you please squash this into the relevant patch (commit c6b5a28941, "fsmonitor: add a performance test", 15-09-2017).

Re: RFC v3: Another proposed hash function transition plan

2017-09-18 Thread Gilles Van Assche
Hi Johannes, > SHA-256 got much more cryptanalysis than SHA3-256 […]. I do not think this is true. Keccak/SHA-3 actually got (and is still getting) a lot of cryptanalysis, with papers published at renowned crypto conferences [1]. Keccak/SHA-3 is recognized to have a significant safety margin.

Re: [PATCH 1/3] sha1_name: Create perf test for find_unique_abbrev()

2017-09-18 Thread Derrick Stolee
On 9/17/2017 5:51 PM, Junio C Hamano wrote: Derrick Stolee writes: +int cmd_main(int ac, const char **av) +{ + setup_git_directory(); As far as I recall, we do not (yet) allow declaration after statement in our codebase. Move this down to make it after all

BUSINESS PROPOSAL

2017-09-18 Thread LING LUNG
Please I like you to keep this proposal as a top secret and delete it if you are not interested and get back to me if you are interested for details as regards to the transfer of $24,500,000 to you. This money initially belongs to a Libyan client who died in the libya crisis and had no