Re: worktrees vs. alternates

2018-05-16 Thread Jeff King
On Thu, May 17, 2018 at 06:13:55AM +0530, Sitaram Chamarty wrote: > I may have missed a few of the earlier messages, but in the last > 20 or so in this thread, I did not see namespaces mentioned by > anyone. (I.e., apologies if it was addressed and discarded > earlier!) > > I was under the

Re: Add option to git to ignore binary files unless force added

2018-05-16 Thread Jacob Keller
On Wed, May 16, 2018 at 5:45 PM, Anmol Sethi wrote: > I think it’d be great to have an option to have git ignore binary files. My > repositories are always source only, committing a binary is always a mistake. > At the moment, I have to configure the .gitignore to ignore every

Re: [PATCH v4 0/3] Add --progress and --dissociate to git submodule

2018-05-16 Thread Junio C Hamano
Casey Fitzpatrick writes: > These patches add --progress and --dissociate options to git submodule. > > The --progress option existed beforehand, but only for the update command and > it was left undocumented. > > Both add and update submodule commands supported --reference,

Re: [PATCH] grep: handle corrupt index files early

2018-05-16 Thread Junio C Hamano
Duy Nguyen writes: > With a majority of call sites dying like this though, I wonder if we > should just add repo_read_index_or_die() with die() inside. Then the > next person won't likely accidentally forget _() Yuck. That sounds like inviting a major code churn. I tend to

Add option to git to ignore binary files unless force added

2018-05-16 Thread Anmol Sethi
I think it’d be great to have an option to have git ignore binary files. My repositories are always source only, committing a binary is always a mistake. At the moment, I have to configure the .gitignore to ignore every binary file and that gets tedious. Having git ignore all binary files would

Re: worktrees vs. alternates

2018-05-16 Thread Sitaram Chamarty
On Wed, May 16, 2018 at 04:02:53PM -0400, Konstantin Ryabitsev wrote: > On 05/16/18 15:37, Jeff King wrote: > > Yes, that's pretty close to what we do at GitHub. Before doing any > > repacking in the mother repo, we actually do the equivalent of: > > > > git fetch --prune ../$id.git

[PATCH 1/2] refspec: consolidate ref-prefix generation logic

2018-05-16 Thread Brandon Williams
When using protocol v2 a client constructs a list of ref-prefixes which are sent across the wire so that the server can do server-side filtering of the ref-advertisement. The logic that does this exists for both fetch and push (even though no push support for v2 currently exists yet) and is

[PATCH 2/2] fetch: generate ref-prefixes when using a configured refspec

2018-05-16 Thread Brandon Williams
Teach fetch to generate ref-prefixes, to be used for server-side filtering of the ref-advertisement, based on the configured fetch refspec ('remote..fetch') when no user provided refspec exists. Signed-off-by: Brandon Williams --- builtin/fetch.c| 10 +-

[PATCH 0/2] generating ref-prefixes for configured refspecs

2018-05-16 Thread Brandon Williams
Here's my short follow on series to the refspec refactoring. When v2 was introduced ref-prefixes were only generated for user provided refspecs (given via the command line). This means that you can only benefit from server-side ref filtering if you explicitly provide a refspec, so this short

Re: [PATCH v3 13/28] t3702: abstract away SHA-1-specific constants

2018-05-16 Thread brian m. carlson
On Wed, May 16, 2018 at 10:18:33AM -0700, Stefan Beller wrote: > This reminds me of the way we test alot of the patch format already. > But there we use standard grep as opposed to egrep. > > git grep egrep doesn't show a lot of hits, but all commits > that mention egrep found via 'git log --grep

Re: worktrees vs. alternates

