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

2018-03-05 Thread Duy Nguyen
On Sun, Mar 4, 2018 at 12:26 PM, Eric Sunshine wrote: > 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

Re: [PATCH/RFC v2 0/9] Reduce pack-objects memory footprint

2018-03-05 Thread Duy Nguyen
On Sat, Mar 03, 2018 at 09:46:57AM +0700, Nguyễn Thái Ngọc Duy wrote: > The array of object_entry in pack-objects can take a lot of memory > when pack-objects is run in "pack everything" mode. On linux-2.6.git, > this array alone takes roughly 800MB. > > This series reorders some fields 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 00/11] Moving global state into the repository object (part 2)

2018-03-02 Thread Duy Nguyen
On Thu, Mar 1, 2018 at 2:09 AM, Junio C Hamano <gits...@pobox.com> wrote: > Stefan Beller <sbel...@google.com> writes: > >> On Wed, Feb 28, 2018 at 9:59 AM, Junio C Hamano <gits...@pobox.com> wrote: >>> Duy Nguyen <pclo...@gmail.com> writes: &g

Re: [PATCH 2/2] Revert "repository: pre-initialize hash algo pointer"

2018-03-02 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 6:09 AM, Junio C Hamano <gits...@pobox.com> wrote: > Duy Nguyen <pclo...@gmail.com> writes: > >> Yes that's the intention. But after writing cover letter for v2 and >> sending it out, it looks to me that this thing must stay until all our

Re: Reduce pack-objects memory footprint?

2018-03-02 Thread Duy Nguyen
On Fri, Mar 2, 2018 at 5:54 PM, Jeff King <p...@peff.net> wrote: > On Fri, Mar 02, 2018 at 05:18:45PM +0700, Duy Nguyen wrote: > >> On Wed, Feb 28, 2018 at 4:27 PM, Duy Nguyen <pclo...@gmail.com> wrote: >> > linux-2.6.git current has 6483999 objects. "git gc

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

2018-03-02 Thread Duy Nguyen
d below, possibly using a > different wording. Will do. > > Regards > Дилян > > On 03/02/18 00:56, Duy Nguyen wrote: >> >> On Fri, Mar 2, 2018 at 3:14 AM, Eric Sunshine <sunsh...@sunshineco.com> >> wrote: >>> >>> As far as I know, there isn't

Re: Reduce pack-objects memory footprint?

2018-03-02 Thread Duy Nguyen
On Fri, Mar 2, 2018 at 5:54 PM, Jeff King <p...@peff.net> wrote: > On Fri, Mar 02, 2018 at 05:18:45PM +0700, Duy Nguyen wrote: > >> On Wed, Feb 28, 2018 at 4:27 PM, Duy Nguyen <pclo...@gmail.com> wrote: >> > linux-2.6.git current has 6483999 objects. "git gc

Re: Reduce pack-objects memory footprint?

