Re: [PATCH v2 0/7] nd/worktree-move reboot

2018-03-03 Thread Eric Sunshine
On Mon, Feb 12, 2018 at 4:49 AM, Nguyễn Thái Ngọc Duy wrote: > v2 basically fixes lots of comments from Eric (many thanks!): memory > leak, typos, document updates, tests, corner case fixes. > Interdiff: Thanks, I finally got around to doing a full re-read of the entire

[PATCH] t2028: fix minor error and issues in newly-added "worktree move" tests

2018-03-03 Thread Eric Sunshine
Recently-added "git worktree move" tests include a minor error and a few small issues. Specifically: * checking non-existence of wrong file ("source" instead of "destination") * unneeded redirect (">empty") * unused variable ("toplevel") * restoring a worktree location by means of a separate

Re: [PATCH] git.el: handle default excludesfile properly

2018-03-03 Thread Eric Sunshine
On Sat, Mar 3, 2018 at 9:57 PM, Dorab Patel wrote: > Thanks for reviewing and locating the commits. > > OK, I'll re-roll and add the relevant commits. It may take some time. > > Should I just send the revised patch as a separate thread (with the > relevant commits and

Re: [PATCH 13/44] pack: move approximate object count to object store

2018-03-03 Thread Duy Nguyen
On Sun, Mar 4, 2018 at 9:47 AM, Eric Sunshine wrote: > On Sat, Mar 3, 2018 at 6:36 AM, Nguyễn Thái Ngọc Duy > wrote: >> The approximate_object_count() function maintains a rough count of >> objects in a repository to estimate how long object name

Re: [PATCH 37/44] packfile: add repository argument to prepare_packed_git

2018-03-03 Thread Eric Sunshine
On Sat, Mar 3, 2018 at 6:36 AM, Nguyễn Thái Ngọc Duy wrote: > Add a repository argument to allow prepare_packed_git callers to > be more specific about which repository to handle. See c28d027a52c > (sha1_file: add repository argument to link_alt_odb_entry, 2018-02-20) > for an

Re: [PATCH] git.el: handle default excludesfile properly

2018-03-03 Thread Dorab Patel
Thanks for reviewing and locating the commits. OK, I'll re-roll and add the relevant commits. It may take some time. Should I just send the revised patch as a separate thread (with the relevant commits and history)? On Sat, Mar 3, 2018 at 6:12 PM, Eric Sunshine wrote:

Re: [PATCH 13/44] pack: move approximate object count to object store

2018-03-03 Thread Eric Sunshine
On Sat, Mar 3, 2018 at 6:36 AM, Nguyễn Thái Ngọc Duy wrote: > The approximate_object_count() function maintains a rough count of > objects in a repository to estimate how long object name abbreviates > should be. Object names are scoped to a repository and the > appropriate

Re: [PATCH 09/44] object-store: free alt_odb_list

2018-03-03 Thread Eric Sunshine
On Sat, Mar 3, 2018 at 6:36 AM, Nguyễn Thái Ngọc Duy wrote: > Free the memory and reset alt_odb_{list, tail} to NULL. > > Signed-off-by: Stefan Beller > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/object.c b/object.c > @@

Re: [PATCH 06/44] repository: introduce raw object store field

2018-03-03 Thread Eric Sunshine
On Sat, Mar 3, 2018 at 6:35 AM, Nguyễn Thái Ngọc Duy wrote: > The raw object store field will contain any objects needed for > access to objects in a given repository. > > This patch introduces the raw object store and populates it with the > `objectdir`, which used to be part

Re: [PATCH] git.el: handle default excludesfile properly

2018-03-03 Thread Eric Sunshine
On Sat, Mar 3, 2018 at 8:36 PM, Dorab Patel wrote: > Correct me if I'm wrong, but my understanding, from > https://git-scm.com/docs/gitignore, is that $HOME/.gitignore is used > only if it is specified as the value of core.excludesfile in > ~/.gitconfig. It is not used by

Re: [PATCH] git.el: handle default excludesfile properly

