Re: [PATCHv2 0/2] (x)diff cleanup: remove duplicate code

2017-10-24 Thread Junio C Hamano
Stefan Beller writes: > v2: > * I realized that we don't have to change the hashing function of xdiff; > we can rather change the hashing function for the move detection, > which is less fundamental. > (That way I can shrink the series down to 2 patches) > * commented

Re: [PATCH 00/13] WIP Partial clone part 1: object filtering

2017-10-24 Thread Junio C Hamano
Jeff Hostetler writes: > From: Jeff Hostetler > > I've been working with Jonathan Tan to combine our partial clone > proposals. This patch series represents a first step in that effort > and introduces an object filtering mechanism to select

Re: [PATCH 00/13] WIP Partial clone part 1: object filtering

2017-10-24 Thread Jonathan Tan
On Tue, Oct 24, 2017 at 11:53 AM, Jeff Hostetler wrote: > From: Jeff Hostetler > > I've been working with Jonathan Tan to combine our partial clone > proposals. This patch series represents a first step in that effort > and introduces an object

Re: Consequences of CRLF in index?

2017-10-24 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Nieder writes: > >> I'd be interested to hear what happens when diff-ing across a line >> ending fixup commit. Is this an area where Git needs some >> improvement? "git merge" knows an -Xrenormalize option to deal with a

Re: [PATCH 10/13] rev-list: add list-objects filtering support