2018-03-02 Thread Duy Nguyen
On Wed, Feb 28, 2018 at 4:27 PM, Duy Nguyen <pclo...@gmail.com> wrote: > linux-2.6.git current has 6483999 objects. "git gc" on my poor laptop > consumes 1.7G out of 4G RAM, pushing lots of data to swap and making > all apps nearly unusuable (granted the problem is partly

Re: [PATCH 00/11] Reduce pack-objects memory footprint

2018-03-01 Thread Duy Nguyen
On Thu, Mar 1, 2018 at 8:33 PM, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Mar 01 2018, Nguyễn Thái Ngọc Duy jotted: > >> The array of object_entry in pack-objects can take a lot of memory >> when pack-objects is run in "pack everything" mode. On linux-2.6.git, >> this array

Re: [PATCH 07/11] pack-objects: move in_pack out of struct object_entry

2018-03-01 Thread Duy Nguyen
On Thu, Mar 1, 2018 at 9:49 PM, Jeff King wrote: > On Thu, Mar 01, 2018 at 04:10:48PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> Instead of using 8 bytes (on 64 bit arch) to store a pointer to a >> pack. Use an index isntead since the number of packs should be >> relatively small. >>

Re: [PATCH/RFC 1/1] gc --auto: exclude the largest giant pack in low-memory config

2018-03-01 Thread Duy Nguyen
On Fri, Mar 2, 2018 at 1:14 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> pack-objects could be a big memory hog especially on large repos, >> everybody knows that. The suggestion to stick a .keep file on the >> largest pack to avoid this

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

2018-03-01 Thread Duy Nguyen
On Fri, Mar 2, 2018 at 3:14 AM, Eric Sunshine wrote: > As far as I know, there isn't any code in Git which would > automatically remove the .git/worktrees/B directory, so it's not clear > how that happened. "git worktree prune" does, which is called by "git gc" and that

Re: Reduce pack-objects memory footprint?

2018-03-01 Thread Duy Nguyen
On Wed, Feb 28, 2018 at 06:22:33PM +, Eric Wong wrote: > Duy Nguyen <pclo...@gmail.com> wrote: > > which saves 12 bytes (or another 74 MB). 222 MB total is plenty of > > space to keep some file cache from being evicted. > > Nice! I can definitely benefit f

Re: Reduce pack-objects memory footprint?

2018-02-28 Thread Duy Nguyen
On Wed, Feb 28, 2018 at 6:11 PM, Jeff King wrote: >> > The torvalds/linux fork network has ~23 million objects, >> > so it's probably 7-8 GB of book-keeping. Which is gross, but 64GB in a >> > server isn't uncommon these days. >> >> I wonder if we could just do book keeping for

Re: Reduce pack-objects memory footprint?

2018-02-28 Thread Duy Nguyen
On Wed, Feb 28, 2018 at 5:17 PM, Jeff King <p...@peff.net> wrote: > On Wed, Feb 28, 2018 at 04:27:22PM +0700, Duy Nguyen wrote: > >> linux-2.6.git current has 6483999 objects. "git gc" on my poor laptop >> consumes 1.7G out of 4G RAM, pushing lots of data to

Re: [PATCH] docs/pretty-formats: fix typo '% <()' -> '%<|()'

2018-02-28 Thread Duy Nguyen
On Wed, Feb 28, 2018 at 3:24 AM, Jonathan Nieder wrote: > Mårten Kongstad wrote: > >> Remove erroneous space between % and < in '% <()'. >> >> Signed-off-by: Mårten Kongstad >> --- >> Documentation/pretty-formats.txt | 2 +- >> 1 file changed, 1

Re: [PATCH v2 05/36] resolve-undo: convert struct resolve_undo_info to object_id

2018-02-28 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 9:01 AM, brian m. carlson <sand...@crustytoothpaste.net> wrote: > On Mon, Feb 26, 2018 at 06:25:24PM +0700, Duy Nguyen wrote: >> On Mon, Feb 26, 2018 at 4:11 AM, brian m. carlson >> <sand...@crustytoothpaste.net> wrote: >> > @@ -44,7 +44

Reduce pack-objects memory footprint?

2018-02-28 Thread Duy Nguyen
linux-2.6.git current has 6483999 objects. "git gc" on my poor laptop consumes 1.7G out of 4G RAM, pushing lots of data to swap and making all apps nearly unusuable (granted the problem is partly Linux I/O scheduler too). So I wonder if we can reduce pack-objects memory footprint a bit. This

Re: [PATCH 00/11] Moving global state into the repository object (part 2)

2018-02-27 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 05:05:57PM -0800, Stefan Beller wrote: > This applies on top of origin/sb/object-store and is the continuation of > that series, adding the repository as a context argument to functions. > > This series focusses on packfile handling, exposing (re)prepare_packed_git > and

Re: [PATCH] protocol: treat unrecognized protocol.version setting as 0

2018-02-27 Thread Duy Nguyen
On Wed, Feb 28, 2018 at 8:02 AM, Brandon Williams wrote: > On 02/27, Jonathan Nieder wrote: >> If I share my .gitconfig or .git/config file between multiple machines >> (or between multiple Git versions on a single machine) and set >> >> [protocol] >>

Re: [PATCH v2 3/4] sha1_file.c: move delayed getenv(altdb) back to setup_git_env()

2018-02-27 Thread Duy Nguyen
On Wed, Feb 28, 2018 at 3:12 AM, Brandon Williams wrote: > On 02/27, Nguyễn Thái Ngọc Duy wrote: >> diff --git a/repository.c b/repository.c >> index 7654b8ada9..e326f0fcbc 100644 >> --- a/repository.c >> +++ b/repository.c >> @@ -61,6 +61,8 @@ void repo_set_gitdir(struct

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

2018-02-27 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 1:57 AM, Eric Sunshine wrote: > Can: > > char *old_gitdir = repo->gitdir; > repo->gitdir = xstrdup(...); > free(old_gitdir); > > be simplified to: > > free(repo->gitdir); > repo->gitdir = xstrdup(...); > > ? No because I think

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

2018-02-27 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 1:57 AM, Eric Sunshine wrote: >> + repo_set_commondir(repo, o->shared_root); > > The repo_set_gitdir() prototype (below) makes it seem as if the last > argument ('o', in this case) is optional, presumably by passing in > NULL, however, this

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

2018-02-26 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 3:30 AM, Stefan Beller wrote: >> diff --git a/setup.c b/setup.c >> index c5d55dcee4..6fac1bb58a 100644 >> --- a/setup.c >> +++ b/setup.c >> @@ -1116,8 +1116,7 @@ const char *setup_git_directory_gently(int *nongit_ok) >> const

Re: [PATCH 0/4] Delete ignore_env member in struct repository

2018-02-26 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 3:46 AM, Stefan Beller wrote: > What is the plan from here on? > Should I build further series on top of yours? The next series will > focus on the pack side of things (pack.h, packfile.{c,h}) > > So maybe we'll have Junio merge down my series (and

Re: [PATCHv4 00/27] Moving global state into the repository object (part 1)

2018-02-26 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 3:50 AM, Stefan Beller wrote: >> The natural thing to do is move these to raw_object_store too (and >> repo_submodule_init needs to check submodule's config file). But one >> may argue these should be per-process instead of per-repo though. I >> don't

Re: [PATCHv4 01/27] repository: introduce raw object store field

2018-02-26 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 2:28 AM, Stefan Beller <sbel...@google.com> wrote: > On Mon, Feb 26, 2018 at 1:30 AM, Duy Nguyen <pclo...@gmail.com> wrote: >> On Fri, Feb 23, 2018 at 04:47:28PM -0800, Stefan Beller wrote: >>> /* The main repository */ >>

Re: [PATCH v2 34/36] Convert lookup_replace_object to struct object_id

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 4:12 AM, brian m. carlson wrote: > diff --git a/sha1_file.c b/sha1_file.c > index 7493bc7f11..c41fbe2f01 100644 > --- a/sha1_file.c > +++ b/sha1_file.c > @@ -1227,22 +1227,18 @@ int oid_object_info_extended(const struct object_id > *oid,

Re: [PATCH v2 05/36] resolve-undo: convert struct resolve_undo_info to object_id

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 4:11 AM, brian m. carlson wrote: > @@ -44,7 +44,7 @@ void resolve_undo_write(struct strbuf *sb, struct > string_list *resolve_undo) > for (i = 0; i < 3; i++) { > if (!ui->mode[i]) >

Re: [PATCH v2 04/36] cache-tree: convert remnants to struct object_id

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 4:11 AM, brian m. carlson wrote: > @@ -465,7 +465,7 @@ static void write_one(struct strbuf *buffer, struct > cache_tree *it, > #endif > > if (0 <= it->entry_count) { > - strbuf_add(buffer, it->oid.hash, 20); > +

Re: [PATCH 0/2] wildmatch precompilation interface

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 3:35 AM, Ævar Arnfjörð Bjarmason wrote: > My recently landed wildmatch test series was in preperation for some > more major wildmatch changes. > > Here's another series that prepares for bigger changes in wildmatch, > it adds an interface to pre-compile

Re: [PATCH 2/2] wildmatch: use the new precompiling wildmatch()

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 3:35 AM, Ævar Arnfjörð Bjarmason wrote: > diff --git a/config.c b/config.c > index b0c20e6cb8..0f595de971 100644 > --- a/config.c > +++ b/config.c > @@ -210,6 +210,7 @@ static int include_by_gitdir(const struct config_options > *opts, > int ret =

Re: [PATCH 1/2] wildmatch: add interface for precompiling wildmatch() patterns

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 3:35 AM, Ævar Arnfjörð Bjarmason wrote: > Add the scaffolding necessary for precompiling wildmatch() > patterns. > > There is currently no point in doing this with the wildmatch() > function we have now, since it can't make any use of precompiling the >

Re: What's cooking in git.git (Feb 2018, #03; Wed, 21)

2018-02-26 Thread Duy Nguyen
On Thu, Feb 22, 2018 at 7:31 AM, Junio C Hamano wrote: > * nd/worktree-move (2018-02-12) 7 commits > - worktree remove: allow it when $GIT_WORK_TREE is already gone > - worktree remove: new command > - worktree move: refuse to move worktrees with submodules > - worktree

Re: [PATCHv4 01/27] repository: introduce raw object store field

2018-02-26 Thread Duy Nguyen
On Fri, Feb 23, 2018 at 04:47:28PM -0800, Stefan Beller wrote: > /* The main repository */ > static struct repository the_repo = { > - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, _index, > _algos[GIT_HASH_SHA1], 0, 0 > + NULL, NULL, > + RAW_OBJECT_STORE_INIT, > + NULL,

Re: [PATCH v2 5/5] Revert "repository: pre-initialize hash algo pointer"

2018-02-24 Thread Duy Nguyen
On Sun, Feb 25, 2018 at 5:58 AM, brian m. carlson wrote: >> diff --git a/repository.c b/repository.c >> index 4ffbe9bc94..0d715f4fdb 100644 >> --- a/repository.c >> +++ b/repository.c >> @@ -5,7 +5,7 @@ >> >> /* The main repository */ >> static struct repository

Re: [PATCHv4 00/27] Moving global state into the repository object (part 1)

2018-02-24 Thread Duy Nguyen
I notice that there are a few global state (or configuration rather) left after this: packed_git_window_size, packed_git_limit and delta_base_cache_limit. These can be changed by $GIT_DIR/config, but since it's still global, a submodule repository will use the same settings of its super

Re: [PATCH v2 4/5] diff.c: initialize hash algo when running in --no-index mode

2018-02-24 Thread Duy Nguyen
On Sat, Feb 24, 2018 at 10:34 AM, Nguyễn Thái Ngọc Duy wrote: > @@ -3995,6 +3995,18 @@ static void run_diff(struct diff_filepair *p, struct > diff_options *o) > return; > } > > + /* > +* NEEDSWORK: When running in no-index mode (and no

Re: [PATCH v3 06/42] completion: use __gitcomp_builtin in _git_am

2018-02-24 Thread Duy Nguyen
On Sat, Feb 24, 2018 at 1:08 AM, Junio C Hamano <gits...@pobox.com> wrote: > Duy Nguyen <pclo...@gmail.com> writes: > >> On Fri, Feb 23, 2018 at 1:19 AM, Junio C Hamano <gits...@pobox.com> wrote: >>> Duy Nguyen <pclo...@gmail.com> writes: >&

Re: [PATCH v2 4/5] diff.c: initialize hash algo when running in --no-index mode

2018-02-24 Thread Duy Nguyen
On Sat, Feb 24, 2018 at 3:15 PM, Eric Sunshine wrote: > On Fri, Feb 23, 2018 at 10:34 PM, Nguyễn Thái Ngọc Duy > wrote: >> before, compared to the alternative that we simply do not hash). >> >> dòng được > > Accidental paste? Oops. I blame Emacs. --

Re: [PATCH 2/2] Revert "repository: pre-initialize hash algo pointer"

2018-02-23 Thread Duy Nguyen
On Sat, Feb 24, 2018 at 5:29 AM, brian m. carlson wrote: >> @@ -40,5 +41,8 @@ int main(int argc, const char **argv) >> >> restore_sigpipe_to_default(); >> >> + if (getenv("GIT_HASH_FIXUP")) >> + repo_set_hash_algo(the_repository, GIT_HASH_SHA1);

Re: [PATCH 1/2] setup.c: initialize the_repository correctly in all cases

2018-02-23 Thread Duy Nguyen
On Sat, Feb 24, 2018 at 5:17 AM, brian m. carlson wrote: > On Fri, Feb 23, 2018 at 04:56:39PM +0700, Nguyễn Thái Ngọc Duy wrote: >> [3] the reason server side is still running ok with no hash algo >> before [2] is because the programs that use enter_repo() do

Re: [PATCH v3 29/42] completion: use __gitcomp_builtin in _git_notes

2018-02-23 Thread Duy Nguyen
On Fri, Feb 23, 2018 at 5:33 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Wed, Feb 14, 2018 at 9:29 PM, SZEDER Gábor <szeder@gmail.com> wrote: >> And we could even go one step further: >> >> *,--*) >> __gitcomp_builtin notes_$subcomm

Re: [PATCH v3 29/42] completion: use __gitcomp_builtin in _git_notes

2018-02-23 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 10:15 PM, SZEDER Gábor wrote: > On Fri, Feb 9, 2018 at 12:02 PM, Nguyễn Thái Ngọc Duy > wrote: > >> diff --git a/contrib/completion/git-completion.bash >> b/contrib/completion/git-completion.bash >> index c7b8b37f19..60127daebf

Re: [PATCH v3 29/42] completion: use __gitcomp_builtin in _git_notes

2018-02-23 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 9:29 PM, SZEDER Gábor wrote: > On Fri, Feb 9, 2018 at 12:02 PM, Nguyễn Thái Ngọc Duy > wrote: > >> diff --git a/contrib/completion/git-completion.bash >> b/contrib/completion/git-completion.bash >> index c7b8b37f19..60127daebf

Re: [PATCH v3 04/42] git-completion.bash: introduce __gitcomp_builtin

2018-02-23 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 10:35 PM, SZEDER Gábor wrote: >> +__gitcomp_builtin () > > Please excuse the bikeshed at v3, but I don't like the name of this > function. It indicates that it completes builtins, but it completes > options of builtins, and even then only the options

Re: [PATCH] am: support --quit

2018-02-23 Thread Duy Nguyen
On Thu, Feb 15, 2018 at 2:26 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Among the "in progress" commands, only git-am and git-merge do not >> support --quit. Support --quit in git-am too. > > That's a strange way to phrase it, when the

Re: [PATCH v3 0/3] Add "git rebase --show-current-patch"

2018-02-23 Thread Duy Nguyen
On Thu, Feb 22, 2018 at 7:54 AM, Tim Landscheidt wrote: > Junio C Hamano wrote: > >>> Compared to v2: > >>> - the potential loss of errno before it's printed out in builtin/am.c >>> is fixed. >>> - keep update_ref() in sequencer.c non-fatal like

Re: [PATCH v3 06/42] completion: use __gitcomp_builtin in _git_am

2018-02-23 Thread Duy Nguyen
On Fri, Feb 23, 2018 at 1:19 AM, Junio C Hamano <gits...@pobox.com> wrote: > Duy Nguyen <pclo...@gmail.com> writes: > >> Now that you mention it, the only command that completes >> --rerere-autoupdate is git-merge. Since this is "auto" I don't think &g

Re: [PATCH 1/2] parse-options: expand $HOME on filename options

2018-02-23 Thread Duy Nguyen
On Thu, Feb 22, 2018 at 8:38 PM, Ævar Arnfjörð Bjarmason wrote: > Ah I see, so you're doing "git init --template=~/". > > ... > > I wonder if the consistency with the tab completion wouldn't be better > done by teaching the tab completion to just expand --template=~/ to > e.g.

Re: [PATCH 1/2] parse-options: expand $HOME on filename options

2018-02-22 Thread Duy Nguyen
On Thu, Feb 15, 2018 at 5:46 AM, Ævar Arnfjörð Bjarmason wrote: > In general I'm mildly negative on adding this, for every user like Doron > who'll be less confused by a hack like this, you'll have other users > who'll be confused about git inexplicably working with ~ in the

Re: [PATCH v3 06/42] completion: use __gitcomp_builtin in _git_am

2018-02-22 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 7:53 PM, SZEDER Gábor wrote: > On Fri, Feb 9, 2018 at 12:01 PM, Nguyễn Thái Ngọc Duy > wrote: >> The new completable options are: >> >> --directory >> --exclude >> --gpg-sign >> --include >> --keep-cr >> --keep-non-patch >>

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 8:51 AM, Junio C Hamano wrote: > * nd/parseopt-completion (2018-02-09) 42 commits > - git-completion.bash: add GIT_COMPLETION_OPTIONS=all config > - completion: use __gitcomp_builtin in _git_worktree > - completion: use __gitcomp_builtin in _git_tag >

Re: [PATCH 3/7] worktree move: new command

2018-02-14 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 10:16 AM, Jeff King wrote: > Hmm. That is not too bad, but somehow it feels funny to me to be > polluting each test script with these annotations. And to be driving it > from inside the test scripts. > > It seems like: > > make SANITIZE=leak test

Re: [PATCH v2] dir.c: ignore paths containing .git when invalidating untracked cache

2018-02-13 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 12:57 AM, Junio C Hamano <gits...@pobox.com> wrote: > Duy Nguyen <pclo...@gmail.com> writes: > >> It's very tempting considering that the amount of changes is much >> smaller. But I think we should go with my version. The hope is whe

Re: [PATCH 00/26] Moving global state into the repository object (part 1)

2018-02-13 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 2:26 AM, Jonathan Nieder wrote: >> Duy suggested that we shall not use the repository blindly, but should >> carefully >> examine whether to pass on an object store or the refstore or such[4], which >> I agree with if it makes sense. This series

Re: [PATCH 14/26] sha1_file: allow prepare_alt_odb to handle arbitrary repositories

2018-02-13 Thread Duy Nguyen
On Tue, Feb 13, 2018 at 8:22 AM, Stefan Beller wrote: > Signed-off-by: Stefan Beller > --- > object-store.h | 3 +-- > sha1_file.c| 21 +++-- > 2 files changed, 12 insertions(+), 12 deletions(-) > > diff --git a/object-store.h

Re: [PATCH 00/26] Moving global state into the repository object (part 1)

2018-02-13 Thread Duy Nguyen
On Tue, Feb 13, 2018 at 6:49 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Mon, Feb 12, 2018 at 05:22:15PM -0800, Stefan Beller wrote: >> This is a real take on the first part of the recent RFC[1]. >> >> ... >> >> Duy suggested that we shall not use the repo

Re: [PATCH 00/26] Moving global state into the repository object (part 1)

2018-02-13 Thread Duy Nguyen
On Mon, Feb 12, 2018 at 05:22:15PM -0800, Stefan Beller wrote: > This is a real take on the first part of the recent RFC[1]. > > ... > > Duy suggested that we shall not use the repository blindly, but > should carefully examine whether to pass on an object store or the > refstore or such[4],

Re: [PATCH 2/3] config: respect `pager.config` in list/get-mode only

2018-02-13 Thread Duy Nguyen
On Sun, Feb 11, 2018 at 11:40 PM, Martin Ågren wrote: > Similar to de121ffe5 (tag: respect `pager.tag` in list-mode only, > 2017-08-02), use the DELAY_PAGER_CONFIG-mechanism to only respect > `pager.config` when we are listing or "get"ing config. > > Some getters give at

Re: [PATCH v2] dir.c: ignore paths containing .git when invalidating untracked cache

2018-02-13 Thread Duy Nguyen
On Wed, Feb 7, 2018 at 11:59 PM, Ben Peart wrote: > diff --git a/dir.c b/dir.c > index 7c4b45e30e..d431da46f5 100644 > --- a/dir.c > +++ b/dir.c > @@ -1773,7 +1773,7 @@ static enum path_treatment treat_path(struct > dir_struct *dir, > if (!de) > return

Re: [PATCH v1] dir.c: don't flag the index as dirty for changes to the untracked cache

2018-02-13 Thread Duy Nguyen
On Tue, Feb 13, 2018 at 12:57 AM, Ben Peart wrote: >> Another case that could touches a lot of directories over time is >> switch trees (e.g. "git checkout master" then "checkout next" or worse >> "checkout v1.0"). > > > You're example above makes me wonder if you understand

Re: [PATCH 3/7] worktree move: new command

2018-02-12 Thread Duy Nguyen
On Mon, Feb 12, 2018 at 11:15:06PM +0100, Martin Ågren wrote: > On 12 February 2018 at 10:56, Duy Nguyen <pclo...@gmail.com> wrote: > > On Wed, Feb 7, 2018 at 3:05 AM, Martin Ågren <martin.ag...@gmail.com> wrote: > >> On 6 February 2018 at 03:13, Jeff King <p...@p

Re: [PATCH v1] dir.c: don't flag the index as dirty for changes to the untracked cache

2018-02-12 Thread Duy Nguyen
On Wed, Feb 7, 2018 at 9:13 PM, Ben Peart <peart...@gmail.com> wrote: > > > On 2/6/2018 7:27 AM, Duy Nguyen wrote: >> >> >> This is another thing that bugs me. I know you're talking about huge >> index files, but at what size should we start this sort of

Re: What's cooking in git.git (Jan 2018, #04; Wed, 31)

2018-02-12 Thread Duy Nguyen
On Sun, Feb 11, 2018 at 9:44 PM, Ævar Arnfjörð Bjarmason <ava...@gmail.com> wrote: > > On Sat, Feb 10 2018, Duy Nguyen jotted: > >> On Sat, Feb 10, 2018 at 1:37 AM, Ævar Arnfjörð Bjarmason >> <ava...@gmail.com> wrote: >>> >>> On Thu, Feb 01 2018,

Re: [PATCH 3/7] worktree move: new command

2018-02-12 Thread Duy Nguyen
On Wed, Feb 7, 2018 at 3:05 AM, Martin Ågren <martin.ag...@gmail.com> wrote: > On 6 February 2018 at 03:13, Jeff King <p...@peff.net> wrote: >> On Mon, Feb 05, 2018 at 08:28:10PM +0700, Duy Nguyen wrote: >>> I learned SANITIZE=leak today! It not only catches thi

Re: [PATCH 6/7] worktree remove: new command

2018-02-12 Thread Duy Nguyen
On Fri, Feb 2, 2018 at 6:47 PM, Eric Sunshine wrote: > On Wed, Jan 24, 2018 at 4:53 AM, Nguyễn Thái Ngọc Duy > wrote: >> This command allows to delete a worktree. Like 'move' you cannot >> remove the main worktree, or one with submodules inside [1].

Re: [PATCH v3 42/42] git-completion.bash: add GIT_COMPLETION_OPTIONS=all config

2018-02-11 Thread Duy Nguyen
On Sun, Feb 11, 2018 at 8:59 AM, Eric Sunshine wrote: > On Fri, Feb 9, 2018 at 6:02 AM, Nguyễn Thái Ngọc Duy > wrote: >> By default, some option names (mostly --force, scripting related or for >> internal use) are not completable for various reasons.

Re: [PATCH v2 1/3] worktree: improve message when creating a new worktree

2018-02-10 Thread Duy Nguyen
On Fri, Feb 9, 2018 at 7:08 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Fri, Feb 9, 2018 at 6:27 PM, Thomas Gummerer <t.gumme...@gmail.com> wrote: >> This would loose the information about the identifier of the worktree, >> but from a coarse look at the man p

Re: [RFC PATCH 000/194] Moving global state into the repository object

2018-02-10 Thread Duy Nguyen
On Thu, Feb 8, 2018 at 1:06 AM, Stefan Beller wrote: >> Something else.. maybe "struct repository *" should not be a universal >> function argument to avoid global states. Like sha1_file.c is mostly about >> the >> object store, and I see that you added object store struct

Re: [PATCH v3 0/2] diff: add --stat-with-summary (was --compact-summary)

2018-02-10 Thread Duy Nguyen
On Thu, Feb 8, 2018 at 1:19 AM, Junio C Hamano <gits...@pobox.com> wrote: > Duy Nguyen <pclo...@gmail.com> writes: > >> ... >> Then we still need to decide the new keyword for this feature, I feel >> compact is a bit too vague (I read --stat=compact

Re: [PATCH v3 22/35] upload-pack: support shallow requests

2018-02-10 Thread Duy Nguyen
On Thu, Feb 8, 2018 at 2:00 AM, Stefan Beller wrote: >> + >> +deepen-relative >> + Requests that the semantics of the "deepen" command be changed >> + to indicate that the depth requested is relative to the clients >> + current shallow boundary, instead

Re: Bug? Error during commit

2018-02-10 Thread Duy Nguyen
On Thu, Feb 8, 2018 at 3:45 AM, Jeff King <p...@peff.net> wrote: > On Mon, Feb 05, 2018 at 08:59:52PM +0700, Duy Nguyen wrote: > >> On Mon, Feb 5, 2018 at 8:48 PM, Andreas Kalz <andreas-k...@gmx.de> wrote: >> > Hello, >> > >> > I am using git freq

Re: What's cooking in git.git (Jan 2018, #04; Wed, 31)

2018-02-10 Thread Duy Nguyen
On Sat, Feb 10, 2018 at 1:37 AM, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Feb 01 2018, Junio C. Hamano jotted: > >> * nd/fix-untracked-cache-invalidation (2018-01-24) 5 commits >> - dir.c: stop ignoring opendir() error in open_cached_dir() >> - update-index doc: note a fixed

Re: [RFC PATCH 3/3] fsck: Check HEAD of other worktrees as well

2018-02-10 Thread Duy Nguyen
On Fri, Feb 09, 2018 at 03:13:30PM -0800, Elijah Newren wrote: > This takes advantage of the fact that "worktrees/$WORKTREE/HEAD" will > currently resolve as a ref, which may not be true in the future with > different ref backends. I don't think it locks us in to supporting > resolving other

Re: [PATCH v3 42/42] git-completion.bash: add GIT_COMPLETION_OPTIONS=all config

2018-02-10 Thread Duy Nguyen
On Fri, Feb 09, 2018 at 03:19:57PM +0100, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Feb 09 2018, Nguyễn Thái Ngọc Duy jotted: > > > By default, some option names (mostly --force, scripting related or for > > internal use) are not completable for various reasons. When > > GIT_COMPLETION_OPTIONS

Re: [PATCH v2 1/3] worktree: improve message when creating a new worktree

2018-02-09 Thread Duy Nguyen
On Fri, Feb 9, 2018 at 6:27 PM, Thomas Gummerer wrote: > This would loose the information about the identifier of the worktree, > but from a coarse look at the man page it doesn't seem like we > advertise that widely > > ... > > So given that maybe it would even be better to

Re: [PATCH v2 00/41] Automate updating git-completion.bash a bit

2018-02-08 Thread Duy Nguyen
On Thu, Feb 8, 2018 at 2:23 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> I posted a proof of concept a while back [1]. This is the full version. >> >> This series lets "git" binary help git-completion.bash to complete >> -- so that when a

Re: is http://git-scm.com an *official* git-affiliated site?

2018-02-07 Thread Duy Nguyen
On Wed, Feb 7, 2018 at 6:58 PM, Robert P. J. Day <rpj...@crashcourse.ca> wrote: > On Wed, 7 Feb 2018, Duy Nguyen wrote: > >> On Wed, Feb 7, 2018 at 6:41 PM, Robert P. J. Day <rpj...@crashcourse.ca> >> wrote: >> > On Wed, 7 Feb 2018, Duy Nguyen wrote: &g

Re: is http://git-scm.com an *official* git-affiliated site?

2018-02-07 Thread Duy Nguyen
On Wed, Feb 7, 2018 at 6:41 PM, Robert P. J. Day <rpj...@crashcourse.ca> wrote: > On Wed, 7 Feb 2018, Duy Nguyen wrote: > >> On Wed, Feb 7, 2018 at 5:54 PM, Robert P. J. Day <rpj...@crashcourse.ca> >> wrote: >> > >> > i ask WRT whethe

Re: [RFC PATCH 000/194] Moving global state into the repository object

2018-02-07 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 6:51 AM, Stefan Beller wrote: > This series moves a lot of global state into the repository struct. > It applies on top of 2512f15446149235156528dafbe75930c712b29e (2.16.0) > It can be found at https://github.com/stefanbeller/git/tree/object-store > >

Re: is http://git-scm.com an *official* git-affiliated site?

2018-02-07 Thread Duy Nguyen
On Wed, Feb 7, 2018 at 5:54 PM, Robert P. J. Day wrote: > > i ask WRT whether it should be up to date. i'm currently writing a > number of git-related wiki pages, and i want to link to whatever are > the canonical man pages for various git commands, I think this one is

Re: BUG: fetch in certain repo always gives "did not send all necessary objects"

2018-02-07 Thread Duy Nguyen
On Wed, Feb 7, 2018 at 7:00 AM, Elijah Newren wrote: > and knew they had been using it, then I might have guessed that "HEAD" > meant "not your actual HEAD but the HEAD of the vestige of some other > worktree"). > > Does anyone have pointers about what might be doable in terms

Re: [PATCH v1] dir.c: don't flag the index as dirty for changes to the untracked cache

2018-02-07 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 7:55 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Tue, Feb 6, 2018 at 7:27 PM, Duy Nguyen <pclo...@gmail.com> wrote: >> On Tue, Feb 6, 2018 at 8:48 AM, Ben Peart <peart...@gmail.com> wrote: >>> With the new behavior, making a change

Re: [PATCH v3 0/2] diff: add --stat-with-summary (was --compact-summary)

2018-02-07 Thread Duy Nguyen
On Wed, Feb 7, 2018 at 4:52 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Tue, Feb 6, 2018 at 5:20 AM, Duy Nguyen <pclo...@gmail.com> wrote: >> On Tue, Feb 6, 2018 at 1:56 AM, Junio C Hamano <gits...@pobox.com> wrote: >>> Duy Nguyen <pclo...@

Re: Cloned repository has file changes -> bug?

2018-02-06 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 8:09 PM, Filip Jorissen wrote: > Hi all, > > Thank you for your quick responses. I was able to resolve the problem based > on your feedback! > > Based on this experience, I would like to suggest that git is somehow able to > avoid these

Re: [PATCH v1] dir.c: don't flag the index as dirty for changes to the untracked cache

2018-02-06 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 7:27 PM, Duy Nguyen <pclo...@gmail.com> wrote: > On Tue, Feb 6, 2018 at 8:48 AM, Ben Peart <peart...@gmail.com> wrote: >> With the new behavior, making a change in dir1/, then calling status would >> update the dir1/ untracked cache entry but no

Re: [PATCH v1] dir.c: don't flag the index as dirty for changes to the untracked cache

2018-02-06 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 8:48 AM, Ben Peart wrote: > With the new behavior, making a change in dir1/, then calling status would > update the dir1/ untracked cache entry but not write it out. On the next > status, git would detect the change in dir1/ again and update the

Re: [PATCH] dir.c: ignore paths containing .git when invalidating untracked cache

2018-02-06 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 12:44 AM, Ben Peart wrote: > > > On 2/4/2018 4:38 AM, Nguyễn Thái Ngọc Duy wrote: >> >> read_directory() code ignores all paths named ".git" even if it's not >> a valid git repository. See treat_path() for details. Since ".git" is >> basically invisible

Re: [PATCH v2 3/3] worktree: teach "add" to check out existing branches

2018-02-06 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 3:23 AM, Thomas Gummerer <t.gumme...@gmail.com> wrote: > On 02/05, Duy Nguyen wrote: >> On Sun, Feb 04, 2018 at 10:13:05PM +, Thomas Gummerer wrote: >> > - if (opts->new_branch) >> > + if (opts->checkout_existing_branch) >>

Re: Missing git options

2018-02-06 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 6:13 PM, Martin Häcker wrote: > This however still freezes the default output of git forever. Why is that a bad thing? Default output format should not change (much) from version to version, or from machine to machine (because of different

Re: [PATCH v3 0/2] diff: add --stat-with-summary (was --compact-summary)

2018-02-06 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 1:56 AM, Junio C Hamano <gits...@pobox.com> wrote: > Duy Nguyen <pclo...@gmail.com> writes: > >> On Sat, Feb 3, 2018 at 2:59 AM, Junio C Hamano <gits...@pobox.com> wrote: >>> Nguyễn Thái Ngọc Duy <pclo...@gmail.com> writes: &g

Re: Are concurrent git operations on the same repo safe?

2018-02-06 Thread Duy Nguyen
On Tue, Feb 6, 2018 at 3:16 AM, Ian Norton wrote: > Hi all, > > I'm generally used to the idea that if a thing is not marked as > "thread-safe" then it isn't thread safe, but I thought I'd ask anyway > to be sure. > > Is it safe for me to do several operations with git

Re: Bug? Error during commit

2018-02-05 Thread Duy Nguyen
On Mon, Feb 5, 2018 at 8:48 PM, Andreas Kalz wrote: > Hello, > > I am using git frequently and usually it is running great. > > I read to write to this eMail address regarding problems and possible bugs. > I am using git version 2.16.1.windows.2 / 64 Bit and during commit the

Re: [PATCH 3/7] worktree move: new command

2018-02-05 Thread Duy Nguyen
On Fri, Feb 2, 2018 at 6:23 PM, Eric Sunshine wrote: > On Fri, Feb 2, 2018 at 4:15 AM, Eric Sunshine wrote: >> On Wed, Jan 24, 2018 at 4:53 AM, Nguyễn Thái Ngọc Duy >> wrote: >>> +static int move_worktree(int ac, const char

Re: [PATCH v3 0/2] diff: add --stat-with-summary (was --compact-summary)

2018-02-05 Thread Duy Nguyen
On Sat, Feb 3, 2018 at 2:59 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Changes since v2 [1]: >> >> - goes back to my original version (yay!) where the extra info >> is appended after the path name. More is described in 2/2 >> -

Re: [PATCH v2 01/41] parse-options: support --git-completion-helper

2018-02-05 Thread Duy Nguyen
On Mon, Feb 5, 2018 at 5:46 PM, Ævar Arnfjörð Bjarmason wrote: > > On Wed, Jan 31 2018, Eric Sunshine jotted: > >> On Wed, Jan 31, 2018 at 6:05 AM, Nguyễn Thái Ngọc Duy >> wrote: >>> This option is designed to be used by git-completion.bash. For many >>>

Re: [PATCH v2 01/41] parse-options: support --git-completion-helper

2018-02-05 Thread Duy Nguyen
On Thu, Feb 01, 2018 at 02:16:46PM -0500, Eric Sunshine wrote: > On Thu, Feb 1, 2018 at 5:21 AM, Duy Nguyen <pclo...@gmail.com> wrote: > > On Thu, Feb 1, 2018 at 4:54 PM, Eric Sunshine <sunsh...@sunshineco.com> > > wrote: > >> I don't see that as

Re: [PATCH v2 3/3] worktree: teach "add" to check out existing branches

2018-02-04 Thread Duy Nguyen
On Sun, Feb 04, 2018 at 10:13:05PM +, Thomas Gummerer wrote: > - if (opts->new_branch) > + if (opts->checkout_existing_branch) > + fprintf(stderr, _(", checking out existing branch '%s'"), > + refname); > + else if (opts->new_branch) >

<    4   5   6   7   8   9   10   11   12   13   >