2018-03-03 Thread Dorab Patel
[[Pardon the duplicate. I forgot to send via text/plain and the mailing list bounced it, so resending.]] Thanks for the feedback. Correct me if I'm wrong, but my understanding, from https://git-scm.com/docs/gitignore, is that $HOME/.gitignore is used only if it is specified as the value of

[PATCH v3 2/2] send-email: Support separate Reply-To address

2018-03-03 Thread Christian Ludwig
In some projects contributions from groups are only accepted from a common group email address. But every individual may want to receive replies to her own personal address. That's what we have 'Reply-To' headers for in SMTP. So introduce an optional '--reply-to' command line option. This patch

git-send-email: Support for Reply-To

2018-03-03 Thread Christian Ludwig
Hi, this is the third iteration of this series. There was a request to rebase the changes on the refactoring patch b6049542 ("send-email: extract email-parsing code into a subroutine", 2017-12-15). This is the result. The diffstat is the same compared to the last revision. It could be made

[PATCH v3 1/2] send-email: Rename variable for clarity

2018-03-03 Thread Christian Ludwig
The SMTP protocol has both, the 'Reply-To' and the 'In-Reply-To' header fields. We only use the latter. To avoid confusion, rename the variable for it. Signed-off-by: Christian Ludwig --- git-send-email.perl | 38 +++--- 1 file changed, 19

[PATCH] git-gui: workaround ttk:style theme use

2018-03-03 Thread Clemens Buchacher
Tk 8.5.7, which is the latest version on Centos 6, does not support getting the current theme with [ttk::style theme use]. Use the existing workaround for this in all places. Signed-off-by: Clemens Buchacher --- git-gui/lib/themed.tcl | 15 ++- 1 file changed, 10

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

2018-03-03 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",

RE

2018-03-03 Thread @Sheng Li Hung
I am Mr.Sheng Li Hung, from china I got your information while search for a reliable person, I have a very profitable business proposition for you and i can assure you that you will not regret been part of this mutual beneficial transaction after completion. Kindly get back to me for more details

Re: [RFC] Contributing to Git (on Windows)