2018-05-16 Thread Jeff King
On Wed, May 16, 2018 at 02:18:20PM -0700, Stefan Beller wrote: > > > > You can also do periodic maintenance like: > > > > 1. Copy each ref in the forked repositories into the parent repository > > (e.g., giving each child that borrows from the parent its own > > hierarchy in

Proposal

2018-05-16 Thread Miss Zeliha Omer Faruk
Hello Greetings to you please i have a business proposal for you contact me for more detailes asap thanks. Best Regards, Miss.Zeliha ömer faruk Esentepe Mahallesi Büyükdere Caddesi Kristal Kule Binasi No:215 Sisli - Istanbul, Turkey

Proposal

2018-05-16 Thread Miss Zeliha Omer Faruk
Hello Greetings to you please i have a business proposal for you contact me for more detailes asap thanks. Best Regards, Miss.Zeliha ömer faruk Esentepe Mahallesi Büyükdere Caddesi Kristal Kule Binasi No:215 Sisli - Istanbul, Turkey

Re: [PATCH v3 07/28] t1007: annotate with SHA1 prerequisite

2018-05-16 Thread brian m. carlson
On Wed, May 16, 2018 at 09:56:33AM -0700, Stefan Beller wrote: > Hi brian, > > On Tue, May 15, 2018 at 6:56 PM, brian m. carlson > wrote: > For the 2 occurrences above I think the SHA1 requirement is not > needed as the check if a blob exists (and the id is given as

[PATCH v2 08/36] transport: convert transport_push to use struct refspec

2018-05-16 Thread Brandon Williams
Convert the logic in 'transport_push()' which calculates a list of ref-prefixes to use 'struct refspec'. Signed-off-by: Brandon Williams --- transport.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/transport.c b/transport.c index

[PATCH v2 22/36] fetch: convert prune_refs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'prune_refs()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c

[PATCH v2 31/36] send-pack: store refspecs in a struct refspec

2018-05-16 Thread Brandon Williams
Convert send-pack.c to store refspecs in a 'struct refspec' instead of as an array of 'const char *'. Signed-off-by: Brandon Williams --- builtin/send-pack.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/builtin/send-pack.c

[PATCH v2 29/36] push: convert to use struct refspec

2018-05-16 Thread Brandon Williams
Convert the refspecs in builtin/push.c to be stored in a 'struct refspec' instead of being stored in a list of 'struct refspec_item's. Signed-off-by: Brandon Williams --- builtin/push.c | 38 +++--- 1 file changed, 15 insertions(+), 23

[PATCH v2 23/36] remote: convert get_stale_heads to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'get_stale_heads()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 2 +- builtin/remote.c | 3 +-- remote.c | 18 +- remote.h | 2 +- 4

[PATCH v2 36/36] submodule: convert push_unpushed_submodules to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'push_unpushed_submodules()' to take a 'struct refspec' as a parameter instead of an array of 'const char *'. Signed-off-by: Brandon Williams --- submodule.c | 19 +-- submodule.h | 3 ++- transport.c | 2 +- 3 files changed, 12 insertions(+), 12

[PATCH v2 33/36] http-push: store refspecs in a struct refspec

2018-05-16 Thread Brandon Williams
Convert http-push.c to store refspecs in a 'struct refspec' instead of in an array of 'const char *'. Signed-off-by: Brandon Williams --- http-push.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/http-push.c b/http-push.c index

[PATCH v2 32/36] transport: remove transport_verify_remote_names

2018-05-16 Thread Brandon Williams
Remove 'transprot_verify_remote_names()' because all callers have migrated to using 'struct refspec' which performs the same checks in 'parse_refspec()'. Signed-off-by: Brandon Williams --- builtin/send-pack.c | 2 -- transport.c | 24

[PATCH v2 30/36] transport: convert transport_push to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'transport_push()' to take a 'struct refspec' as a parameter instead of an array of strings which represent refspecs. Signed-off-by: Brandon Williams --- builtin/push.c | 3 +-- transport.c| 17 +++-- transport.h| 2 +- 3 files changed, 9

[PATCH v2 34/36] remote: convert match_push_refs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'match_push_refs()' to take a 'struct refspec' as a parameter instead of an array of 'const char *'. Signed-off-by: Brandon Williams --- builtin/remote.c| 3 +-- builtin/send-pack.c | 2 +- http-push.c | 3 +-- remote.c| 21

[PATCH v2 35/36] remote: convert check_push_refs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'check_push_refs()' to take a 'struct refspec' as a parameter instead of an array of 'const char *'. Signed-off-by: Brandon Williams --- remote.c| 14 +- remote.h| 2 +- transport.c | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff

[PATCH v2 25/36] remote: convert query_refspecs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'query_refspecs()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/push.c | 3 +-- remote.c | 10 +- remote.h | 2 +- 3 files changed, 7 insertions(+), 8

[PATCH v2 17/36] fetch: convert fetch_one to use struct refspec

2018-05-16 Thread Brandon Williams
Convert 'fetch_one()' to use 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 46 +++--- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index 7a1637d35..18704c6cd

[PATCH v2 28/36] push: check for errors earlier

2018-05-16 Thread Brandon Williams
Move the error checking for using the "--mirror", "--all", and "--tags" options earlier and explicitly check for the presence of the flags instead of checking for a side-effect of the flag. Signed-off-by: Brandon Williams --- builtin/push.c | 31

[PATCH v2 15/36] remote: remove add_prune_tags_to_fetch_refspec

2018-05-16 Thread Brandon Williams
Remove 'add_prune_tags_to_fetch_refspec()' function and instead have the only caller directly add the tag refspec using 'refspec_append()'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 2 +- remote.c| 5 - remote.h| 2 -- 3 files changed, 1

[PATCH v2 27/36] remote: convert match_explicit_refs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'match_explicit_refs()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- remote.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/remote.c b/remote.c index

[PATCH v2 26/36] remote: convert get_ref_match to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'get_ref_match()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- remote.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/remote.c b/remote.c

[PATCH v2 24/36] remote: convert apply_refspecs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'apply_refspecs()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fast-export.c | 2 +- remote.c | 15 ++- remote.h | 3 +-- transport-helper.c

[PATCH v2 21/36] fetch: convert get_ref_map to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'get_ref_map()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 43 --- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git

[PATCH v2 14/36] remote: convert fetch refspecs to struct refspec

2018-05-16 Thread Brandon Williams
Convert the set of fetch refspecs stored in 'struct remote' to use 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 20 ++-- builtin/remote.c | 18 +- remote.c | 38 --

[PATCH v2 20/36] fetch: convert do_fetch to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'do_fetch()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c

[PATCH v2 09/36] remote: convert check_push_refs to use struct refspec

2018-05-16 Thread Brandon Williams
Convert 'check_push_refs()' to use 'struct refspec'. Signed-off-by: Brandon Williams --- remote.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/remote.c b/remote.c index 89820c476..191855118 100644 --- a/remote.c +++ b/remote.c @@ -1282,12

[PATCH v2 19/36] refspec: remove the deprecated functions

2018-05-16 Thread Brandon Williams
Now that there are no callers of 'parse_push_refspec()', 'parse_fetch_refspec()', and 'free_refspec()', remove these functions. Signed-off-by: Brandon Williams --- refspec.c | 49 - refspec.h | 5 - 2 files changed, 54

[PATCH v2 12/36] fast-export: convert to use struct refspec

2018-05-16 Thread Brandon Williams
Convert fast-export to use 'struct refspec' instead of using a list of refspec_item's. Signed-off-by: Brandon Williams --- builtin/fast-export.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/builtin/fast-export.c

[PATCH v2 13/36] remote: convert push refspecs to struct refspec

2018-05-16 Thread Brandon Williams
Convert the set of push refspecs stored in 'struct remote' to use 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/push.c | 10 +- builtin/remote.c | 14 +++--- remote.c | 35 ++- remote.h | 6

[PATCH v2 18/36] fetch: convert refmap to use struct refspec

2018-05-16 Thread Brandon Williams
Convert the refmap in builtin/fetch.c to be stored in a 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index 18704c6cd..6b909cd5b

[PATCH v2 16/36] transport-helper: convert to use struct refspec

2018-05-16 Thread Brandon Williams
Convert the refspecs in transport-helper.c to be stored in a 'struct refspec'. Signed-off-by: Brandon Williams --- transport-helper.c | 38 -- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/transport-helper.c

[PATCH v2 10/36] remote: convert match_push_refs to use struct refspec

2018-05-16 Thread Brandon Williams
Convert 'match_push_refs()' to use struct refspec. Signed-off-by: Brandon Williams --- remote.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/remote.c b/remote.c index 191855118..bce6e7ce4 100644 --- a/remote.c +++ b/remote.c @@ -1312,7

[PATCH v2 02/36] refspec: rename struct refspec to struct refspec_item

2018-05-16 Thread Brandon Williams
In preparation for introducing an abstraction around a collection of refspecs (much like how a 'struct pathspec' is a collection of 'struct pathspec_item's) rename the existing 'struct refspec' to 'struct refspec_item'. Signed-off-by: Brandon Williams --- branch.c

[PATCH v2 11/36] clone: convert cmd_clone to use refspec_item_init

2018-05-16 Thread Brandon Williams
Convert 'cmd_clone()' to use 'refspec_item_init()' instead of relying on the old 'parse_fetch_refspec()' to initialize a single refspec item. Signed-off-by: Brandon Williams --- builtin/clone.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH v2 04/36] refspec: introduce struct refspec

2018-05-16 Thread Brandon Williams
Introduce 'struct refspec', an abstraction around a collection of 'struct refspec_item's much like how 'struct pathspec' holds a collection of 'struct pathspec_item's. A refspec struct also contains an array of the original refspec strings which will be used to facilitate the migration to using

[PATCH v2 07/36] pull: convert get_tracking_branch to use refspec_item_init

2018-05-16 Thread Brandon Williams
Convert 'get_tracking_branch()' to use 'refspec_item_init()' instead of the old 'parse_fetch_refspec()' function. Signed-off-by: Brandon Williams --- builtin/pull.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c

[PATCH v2 03/36] refspec: factor out parsing a single refspec

2018-05-16 Thread Brandon Williams
Factor out the logic which parses a single refspec into its own function. This makes it easier to reuse this logic in a future patch. Signed-off-by: Brandon Williams --- refspec.c | 195 +- 1 file changed, 104

[PATCH v2 01/36] refspec: move refspec parsing logic into its own file

2018-05-16 Thread Brandon Williams
In preparation for performing a refactor on refspec related code, move the refspec parsing logic into its own file. Signed-off-by: Brandon Williams --- Makefile| 1 + branch.c| 1 + builtin/clone.c | 1 +

[PATCH v2 05/36] refspec: convert valid_fetch_refspec to use parse_refspec

2018-05-16 Thread Brandon Williams
Convert 'valid_fetch_refspec()' to use the new 'parse_refspec()' function to only parse a single refspec and eliminate an allocation. Signed-off-by: Brandon Williams --- refspec.c | 17 - refspec.h | 3 ++- 2 files changed, 10 insertions(+), 10 deletions(-)

[PATCH v2 06/36] submodule--helper: convert push_check to use struct refspec

2018-05-16 Thread Brandon Williams
Convert 'push_check()' to use 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/submodule--helper.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index

[PATCH v2 00/36] refactoring refspecs

2018-05-16 Thread Brandon Williams
Changes in v2: * added missing extern keyword in the first patch * reordered patch 2 and 3 and updated some comments to be clearer. * fixed some memory leaks * squashed in some changes recommended by Aevar Brandon Williams (36): refspec: move refspec parsing logic into its own file

Re: [PATCH 11/11] read_cache: convert most calls to repo_read_index_or_die

2018-05-16 Thread Brandon Williams
On 05/16, Stefan Beller wrote: > Signed-off-by: Stefan Beller > --- > blame.c | 5 +++-- > builtin/am.c | 3 ++- > builtin/diff.c| 3 ++- > builtin/fsck.c| 3 ++- > builtin/merge-index.c | 3 ++- > check-racy.c | 2 +- > diff.c

[PATCH 04/11] submodule: use repo_read_index_or_die

2018-05-16 Thread Stefan Beller
The code is used by the fetch command, which is a main porcelain command, so we should localize its error messages. Signed-off-by: Stefan Beller --- submodule.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/submodule.c b/submodule.c index

[PATCH 02/11] repository: introduce repo_read_index_or_die

2018-05-16 Thread Stefan Beller
A common pattern with the repo_read_index function is to die if the return of repo_read_index is negative. Move this pattern into a function. This patch replaces the calls of repo_read_index with its _or_die version, if the error message is exactly the same. Signed-off-by: Stefan Beller

[PATCH 03/11] builtin/grep: use repo_read_index_or_die

2018-05-16 Thread Stefan Beller
grep is a porcelain command, so translating its error message is a good idea. Signed-off-by: Stefan Beller --- builtin/grep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 69f0743619f..2c2d6cc6bca 100644 ---

[PATCH 00/11]

2018-05-16 Thread Stefan Beller
> If you have time, yes translate them all. I don't see how any of these > strings are meant for script. If not, just _() the new string you > added is fine. > With a majority of call sites dying like this though, I wonder if we > should just add repo_read_index_or_die() with die() inside. Then

[PATCH 08/11] check-attr: switch to repo_read_index_or_die

2018-05-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/check-attr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/check-attr.c b/builtin/check-attr.c index 91444dc0448..bf05e7e93ca 100644 --- a/builtin/check-attr.c +++ b/builtin/check-attr.c @@ -4,6 +4,7

[PATCH 10/11] test helpers: switch to repo_read_index_or_die

2018-05-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/helper/test-dump-cache-tree.c | 5 ++--- t/helper/test-dump-untracked-cache.c | 4 ++-- t/helper/test-lazy-init-name-hash.c | 11 ++- t/helper/test-read-cache.c | 3 ++- t/helper/test-scrap-cache-tree.c | 4

[PATCH 11/11] read_cache: convert most calls to repo_read_index_or_die

2018-05-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- blame.c | 5 +++-- builtin/am.c | 3 ++- builtin/diff.c| 3 ++- builtin/fsck.c| 3 ++- builtin/merge-index.c | 3 ++- check-racy.c | 2 +- diff.c| 5 +++-- merge-recursive.c |

[PATCH 05/11] builtin/ls-files: use repo_read_index_or_die

2018-05-16 Thread Stefan Beller
Despite ls-files being a plumbing command, which promises to not change its output ever, and to be easy on machines (e.g. non-localized output), it may make sense to localize the error message for a corrupt index nevertheless: 1. that is more consistent with the rest of Git. 2. Searching for

[PATCH 09/11] checkout-index: switch to repo_read_index

2018-05-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/checkout-index.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c index a730f6a1aa4..aaba99d36c0 100644 --- a/builtin/checkout-index.c +++

[PATCH 07/11] rerere: use repo_read_index_or_die

2018-05-16 Thread Stefan Beller
By switching to repo_read_index_or_die, we'll get a slightly different error message ("index file corrupt") as well as localization of it. Signed-off-by: Stefan Beller --- rerere.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/rerere.c

[PATCH 01/11] grep: handle corrupt index files early

2018-05-16 Thread Stefan Beller
Any other caller of 'repo_read_index' dies upon a negative return of it, so grep should, too. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- builtin/grep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 06/11] read_cache: use repo_read_index_or_die with different error messages