2017-10-24 Thread Jonathan Tan
On Tue, Oct 24, 2017 at 11:53 AM, Jeff Hostetler wrote: > static void finish_object(struct object *obj, const char *name, void > *cb_data) > { > struct rev_list_info *info = cb_data; > - if (obj->type == OBJ_BLOB && !has_object_file(>oid)) > + if

Re: [PATCH 1/2] xdiff-interface: export comparing and hashing strings

2017-10-24 Thread Eric Sunshine
On Tue, Oct 24, 2017 at 7:42 PM, Stefan Beller wrote: > This will turn out to be useful in a later patch. > > xdl_recmatch is exported in xdiff/xutils.h, to be used by various > xdiff/*.c files, but not outside of xdiff/. This one makes it available > to the outside, too. > >

Re: [PATCH 08/13] list-objects: add traverse_commit_list_filtered method

2017-10-24 Thread Jonathan Tan
On Tue, Oct 24, 2017 at 11:53 AM, Jeff Hostetler wrote: > +void traverse_commit_list_filtered( > + struct list_objects_filter_options *filter_options, > + struct rev_info *revs, > + show_commit_fn show_commit, > + show_object_fn show_object, > +

Re: [PATCH 07/13] list-objects-filter-options: common argument parsing

2017-10-24 Thread Jonathan Tan
On Tue, Oct 24, 2017 at 11:53 AM, Jeff Hostetler wrote: > + * ::= blob:none > + * blob:limit:[kmg] > + * sparse:oid: > + * sparse:path: I notice in the code below that there are some usages of "=" instead of ":" - could you clarify which one

Re: [PATCH] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-24 Thread Eric Sunshine
On Tue, Oct 24, 2017 at 9:48 PM, Junio C Hamano wrote: > Jeff King writes: >> I definitely agree with the sentiment that as few things as possible >> should happen between calling getenv() and using its result. I've seen >> real bugs there from unexpected

Re: [PATCH 01/13] dir: allow exclusions from blob in addition to file

2017-10-24 Thread Eric Sunshine
On Tue, Oct 24, 2017 at 2:53 PM, Jeff Hostetler wrote: > Refactor add_excludes() to separate the reading of the > exclude file into a buffer and the parsing of the buffer > into exclude_list items. > > Add add_excludes_from_blob_to_list() to allow an exclude > file be

Re: [PATCH 03/13] list-objects: filter objects in traverse_commit_list

2017-10-24 Thread Jonathan Tan
On Tue, Oct 24, 2017 at 11:53 AM, Jeff Hostetler wrote: > +enum list_objects_filter_result { > + LOFR_ZERO = 0, > + LOFR_MARK_SEEN = 1<<0, Probably worth documenting, something like /* Mark this object so that it is skipped for the rest of the traversal.

Re: [PATCH 2/2] files_transaction_prepare(): fix handling of ref lock failure

2017-10-24 Thread Junio C Hamano
Michael Haggerty writes: > ... But dc39e09942 added another blurb of code between > the loop and the cleanup. That blurb sometimes resets `ret` to zero, > making the cleanup code think that the locking was successful. > ... > The fix is simple: instead of just breaking out

Re: Consequences of CRLF in index?

2017-10-24 Thread Junio C Hamano
Jonathan Nieder writes: > I'd be interested to hear what happens when diff-ing across a line > ending fixup commit. Is this an area where Git needs some > improvement? "git merge" knows an -Xrenormalize option to deal with a > related problem --- it's possible that "git

Re: [PATCH] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-24 Thread Junio C Hamano
Jeff King writes: > I definitely agree with the sentiment that as few things as possible > should happen between calling getenv() and using its result. I've seen > real bugs there from unexpected invalidation of the static buffer. Sure. I do not think we mind xstrdup()ing the

Re: [PATCH] status: do not get confused by submodules in excluded directories

2017-10-24 Thread Junio C Hamano
Heiko Voigt writes: > On Tue, Oct 24, 2017 at 02:18:49PM +0900, Junio C Hamano wrote: >> Johannes Schindelin writes: >> >> > We meticulously pass the `exclude` flag to the `treat_directory()` >> > function so that we can indicate that files in it

Re: [WIP PATCH] diff: add option to ignore whitespaces for move detection only

2017-10-24 Thread Junio C Hamano
Junio C Hamano writes: > Brandon Williams writes: > >> One simple idea would be to convert the single 'flag' into various bit >> fields themselves, that way if you need to add a new flag you would just >> make a new bit field. I'm unaware of any downsides

Re: [WIP PATCH] diff: add option to ignore whitespaces for move detection only

2017-10-24 Thread Junio C Hamano
Brandon Williams writes: > One simple idea would be to convert the single 'flag' into various bit > fields themselves, that way if you need to add a new flag you would just > make a new bit field. I'm unaware of any downsides of doing so (though > i may be missing something)

Re: [RFC] protocol version 2

2017-10-24 Thread Junio C Hamano
Brandon Williams writes: >> I actually have a reasonable guess why you want to have a separate >> delimiter (which has nothing to do with "optional delim can be >> omitted"), but I want to see it explained in this document clearly >> by its designer(s). > > Jonathan Tan

[PATCH 1/5] fnv: migrate code from hashmap to fnv

2017-10-24 Thread Stefan Beller
The functions regarding the Fowler–Noll–Vo hash function are put in a separate compilation unit, as it is logically different from the hashmap functionality. Signed-off-by: Stefan Beller --- This may still be an interesting cleanup on its own. Thanks, Stefan Makefile

[PATCH 2/2] diff.c: get rid of duplicate implementation

2017-10-24 Thread Stefan Beller
The implementations in diff.c to detect moved lines needs to compare strings and hash strings, which is implemented in that file, as well as in the xdiff library. Remove the rather recent implementation in diff.c and rely on the well exercised code in the xdiff lib. With this change the hash

[PATCH 1/2] xdiff-interface: export comparing and hashing strings

2017-10-24 Thread Stefan Beller
This will turn out to be useful in a later patch. xdl_recmatch is exported in xdiff/xutils.h, to be used by various xdiff/*.c files, but not outside of xdiff/. This one makes it available to the outside, too. While at it, add documentation. Signed-off-by: Stefan Beller ---

[PATCHv2 0/2] (x)diff cleanup: remove duplicate code

2017-10-24 Thread Stefan Beller
v2: * I realized that we don't have to change the hashing function of xdiff; we can rather change the hashing function for the move detection, which is less fundamental. (That way I can shrink the series down to 2 patches) * commented and renamed function parameters in the exposed xdiff

Re: [PATCH 3/4] xdiff: use stronger hash function internally

2017-10-24 Thread Jonathan Nieder
Stefan Beller wrote: > --- a/xdiff/xutils.c > +++ b/xdiff/xutils.c > @@ -24,7 +24,8 @@ > #include > #include "xinclude.h" > > - > +#include "cache.h" > +#include "hashmap.h" #includes like "git-compat-util.h" and "cache.h" can only be used as the *first* #include. Otherwise the feature

Re: [GIT PULL] l10n updates for 2.15.0 round 2

2017-10-24 Thread Christopher Díaz Riveros
El mar, 24-10-2017 a las 11:48 +0900, Junio C Hamano escribió: > > Thanks, will pull.  Nice to see a new language added to the > repertoire. > Thank you, I am very happy to be able to help the community. And bring Git a little closer to Latin America and Spain. Regards -- Christopher Díaz

Re: Consequences of CRLF in index?

2017-10-24 Thread Johannes Sixt
Am 24.10.2017 um 19:48 schrieb Lars Schneider: I've migrated a large repo (110k+ files) with a lot of history (177k commits) and a lot of users (200+) to Git. Unfortunately, all text files in the index of the repo have CRLF line endings. In general this seems not to be a problem as the project

Re: [PATCH 1/4] hashmap: introduce memhash_feed to access the internals of FNV-1 hash

2017-10-24 Thread Stefan Beller
>> +unsigned int memhash_feed(unsigned int hash_seed, const unsigned char next) > > Why is the second parameter const and the first one isn't? (We tend > not to bother with const for value types.) will do. >> + hash = memhash_feed(hash, c); > > I guess compilers inline a copy of the

Re: [PATCH 3/4] xdiff: use stronger hash function internally

2017-10-24 Thread Stefan Beller
On Tue, Oct 24, 2017 at 1:23 PM, René Scharfe wrote: > Am 24.10.2017 um 20:59 schrieb Stefan Beller: >> Instead of using the hash seeded with 5381, and updated via >> `(hash << 5) ^ new_byte`, use the FNV-1 primitives as offered by >> hashmap.h, which is seeded with 0x811c9dc5 and

Re: [PATCH 2/4] xdiff-interface: export comparing and hashing strings

2017-10-24 Thread Stefan Beller
On Tue, Oct 24, 2017 at 1:23 PM, René Scharfe wrote: > xdl_recmatch() is already exported; why not use it without this > wrapper? It is exported in xdiff/xutils.h, to be used by various xdiff/*.c files, but not outside of xdiff/. This one makes it available to the outside, too.

Re: [PATCH 3/4] xdiff: use stronger hash function internally

2017-10-24 Thread René Scharfe
Am 24.10.2017 um 20:59 schrieb Stefan Beller: > Instead of using the hash seeded with 5381, and updated via > `(hash << 5) ^ new_byte`, use the FNV-1 primitives as offered by > hashmap.h, which is seeded with 0x811c9dc5 and computed as > `(hash * 0x01000193) ^ new_byte`. The hash function you're

Re: [PATCH 2/4] xdiff-interface: export comparing and hashing strings

2017-10-24 Thread René Scharfe
Am 24.10.2017 um 20:59 schrieb Stefan Beller: > This will turn out to be useful in a later patch > > Signed-off-by: Stefan Beller > --- > xdiff-interface.c | 11 +++ > xdiff-interface.h | 5 + > 2 files changed, 16 insertions(+) > > diff --git

Re: [PATCH 1/4] hashmap: introduce memhash_feed to access the internals of FNV-1 hash

2017-10-24 Thread René Scharfe
Am 24.10.2017 um 20:59 schrieb Stefan Beller: > This will be useful shortly. > > Signed-off-by: Stefan Beller > --- > hashmap.c | 7 ++- > hashmap.h | 3 +++ > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/hashmap.c b/hashmap.c > index

Re: Multiple paths in GIT_EXEC_PATH

2017-10-24 Thread Dennis Kaarsemaker
On Tue, 2017-10-17 at 18:21 +0300, Nikolay Yakimov wrote: > For why I need that is another matter. Long story short, I need git to > look for '.gitignore' in a particular non-standard location, since I > have multiple git repositories in the same workdir (that workdir being > $HOME and git

Re: [PATCH] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-24 Thread Jeff King
On Tue, Oct 24, 2017 at 07:11:24PM +0200, Martin Ågren wrote: > On 24 October 2017 at 18:45, Eric Sunshine wrote: > > On Tue, Oct 24, 2017 at 12:28 PM, Stefan Beller wrote: > >> On Tue, Oct 24, 2017 at 8:27 AM, Andrey Okoshkin

Re: [PATCH 2/2] files_transaction_prepare(): fix handling of ref lock failure

2017-10-24 Thread Jeff King
On Tue, Oct 24, 2017 at 05:16:25PM +0200, Michael Haggerty wrote: > The fix is simple: instead of just breaking out of the loop, jump > directly to the cleanup code. This fixes some tests in t1404 that were > added in the previous commit. Nicely explained. I think that fix makes sense, and

Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-24 Thread Jeff King
On Tue, Oct 24, 2017 at 12:19:26PM -0400, Eric Sunshine wrote: > On Tue, Oct 24, 2017 at 11:16 AM, Michael Haggerty > wrote: > > diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh > > @@ -34,6 +34,86 @@ test_update_rejected () { > > +# Test adding and

Re: [PATCH 0/2] Fix an error-handling path when locking refs

2017-10-24 Thread Jeff King
On Tue, Oct 24, 2017 at 05:16:23PM +0200, Michael Haggerty wrote: > But in fact the problem is more general; it can happen whenever a > reference deletion within a transaction is processed successfully, and > then another reference update in the same transaction fails in >

Re: [PATCH] path: use xmalloc in add_to_trie

2017-10-24 Thread Jeff King
On Tue, Oct 24, 2017 at 09:13:28AM -0700, Stefan Beller wrote: > On Tue, Oct 24, 2017 at 8:15 AM, Andrey Okoshkin > wrote: > > Add usage of xmalloc() instead of malloc() in add_to_trie() as xmalloc wraps > > and checks memory allocation result. > > > > Signed-off-by:

Re: v2.15.0-rc2 ref deletion bug

2017-10-24 Thread Jeff King
On Tue, Oct 24, 2017 at 01:05:00PM +0200, Michael Haggerty wrote: > > I'd expect one of: > > > > 1. We delete "foo" before updating "foo/bar", and we end up with a > > single ref. > > I don't think that this is possible in the general case in a single > transaction. The problem is that

Re: Consequences of CRLF in index?

2017-10-24 Thread Torsten Bögershausen
On Tue, Oct 24, 2017 at 11:14:15AM -0700, Jonathan Nieder wrote: > Hi, > > Lars Schneider wrote: > > > I've migrated a large repo (110k+ files) with a lot of history (177k > > commits) > > and a lot of users (200+) to Git. Unfortunately, all text files in the index > > of the repo have CRLF

Re: [PATCH 0/4] (x)diff cleanup: remove duplicate code

2017-10-24 Thread Stefan Beller
On Tue, Oct 24, 2017 at 11:59 AM, Stefan Beller wrote: > Junio wrote: > >> * I was hoping that the next_byte() and string_hash() thing, once >>they are cleaned up, will eventually be shared with the xdiff/ >>code at the lower layer, which needs to do pretty much the

[PATCH 3/4] xdiff: use stronger hash function internally

2017-10-24 Thread Stefan Beller
Instead of using the hash seeded with 5381, and updated via `(hash << 5) ^ new_byte`, use the FNV-1 primitives as offered by hashmap.h, which is seeded with 0x811c9dc5 and computed as `(hash * 0x01000193) ^ new_byte`. Signed-off-by: Stefan Beller --- xdiff/xutils.c | 19

[PATCH 4/4] diff.c: get rid of duplicate implementation

2017-10-24 Thread Stefan Beller
The implementations in diff.c to detect moved lines needs to compare strings and hash strings, which is implemented in that file, as well as in the xdiff library. Remove the rather recent implementation in diff.c and rely on the well exercised code in the xdiff lib. Signed-off-by: Stefan Beller

[PATCH 2/4] xdiff-interface: export comparing and hashing strings

2017-10-24 Thread Stefan Beller
This will turn out to be useful in a later patch Signed-off-by: Stefan Beller --- xdiff-interface.c | 11 +++ xdiff-interface.h | 5 + 2 files changed, 16 insertions(+) diff --git a/xdiff-interface.c b/xdiff-interface.c index 018e033089..fd002ebbc2 100644 ---

[PATCH 1/4] hashmap: introduce memhash_feed to access the internals of FNV-1 hash

2017-10-24 Thread Stefan Beller
This will be useful shortly. Signed-off-by: Stefan Beller --- hashmap.c | 7 ++- hashmap.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hashmap.c b/hashmap.c index d42f01ff5a..d103eb1fd2 100644 --- a/hashmap.c +++ b/hashmap.c @@ -26,13 +26,18 @@

[PATCH 0/4] (x)diff cleanup: remove duplicate code

2017-10-24 Thread Stefan Beller
Junio wrote: > * I was hoping that the next_byte() and string_hash() thing, once >they are cleaned up, will eventually be shared with the xdiff/ >code at the lower layer, which needs to do pretty much the same >in order to implement various whitespace ignoring options. I am >not

[PATCH 10/13] rev-list: add list-objects filtering support

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Teach rev-list to use the filtering provided by the traverse_commit_list_filtered() interface to omit unwanted objects from the result. This feature is only enabled when one of the "--objects*" options are used. Furthermore, when the

[PATCH 12/13] pack-objects: add list-objects filtering

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Teach pack-objects to use the filtering provided by the traverse_commit_list_filtered() interface to omit unwanted objects from the resulting packfile. This feature is intended for partial clone/fetch. Filtering requires the use of the "--stdout"

[PATCH 09/13] extension.partialclone: introduce partial clone extension

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Introduce the ability to have missing objects in a repo. This functionality is guarded by new repository extension options: `extensions.partialcloneremote` and `extensions.partialclonefilter`. See the update to

[PATCH 05/13] list-objects-filter-blobs-limit: add large blob filtering

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Create a filter for traverse_commit_list_worker() to omit blobs larger than a requested size from the result, but always include ".git*" special files. Signed-off-by: Jeff Hostetler --- Makefile |

[PATCH 04/13] list-objects-filter-blobs-none: add filter to omit all blobs

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Create a simple filter for traverse_commit_list_worker() to omit all blobs from the result. This filter will be used in a future commit by rev-list and pack-objects to create a "commits and trees" result. This is intended for partial clone and fetch

[PATCH 13/13] t5317: pack-objects object filtering test

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/t5317-pack-objects-filter-objects.sh | 384 + 1 file changed, 384 insertions(+) create mode 100755 t/t5317-pack-objects-filter-objects.sh diff --git

[PATCH 01/13] dir: allow exclusions from blob in addition to file

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Refactor add_excludes() to separate the reading of the exclude file into a buffer and the parsing of the buffer into exclude_list items. Add add_excludes_from_blob_to_list() to allow an exclude file be specified with an OID. Signed-off-by: Jeff

[PATCH 03/13] list-objects: filter objects in traverse_commit_list

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Create traverse_commit_list_filtered() and add filtering interface to allow certain objects to be omitted (not shown) during a traversal. Update traverse_commit_list() to be a wrapper for the above. Filtering will be used in a future commit by

[PATCH 07/13] list-objects-filter-options: common argument parsing

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Create common routines and defines for parsing list-objects-filter-related command line arguments and pack-protocol fields. Signed-off-by: Jeff Hostetler --- Makefile | 1 +

[PATCH 11/13] t6112: rev-list object filtering test

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/t6112-rev-list-filters-objects.sh | 223 1 file changed, 223 insertions(+) create mode 100755 t/t6112-rev-list-filters-objects.sh diff --git

[PATCH 06/13] list-objects-filter-sparse: add sparse filter

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Create a filter for traverse_commit_list_worker() to only include the blobs the would be referenced by a sparse-checkout using the given specification. Signed-off-by: Jeff Hostetler --- Makefile | 1 +

[PATCH 08/13] list-objects: add traverse_commit_list_filtered method

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Add traverse_commit_list_filtered() wrapper around the various filter methods using common data in object_filter_options. Signed-off-by: Jeff Hostetler --- list-objects.c | 45 +

[PATCH 00/13] WIP Partial clone part 1: object filtering

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler I've been working with Jonathan Tan to combine our partial clone proposals. This patch series represents a first step in that effort and introduces an object filtering mechanism to select unwanted objects. [1] traverse_commit_list and list-objects

[PATCH 02/13] list-objects-filter-map: extend oidmap to collect omitted objects

2017-10-24 Thread Jeff Hostetler
From: Jeff Hostetler Create helper class to extend oidmap to collect a list of omitted or missing objects during traversal. This will be used in a later commit by the list-object filtering code. Signed-off-by: Jeff Hostetler --- Makefile

Re: [WIP PATCH] diff: add option to ignore whitespaces for move detection only

2017-10-24 Thread Brandon Williams
On 10/23, Stefan Beller wrote: > Signed-off-by: Stefan Beller > --- > > diff.c | 10 ++-- > diff.h | 1 + > t/t4015-diff-whitespace.sh | 114 > - > > See, only 10 lines of code! (and a

Re: [RFC] protocol version 2

2017-10-24 Thread Brandon Williams
On 10/24, Junio C Hamano wrote: > Brandon Williams writes: > > > * Capabilities were implemented as a hack and are hidden behind a NUL > > byte after the first ref sent from the server during the ref > > advertisement: > > ... > > > > * Various other technical debt

Re: [Alt. PATCH] ls-remote: deprecate -h as short for --heads

2017-10-24 Thread René Scharfe
Am 24.10.2017 um 02:52 schrieb Junio C Hamano: > René Scharfe writes: > >> Am 21.10.2017 um 14:18 schrieb Junio C Hamano: >>> René Scharfe writes: >>> FWIW, I use "-?" for that everywhere. I have yet to find a command or environment where it does something

Re: Consequences of CRLF in index?

2017-10-24 Thread Jonathan Nieder
Hi, Lars Schneider wrote: > I've migrated a large repo (110k+ files) with a lot of history (177k commits) > and a lot of users (200+) to Git. Unfortunately, all text files in the index > of the repo have CRLF line endings. In general this seems not to be a problem > as the project is developed

Consequences of CRLF in index?

2017-10-24 Thread Lars Schneider
Hi, I've migrated a large repo (110k+ files) with a lot of history (177k commits) and a lot of users (200+) to Git. Unfortunately, all text files in the index of the repo have CRLF line endings. In general this seems not to be a problem as the project is developed exclusively on Windows.

Re: [PATCH] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-24 Thread Martin Ågren
On 24 October 2017 at 18:45, Eric Sunshine wrote: > On Tue, Oct 24, 2017 at 12:28 PM, Stefan Beller wrote: >> On Tue, Oct 24, 2017 at 8:27 AM, Andrey Okoshkin >> wrote: >>> Add check of 'GIT_MERGE_VERBOSITY' environment

[PATCH] add a test for "describe --contains" with mixed tags

2017-10-24 Thread orgads
From: Orgad Shaneh If a repository has early lightweight tags and annotated tags later, running git describe --contains for an early commit used the annotated tag for reference, instead of the lightweight tag which was closer. This has been fixed in

Re: [PATCH] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-24 Thread Eric Sunshine
On Tue, Oct 24, 2017 at 12:28 PM, Stefan Beller wrote: > On Tue, Oct 24, 2017 at 8:27 AM, Andrey Okoshkin > wrote: >> Add check of 'GIT_MERGE_VERBOSITY' environment variable only once in >> init_merge_options(). >> Consequential call of getenv() may

Re: [PATCH v2 1/1] completion: add remaining flags to checkout

2017-10-24 Thread Johannes Sixt
Am 24.10.2017 um 15:19 schrieb Thomas Braun: In the commits 1fc458d9 (builtin/checkout: add --recurse-submodules switch, 2017-03-14), 08d595dc (checkout: add --ignore-skip-worktree-bits in sparse checkout mode, 2013-04-13) and 32669671 (checkout: introduce --detach synonym for "git checkout

Re: [PATCH] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-24 Thread Stefan Beller
On Tue, Oct 24, 2017 at 8:27 AM, Andrey Okoshkin wrote: > Add check of 'GIT_MERGE_VERBOSITY' environment variable only once in > init_merge_options(). > Consequential call of getenv() may return NULL pointer and strtol() crashes. > However the stored pointer to the

Re: [PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-24 Thread Eric Sunshine
On Tue, Oct 24, 2017 at 11:16 AM, Michael Haggerty wrote: > diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh > @@ -34,6 +34,86 @@ test_update_rejected () { > +# Test adding and deleting D/F-conflicting references in a single > +# transaction. >

Re: [PATCH] path: use xmalloc in add_to_trie

2017-10-24 Thread Stefan Beller
On Tue, Oct 24, 2017 at 8:15 AM, Andrey Okoshkin wrote: > Add usage of xmalloc() instead of malloc() in add_to_trie() as xmalloc wraps > and checks memory allocation result. > > Signed-off-by: Andrey Okoshkin > --- > Hello, > I'm not sure but it

Re: [PATCH] status: do not get confused by submodules in excluded directories

2017-10-24 Thread Stefan Beller
On Tue, Oct 24, 2017 at 5:15 AM, Heiko Voigt wrote: > Looks good to me. Same here, Thanks, Stefan

Re: No log --no-decorate completion?

2017-10-24 Thread Stefan Beller
On Tue, Oct 24, 2017 at 8:15 AM, Max Rothman wrote: > Just re-discovered this in my inbox. So is this worth fixing? I could > (probably) figure out a patch. > > Thanks, > Max > $ git log -- Display all 100 possibilities? (y or n) I guess adding one more option is no

Re: No log --no-decorate completion?

2017-10-24 Thread Max Rothman
Just re-discovered this in my inbox. So is this worth fixing? I could (probably) figure out a patch. Thanks, Max On Thu, Oct 12, 2017 at 1:41 PM, Max Rothman wrote: > To be fair, other --no* options complete, it's just --no-decorate, > --no-walk, --no-abbrev-commit,

[PATCH] merge-recursive: check GIT_MERGE_VERBOSITY only once

2017-10-24 Thread Andrey Okoshkin
Add check of 'GIT_MERGE_VERBOSITY' environment variable only once in init_merge_options(). Consequential call of getenv() may return NULL pointer and strtol() crashes. However the stored pointer to the obtained getenv() result may be invalidated by some other getenv() call from another thread as

[PATCH 2/2] files_transaction_prepare(): fix handling of ref lock failure

2017-10-24 Thread Michael Haggerty
Since dc39e09942 (files_ref_store: use a transaction to update packed refs, 2017-09-08), failure to lock a reference has been handled incorrectly by `files_transaction_prepare()`. If `lock_ref_for_update()` fails in the lock-acquisition loop of that function, it sets `ret` then breaks out of that

[PATCH 1/2] t1404: add a bunch of tests of D/F conflicts

2017-10-24 Thread Michael Haggerty
It is currently not allowed, in a single transaction, to add one reference and delete another reference if the two reference names D/F conflict with each other (e.g., like `refs/foo/bar` and `refs/foo`). The reason is that the code would need to take locks $GIT_DIR/refs/foo.lock

[PATCH 0/2] Fix an error-handling path when locking refs

2017-10-24 Thread Michael Haggerty
In [1], Peff described a bug that he found that could cause a reference transaction to be partly carried-out and partly not, with a successful return. The scenario that he discussed was the deletion of one reference and creation of another, where the two references D/F conflict with each other.

[PATCH] path: use xmalloc in add_to_trie

2017-10-24 Thread Andrey Okoshkin
Add usage of xmalloc() instead of malloc() in add_to_trie() as xmalloc wraps and checks memory allocation result. Signed-off-by: Andrey Okoshkin --- Hello, I'm not sure but it looks like there is a missing check of the malloc result. memcpy() may crash with SIGSEGV due to

[PATCH v2] read_index_from(): Skip verification of the cache entry order to speed index loading

2017-10-24 Thread Ben Peart
There is code in post_read_index_from() to detect out of order cache entries when reading an index file. This order verification adds cost to read_index_from() that grows with the size of the index. Put this on-disk data-structure validation code behind an #ifdef DEBUG so only debug builds have

Re: Git diff --no-index and file descriptor inputs

2017-10-24 Thread Dennis Kaarsemaker
On Thu, 2017-09-07 at 15:55 -0400, Jason Pyeron wrote: > > -Original Message- > > From: Martin Ågren > > Sent: Thursday, September 7, 2017 1:48 PM > > > > On 7 September 2017 at 18:00, Jason Pyeron wrote: > > > > > > I was hoping to leverage --word-diff-regex, but the

[PATCH v2 1/1] completion: add remaining flags to checkout

2017-10-24 Thread Thomas Braun
In the commits 1fc458d9 (builtin/checkout: add --recurse-submodules switch, 2017-03-14), 08d595dc (checkout: add --ignore-skip-worktree-bits in sparse checkout mode, 2013-04-13) and 32669671 (checkout: introduce --detach synonym for "git checkout foo^{commit}", 2011-02-08) checkout gained new

Re: [PATCH v1 1/1] completion: add remaining flags to checkout

2017-10-24 Thread Thomas Braun
> Johannes Sixt hat am 12. Oktober 2017 um 18:50 geschrieben: > > > Am 12.10.2017 um 14:20 schrieb Thomas Braun: > > In the commits 1d0fa898 (checkout: add --ignore-other-wortrees, > > 2015-01-03), 1fc458d9 (builtin/checkout: add --recurse-submodules switch, > > 2017-03-14),

Re: v2.15.0-rc2 ref deletion bug

2017-10-24 Thread Michael Haggerty
On 10/24/2017 01:05 PM, Michael Haggerty wrote: > On 10/24/2017 10:24 AM, Jeff King wrote: >> I found a potentially serious bug in v2.15.0-rc2 (and earlier release >> candidates, too) that we may want to deal with before the release. >> >> If I do: >> [...] >> then at the end we have no refs at

Re: [RFC PATCH 2/8] commit: move code to update HEAD to libgit

2017-10-24 Thread Junio C Hamano
Phillip Wood writes: >> I suspect that it would be sufficient to make update_head() helper >> function take the reflog action message as another parameter >> instead to fix the above, but there may be other reasons why you >> chose to do it this way---I cannot read it

Re: [PATCH] status: do not get confused by submodules in excluded directories

2017-10-24 Thread Heiko Voigt
On Tue, Oct 24, 2017 at 02:18:49PM +0900, Junio C Hamano wrote: > Johannes Schindelin writes: > > > We meticulously pass the `exclude` flag to the `treat_directory()` > > function so that we can indicate that files in it are excluded rather > > than untracked when

Re: v2.15.0-rc2 ref deletion bug

2017-10-24 Thread Michael Haggerty
On 10/24/2017 10:24 AM, Jeff King wrote: > I found a potentially serious bug in v2.15.0-rc2 (and earlier release > candidates, too) that we may want to deal with before the release. > > If I do: > > git init -q repo > cd repo > obj=$(git hash-object -w /dev/null) > git update-ref refs/tags/foo

Docker image for git

2017-10-24 Thread Vaibhav Sood
Hi, Want to check if there is a docker image/Dockerfile for git which is officially supported? I could not find one under dockerhub official images  https://hub.docker.com/explore/ If not, want to check if there is any plan to add an official git image to dockerhub? 

Re: [ANNOUNCE] Git for Windows 2.14.3

2017-10-24 Thread Johannes Schindelin
Dear Git users, On Tue, 24 Oct 2017, Johannes Schindelin wrote: > Dear Git users, > > It is my pleasure to announce that Git for Windows 2.14.3 is available from: > > https://git-for-windows.github.io/ ... and at this point, usually the release notes are repeated. In this case, they

Re: [RFC PATCH 2/8] commit: move code to update HEAD to libgit

2017-10-24 Thread Phillip Wood
On 07/10/17 10:54, Junio C Hamano wrote: > Phillip Wood writes: > >> From: Phillip Wood >> >> Signed-off-by: Phillip Wood >> --- > > This seems to do a lot more than just moving code, most notably, it > uses

v2.15.0-rc2 ref deletion bug

2017-10-24 Thread Jeff King
I found a potentially serious bug in v2.15.0-rc2 (and earlier release candidates, too) that we may want to deal with before the release. If I do: git init -q repo cd repo obj=$(git hash-object -w /dev/null) git update-ref refs/tags/foo $obj git update-ref --stdin <<-EOF delete refs/tags/foo

Re: [PATCH] status: do not get confused by submodules in excluded directories

2017-10-24 Thread Kevin Daudt
On Tue, Oct 17, 2017 at 03:10:11PM +0200, Johannes Schindelin wrote: > We meticulously pass the `exclude` flag to the `treat_directory()` > function so that we can indicate that files in it are excluded rather > than untracked when recursing. > > But we did not yet treat submodules the same way.

git describe returns tags including 'refs/tags/

2017-10-24 Thread Voie, Per Erlend Torbergsen
Hi I am versioning my python package using git tags and the python-versioneer package. Basically versioneer gets the version number from git tags using the command "git describe --tags --dirty --always --long --match 'tag_prefix*'". I do not apply a tag prefix, hence tag_prefix=''. Now to

Re: [RFE] Add minimal universal release management capabilities to GIT

2017-10-24 Thread Jacob Keller
On October 21, 2017 6:56:51 AM PDT, nicolas.mail...@laposte.net wrote: > > >- Mail original - >De: "Stefan Beller" > >> git tags ? > >Too loosely defined to be relied on by project-agnostic tools. That's >what most tools won't ever try to use those. Anything you will define >around

Re: [PATCH v2] column: show auto columns when pager is active

2017-10-24 Thread Kevin Daudt
On Mon, Oct 23, 2017 at 02:52:46PM -0700, Jonathan Nieder wrote: > Hi, > > Kevin Daudt wrote: > > > --- a/column.c > > +++ b/column.c > > @@ -5,6 +5,7 @@ > > #include "parse-options.h" > > #include "run-command.h" > > #include "utf8.h" > > +#include "pager.c" > > Should this be pager.h? > >

Re: [RFC] protocol version 2

2017-10-24 Thread Junio C Hamano
Brandon Williams writes: > * Capabilities were implemented as a hack and are hidden behind a NUL > byte after the first ref sent from the server during the ref > advertisement: > ... > > * Various other technical debt (e.g. abusing capabilities to > communicate