2018-03-03 Thread Jonathan Nieder
Hi Dscho, Johannes Schindelin wrote: >> Jonathan Nieder writes: >>> Dereck Stolee wrote: +Test Your Changes on Linux +-- + +It can be important to work directly on the [core Git codebase](https://github.com/git/git), +such as

Re: [RFC] Contributing to Git (on Windows)

2018-03-03 Thread Johannes Schindelin
Hi, On Fri, 2 Mar 2018, Junio C Hamano wrote: > Jonathan Nieder writes: > > >> +Test Your Changes on Linux > >> +-- > >> + > >> +It can be important to work directly on the [core Git > >> codebase](https://github.com/git/git), +such as a recent

Re: [RFC] Rebasing merges: a jorney to the ultimate solution(RoadClear)

2018-03-03 Thread Igor Djordjevic
On 02/03/2018 19:14, Igor Djordjevic wrote: > > > > It is interesting to think what it means to faithfully rebase a '-s > > > ours' merge. In your example the rebase does not introduce any new > > > changes into branch B that it doesn't introduce to branch A. Had it > > > added a fixup to branch

Re: git stash push -u always warns "pathspec '...' did not match any files"

2018-03-03 Thread Thomas Gummerer
On 03/03, Marc Strapetz wrote: > Reproducible in a test repository with following steps: > > $ touch untracked > $ git stash push -u -- untracked > Saved working directory and index state WIP on master: 0096475 init > fatal: pathspec 'untracked' did not match any files > error: unrecognized input

[PATCH v3 12/13] Makefile: add NO_PERL_CPAN_FALLBACKS knob

2018-03-03 Thread Ævar Arnfjörð Bjarmason
From: Todd Zullinger We include some perl modules which are not part of the core perl install, as a convenience. This allows us to rely on those modules in our perl-based tools and scripts without requiring users to install the modules from CPAN or their operating system

[PATCH v3 09/13] perl: move CPAN loader wrappers to another namespace

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Move the Git::Error and Git::Mail::Address wrappers to the Git::LoadCPAN::Loader::* namespace, e.g. Git::LoadCPAN::Error. That module will then either load Error from CPAN (if installed on the OS), or use Git::FromCPAN::Error. When I added the Error wrapper in 20d2a30f8f ("Makefile: replace

[PATCH v3 07/13] perl: update our ancient copy of Error.pm

2018-03-03 Thread Ævar Arnfjörð Bjarmason
The Error.pm shipped with Git as a fallback if there was no Error.pm on the system was released in April 2006. There's been dozens of releases since then, the latest at August 7, 2017. Let's update to that. I don't know of anything we need from this new release or which this fixes. This change is

[PATCH v3 08/13] perl: update our copy of Mail::Address

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Update our copy of Mail::Address from 2.19 (Aug 22, 2017) to 2.20 (Jan 23, 2018). Like the preceding Error.pm update this is done simply to keep up-to-date with upstream, and as can be shown from the diff there's no functional changes. The updated source was retrieved from

[PATCH v3 10/13] perl: generalize the Git::LoadCPAN facility

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Change the two wrappers that load from CPAN (local OS) or our own copy to do so via the same codepath. I added the Error.pm wrapper in 20d2a30f8f ("Makefile: replace perl/Makefile.PL with simple make rules", 2017-12-10), and shortly afterwards Matthieu Moy added a wrapper for Mail::Address in

[PATCH v3 13/13] perl Git::LoadCPAN: emit better errors under NO_PERL_CPAN_FALLBACKS

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Before my 20d2a30f8f ("Makefile: replace perl/Makefile.PL with simple make rules", 2017-12-10) on an OS package that removed the private-Error.pm copy we carried around manually removing the OS's Error.pm would yield: $ git add -p Can't locate Error.pm in @INC (you may need to install the

[PATCH v3 11/13] perl: move the perl/Git/FromCPAN tree to perl/FromCPAN

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Move the CPAN modules that have lived under perl/Git/FromCPAN since my 20d2a30f8f ("Makefile: replace perl/Makefile.PL with simple make rules", 2017-12-10) to perl/FromCPAN. A subsequent change will teach the Makefile to only install these copies of CPAN modules if a flag that distro packagers

[PATCH v3 06/13] git-send-email: unconditionally use Net::{SMTP,Domain}

2018-03-03 Thread Ævar Arnfjörð Bjarmason
The Net::SMTP and Net::Domain were both first released with perl v5.7.3[1], since my d48b284183 ("perl: bump the required Perl version to 5.8 from 5.6.[21]", 2010-09-24) we've depended on 5.8, so there's no reason to conditionally require them anymore. This conditional loading was initially added

[PATCH v3 05/13] Git.pm: hard-depend on the File::{Temp,Spec} modules

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Since my d48b284183 ("perl: bump the required Perl version to 5.8 from 5.6.[21]", 2010-09-24), we've depended on 5.8, so there's no reason to conditionally require File::Temp and File::Spec anymore. They were first released with perl versions v5.6.1 and 5.00405, respectively. This code was

[PATCH v3 04/13] gitweb: hard-depend on the Digest::MD5 5.8 module

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Since my d48b284183 ("perl: bump the required Perl version to 5.8 from 5.6.[21]", 2010-09-24), we've depended on 5.8, so there's no reason to conditionally require Digest::MD5 anymore. It was released with perl v5.7.3[1] The initial introduction of the dependency in e9fdd74e53 ("gitweb:

[PATCH v3 02/13] Git.pm: remove redundant "use strict" from sub-package

2018-03-03 Thread Ævar Arnfjörð Bjarmason
In Perl the "use strict/warnings" pragmas are lexical, thus there's no reason to do: package Foo; use strict; package Bar; use strict; $x = 5; To satisfy the desire that the undeclared $x variable will be spotted at compile-time. It's enough to include the first "use strict".

[PATCH v3 03/13] Git.pm: add the "use warnings" pragma

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Amend Git.pm to load the "warnings" pragma like the rest of the code in perl/ in addition to the existing "strict" pragma. This is considered the bare minimum best practice in Perl. Ever since this code was introduced in b1edc53d06 ("Introduce Git.pm (v4)", 2006-06-24) it's only been using

[PATCH v3 01/13] perl: *.pm files should not have the executable bit

2018-03-03 Thread Ævar Arnfjörð Bjarmason
The Git::Mail::Address file added in bd869f67b9 ("send-email: add and use a local copy of Mail::Address", 2018-01-05) had the executable bit set. That bit should not be set for *.pm files. It breaks nothing but it is redundant and confusing as none of the other files have it and these files are

[PATCH v3 00/13] various perl fixes

2018-03-03 Thread Ævar Arnfjörð Bjarmason
Same as v2 except rebased on master & a couple of commit message fixes, thanks to Eric Sunshine (thanks!). tbdiff with v2: 4: 0d67af28fb ! 4: 8ad874c944 gitweb: hard-depend on the Digest::MD5 5.8 module @@ -14,9 +14,6 @@ always be run on at least 5.8, so there's no need to mention

Re: t006 broken under Mac OS

2018-03-03 Thread Jeff King
On Sat, Mar 03, 2018 at 01:52:05PM +0100, Torsten Bögershausen wrote: > Beside that t1006 has a broken indentation (mixed spaces and TABs at > the beginning of the line, I get 4 errors here under Mac OS: > > not ok 15 - Check %(refname) gives empty output > not ok 36 - Check %(refname) gives

RE: [PATCH 0/3] git worktree prune improvements

2018-03-03 Thread Randall S. Becker
On March 2, 2018 10:39 PM, Nguy?n Thái Ng?c Duy wrote: > This is something we could do to improve the situation when a user manually > moves a worktree and not follow the update process (we have had the first > reported case [1]). Plus a bit cleanup in gc. > > I think this is something we should

Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-03 Thread SZEDER Gábor
On Sat, Mar 3, 2018 at 10:23 AM, Nguyễn Thái Ngọc Duy wrote: > This also adds completion for 'git notes remove' with two options: > --ignore-missing and --stdin. > > For some strange reason, 'git notes undefined --' completes --ref > without even running

t006 broken under Mac OS

2018-03-03 Thread Torsten Bögershausen
Hej, Beside that t1006 has a broken indentation (mixed spaces and TABs at the beginning of the line, I get 4 errors here under Mac OS: not ok 15 - Check %(refname) gives empty output not ok 36 - Check %(refname) gives empty output not ok 58 - Check %(refname) gives empty output not ok 89 - Check

Re: [PATCH 2/2] completion: simplify _git_notes

2018-03-03 Thread SZEDER Gábor
On Sat, Mar 3, 2018 at 10:23 AM, Nguyễn Thái Ngọc Duy wrote: > This also adds completion for 'git notes remove' with two options: > --ignore-missing and --stdin. > > For some strange reason, 'git notes undefined --' completes --ref > without even running

[PATCH 41/44] packfile: allow reprepare_packed_git to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- packfile.c | 8 packfile.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-)

[PATCH 33/44] packfile: allow prepare_packed_git_mru to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller This conversion was done without the #define trick used in the earlier series refactoring to have better repository access, because this function is easy to review, as all lines are converted and it has only one caller Signed-off-by: Stefan Beller

[PATCH 42/44] packfile: add repository argument to find_pack_entry

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller While at it move the documentation to the header and mention which pack files are searched. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy ---

[PATCH 44/44] packfile: keep prepare_packed_git() private

2018-03-03 Thread Nguyễn Thái Ngọc Duy
The reason callers have to call this is to make sure either packed_git or packed_git_mru pointers are initialized since we don't do that by default. Sometimes it's hard to see this connection between where the function is called and where packed_git pointer is used (sometimes in separate

[PATCH 39/44] packfile: allow prepare_packed_git_one to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- packfile.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH 40/44] packfile: allow prepare_packed_git to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- packfile.c | 18 +- packfile.h | 3 +-- 2 files changed, 10 insertions(+), 11

[PATCH 37/44] packfile: add repository argument to prepare_packed_git

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Add a repository argument to allow prepare_packed_git callers to be more specific about which repository to handle. See c28d027a52c (sha1_file: add repository argument to link_alt_odb_entry, 2018-02-20) for an explanation of the #define trick.

[PATCH 43/44] packfile: allow find_pack_entry to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- packfile.c | 11 +-- packfile.h | 3 +-- 2 files changed, 6 insertions(+), 8

[PATCH 38/44] packfile: add repository argument to reprepare_packed_git

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller See previous patch for explanation. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/gc.c | 2 +- builtin/receive-pack.c | 3

[PATCH 35/44] packfile: allow install_packed_git to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller This conversion was done without the #define trick used in the earlier series refactoring to have better repository access, because this function is easy to review, as it only has one caller and all lines but the first two are converted. We must not

[PATCH 34/44] packfile: allow rearrange_packed_git to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- packfile.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 31/44] sha1_file: allow map_sha1_file to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- object-store.h | 3 +-- sha1_file.c| 5

[PATCH 36/44] packfile: add repository argument to prepare_packed_git_one

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- packfile.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 32/44] sha1_file: allow sha1_loose_object_info to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Jonathan Nieder Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1_file.c | 11 +-- 1 file

[PATCH 27/44] sha1_file: allow sha1_file_name to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- object-store.h | 3 +-- sha1_file.c| 4

[PATCH 29/44] sha1_file: allow open_sha1_file to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1_file.c | 11 +-- 1 file

[PATCH 30/44] sha1_file: allow map_sha1_file_1 to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Jonathan Nieder Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1_file.c | 8 +++- 1 file changed,

[PATCH 28/44] sha1_file: allow stat_sha1_file to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1_file.c | 11 +-- 1 file

[PATCH 25/44] sha1_file: add repository argument to map_sha1_file

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Add a repository argument to allow map_sha1_file callers to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the

[PATCH 26/44] sha1_file: add repository argument to sha1_loose_object_info

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Add a repository argument to allow the sha1_loose_object_info caller to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As

[PATCH 21/44] sha1_file: add repository argument to sha1_file_name

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Add a repository argument to allow sha1_file_name callers to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the

[PATCH 14/44] sha1_file: add raw_object_store argument to alt_odb_usable

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Add a raw_object_store to alt_odb_usable to be more specific about which repository to act on. The choice of the repository is delegated to its only caller link_alt_odb_entry. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano

[PATCH 23/44] sha1_file: add repository argument to open_sha1_file

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Add a repository argument to allow the open_sha1_file caller to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the

[PATCH 19/44] sha1_file: allow link_alt_odb_entries to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Actually this also allows read_info_alternates and link_alt_odb_entry to handle arbitrary repositories, but link_alt_odb_entries is the most interesting function in this set of functions, hence the commit subject. These functions span a strongly connected

[PATCH 15/44] sha1_file: add repository argument to link_alt_odb_entry

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Add a repository argument to allow the link_alt_odb_entry caller to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. Since the

[PATCH 18/44] sha1_file: add repository argument to prepare_alt_odb

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller See previous patch for explanation. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy ---

[PATCH 17/44] sha1_file: add repository argument to link_alt_odb_entries

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller See previous patch for explanation. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Nguyễn Thái Ngọc Duy --- sha1_file.c | 18 -- 1 file changed, 12

[PATCH 22/44] sha1_file: add repository argument to stat_sha1_file

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Add a repository argument to allow the stat_sha1_file caller to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the

[PATCH 16/44] sha1_file: add repository argument to read_info_alternates

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller See previous patch for explanation. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy ---

[PATCH 20/44] sha1_file: allow prepare_alt_odb to handle arbitrary repositories

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Nguyễn Thái Ngọc Duy --- object-store.h | 3 +-- sha1_file.c| 12 +--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/object-store.h

[PATCH 24/44] sha1_file: add repository argument to map_sha1_file_1

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Add a repository argument to allow the map_sha1_file_1 caller to be more specific about which repository to act on. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with the

[PATCH 05/44] repository: delete ignore_env member

2018-03-03 Thread Nguyễn Thái Ngọc Duy
This variable was added because the repo_set_gitdir() was created to cover both submodule and main repos, but these two are initialized a bit differently so ignore_env == 0 means main repo, while ignore_env != 0 is submodules. Since the difference part (env variables) has been moved out of

[PATCH 04/44] sha1_file.c: move delayed getenv(altdb) back to setup_git_env()

2018-03-03 Thread Nguyễn Thái Ngọc Duy
getenv() is supposed to work on the main repository only. This delayed getenv() code in sha1_file.c makes it more difficult to convert sha1_file.c to a generic object store that could be used by both submodule and main repositories. Move the getenv() back in setup_git_env() where other env vars

[PATCH 10/44] object-store: move packed_git and packed_git_mru to object store

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller In a process with multiple repositories open, packfile accessors should be associated to a single repository and not shared globally. Move packed_git and packed_git_mru into the_repository and adjust callers to reflect this. [nd: while at there, wrap

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

2018-03-03 Thread Nguyễn Thái Ngọc Duy
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 customizable paths. These optional paths can be NULL and will be

[PATCH 13/44] pack: move approximate object count to object store

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller The approximate_object_count() function maintains a rough count of objects in a repository to estimate how long object name abbreviates should be. Object names are scoped to a repository and the appropriate length may differ by repository, so the object

[PATCH 09/44] object-store: free alt_odb_list

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Free the memory and reset alt_odb_{list, tail} to NULL. Signed-off-by: Stefan Beller Signed-off-by: Nguyễn Thái Ngọc Duy --- object.c | 18 ++ 1 file changed, 18 insertions(+) diff --git

[PATCH 12/44] pack: move prepare_packed_git_run_once to object store

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Each repository's object store can be initialized independently, so they must not share a run_once variable. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH 11/44] object-store: close all packs upon clearing the object store

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/am.c | 2 +- builtin/clone.c| 2 +- builtin/fetch.c| 2 +-

[PATCH 00/44] reroll nd/remove-ignore-env.. sb/object-store and sb/packfiles..

2018-03-03 Thread Nguyễn Thái Ngọc Duy
On Sat, Mar 3, 2018 at 9:54 AM, Duy Nguyen wrote: > On Thu, Mar 1, 2018 at 2:09 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> On Wed, Feb 28, 2018 at 9:59 AM, Junio C Hamano wrote: Duy Nguyen

[PATCH 06/44] repository: introduce raw object store field

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller The raw object store field will contain any objects needed for access to objects in a given repository. This patch introduces the raw object store and populates it with the `objectdir`, which used to be part of the repository struct. As the struct gains

[PATCH 08/44] object-store: move alt_odb_list and alt_odb_tail to object store

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller In a process with multiple repositories open, alternates should be associated to a single repository and not shared globally. Move alt_odb_list and alt_odb_tail into the_repository and adjust callers to reflect this. Now that the alternative object data

[PATCH 07/44] object-store: migrate alternates struct and functions from cache.h

2018-03-03 Thread Nguyễn Thái Ngọc Duy
From: Stefan Beller Migrate the struct alternate_object_database and all its related functions to the object store as these functions are easier found in that header. The migration is just a verbatim copy, no need to include the object store header at any C file, because

[PATCH 01/44] repository: initialize the_repository in main()

2018-03-03 Thread Nguyễn Thái Ngọc Duy
This simplifies initialization of struct repository and anything inside. Easier to read. Easier to add/remove fields. Everything will go through main() common-main.c so this should cover all programs, including t/helper. Signed-off-by: Nguyễn Thái Ngọc Duy --- common-main.c

[PATCH 03/44] repository.c: delete dead functions

2018-03-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- repository.c | 25 - 1 file changed, 25 deletions(-) diff --git a/repository.c b/repository.c index bb53b54b6d..e65f4138a7 100644 --- a/repository.c +++

Re: Contributor Summit planning

2018-03-03 Thread Jeff King
On Sat, Mar 03, 2018 at 05:30:10AM -0500, Jeff King wrote: > As in past years, I plan to run it like an unconference. Attendees are > expected to bring topics for group discussion. Short presentations are > also welcome. We'll put the topics on a whiteboard in the morning, and > pick whichever

Contributor Summit planning

2018-03-03 Thread Jeff King
The Git Merge Contributor Summit is scheduled for this coming Wednesday, March 7th, in Barcelona. If you're not registered, there are still one or two slots left for last-minute attendees. Please email me if you're interested. As in past years, I plan to run it like an unconference. Attendees

Re: Worktree silently deleted on git fetch/gc/log

2018-03-03 Thread Eric Sunshine
On Fri, Mar 2, 2018 at 6:53 AM, Duy Nguyen wrote: > I'm going to improve it a bit in this case either way, I think I have > some idea: (mostly to Eric) since worktree B is alive and kicking, it > should keep at least HEAD or index updated often. We can delay > deleting a

Re: [PATCH] smart-http: document flush after "# service" line

2018-03-03 Thread Jeff King
On Sat, Mar 03, 2018 at 03:28:47AM -0500, Eric Sunshine wrote: > On Sat, Mar 3, 2018 at 12:27 AM, Jeff King wrote: > > Subject: smart-http: document flush after "# service" line > > > > The http-protocol.txt spec fails to mention that a flush > > packet comes in the smart server

git stash push -u always warns "pathspec '...' did not match any files"

2018-03-03 Thread Marc Strapetz
Reproducible in a test repository with following steps: $ touch untracked $ git stash push -u -- untracked Saved working directory and index state WIP on master: 0096475 init fatal: pathspec 'untracked' did not match any files error: unrecognized input The file is stashed correctly, though.

Re: [PATCH 1/2] completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate

2018-03-03 Thread Eric Sunshine
On Sat, Mar 3, 2018 at 4:23 AM, Nguyễn Thái Ngọc Duy wrote: > There is not a strong reason to hide this option, and git-merge already > completes this one. Let's allow to complete this for all commands (and > let git-completion.bash do the suppressing if neede).

Re: [PATCH 3/3] worktree prune: improve prune logic when worktree is moved

2018-03-03 Thread Eric Sunshine
On Fri, Mar 2, 2018 at 10:39 PM, Nguyễn Thái Ngọc Duy wrote: > Worktree manual move support is actually gone in 618244e160 (worktree: > stop supporting moving worktrees manually - 2016-01-22). Before that, > this gitdir could be updated often when the worktree is accessed. That

[PATCH 0/2] nd/parseopt-completion fixups

2018-03-03 Thread Nguyễn Thái Ngọc Duy
This addresses some comments from v3 [1]. Since the series has been merged to 'next', we do incremental updates instead: - --rerere-autoupdate is completable on am, revert and cherry-pick - simplification in _git_notes which leads to completion in 'git notes remove' [1]

[PATCH 2/2] completion: simplify _git_notes

2018-03-03 Thread Nguyễn Thái Ngọc Duy
This also adds completion for 'git notes remove' with two options: --ignore-missing and --stdin. For some strange reason, 'git notes undefined --' completes --ref without even running --git-completion-helper. But since this is an error case (and we're not doing anything destructive, it's probably

[PATCH 1/2] completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate

2018-03-03 Thread Nguyễn Thái Ngọc Duy
There is not a strong reason to hide this option, and git-merge already completes this one. Let's allow to complete this for all commands (and let git-completion.bash do the suppressing if neede). This makes --rerere-autoupdate completable for am, cherry-pick and revert. Signed-off-by: Nguyễn

Re: [PATCH 1/3] gc.txt: more details about what gc does

2018-03-03 Thread Eric Sunshine
On Fri, Mar 2, 2018 at 10:39 PM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt > @@ -15,8 +15,9 @@ DESCRIPTION > --- > Runs a number of housekeeping tasks

Re: [PATCH] git.el: handle default excludesfile properly

2018-03-03 Thread Eric Sunshine
On Fri, Mar 2, 2018 at 10:48 PM, Dorab Patel wrote: > The previous version only looked at core.excludesfile for locating the > excludesfile. So, when core.excludesfile was not defined, it did not > use the possible default locations. > > The current version uses either

Re: [PATCH] smart-http: document flush after "# service" line

2018-03-03 Thread Eric Sunshine
On Sat, Mar 3, 2018 at 12:27 AM, Jeff King wrote: > Subject: smart-http: document flush after "# service" line > > The http-protocol.txt spec fails to mention that a flush > packet comes in the smart server response after sending any > the "service" header. "any the"? >