Bad refspec messes up bundle.

2018-03-19 Thread Luciano Joublanc
Yesterday I created a git bundle as best as I can remember like this git bundle save chunk chunk.bundle --all master Note the 'master' I added accidentally at the end - this was a user error but still the bundle was created. When I tried to clone this, I get ~\local\src> git clone 'G:\My Drive\

Re: [PATCH 04/36] t/helper: merge test-lazy-init-name-hash into test-tool

2018-03-19 Thread Jeff Hostetler
On 3/18/2018 4:47 AM, Eric Sunshine wrote: On Sun, Mar 18, 2018 at 4:25 AM, Duy Nguyen wrote: On Sun, Mar 18, 2018 at 3:11 AM, Eric Sunshine wrote: On Sat, Mar 17, 2018 at 3:53 AM, Nguyễn Thái Ngọc Duy wrote: -extern int test_lazy_init_name_hash(struct index_state *istate, int try_thread

Re: [PATCH 0/2] routines to generate JSON data

2018-03-19 Thread Jeff Hostetler
On 3/16/2018 5:18 PM, Jeff King wrote: On Fri, Mar 16, 2018 at 07:40:55PM +, g...@jeffhostetler.com wrote: [...] I really like the idea of being able to send our machine-readable output in some "standard" syntax for which people may already have parsers. But one big hangup with JSON is t

大订单的量产地---第10届日本国际促销品展Promotional Goods Expo

2018-03-19 Thread LIFESTYLE EXPO TOKYO (Former: GIFTEX TOKYO) Show Management
Zhejiang Wuchuan Industrial Co., Ltd 尊敬的 市场经理 先生/女士, 您好! 这里是日本国际促销品展展会主办方。 贵司是否在寻找能接到大批量订单的市场和展会? 那么您一定不能错过日本的促销品市场。 如动漫明星周边,杂志赠品,日本各大品牌赠品/包装等均是促销品的范畴。 想要遇见目标客户客户,相信日本最大的促销品展会日本国际促销品展将是您最好的选择。 为什么日本国际促销品展能接到大批量订单? 理由一: 日本大部分促销品属于赠品/附赠品,因此买家基本无需考虑在库风险。 只要

[BUG] log --graph corrupts patch

2018-03-19 Thread Phillip Wood
I've just been reviewing some patches with 'git log --graph --patch' and came across what looked like a bug: | @@ -272,6 +272,9 @@ do | --keep-empty) | keep_empty=yes | ;; | --allow-empty-message) | + --no-keep-empty) | + keep_empty= | +

multimail/p4: issues identified by lgtm.com

2018-03-19 Thread Johannes Schindelin
Hi team, while Coverity was down (it still is not reachable for me, but I guess that's just because everybody and their dog wants to catch up on a month of work delayed by their outage), I tried to find alternatives, and one of them is lgtm.com. Their C/C++ support is not generally available yet,

Re: [PATCH 3/3] Makefile: optionally symlink libexec/git-core binaries to bin/git

2018-03-19 Thread Johannes Schindelin
Hi Ævar, On Fri, 16 Mar 2018, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Mar 16 2018, Johannes Schindelin jotted: > > > On Thu, 15 Mar 2018, Linus Torvalds wrote: > > > >> We do end up still using the dashed form for certain things, but they > >> are already special-cased (ie things like "git-r

Re: [PATCH v6 00/14] Serialized Git Commit Graph

2018-03-19 Thread Johannes Schindelin
Hi Junio, On Fri, 16 Mar 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > > I understand that it is a trade-off between time you have to spend and > > that others have to spend, and since you do not scale, that trade-off > > has to be in your favor. > > That tradeoff may exist, bu

Re: [PATCH v6 00/14] Serialized Git Commit Graph

2018-03-19 Thread Derrick Stolee
On 3/16/2018 4:19 PM, Jeff King wrote: On Fri, Mar 16, 2018 at 04:06:39PM -0400, Jeff King wrote: Furthermore, in order to look at an object it has to be zlib inflated first, and since commit objects tend to be much smaller than trees and especially blobs, there are a lot less bytes to inflat

RE: getting fatal error trying to open git gui

2018-03-19 Thread Briggs, John
I used Git-2.16.2-64-bit.exe to install. I used all defaults except for editor, where I chose Notpad++. John -Original Message- From: Bryan Turner Sent: Friday, March 16, 2018 3:22 PM To: Briggs, John Cc: Jonathan Nieder ; git@vger.kernel.org; git-for-wind...@googlegroups.com Subject

[PATCH v3 1/5] ref-filter: start adding strbufs with errors

2018-03-19 Thread Olga Telezhnaya
This is a first step in removing any printing from ref-filter formatting logic, so that it could be more general. Everything would be the same for show_ref_array_item() users. But, if you want to deal with errors by your own, you could invoke format_ref_array_item(). It means that you need to print

[PATCH v3 5/5] ref-filter: get_ref_atom_value() error handling

2018-03-19 Thread Olga Telezhnaya
Finish removing any printing from ref-filter formatting logic, so that it could be more general. Change the signature of get_ref_atom_value() and underlying functions by adding return value and strbuf parameter for error message. Some die() calls are left; all of them are not for users, but for G

[PATCH v3 2/5] ref-filter: add return value && strbuf to handlers

2018-03-19 Thread Olga Telezhnaya
Continue removing any printing from ref-filter formatting logic, so that it could be more general. Change the signature of handlers by adding return value and strbuf parameter for errors. Signed-off-by: Olga Telezhnaia --- ref-filter.c | 71 --

[PATCH v3 3/5] ref-filter: change parsing function error handling

2018-03-19 Thread Olga Telezhnaya
Continue removing any printing from ref-filter formatting logic, so that it could be more general. Change the signature of parse_ref_filter_atom() by adding strbuf parameter for error message. Return value means the same except negative values: they indicate errors (previous version could return o

[PATCH v3 4/5] ref-filter: add return value to parsers

2018-03-19 Thread Olga Telezhnaya
Continue removing any printing from ref-filter formatting logic, so that it could be more general. Change the signature of parsers by adding return value and strbuf parameter for error message. Signed-off-by: Olga Telezhnaia --- ref-filter.c | 177 +++

Re: [PATCH v6 00/14] Serialized Git Commit Graph

2018-03-19 Thread Derrick Stolee
On 3/16/2018 12:28 PM, Lars Schneider wrote: On 14 Mar 2018, at 21:43, Junio C Hamano wrote: Derrick Stolee writes: Hopefully this version is ready to merge. I have several follow-up topics in mind to submit soon after, including: A few patches add trailing blank lines and other whitespa

Re: [PATCH v6 12/14] commit-graph: read only from specific pack-indexes

2018-03-19 Thread Derrick Stolee
On 3/15/2018 6:50 PM, SZEDER Gábor wrote: On Wed, Mar 14, 2018 at 8:27 PM, Derrick Stolee wrote: From: Derrick Stolee Teach git-commit-graph to inspect the objects only in a certain list of pack-indexes within the given pack directory. This allows updating the commit graph iteratively. This

Re: [PATCH v6 07/14] commit-graph: implement 'git-commit-graph write'

2018-03-19 Thread Derrick Stolee
On 3/18/2018 9:25 AM, Ævar Arnfjörð Bjarmason wrote: On Wed, Mar 14 2018, Derrick Stolee jotted: +'git commit-graph write' [--object-dir ] + + +DESCRIPTION +--- + +Manage the serialized commit graph file. + + +OPTIONS +--- +--object-dir:: + Use given directory for the locatio

Re: [PATCH 15/40] external-odb: add script mode support

2018-03-19 Thread Christian Couder
On Thu, Jan 4, 2018 at 8:55 PM, Jeff Hostetler wrote: > > On 1/3/2018 11:33 AM, Christian Couder wrote: >> >> diff --git a/odb-helper.c b/odb-helper.c >> index 4b70b287af..c1a3443dc7 100644 >> --- a/odb-helper.c >> +++ b/odb-helper.c >> @@ -21,13 +21,124 @@ struct odb_helper_cmd { >> struc

Re: [PATCH 28/40] pack-objects: don't pack objects in external odbs

2018-03-19 Thread Christian Couder
On Thu, Jan 4, 2018 at 9:54 PM, Jeff Hostetler wrote: > > On 1/3/2018 11:33 AM, Christian Couder wrote: >> >> Objects managed by an external ODB should not be put into >> pack files. They should be transfered using other mechanism >> that can be specific to the external odb. >> >> Signed-off-by: C

[PATCH v2 05/36] external-odb: implement external_odb_get_direct

2018-03-19 Thread Christian Couder
This is implemented only in the promisor remote mode for now by calling fetch_object(). Signed-off-by: Christian Couder --- external-odb.c | 15 +++ external-odb.h | 1 + odb-helper.c | 13 + odb-helper.h | 3 ++- 4 files changed, 31 insertions(+), 1 deletion(-) di

[PATCH v2 01/36] Add initial external odb support

2018-03-19 Thread Christian Couder
The external-odb.{c,h} files will contain the functions that are called by the rest of Git mostly from "sha1_file.c" to access the objects managed by the external odbs. The odb-helper.{c,h} files will contain the functions to actually implement communication with either the internal functions or t

[PATCH v2 06/36] sha1_file: prepare for external odbs

2018-03-19 Thread Christian Couder
In the following commits we will need some functions that were internal to sha1_file.c, so let's first make them non static and declare them in "cache.h". While at it, let's rename 'create_tmpfile()' to 'create_object_tmpfile()' to make its name less generic. Let's also split out 'sha1_file_name_a

[PATCH v2 02/36] sha1_file: add prepare_external_alt_odb()

2018-03-19 Thread Christian Couder
This new function adds the external odb cache to all the other odbs. Signed-off-by: Christian Couder --- cache.h | 1 + sha1_file.c | 17 + 2 files changed, 18 insertions(+) diff --git a/cache.h b/cache.h index d06932ed0b..2ac7d63e5c 100644 --- a/cache.h +++ b/cache.h @@ -1

[PATCH v2 04/36] external-odb: add has_external_odb()

2018-03-19 Thread Christian Couder
This function will be used to check if the external odb mechanism is actually used. Signed-off-by: Christian Couder --- external-odb.c | 7 +++ external-odb.h | 1 + 2 files changed, 8 insertions(+) diff --git a/external-odb.c b/external-odb.c index 390958dbfe..d26e63d8b1 100644 --- a/exter

[PATCH v2 07/36] odb-helper: add 'enum odb_helper_type'

2018-03-19 Thread Christian Couder
As there will be different kinds of helpers, let's add an "enum odb_helper_type" to tell between the different kinds. Let's add a field with this type in "struct odb_helper", and set it when reading the config file. While at it let's also make it possible to find an helper of a specific kind by a

[PATCH v2 16/36] t0500: add 'put_raw_obj' instruction to odb-helper script

2018-03-19 Thread Christian Couder
To properly test passing objects from Git to an external odb we need an odb-helper script that supports a 'put' capability/instruction. For now we will support only sending raw blobs, so the supported capability/instruction will be 'put_raw_obj'. While at it let's add a test to check that our odb

[PATCH v2 18/36] external-odb: accept only blobs for now

2018-03-19 Thread Christian Couder
The mechanism to decide which blobs should be sent to which external object database will be very simple for now. If the external odb helper support any "put_*" instruction all the new blobs will be sent to it. Signed-off-by: Christian Couder --- external-odb.c | 4 1 file changed, 4 insert

[PATCH v2 13/36] Use external_odb_get_direct() and has_external_odb()

2018-03-19 Thread Christian Couder
Instead of using the repository_format_partial_clone global and fetch_object() directly, let's use has_external_odb() and external_odb_get_direct(). Signed-off-by: Christian Couder --- builtin/cat-file.c| 5 +++-- builtin/fetch.c | 11 ++- builtin/gc.c

[PATCH v2 12/36] external-odb: add external_odb_get_many_direct()

2018-03-19 Thread Christian Couder
Signed-off-by: Christian Couder --- external-odb.c | 17 + external-odb.h | 1 + odb-helper.c | 16 odb-helper.h | 2 ++ 4 files changed, 36 insertions(+) diff --git a/external-odb.c b/external-odb.c index ae6bc017fe..8be92277d2 100644 --- a/external-odb.c

[PATCH v2 17/36] external odb: add 'put_raw_obj' support

2018-03-19 Thread Christian Couder
Add support for a 'put_raw_obj' capability/instruction to send new objects to an external odb. Objects will be sent as they are (in their 'raw' format). They will not be converted to Git objects. For now any new Git object (blob, tree, commit, ...) would be sent if 'put_raw_obj' is supported by an

[PATCH v2 00/36] Promisor remotes and external ODB support

2018-03-19 Thread Christian Couder
This is a follow up from an early patch series at the beginning of the year that started to integrate the jh/fsck-promisors patch series with the external odb patch series. A lot of things are different because the jh/fsck-promisors and jh/partial-clone have been merged into master since the v1. S

[PATCH v2 03/36] Add GIT_NO_EXTERNAL_ODB env variable

2018-03-19 Thread Christian Couder
This new environment variable will be used to perform git commands without involving any external odb mechanism. This makes it possible for example to create new blobs that will not be sent to an external odb even if the external odb supports "put_*" instructions. Signed-off-by: Christian Couder

[PATCH v2 14/36] Use odb.origin.partialclonefilter instead of core.partialclonefilter

2018-03-19 Thread Christian Couder
Let's make the partial clone filter specific to one odb instead of general to all the odbs. This makes it possible to have different partial clone filters for different odbs. Signed-off-by: Christian Couder --- builtin/fetch.c | 2 +- external-odb.c| 2 ++ list-o

[PATCH v2 26/36] pack-objects: don't pack objects in external odbs

2018-03-19 Thread Christian Couder
Objects managed by an external ODB should not be put into pack files. They should be transfered using other mechanism that can be specific to the external odb. Signed-off-by: Christian Couder --- builtin/pack-objects.c | 4 1 file changed, 4 insertions(+) diff --git a/builtin/pack-objects.

[PATCH v2 22/36] lib-httpd: add upload.sh

2018-03-19 Thread Christian Couder
This cgi will be used to upload objects to, or to delete objects from, an apache web server. This way the apache server can work as an external object database. Signed-off-by: Christian Couder --- t/lib-httpd.sh| 1 + t/lib-httpd/upload.sh | 45 +

[PATCH v2 27/36] Add t0520 to test transfer to HTTP external odb

2018-03-19 Thread Christian Couder
This tests that an apache web server can be used as an external object database and store files in their native format instead of converting them to a Git object. Signed-off-by: Christian Couder --- t/t0520-transfer-http-e-odb.sh | 142 + 1 file changed, 142 inser

[PATCH v2 21/36] lib-httpd: pass config file to start_httpd()

2018-03-19 Thread Christian Couder
This makes it possible to start an apache web server with different config files. This will be used in a later patch to pass a config file that makes apache store external objects. Signed-off-by: Christian Couder --- t/lib-httpd.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) di

[PATCH v2 30/36] Add t0560 to test passing git objects

2018-03-19 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t0560-read-object-git.sh | 28 ++ t/t0560/read-object-git| 78 ++ 2 files changed, 106 insertions(+) create mode 100755 t/t0560-read-object-git.sh create mode 100755 t/t0560/read-object-git diff --git a/t

[PATCH v2 36/36] Add Documentation/technical/external-odb.txt

2018-03-19 Thread Christian Couder
This describes the external odb mechanism's purpose and how it works. Helped-by: Ben Peart Signed-off-by: Christian Couder --- Documentation/technical/external-odb.txt | 342 +++ 1 file changed, 342 insertions(+) create mode 100644 Documentation/technical/external-odb.txt

[PATCH v2 34/36] Add t0580 to test "have" capability and raw objects

2018-03-19 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t0580-read-object-have-http-e-odb.sh | 109 + t/t0580/read-object-plain-have | 103 +++ 2 files changed, 212 insertions(+) create mode 100755 t/t0580-read-object-have-http-e-odb.sh create mode 100755 t/t05

[PATCH v2 35/36] external-odb: use 'odb=magic' attribute to mark odb blobs

2018-03-19 Thread Christian Couder
To tell which blobs should be sent to the "magic" external odb, let's require that the blobs be marked using the 'odb=magic' attribute. Signed-off-by: Christian Couder --- external-odb.c | 25 ++--- external-odb.h | 3 ++- sha1

[PATCH v2 32/36] Add t0570 to test passing raw objects

2018-03-19 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t0570-read-object-http-e-odb.sh | 109 ++ t/t0570/read-object-plain | 83 +++ 2 files changed, 192 insertions(+) create mode 100755 t/t0570-read-object-http-e-odb.sh create mode 100755 t/t0570/read-ob

[PATCH v2 11/36] odb-helper: add odb_helper_init() to send 'init' instruction

2018-03-19 Thread Christian Couder
Let's add an odb_helper_init() function to send an 'init' instruction to the helpers. This 'init' instruction is especially useful to get the capabilities that are supported by the helpers. So while at it, let's also add a parse_capabilities() function to parse them and a supported_capabilities va

[PATCH v2 33/36] odb-helper: add have_object_process()

2018-03-19 Thread Christian Couder
This adds the infrastructure to handle 'have' instructions in process mode. The answer from the helper sub-process should be like the output in script mode, that is lines like this: sha1 SPACE size SPACE type NEWLINE Signed-off-by: Christian Couder --- odb-helper.c | 74 +++

[PATCH v2 31/36] odb-helper: add put_object_process()

2018-03-19 Thread Christian Couder
This adds the infrastructure to send objects to a sub-process handling the communication with an external odb. For now we only handle sending raw blobs using the 'put_raw_obj' instruction. Signed-off-by: Christian Couder --- odb-helper.c | 78

[PATCH v2 15/36] external-odb: add 'get_direct' support

2018-03-19 Thread Christian Couder
This implements the 'get_direct' capability/instruction that makes it possible for external odb helper scripts to pass blobs to Git by directly writing them as loose objects files. It is better to call this a "direct" mode rather than a "fault-in" mode as we could have the same kind of mechanism t

[PATCH v2 28/36] odb-helper: add init_object_process()

2018-03-19 Thread Christian Couder
This adds the infrastructure to launch and use long running sub-processes as external odb helpers. For now only the 'init' and 'get_direct' capabilities are supported with sub-processes. Signed-off-by: Christian Couder --- external-odb.c | 46 +++-- odb-helper.c | 498 +++

[PATCH v2 25/36] odb-helper: add odb_helper_get_raw_object()

2018-03-19 Thread Christian Couder
The existing odb_helper_get_object() is renamed odb_helper_get_git_object() and a new odb_helper_get_raw_object() is introduced to deal with external objects that are not in Git format. Signed-off-by: Christian Couder --- odb-helper.c | 113 ++- 1

[PATCH v2 29/36] Add t0550 to test 'get_direct' mechanism

2018-03-19 Thread Christian Couder
From: Ben Peart Signed-off-by: Ben Peart Signed-off-by: Christian Couder --- t/t0550-read-object.sh | 28 + t/t0550/read-object| 68 ++ 2 files changed, 96 insertions(+) create mode 100755 t/t0550-read-object.sh create mode 100755 t

[PATCH v2 23/36] lib-httpd: add list.sh

2018-03-19 Thread Christian Couder
This cgi script can list Git objects that have been uploaded as files to an apache web server. This script can also retrieve the content of each of these files. This will help make apache work as an external object database. Signed-off-by: Christian Couder --- t/lib-httpd.sh | 1 + t/lib-

[PATCH v2 19/36] t0500: add test for external odb write support

2018-03-19 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t0500-external-odb.sh | 8 1 file changed, 8 insertions(+) diff --git a/t/t0500-external-odb.sh b/t/t0500-external-odb.sh index 4ccca1e965..f924de870f 100755 --- a/t/t0500-external-odb.sh +++ b/t/t0500-external-odb.sh @@ -69,4 +69,12 @@ test_expect_

[PATCH v2 24/36] lib-httpd: add apache-e-odb.conf

2018-03-19 Thread Christian Couder
This is an apache config file to test external object databases. It uses the upload.sh and list.sh cgi that have been added previously to make apache store external objects. Signed-off-by: Christian Couder --- t/lib-httpd/apache-e-odb.conf | 214 ++ 1 file changed

[PATCH v2 20/36] Add t0510 to test external ODB transfer

2018-03-19 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t0510-transfer-e-odb.sh | 144 ++ 1 file changed, 144 insertions(+) create mode 100755 t/t0510-transfer-e-odb.sh diff --git a/t/t0510-transfer-e-odb.sh b/t/t0510-transfer-e-odb.sh new file mode 100755 index 00..06

[PATCH v2 10/36] odb-helper: add 'script_mode' to 'struct odb_helper'

2018-03-19 Thread Christian Couder
to prepare for having a long running odb helper sub-process handling the communication between Git and an external odb. We introduce "odb..subprocesscommand" to make it possible to define such a sub-process, and we mark such odb helpers with the new 'script_mode' field set to 0. Helpers defined u

[PATCH v2 09/36] external-odb: add script mode support

2018-03-19 Thread Christian Couder
This adds support for the script command mode where an helper script or command is called to retrieve or manage objects. This implements the 'have' and 'get_git_obj' instructions for the script mode. Signed-off-by: Christian Couder --- external-odb.c | 55 +- external-odb.h

[PATCH v2 08/36] external-odb: add external_odb_reinit()

2018-03-19 Thread Christian Couder
As we will need to reinitialize the list of odb helpers from the config file, let's add external_odb_reinit() for that purpose. Signed-off-by: Christian Couder --- external-odb.c | 14 -- external-odb.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/external-

RE: getting fatal error trying to open git gui

2018-03-19 Thread Johannes Schindelin
Hi John, On Mon, 19 Mar 2018, Briggs, John wrote: > I used Git-2.16.2-64-bit.exe to install. I used all defaults except for > editor, where I chose Notpad++. If your Git GUI mentions something funny about the version string when run as normal user, but not when run as administrator, I do suspect

Re: multimail/p4: issues identified by lgtm.com

2018-03-19 Thread Matthieu Moy
Johannes Schindelin writes: > Hi team, > > while Coverity was down (it still is not reachable for me, but I guess > that's just because everybody and their dog wants to catch up on a month > of work delayed by their outage), I tried to find alternatives, and one of > them is lgtm.com. Their C/C++

Re: [PATCH v6 07/14] commit-graph: implement 'git-commit-graph write'

2018-03-19 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 19 2018, Derrick Stolee jotted: > On 3/18/2018 9:25 AM, Ævar Arnfjörð Bjarmason wrote: >> On Wed, Mar 14 2018, Derrick Stolee jotted: >> >>> +'git commit-graph write' [--object-dir ] >>> + >>> + >>> +DESCRIPTION >>> +--- >>> + >>> +Manage the serialized commit graph file. >>>

[PATCH] filter-branch: use printf instead of echo -e

2018-03-19 Thread Michele Locati
In order to echo a tab character, it's better to use printf instead of "echo -e", because it's more portable (for instance, "echo -e" doesn't work as expected on a Mac). This solves the "fatal: Not a valid object name" error in git-filter-branch when using the --state-branch option. Signed-off-by

Re: [PATCH 1/1] Fix typo in merge-strategies documentation

2018-03-19 Thread Johannes Schindelin
Hi David, On Sat, 17 Mar 2018, David Pursehouse wrote: > diff --git a/Documentation/merge-strategies.txt > b/Documentation/merge-strategies.txt > index fd5d748d1..4a58aad4b 100644 > --- a/Documentation/merge-strategies.txt > +++ b/Documentation/merge-strategies.txt > @@ -40,7 +40,7 @@ the other

Re: [PATCH v3 0/2] stash push -u -- fixes

2018-03-19 Thread Marc Strapetz
On 16.03.2018 21:43, Thomas Gummerer wrote: Thanks Marc for catching the regression I almost introduced and Junio for the review of the second patch. Here's a re-roll that should fix the issues of v2. Thanks, existing issues are fixed, but cleanup of the stashed files seems to not work proper

Re: [PATCH 04/36] t/helper: merge test-lazy-init-name-hash into test-tool

2018-03-19 Thread Duy Nguyen
On Mon, Mar 19, 2018 at 10:40 AM, Jeff Hostetler wrote: > > > On 3/18/2018 4:47 AM, Eric Sunshine wrote: >> >> On Sun, Mar 18, 2018 at 4:25 AM, Duy Nguyen wrote: >>> >>> On Sun, Mar 18, 2018 at 3:11 AM, Eric Sunshine >>> wrote: On Sat, Mar 17, 2018 at 3:53 AM, Nguyễn Thái Ngọc Duy

[PATCH v2] filter-branch: use printf instead of echo -e

2018-03-19 Thread Michele Locati
In order to echo a tab character, it's better to use printf instead of "echo -e", because it's more portable (for instance, "echo -e" doesn't work as expected on a Mac). This solves the "fatal: Not a valid object name" error in git-filter-branch when using the --state-branch option. Furthermore,

Re: [PATCH v6 09/11] pack-objects: shrink size field in struct object_entry

2018-03-19 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +static inline int oe_fits_in_32bits(unsigned long limit) > +{ > + uint32_t truncated_limit = (uint32_t)limit; > + > + return limit == truncated_limit; > +} I do not think it is worth a reroll (there only are a few callsites), but the above has nothing to

Re: [PATCH v6 09/11] pack-objects: shrink size field in struct object_entry

2018-03-19 Thread Duy Nguyen
On Mon, Mar 19, 2018 at 5:19 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> +static inline int oe_fits_in_32bits(unsigned long limit) >> +{ >> + uint32_t truncated_limit = (uint32_t)limit; >> + >> + return limit == truncated_limit; >> +} > > I do not think it is worth a re

Re: [PATCH] Makefile: detect compiler and enable more warnings in DEVELOPER=1

2018-03-19 Thread Duy Nguyen
On Sun, Mar 18, 2018 at 7:56 PM, Ramsay Jones wrote: > > > On 18/03/18 15:55, Duy Nguyen wrote: >> On Sun, Mar 18, 2018 at 9:18 AM, Nguyễn Thái Ngọc Duy >> wrote: >>> +ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter >>> clang4,$(COMPILER_FEATURES))),) >>> +CFLAGS += -Wextra >> >> Anoth

Re: [PATCH v6 09/11] pack-objects: shrink size field in struct object_entry

2018-03-19 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +static inline void oe_set_size(struct object_entry *e, > +unsigned long size) > +{ > + e->size_ = size; > + e->size_valid = e->size_ == size; A quite similar comment as my earlier one applies here. I wonder if this is easier t

[PATCH] mingw: abort on invalid strftime formats

2018-03-19 Thread Johannes Schindelin
On Windows, strftime() does not silently ignore invalid formats, but warns about them and then returns 0 and sets errno to EINVAL. Unfortunately, Git does not expect such a behavior, as it disagrees with strftime()'s semantics on Linux. As a consequence, Git misinterprets the return value 0 as "I

Re: [PATCH 1/1] Fix typo in merge-strategies documentation

2018-03-19 Thread Junio C Hamano
David Pursehouse writes: > From: David Pursehouse > > Signed-off-by: David Pursehouse > --- I somehow had to stare at the patch for a few minutes, view it in two Emacs buffers and run M-x compare-windows before I finally spot the single-byte typofix. Will queue with a retitle. Documentat

Re: [PATCH v6 09/11] pack-objects: shrink size field in struct object_entry

2018-03-19 Thread Duy Nguyen
On Mon, Mar 19, 2018 at 5:43 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> +static inline void oe_set_size(struct object_entry *e, >> +unsigned long size) >> +{ >> + e->size_ = size; >> + e->size_valid = e->size_ == size; > > A quite similar co

Re: [PATCH] completion: complete tags with git tag --delete/--verify

2018-03-19 Thread Junio C Hamano
Todd Zullinger writes: > Completion of tag names has worked for the short -d/-v options since > 88e21dc746 ("Teach bash about completing arguments for git-tag", > 2007-08-31). The long options were not added to "git tag" until many > years later, in c97eff5a95 ("git-tag: introduce long forms for

Re: [PATCH v6 0/3] RUNTIME_PREFIX relocatable Git

2018-03-19 Thread Junio C Hamano
Dan Jacques writes: > This patch set expands support for the RUNTIME_PREFIX configuration flag, > currently only used on Windows builds, to include Linux, Darwin, and > FreeBSD. When Git is built with RUNTIME_PREFIX enabled, it resolves its > ancillary paths relative to the runtime location of it

Re: [PATCH v4 1/4] worktree: improve message when creating a new worktree

2018-03-19 Thread Duy Nguyen
On Sat, Mar 17, 2018 at 11:22 PM, Thomas Gummerer wrote: > Currently 'git worktree add' produces output like the following, when > '--no-checkout' is not given: > > Preparing foo (identifier foo) > HEAD is now at 26da330922 > > where the first line is written to stderr, and the second lin

Re: [PATCH 1/2] completion: improve ls-files filter performance

2018-03-19 Thread Johannes Schindelin
Hi drizzd, first of all: thank you so much for working on this. I am sure it will be noticeable to many Windows users, and also make my life easier. On Sat, 17 Mar 2018, Clemens Buchacher wrote: > From the output of ls-files, we remove all but the leftmost path > component and then we eliminate

Re: [PATCH v6 2/3] Makefile: add Perl runtime prefix support

2018-03-19 Thread Junio C Hamano
Dan Jacques writes: > +# RUNTIME_PREFIX's resolution logic requires resource paths to be expressed > +# relative to each other and share an installation path. > +# > +# This is a dependnecy in: dependency? > +# - Git's binary RUNTIME_PREFIX logic in (see "exec_cmd.c"). > +# - The runtime prefix

Re: [PATCH v6 2/3] Makefile: add Perl runtime prefix support

2018-03-19 Thread Daniel Jacques
On Mon, Mar 19, 2018 at 1:14 PM Junio C Hamano wrote: > > +# RUNTIME_PREFIX's resolution logic requires resource paths to be expressed > > +# relative to each other and share an installation path. > > +# > > +# This is a dependnecy in: > dependency? Oops, this is the second typo that has been p

Re: [PATCH v6 3/3] exec_cmd: RUNTIME_PREFIX on some POSIX systems

2018-03-19 Thread Junio C Hamano
Dan Jacques writes: > Enable Git to resolve its own binary location using a variety of > OS-specific and generic methods, including: > > - procfs via "/proc/self/exe" (Linux) > - _NSGetExecutablePath (Darwin) > - KERN_PROC_PATHNAME sysctl on BSDs. > - argv0, if absolute (all, including Windows).

Re: [PATCH v3 2/7] gc: add --keep-base-pack

2018-03-19 Thread Duy Nguyen
On Fri, Mar 16, 2018 at 10:05 PM, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Mar 16 2018, Nguyễn Thái Ngọc Duy jotted: > >> +--keep-base-pack:: >> + All packs except the base pack and those marked with a `.keep` >> + files are consolidated into a single pack. The largest pack is >> + c

Re: [GSoC] Scripts to be conversted into builtins

2018-03-19 Thread Johannes Schindelin
Hi, On Sat, 17 Mar 2018, Yash Yadav wrote: > In the project ideas listed there is one idea talking of conversion of > scripts to builtins. This interests me but no pointer forward is given > and I'd like to dive more into that idea and go through the script(s). > > So, where should I look furthe

Re: [PATCH v6 3/3] exec_cmd: RUNTIME_PREFIX on some POSIX systems

2018-03-19 Thread Daniel Jacques
On Mon, Mar 19, 2018 at 1:24 PM Junio C Hamano wrote: > Look for these misspelled words: Oh boy ... thanks, and done. > OK. An essentially no-op change but with the name better suited in > the extended context---we used to only care about argv0 but that was > an implementation detail of "where

Re: [PATCH 0/2] routines to generate JSON data

2018-03-19 Thread Jeff Hostetler
On 3/17/2018 3:38 AM, Jacob Keller wrote: On Fri, Mar 16, 2018 at 2:18 PM, Jeff King wrote: 3. Some other similar format. YAML comes to mind. Last time I looked (quite a while ago), it seemed insanely complex, but I think you could implement only a reasonable subset. OTOH, I th

[GSoC][PATCH] test: avoid pipes in git related commands for test suite

2018-03-19 Thread Pratik Karki
Thank you Eric Sunshine, I have done as you had instructed me. I look forward to more understanding of the codebase and would love to fix "git rev-parse" problems in my follow-on patches. Thank you for the professional review comment. Sorry for late follow-on patch, I got tied up with my universi

Re: Bad refspec messes up bundle.

2018-03-19 Thread Junio C Hamano
Luciano Joublanc writes: > Yesterday I created a git bundle as best as I can remember like this > > git bundle save chunk chunk.bundle --all master > > Note the 'master' I added accidentally at the end - this was a user > error but still the bundle was created. > > When I tried to clone this, I g

[PATCH 0/2] -Wuninitialized

2018-03-19 Thread Ramsay Jones
This series removes all 'self-initialised' variables (ie. var = var;). This construct has been used to silence gcc '-W[maybe-]uninitialized' warnings in the past [1]. Unfortunately, this construct causes warnings to be issued by MSVC [2], along with clang static analysis complaining about an 'Ass

Re: [PATCH] mingw: abort on invalid strftime formats

2018-03-19 Thread Junio C Hamano
Johannes Schindelin writes: > On Windows, strftime() does not silently ignore invalid formats, but > warns about them and then returns 0 and sets errno to EINVAL. > > Unfortunately, Git does not expect such a behavior, as it disagrees > with strftime()'s semantics on Linux. As a consequence, Git

PATCH 1/2] -Wuninitialized: remove some 'init-self' workarounds

2018-03-19 Thread Ramsay Jones
The 'self-initialised' variables construct (ie var = var;) has been used to silence gcc '-W[maybe-]uninitialized' warnings. This has, unfortunately, caused MSVC to issue 'uninitialized variable' warnings. Also, using clang static analysis causes complaints about an 'Assigned value is garbage or u

[PATCH 2/2] read-cache: fix an -Wmaybe-uninitialized warning

2018-03-19 Thread Ramsay Jones
The function ce_write_entry() uses a 'self-initialised' variable construct, for the symbol 'saved_namelen', to suppress a gcc '-Wmaybe-uninitialized' warning, given that the warning is a false positive. For the purposes of this discussion, the ce_write_entry() function has three code blocks of in

Re: [PATCH v2] filter-branch: use printf instead of echo -e

2018-03-19 Thread Junio C Hamano
Michele Locati writes: > In order to echo a tab character, it's better to use printf instead of > "echo -e", because it's more portable (for instance, "echo -e" doesn't work > as expected on a Mac). > > This solves the "fatal: Not a valid object name" error in git-filter-branch > when using the -

Re: [PATCH 02/44] repository.c: move env-related setup code back to environment.c

2018-03-19 Thread Jonathan Tan
On Sat, 3 Mar 2018 18:35:55 +0700 Nguyễn Thái Ngọc Duy wrote: > It does not make sense that generic repository code contains handling > of environment variables, which are specific for the main repository > only. Refactor repo_set_gitdir() function to take $GIT_DIR and > optionally _all_ other

Re: [PATCH v6 09/11] pack-objects: shrink size field in struct object_entry

2018-03-19 Thread Duy Nguyen
On Mon, Mar 19, 2018 at 7:29 PM, Junio C Hamano wrote: + if (!e->size_valid) { + unsigned long real_size; + + if (sha1_object_info(e->idx.oid.hash, &real_size) < 0 || + size != real_size) + die("BUG: 'siz

Re: [PATCH v6 07/14] commit-graph: implement 'git-commit-graph write'

2018-03-19 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 19 2018, Derrick Stolee jotted: > On 3/19/2018 10:36 AM, Ævar Arnfjörð Bjarmason wrote: >> On Mon, Mar 19 2018, Derrick Stolee jotted: >> >>> On 3/18/2018 9:25 AM, Ævar Arnfjörð Bjarmason wrote: On Wed, Mar 14 2018, Derrick Stolee jotted: > +'git commit-graph write' [--

Re: [GSoC][PATCH v4] Make options that expect object ids less chatty if id is invalid

2018-03-19 Thread ungureanupaulsebastian
Hello, Thank you for your advice! Soon enough, I wil submit a new patch which fixes the issues you mentioned. Best regards, Paul Ungureanu

[GSoC][PATCH v5] Make options that expect object ids less chatty if id is invalid

2018-03-19 Thread Paul-Sebastian Ungureanu
Usually, the usage should be shown only if the user does not know what options are available. If the user specifies an invalid value, the user is already aware of the available options. In this case, there is no point in displaying the usage anymore. This patch applies to "git tag --contains", "gi

Re: [PATCH 02/44] repository.c: move env-related setup code back to environment.c

2018-03-19 Thread Duy Nguyen
On Mon, Mar 19, 2018 at 7:07 PM, Jonathan Tan wrote: >> -extern void repo_set_gitdir(struct repository *repo, const char *path); >> +struct set_gitdir_args { >> + const char *commondir; >> + const char *object_dir; >> + const char *graft_file; >> + const char *index_file; >> +}; >>

Re: [PATCH v6 09/11] pack-objects: shrink size field in struct object_entry

2018-03-19 Thread Junio C Hamano
Duy Nguyen writes: > This is why I do "size_valid = size_ == size". In my private build, I > reduced size_ to less than 32 bits and change the "fits_in_32bits" > function to do something like > > int fits_in_32bits(unsigned long size) > { > struct object_entry e; > e.size_ = size; > return e.size

Re: [PATCH v3 2/7] gc: add --keep-base-pack

2018-03-19 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 19 2018, Duy Nguyen jotted: > On Fri, Mar 16, 2018 at 10:05 PM, Ævar Arnfjörð Bjarmason > wrote: >> >> On Fri, Mar 16 2018, Nguyễn Thái Ngọc Duy jotted: >> >>> +--keep-base-pack:: >>> + All packs except the base pack and those marked with a `.keep` >>> + files are consolidate

Re: [PATCH v6 07/14] commit-graph: implement 'git-commit-graph write'

2018-03-19 Thread Derrick Stolee
On 3/19/2018 10:36 AM, Ævar Arnfjörð Bjarmason wrote: On Mon, Mar 19 2018, Derrick Stolee jotted: On 3/18/2018 9:25 AM, Ævar Arnfjörð Bjarmason wrote: On Wed, Mar 14 2018, Derrick Stolee jotted: +'git commit-graph write' [--object-dir ] + + +DESCRIPTION +--- + +Manage the serialized

Re: [PATCH v6 2/3] Makefile: add Perl runtime prefix support

2018-03-19 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 19 2018, Dan Jacques jotted: > +gitexecdir_relative = $(patsubst $(prefix)/%,%,$(gitexecdir)) > mandir_relative = $(patsubst $(prefix)/%,%,$(mandir)) > infodir_relative = $(patsubst $(prefix)/%,%,$(infodir)) > +localedir_relative = $(patsubst $(prefix)/%,%,$(localedir)) > htmldir_r

  1   2   >