2018-05-16 Thread Stefan Beller
This replaces all patterns of "if (read_cached() < 0) die(some-msg);" with repo_read_index_or_die; this changes the output of the error message. However as all error messages before were translated, these are for human consumption, so a change in error message is not bad; in fact it makes Git

Re: [PATCH] shallow: remove unused variable

2018-05-16 Thread Stefan Beller
Hi Ramsay, > That commit seems to rename the 'shallow_stat' symbol to the > 'the_repository_shallow_stat' symbol, but at the same time adds an > 'shallow_stat' field to the parsed_object_pool struct, so ... :( Thanks for catching this! it shows again, how rebase can be a dangerous tool if not

[PATCH] shallow: remove unused variable

2018-05-16 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Stefan, If you need to re-roll your 'sb/object-store-grafts' branch, could you please squash this into the relevant patch (whichever one that would be)! ;-) I have not looked to see which patch needs to change (just being lazy,

Re: [PATCH v2 0/3] unpack_trees_options: free messages when done

2018-05-16 Thread Elijah Newren
Hi Martin, On Wed, May 16, 2018 at 9:30 AM, Martin Ågren wrote: > On 16 May 2018 at 16:32, Elijah Newren wrote: >> On Sat, Apr 28, 2018 at 4:32 AM, Martin Ågren wrote: >>> As you noted elsewhere [1], Ben is also working in this

Re: [PATCH] refspec.h: reinstate 'extern' to fix sparse warning

2018-05-16 Thread Johannes Schindelin
On Wed, 16 May 2018, Stefan Beller wrote: > On Wed, May 16, 2018 at 2:42 PM, Brandon Williams wrote: > > > Though now I'm confused, I thought we were going towards eliminating > > using the extern keyword? ...of course I guess it means something > > _slightly_ different when

Re: [PATCH] refspec.h: reinstate 'extern' to fix sparse warning

2018-05-16 Thread Stefan Beller
On Wed, May 16, 2018 at 2:42 PM, Brandon Williams wrote: > On 05/16, Ramsay Jones wrote: >> >> Signed-off-by: Ramsay Jones >> --- >> >> Hi Brandon, >> >> If you need to re-roll your 'bw/refspec-api' branch, could you please >> squash this, or the

Re: [PATCH] refspec.h: reinstate 'extern' to fix sparse warning

2018-05-16 Thread Brandon Williams
On 05/16, Ramsay Jones wrote: > > Signed-off-by: Ramsay Jones > --- > > Hi Brandon, > > If you need to re-roll your 'bw/refspec-api' branch, could you please > squash this, or the equivalent change before the 'struct refname' to > 'struct refname_item' name change,

[PATCH] refspec.h: reinstate 'extern' to fix sparse warning

2018-05-16 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Brandon, If you need to re-roll your 'bw/refspec-api' branch, could you please squash this, or the equivalent change before the 'struct refname' to 'struct refname_item' name change, into the relevant patch. (which would be patch

Re: [PATCH v2 1/3] merge: setup `opts` later in `checkout_fast_forward()`

2018-05-16 Thread Jacob Keller
On Wed, May 16, 2018 at 12:29 PM, Martin Ågren wrote: > On 16 May 2018 at 18:41, Stefan Beller wrote: >> On Wed, May 16, 2018 at 9:30 AM, Martin Ågren wrote: >>> >>> This patch is best viewed using something like this (note the

Re: [PATCH v2 1/3] merge: setup `opts` later in `checkout_fast_forward()`

2018-05-16 Thread Jacob Keller
On Wed, May 16, 2018 at 9:41 AM, Stefan Beller wrote: > + Jonathan Tan for a side discussion on anchoring. > > On Wed, May 16, 2018 at 9:30 AM, Martin Ågren wrote: >> >> This patch is best viewed using something like this (note the tab!): >>

Re: worktrees vs. alternates

2018-05-16 Thread Stefan Beller
> > You can also do periodic maintenance like: > > 1. Copy each ref in the forked repositories into the parent repository > (e.g., giving each child that borrows from the parent its own > hierarchy in refs/remotes//*). Can you just copy? I assume the mother repo doesn't know about all

Re: Git log range reverse bug

2018-05-16 Thread Johannes Sixt
Am 16.05.2018 um 20:19 schrieb Mehdi Zeinali: Git Version: Version: 2.14.2 When reversing a range in git log, it does not start from the expected commit: --reverse does not change the meaning A..B to B..A or something. For a particular A..B specification, the set of commits selected when

Re: [PATCH 1/1] git-p4: add unshelve command

2018-05-16 Thread Luke Diamand
On 13 May 2018 at 14:52, Merland Romain wrote: > Hello Luke, > > Very interseting > This is indeed an option we are waiting since the introduction of option > --shelve for git p4 submit > What I like most in your approach is the preservation of link to p4/master > inducing

Re: worktrees vs. alternates

2018-05-16 Thread Martin Fick
On Wednesday, May 16, 2018 01:06:59 PM Jeff King wrote: > On Wed, May 16, 2018 at 01:40:56PM -0600, Martin Fick wrote: > > > In theory the fetch means that it's safe to actually > > > prune in the mother repo, but in practice there are > > > still races. They don't come up often, but if you > > >

Re: worktrees vs. alternates

2018-05-16 Thread Jeff King
On Wed, May 16, 2018 at 04:02:53PM -0400, Konstantin Ryabitsev wrote: > On 05/16/18 15:37, Jeff King wrote: > > Yes, that's pretty close to what we do at GitHub. Before doing any > > repacking in the mother repo, we actually do the equivalent of: > > > > git fetch --prune ../$id.git

Re: worktrees vs. alternates

2018-05-16 Thread Jeff King
On Wed, May 16, 2018 at 01:40:56PM -0600, Martin Fick wrote: > > In theory the fetch means that it's safe to actually prune > > in the mother repo, but in practice there are still > > races. They don't come up often, but if you have enough > > repositories, they do eventually. :) > > Peff, > >

Re: worktrees vs. alternates

2018-05-16 Thread Konstantin Ryabitsev
On 05/16/18 15:37, Jeff King wrote: > Yes, that's pretty close to what we do at GitHub. Before doing any > repacking in the mother repo, we actually do the equivalent of: > > git fetch --prune ../$id.git +refs/*:refs/remotes/$id/* > git repack -Adl > > from each child to pick up any new

Re: worktrees vs. alternates

2018-05-16 Thread Martin Fick
On Wednesday, May 16, 2018 12:37:45 PM Jeff King wrote: > On Wed, May 16, 2018 at 03:29:42PM -0400, Konstantin Ryabitsev wrote: > Yes, that's pretty close to what we do at GitHub. Before > doing any repacking in the mother repo, we actually do > the equivalent of: > > git fetch --prune

Re: worktrees vs. alternates

2018-05-16 Thread Jeff King
On Wed, May 16, 2018 at 03:29:42PM -0400, Konstantin Ryabitsev wrote: > On 05/16/18 15:23, Jeff King wrote: > > I implemented "repack -k", which keeps all objects and just rolls them > > into the new pack (along with any currently-loose unreachable objects). > > Aside from corner cases (e.g.,

Re: worktrees vs. alternates

2018-05-16 Thread Konstantin Ryabitsev
On 05/16/18 15:23, Jeff King wrote: > I implemented "repack -k", which keeps all objects and just rolls them > into the new pack (along with any currently-loose unreachable objects). > Aside from corner cases (e.g., where somebody accidentally added a 20GB > file to an otherwise 100MB-repo and

Re: [PATCH v2 1/3] merge: setup `opts` later in `checkout_fast_forward()`

2018-05-16 Thread Martin Ågren
On 16 May 2018 at 18:41, Stefan Beller wrote: > On Wed, May 16, 2018 at 9:30 AM, Martin Ågren wrote: >> >> This patch is best viewed using something like this (note the tab!): >> --color-moved --anchored=" trees[nr_trees] = parse_tree_indirect" >

Re: worktrees vs. alternates

2018-05-16 Thread Jeff King
On Wed, May 16, 2018 at 03:01:13PM -0400, Konstantin Ryabitsev wrote: > On 05/16/18 14:26, Martin Fick wrote: > > If you are going to keep the unreferenced objects around > > forever, it might be better to keep them around in packed > > form? > > I'm undecided about that. On the one hand this

Re: worktrees vs. alternates

2018-05-16 Thread Martin Fick
On Wednesday, May 16, 2018 03:11:47 PM Konstantin Ryabitsev wrote: > On 05/16/18 15:03, Martin Fick wrote: > >> I'm undecided about that. On the one hand this does > >> create lots of small files and inevitably causes > >> (some) performance degradation. On the other hand, I > >> don't want to

Re: worktrees vs. alternates

2018-05-16 Thread Jeff King
On Wed, May 16, 2018 at 10:58:19AM -0400, Konstantin Ryabitsev wrote: > The parent repo is not keeping track of any other repositories that may > be using it for alternates, which is why you basically: > > 1. never run auto-gc in the parent repo > 2. repack it manually using -Ad to keep loose

Re: worktrees vs. alternates

2018-05-16 Thread Konstantin Ryabitsev
On 05/16/18 15:03, Martin Fick wrote: >> I'm undecided about that. On the one hand this does create >> lots of small files and inevitably causes (some) >> performance degradation. On the other hand, I don't want >> to keep useless objects in the pack, because that would >> also cause performance

Re: worktrees vs. alternates

2018-05-16 Thread Martin Fick
On Wednesday, May 16, 2018 03:01:13 PM Konstantin Ryabitsev wrote: > On 05/16/18 14:26, Martin Fick wrote: > > If you are going to keep the unreferenced objects around > > forever, it might be better to keep them around in > > packed > > form? > > I'm undecided about that. On the one hand this

Re: worktrees vs. alternates

2018-05-16 Thread Konstantin Ryabitsev
On 05/16/18 14:26, Martin Fick wrote: > If you are going to keep the unreferenced objects around > forever, it might be better to keep them around in packed > form? I'm undecided about that. On the one hand this does create lots of small files and inevitably causes (some) performance

Re: worktrees vs. alternates

2018-05-16 Thread Martin Fick
On Wednesday, May 16, 2018 02:12:24 PM Konstantin Ryabitsev wrote: > The loose objects I'm thinking of are those that are > generated when we do "git repack -Ad" -- this takes all > unreachable objects and loosens them (see man git-repack > for more info). Normally, these would be pruned after a

Re: Git log range reverse bug

2018-05-16 Thread Derrick Stolee
Hi Mendi, On 5/16/2018 2:19 PM, Mehdi Zeinali wrote: Git Version: Version: 2.14.2 When reversing a range in git log, it does not start from the expected commit: $ git show 8e11b4a41ec21e47fb0bf8b76e1edba739f57a9b commit 8e11b4a41ec21e47fb0bf8b76e1edba739f57a9b Author: Some Name

Git log range reverse bug

2018-05-16 Thread Mehdi Zeinali
Git Version: Version: 2.14.2 When reversing a range in git log, it does not start from the expected commit: $ git show 8e11b4a41ec21e47fb0bf8b76e1edba739f57a9b commit 8e11b4a41ec21e47fb0bf8b76e1edba739f57a9b Author: Some Name Date: Mon Nov 3 19:01:53 2014 + . . .

Re: worktrees vs. alternates

2018-05-16 Thread Konstantin Ryabitsev
On 05/16/18 14:02, Ævar Arnfjörð Bjarmason wrote: > > On Wed, May 16 2018, Konstantin Ryabitsev wrote: > >> Maybe git-repack can be told to only borrow parent objects if they are >> in packs. Anything not in packs should be hardlinked into the child >> repo. That's my wishful think for the day.

Re: worktrees vs. alternates

2018-05-16 Thread Ævar Arnfjörð Bjarmason
On Wed, May 16 2018, Konstantin Ryabitsev wrote: > Maybe git-repack can be told to only borrow parent objects if they are > in packs. Anything not in packs should be hardlinked into the child > repo. That's my wishful think for the day. :) Can you elaborate on how this would help? We're just

Re: worktrees vs. alternates

2018-05-16 Thread Ævar Arnfjörð Bjarmason
On Wed, May 16 2018, Konstantin Ryabitsev wrote: > On Wed, May 16, 2018 at 05:34:34PM +0200, Ævar Arnfjörð Bjarmason wrote: >>I may have missed some edge case, but I believe this entire workaround >>isn't needed if you guarantee that the parent repo doesn't contain any >>objects that will get

Re: worktrees vs. alternates

2018-05-16 Thread Konstantin Ryabitsev
On 05/16/18 13:14, Martin Fick wrote: > On Wednesday, May 16, 2018 10:58:19 AM Konstantin Ryabitsev > wrote: >> >> 1. Find every repo mentioning the parent repository in >> their alternates 2. Repack them without the -l switch >> (which copies all the borrowed objects into those repos) >> 3. Once

Re: [PATCH v3 13/28] t3702: abstract away SHA-1-specific constants

2018-05-16 Thread Stefan Beller
On Tue, May 15, 2018 at 6:56 PM, brian m. carlson wrote: > Strip out the index lines in the diff before comparing them, as these > will differ between hash algorithms. This leads to a smaller, simpler > change than editing the index line. > > Signed-off-by: brian m.

Re: worktrees vs. alternates

2018-05-16 Thread Martin Fick
On Wednesday, May 16, 2018 10:58:19 AM Konstantin Ryabitsev wrote: > > 1. Find every repo mentioning the parent repository in > their alternates 2. Repack them without the -l switch > (which copies all the borrowed objects into those repos) > 3. Once all child repos have been repacked this way,

Re: [PATCH v3 07/28] t1007: annotate with SHA1 prerequisite

2018-05-16 Thread Stefan Beller
Hi brian, On Tue, May 15, 2018 at 6:56 PM, brian m. carlson wrote: > Since this is a core test that tests basic functionality, annotate the > assertions that have dependencies on SHA-1 with the appropriate > prerequisite. > > Signed-off-by: brian m. carlson

  1   2   >