Re: [PATCH v5 02/15] read-cache: allow to keep mmap'd memory after reading

2016-04-20 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 6:27 AM, David Turner wrote: > From: Nguyễn Thái Ngọc Duy > > Later, we will introduce git index-helper to share this memory with > other git processes. > > Since the memory will be shared, it will never be unmapped (although > the kernel may of course choose to page it ou

Re: [PATCH v5 06/15] index-helper: add --detach

2016-04-20 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 8:04 AM, David Turner wrote: > On Wed, 2016-04-20 at 06:50 +0700, Duy Nguyen wrote: >> On Wed, Apr 20, 2016 at 6:28 AM, David Turner < >> dtur...@twopensource.com> wrote: >> > @@ -317,6 +320,8 @@ int main(int argc, char *

Re: [PATCH v5 09/15] index-helper: use watchman to avoid refreshing index with lstat()

2016-04-20 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 8:01 AM, David Turner wrote: > On Wed, 2016-04-20 at 07:15 +0700, Duy Nguyen wrote: >> Continuing my comment from the --use-watchman patch about watchman >> not >> being supported... >> >> On Wed, Apr 20, 2016 at 6:28 AM, David Turner <

Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff

2016-04-20 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 7:17 PM, Johannes Schindelin wrote: >> We keep this daemon's logic as thin as possible. The "brain" stays in >> git. So the daemon can read and validate stuff, but that's all it's >> allowed to do. It does not add/create new information. It doesn't even >> accept direct upd

Re: [PATCH 16/15] Add tracing to measure where most of the time is spent

2016-04-20 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 7:28 PM, Johannes Schindelin wrote: > Hi Duy, > > On Wed, 20 Apr 2016, Nguyễn Thái Ngọc Duy wrote: > >> All the known heavy code blocks are measured (except object database >> access). This should help identify if an optimization is effective or >> not. An unoptimized git-s

Re: [PATCH v2 06/12] wt-status.c: split rebase detection out of wt_status_get_state()

2016-04-20 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 8:48 PM, Ramsay Jones wrote: > > > On 20/04/16 14:24, Nguyễn Thái Ngọc Duy wrote: >> worktree.c:find_shared_symref() later needs to know if a branch is being >> rebased, and only rebased only. Split this code so it can be used > ^ > Err ... w

Re: [PATCH v2 01/12] path.c: add git_common_path() and strbuf_git_common_path()

2016-04-20 Thread Duy Nguyen
On Thu, Apr 21, 2016 at 1:11 AM, Eric Sunshine wrote: > On Wed, Apr 20, 2016 at 9:24 AM, Nguyễn Thái Ngọc Duy > wrote: >> diff --git a/path.c b/path.c >> @@ -503,6 +503,35 @@ void strbuf_git_path_submodule(struct strbuf *buf, >> const char *path, >> +const char *git_common_path(const char *fmt,

Re: [PATCH v2 09/12] worktree.c: test if branch being rebased in another worktree

2016-04-20 Thread Duy Nguyen
On Thu, Apr 21, 2016 at 1:04 AM, Junio C Hamano wrote: >> diff --git a/builtin/checkout.c b/builtin/checkout.c >> index efcbd8f..6041718 100644 >> --- a/builtin/checkout.c >> +++ b/builtin/checkout.c >> @@ -,7 +,7 @@ static int checkout_branch(struct checkout_opts *opts, >> c

Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Duy Nguyen
On Thu, Apr 21, 2016 at 2:20 PM, Eric Sunshine wrote: > On Wed, Apr 20, 2016 at 9:24 AM, Nguyễn Thái Ngọc Duy > wrote: >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- >> diff --git a/worktree.c b/worktree.c >> @@ -178,6 +182,18 @@ struct worktree **get_worktrees(void) >> } >> ALLO

Re: [PATCH v2 04/12] worktree.c: mark current worktree

2016-04-21 Thread Duy Nguyen
On Thu, Apr 21, 2016 at 3:19 PM, Duy Nguyen wrote: > On Thu, Apr 21, 2016 at 2:20 PM, Eric Sunshine > wrote: >> On Wed, Apr 20, 2016 at 9:24 AM, Nguyễn Thái Ngọc Duy >> wrote: >>> Signed-off-by: Nguyễn Thái Ngọc Duy >>> --- >>> diff --git a/

Re: [PATCH 00/83] libify apply and use lib in am

2016-04-24 Thread Duy Nguyen
On Mon, Apr 25, 2016 at 12:42 AM, Ramsay Jones wrote: > > > On 24/04/16 17:56, Christian Couder wrote: >> On Sun, Apr 24, 2016 at 6:27 PM, Christian Couder >> wrote: >>> On Sun, Apr 24, 2016 at 5:23 PM, Ramsay Jones >>> wrote: On 24/04/16 14:33, Christian Couder wrote: > This

Re: [PATCH 00/83] libify apply and use lib in am

2016-04-25 Thread Duy Nguyen
On Sun, Apr 24, 2016 at 8:33 PM, Christian Couder wrote: > Sorry if this patch series is a bit long. I can split it into two or > more series if it is prefered. I suspect you deliberately made the series long just to show off how good new git-rebase is ;-) > Performance numbers: > > - A few da

Re: [PATCH 00/83] libify apply and use lib in am

2016-04-25 Thread Duy Nguyen
On Mon, Apr 25, 2016 at 4:57 PM, Christian Couder wrote: >> But why write so many times when nobody reads it? We only need to >> write before git-apply exits, > > You mean `git am` here I think. > >> either after successfully applying the >> whole series, or after it stops at conflicts, and maybe

Re: Silent failure to add Windows-style paths in Cygwin Git

2016-04-25 Thread Duy Nguyen
On Mon, Apr 25, 2016 at 7:07 PM, Adam Dinwoodie wrote: > [Resending as my initial attempt appears to have not made it to the > list. Apologies if this results in a double-post.] > > If I attempt to `git add` an extant file specified using a Windows-style > path on Cygwin Git, this doesn't add the

Re: [PATCH 53/83] builtin/apply: make find_header() return -1 instead of die()ing

2016-04-25 Thread Duy Nguyen
On Sun, Apr 24, 2016 at 8:33 PM, Christian Couder wrote: > To be compatible with the rest of the error handling in builtin/apply.c, > find_header() should return -1 instead of calling die(). > > Unfortunately find_header() already returns -1 when no header is found, > so let's make it return -2 in

Re: [PATCH 61/83] builtin/apply: libify check_apply_state()

2016-04-25 Thread Duy Nguyen
On Sun, Apr 24, 2016 at 8:34 PM, Christian Couder wrote: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 16 +--- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/builtin/apply.c b/builtin/apply.c > index e3ee199..7576ec5 100644 > --- a/builtin/apply.c >

Re: [PATCH 63/83] builtin/apply: make apply_all_patches() return -1 on error

2016-04-25 Thread Duy Nguyen
On Sun, Apr 24, 2016 at 8:34 PM, Christian Couder wrote: > if (state->update_index) { > if (write_locked_index(&the_index, state->lock_file, > COMMIT_LOCK)) > - die(_("Unable to write new index file")); > + return error(_("Unable

Re: [PATCH 65/83] builtin/apply: make gitdiff_verify_name() return -1 on error

2016-04-25 Thread Duy Nguyen
On Sun, Apr 24, 2016 at 8:34 PM, Christian Couder wrote: > Signed-off-by: Christian Couder > --- > builtin/apply.c | 52 ++-- > 1 file changed, 30 insertions(+), 22 deletions(-) > > diff --git a/builtin/apply.c b/builtin/apply.c > index 6b8ba2a..26

Re: [PATCH 78/83] Move libified code from builtin/apply.c to apply.{c,h}

2016-04-25 Thread Duy Nguyen
On Sun, Apr 24, 2016 at 8:34 PM, Christian Couder wrote: > Signed-off-by: Christian Couder > --- > apply.c | 4678 > ++- > apply.h | 19 + > builtin/apply.c | 4677 -- > 3 f

Re: Parallel checkout (Was Re: 0 bot for Git)

2016-04-26 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 4:51 PM, Duy Nguyen wrote: > Numbers are encouraging though. On linux-2.6 repo running on linux and > ext4 filesystem, checkout_paths() would dominate "git checkout :/". > Unmodified git takes about 31s. > > > 16:26:00.114029 builtin

Re: [PATCH] Move test-* to t/helper/ subdirectory

2016-04-26 Thread Duy Nguyen
On Wed, Apr 27, 2016 at 5:07 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> This keeps top dir a bit less crowded. And because these programs are >> for testing purposes, it makes sense that they stay somewhere in t/ >> >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- >> This patch

Re: [PATCH] Move test-* to t/helper/ subdirectory

2016-04-27 Thread Duy Nguyen
On Wed, Apr 27, 2016 at 07:52:41AM +0700, Duy Nguyen wrote: > > Can you (or somebody else) double check that the resulting Makefile > > gets the build dependencies and exec path right? > > > > I am seeing occasional failure from t0040 when checking out between > >

Re: [PATCH v6 03/19] index-helper: new daemon for caching index and related stuff

2016-04-30 Thread Duy Nguyen
On Sat, Apr 30, 2016 at 1:46 AM, David Turner wrote: > On Thu, 2016-04-28 at 11:58 -0700, Junio C Hamano wrote: >> David Turner writes: >> >> > From: Nguyễn Thái Ngọc Duy >> > ... >> > The biggest gain is not having to verify the trailing SHA-1, which >> > takes lots of time especially on large

Re: [PATCH] Move test-* to t/helper/ subdirectory

2016-04-30 Thread Duy Nguyen
On Wed, Apr 27, 2016 at 09:15:41AM -0700, Junio C Hamano wrote: > Duy Nguyen writes: > > > This patch forces bin-wrappers regeneration every time a test program > > is updated. A bit wasteful, but I don't see a better option (which is > > also why I limit this to

Re: [PATCH] Move test-* to t/helper/ subdirectory

2016-04-30 Thread Duy Nguyen
On Sun, May 01, 2016 at 07:28:52AM +0700, Duy Nguyen wrote: > On Wed, Apr 27, 2016 at 09:15:41AM -0700, Junio C Hamano wrote: > > Duy Nguyen writes: > > > > > This patch forces bin-wrappers regeneration every time a test program > > > is updated. A bit wasteful

pthread_sigmask() on windows (wine actualy)

2016-05-01 Thread Duy Nguyen
I got this while compiling master today using mingw32 cross toolchain CC run-command.o run-command.c: In function 'run_thread': run-command.c:596:3: warning: implicit declaration of function 'pthread_sigmask' [-Wimplicit-function-declaration] run-command.c:596:23: error: 'SIG_BLOCK' undeclared

Re: [PATCH 00/41] Add and use error_errno() and warning_errno()

2016-05-01 Thread Duy Nguyen
On Sun, May 01, 2016 at 06:14:16PM +0700, Nguyễn Thái Ngọc Duy wrote: > This is a spinoff from my worktree-move topic. This series adds > die_errno() companions, error_errno() and warning_errno(), and use them > where applicable to reduce the amount of typing (in future). I had this patch in the s

Re: [PATCH 12/41] builtin/update-index.c: use error_errno()

2016-05-02 Thread Duy Nguyen
On Mon, May 2, 2016 at 1:40 AM, Eric Sunshine wrote: > On Sun, May 1, 2016 at 7:14 AM, Nguyễn Thái Ngọc Duy > wrote: >> "err" is deleted because it just causes confusion when "errno" is also >> used directly in process_lstat_error(). > > Despite the function name which may imply that it is consu

Re: [PATCH] Move test-* to t/helper/ subdirectory

2016-05-02 Thread Duy Nguyen
On Tue, May 3, 2016 at 12:34 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> I may have rushed to judgement. wrap-for-bin.sh has always been the >> dependency for bin-wrappers/*. If we force that file to change, then >> bin-wrappers/* will be recreated when switchin

Re: [PATCH] remote.c: specify correct plural form in "commit diverge" message

2016-05-02 Thread Duy Nguyen
On Tue, May 3, 2016 at 7:16 AM, Stefan Beller wrote: > On Mon, May 2, 2016 at 5:12 PM, Nguyễn Thái Ngọc Duy > wrote: >> We need to count both "ours" and "theirs" commits when selecting plural >> form for this message. Note that even though in this block, both ours >> and theirs must be positive

Re: [PATCH 03/14] upload-pack-2: Implement the version 2 of upload-pack

2016-05-02 Thread Duy Nguyen
On Tue, May 3, 2016 at 1:56 AM, David Turner wrote: > On Mon, 2016-05-02 at 10:51 -0700, Stefan Beller wrote: >> On Mon, May 2, 2016 at 10:43 AM, David Turner < >> dtur...@twopensource.com> wrote: >> > On Fri, 2016-04-29 at 16:34 -0700, Stefan Beller wrote: >> > > In upload-pack-2 we send each cap

Re: [PATCH] fix flaky untracked-cache test

2015-10-21 Thread Duy Nguyen
On Mon, Oct 19, 2015 at 9:48 PM, David Turner wrote: > Dirty the test worktree's root directory, as the test expects. > > When testing the untracked-cache, we previously assumed that checking > out master would be sufficient to mark the mtime of the worktree's > root directory as racily-dirty. Bu

Re: Watchman/inotify support and other ways to speed up git status

2015-10-22 Thread Duy Nguyen
On Thu, Oct 22, 2015 at 7:59 AM, Christian Couder wrote: > Hi everyone, > > I am starting to investigate ways to speed up git status and other git > commands for Booking.com (thanks to AEvar) and I'd be happy to discuss > the current status or be pointed to relevant documentation or mailing > list

Re: [PATCH 3/6] Facilitate debugging Git executables in tests with gdb

2015-10-27 Thread Duy Nguyen
On Mon, Oct 26, 2015 at 2:15 PM, Johannes Schindelin wrote: > When prefixing a Git call in the test suite with 'TEST_GDB_GIT=1 ', it > will now be run with GDB, allowing the developer to debug test failures > more conveniently. I'm very slowly catching up with git traffic. Apologies if it's alrea

[off topic] xkcd

2015-10-30 Thread Duy Nguyen
We are on xkcd! We're famous now! /me goes hide https://xkcd.com/1597/ -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: git log --author=me

2015-11-02 Thread Duy Nguyen
On Mon, Nov 2, 2015 at 2:27 PM, Harry Jeffery wrote: > Hi, > > I've written a patch that allows `me` to be used as shorthand for > $(user.name) or $(user.email) in the `--author` and `--commiter` fields. > > The purpose being to make finding your own commits quicker and easier: > git log --aut

Re: [PATCH 0/5] Use watchman to reduce index refresh time

2015-11-02 Thread Duy Nguyen
On Mon, Nov 2, 2015 at 3:54 PM, Paolo Ciarrocchi wrote: > On Sun, Nov 1, 2015 at 2:55 PM, Nguyễn Thái Ngọc Duy > wrote: > > Hi Duy, > >> This series builds on top of the index-helper series I just sent and >> uses watchman to keep track of file changes in order to avoid lstat() >> at refresh tim

Re: Watchman/inotify support and other ways to speed up git status

2015-11-02 Thread Duy Nguyen
On Mon, Nov 2, 2015 at 9:56 PM, David Turner wrote: > On Thu, 2015-10-29 at 09:10 +0100, Christian Couder wrote: >> > We're using Watchman at Twitter. A week or two ago posted a dump of our >> > code to github, but I would advise waiting a day or two to use it, as >> > I'm about to pull a large n

Re: [PATCH] setup: do not create $X/gitdir unnecessarily when accessing git file $X

2015-11-02 Thread Duy Nguyen
(resend) On Mon, Nov 2, 2015 at 9:51 PM, Junio C Hamano wrote: > Jeff King writes: > >> [2] I suspect this code should use write_file_gently(). What happens if >> I have a read-only linked checkout? I can't hide anything from you guys can I? :) My first attempt was move this update logic ba

Re: [PATCH 0/5] Use watchman to reduce index refresh time

2015-11-03 Thread Duy Nguyen
On Mon, Nov 2, 2015 at 8:23 PM, Duy Nguyen wrote: > On Mon, Nov 2, 2015 at 3:54 PM, Paolo Ciarrocchi > wrote: >> On Sun, Nov 1, 2015 at 2:55 PM, Nguyễn Thái Ngọc Duy >> wrote: >> >> Hi Duy, >> >>> This series builds on top of the index-helper ser

Re: git gc/prune runs again and again

2015-11-03 Thread Duy Nguyen
On Tue, Nov 3, 2015 at 1:44 PM, Andreas Krey wrote: > Hi all, > > I have a bit of an annoying behaviour in git gc; > there is a repo I regularly do a fetch in, and > this kicks off a gc/prune every time. I remember > there being a heuristic with being that many files > in .git/objects/17 as the gc

Re: [PATCH 1/5] read-cache: add watchman 'WAMA' extension

2015-11-03 Thread Duy Nguyen
On Mon, Nov 2, 2015 at 11:03 PM, David Turner wrote: > On Sun, 2015-11-01 at 14:55 +0100, Nguyễn Thái Ngọc Duy wrote: >> >>+#define CE_NO_WATCH (0x0001) > > This name seems very confusing to me. CE_NO_WATCHMAN_STAT? > CE_UNKNOWN_TO_WATCHMAN? Files that are known updated. Maybe CE_WATCHMAN_DIRTY

Re: fetch unshallow fails to honor dry-run

2015-11-14 Thread Duy Nguyen
Thanks for including me. I thought I marked this for reply later but I did not.. On Mon, Nov 9, 2015 at 8:24 PM, Jeff King wrote: > [+cc Duy for shallow expertise] > > On Sun, Oct 25, 2015 at 10:16:00AM +0100, Tim Janik wrote: > >> git fetch --dry-run modifies the repository if --unshallow is pas

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-17 Thread Duy Nguyen
On Mon, Nov 16, 2015 at 8:25 PM, Stefan Beller wrote: > Instead of having to search all branches for the requested sha1, we could have > some sort of data structure to make it not an O(n) operation (n being > all objects > in the repo). > > Maybe I overestimate the work which needs to be done, bec

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-11-18 Thread Duy Nguyen
On Tue, Nov 17, 2015 at 10:43 PM, Jeff King wrote: > On Tue, Nov 17, 2015 at 09:17:43PM +0100, Duy Nguyen wrote: > >> On Mon, Nov 16, 2015 at 8:25 PM, Stefan Beller wrote: >> > Instead of having to search all branches for the requested sha1, we could >> > have &g

Re: Sparse checkout in worktree

2015-11-25 Thread Duy Nguyen
On Wed, Nov 25, 2015 at 1:40 PM, Michael J Gruber wrote: > Hi there, > > I'm wondering how much it would take to enable worktree specific sparse > checkouts. From a superfluous look: > > - $GIT_DIR/info/sparse_checkout needs to be worktree specific It already is. > - We don't have much tooling a

Re: [RFC/PATCH] config: add core.trustmtime

2015-11-25 Thread Duy Nguyen
On Wed, Nov 25, 2015 at 10:00 AM, Ævar Arnfjörð Bjarmason wrote: > On Wed, Nov 25, 2015 at 7:35 AM, Christian Couder > wrote: >> At Booking.com we know that mtime works everywhere and we don't >> want the untracked cache to stop working when a kernel is upgraded >> or when the repo is copied to a

Re: Git clone fails during pre-commit hook due to GIT_WORK_TREE=. (regression 2.5 -> 2.6)

2015-11-25 Thread Duy Nguyen
On Tue, Nov 24, 2015 at 6:57 PM, Stefan Beller wrote: > +to Nguyễn Thái Ngọc Duy > > On Mon, Nov 23, 2015 at 6:22 PM, Anthony Sottile wrote: >> * Short description of the problem * >> >> It seems GIT_WORK_DIR is now exported invariantly when calling git >> hooks such as pre-commit. If these hoo

Re: Git super slow on Windows 7

2015-11-25 Thread Duy Nguyen
On Wed, Nov 25, 2015 at 7:47 PM, Stefan Beller wrote: > On Wed, Nov 25, 2015 at 10:42 AM, Lars Schneider > wrote: >> After some investigation I figured that ~50 Submodules are the culprit. >> Does anyone have an idea how to speed up Git on Windows while keeping 50 >> Submodules? >> >> Thanks, >>

Re: Sparse checkout in worktree

2015-11-25 Thread Duy Nguyen
On Wed, Nov 25, 2015 at 8:44 PM, Michael J Gruber wrote: > Duy Nguyen venit, vidit, dixit 25.11.2015 20:38: >> On Wed, Nov 25, 2015 at 1:40 PM, Michael J Gruber >> wrote: >>> Hi there, >>> >>> I'm wondering how much it would take to enable

Re: Sparse checkout in worktree

2015-11-25 Thread Duy Nguyen
On Wed, Nov 25, 2015 at 9:44 PM, Michael J Gruber wrote: > OTOH, config is common: core.sparseCheckout > So, the per worktree "switch" is the presence of the sparse-checkout file. Oh.. but yeah, splitting config file per worktree is on my todo list. Or you can help finish it [1] if you want to ma

Re: [RFC/PATCH] config: add core.trustmtime

2015-11-26 Thread Duy Nguyen
On Thu, Nov 26, 2015 at 6:21 AM, Christian Couder wrote: > Hi Duy, > > On Wed, Nov 25, 2015 at 8:51 PM, Duy Nguyen wrote: >> On Wed, Nov 25, 2015 at 10:00 AM, Ævar Arnfjörð Bjarmason >> wrote: >>> On Wed, Nov 25, 2015 at 7:35 AM, Christian Couder >>>

Re: GIT_INDEX_FILE relative paths are relative to the work tree

2015-11-27 Thread Duy Nguyen
On Fri, Nov 27, 2015 at 4:17 PM, Jack O'Connor wrote: > When I use a relative path in the GIT_INDEX_FILE environment variable, > git interprets that path relative to the the work tree. This can be > confusing if my cwd is some subdirectory of my project; in that case > an index file is created in

Re: [PATCH 5/8] checkout(-index): do not checkout i-t-a entries

2015-11-29 Thread Duy Nguyen
Sorry for this waaay too late response, everything (of the series nd/ita-cleanup) is addressed so far except this.. On Tue, Aug 25, 2015 at 10:36:52AM -0700, Junio C Hamano wrote: > > diff --git a/builtin/checkout.c b/builtin/checkout.c > > index e1403be..02889d4 100644 > > --- a/builtin/checkout.

Re: Git clone fails during pre-commit hook due to GIT_WORK_TREE=. (regression 2.5 -> 2.6)

2015-11-30 Thread Duy Nguyen
On Wed, Nov 25, 2015 at 9:13 PM, Duy Nguyen wrote: > On Tue, Nov 24, 2015 at 6:57 PM, Stefan Beller wrote: >> +to Nguyễn Thái Ngọc Duy >> >> On Mon, Nov 23, 2015 at 6:22 PM, Anthony Sottile wrote: >>> * Short description of the problem * >>> &g

Re: [RFC/PATCH] config: add core.trustmtime

2015-11-30 Thread Duy Nguyen
On Mon, Nov 30, 2015 at 8:05 PM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Maybe I'm missing some really common breakage with st_mtime on some >> system, but having a feature the user explicitly enables turn itself >> off and doing FS-testing that takes 10 seconds when it's ena

Re: [PATCH v6] Add git-grep threads param

2015-11-30 Thread Duy Nguyen
On Wed, Nov 11, 2015 at 12:52 PM, Victor Leschuk wrote: > "git grep" can now be configured (or told from the command line) > how many threads to use when searching in the working tree files. > > Changes to default behavior: number of threads now doesn't depend > on online_cpus(), e.g. if specif

Re: [PATCH v6] Add git-grep threads param

2015-11-30 Thread Duy Nguyen
I forgot.. On Wed, Nov 11, 2015 at 12:52 PM, Victor Leschuk wrote: > + else if (num_threads < 0) > + die("Invalid number of threads specified (%d)", num_threads); Please wrap this string with _() so it can be translated -- Duy -- To unsubscribe from this list: send the line

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-12-01 Thread Duy Nguyen
On Tue, Dec 1, 2015 at 1:47 AM, Stefan Beller wrote: > On Mon, Nov 30, 2015 at 10:11 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> +cc Junio, Duy >>> >>> So cloning from an arbitrary SHA1 is not a new thing I just came up with, >>> but has been discussed before[1]. >>> >>> Junio wrot

Re: Git clone fails during pre-commit hook due to GIT_WORK_TREE=. (regression 2.5 -> 2.6)

2015-12-01 Thread Duy Nguyen
On Mon, Nov 30, 2015 at 9:16 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> I was wrong, GIT_WORK_TREE support was added in git-clone many years >> ago in 20ccef4 (make git-clone GIT_WORK_TREE aware - 2007-07-06). So >> my change accidentally triggers an (undocum

Re: [RFC/PATCH 1/8] update-index: add untracked cache notifications

2015-12-02 Thread Duy Nguyen
On Tue, Dec 1, 2015 at 9:31 PM, Christian Couder wrote: > Doing: > > cd /tmp > git --git-dir=/git/somewhere/else/.git update-index --untracked-cache > > doesn't work how one would expect. It hardcodes "/tmp" as the directory > that "works" into the index, so if you use the working tree, you'll

Re: [RFC/PATCH 2/8] update-index: add --test-untracked-cache

2015-12-02 Thread Duy Nguyen
On Tue, Dec 1, 2015 at 9:31 PM, Christian Couder wrote: > diff --git a/builtin/update-index.c b/builtin/update-index.c > index e568acc..b7b5108 100644 > --- a/builtin/update-index.c > +++ b/builtin/update-index.c > @@ -996,8 +996,10 @@ int cmd_update_index(int argc, const char **argv, const > cha

Re: [RFC/PATCH 7/8] update-index: prevent --untracked-cache from performing tests

2015-12-02 Thread Duy Nguyen
On Tue, Dec 1, 2015 at 9:31 PM, Christian Couder wrote: diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh > index 0e8d0d4..8c3e703 100755 > --- a/t/t7063-status-untracked-cache.sh > +++ b/t/t7063-status-untracked-cache.sh > @@ -11,7 +11,7 @@ avoid_racy() { > # It

Re: [RFC/PATCH] config: add core.trustmtime

2015-12-02 Thread Duy Nguyen
On Wed, Nov 25, 2015 at 10:00 AM, Ævar Arnfjörð Bjarmason wrote: > Aside from the slight hassle of enabling this and keeping it enabled > this feature is great. It's sped up "git status" across the board by > about 40%. Slightly less than that on faster spinning disks, slightly > more than that on

Re: [PATCH 0/5] Split .git/config in multiple worktree setup

2015-12-03 Thread Duy Nguyen
On Thu, Dec 3, 2015 at 7:15 AM, Max Kirillov wrote: > On Wed, Dec 02, 2015 at 08:13:41PM +0100, Nguyễn Thái Ngọc Duy wrote: >> Let's restart this. From the last discussion [1], we need to make >> core.worktree per-worktree for submodules to work. We also need >> core.sparseCheckout per-worktree. >

Re: [PATCH v2] add test to demonstrate that shallow recursive clones fail

2015-12-03 Thread Duy Nguyen
On Tue, Dec 1, 2015 at 11:22 PM, Junio C Hamano wrote: > As to ${sign}, I was tempted to say an empty string might be > sufficient (i.e. "do not use 40-hex as your branch name"), but it > probably is a bad idea. A single dot "." would be a possibility > (i.e. a ref component cannot begin with a d

Re: GIT_WORK_TREE not set as expected when changing git repository from a script using a git alias

2015-12-04 Thread Duy Nguyen
On Fri, Dec 4, 2015 at 10:54 AM, Gabriel Ganne wrote: > Hi, > > Following commit d95138e695d99d32dcad528a2a7974f434c51e79 (since > v2.5.1) the following workflow I use seems broken : You are not the first one bitten [1] by that commit. A fix is being worked on [2]. Sorry for the trouble. [1] htt

Re: [PATCH 0/5] Split .git/config in multiple worktree setup

2015-12-04 Thread Duy Nguyen
On Thu, Dec 3, 2015 at 9:53 PM, Max Kirillov wrote: > On Thu, Dec 03, 2015 at 09:07:07AM +0100, Duy Nguyen wrote: >> On Thu, Dec 3, 2015 at 7:15 AM, Max Kirillov wrote: >>> Using builtin defaults might be confusing for users - >>> editing the info/config.worktree

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Duy Nguyen
On Fri, Dec 4, 2015 at 11:45 PM, Junio C Hamano wrote: > Jeff King writes: > >>> But why would fetching a tag (or set of tags) merit a depth of zero? >>> Doesn't depth 1 mean "give me the the objects, and none of their >>> descendants"? Why use 0? >> >> That comes from this line: >> >> transpo

Re: [PATCH 2/2] setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..

2015-12-04 Thread Duy Nguyen
On Fri, Dec 4, 2015 at 9:35 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> ... Now I conclude >> that setup-messed-by-alias is always evil. So the env restoration is >> done for _all_ commands whenever aliases are involved. > > So a side effect of this is whenever an alias is inv

Re: [PATCH 13/16] init: allow alternate backends to be set for new repos

2015-12-04 Thread Duy Nguyen
On Thu, Dec 3, 2015 at 1:35 AM, David Turner wrote: > git init learns a new argument --refs-backend-type. Presently, only > "files" is supported, but later we will add other backends. > > When this argument is used, the repository's core.refsBackendType > configuration value is set, and the refs

Re: [PATCH 2/2] setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..

2015-12-05 Thread Duy Nguyen
On Thu, Dec 3, 2015 at 7:17 PM, Nguyễn Thái Ngọc Duy wrote: > The solution in d95138e is reverted in this commit. Instead we reuse the > solution from c056261 [4]. c056261 fixes another setup-messed-up-by-alias > by saving and restoring env for git-clone and git-init. Now I conclude > that setup-m

Re: [PATCH 2/5] config.c: move worktree-specific variables to .git/worktrees/...

2015-12-06 Thread Duy Nguyen
On Sun, Dec 6, 2015 at 8:47 AM, Eric Sunshine wrote: > On Wed, Dec 2, 2015 at 2:13 PM, Nguyễn Thái Ngọc Duy > wrote: >> .git/info/config.worktree is a pattern list that splits .git/config in >> to sets: the worktree set matches the patterns, the commmon set does >> not. >> >> In normal worktrees

Re: Multiple fetches when unshallowing a shallow clone

2015-12-06 Thread Duy Nguyen
On Sun, Dec 6, 2015 at 8:01 AM, Jeff King wrote: > On Sun, Dec 06, 2015 at 01:37:18AM -0500, Jeff King wrote: > >> And indeed, replacing the logic with what I wrote does make the backfill >> go away in my test case. But it's so far from what is there that I feel >> like I must be missing something

Re: [RFC/PATCH 1/8] update-index: add untracked cache notifications

2015-12-07 Thread Duy Nguyen
On Mon, Dec 7, 2015 at 10:08 AM, Christian Couder wrote: > On Wed, Dec 2, 2015 at 8:16 PM, Duy Nguyen wrote: >>> --- a/builtin/update-index.c >>> +++ b/builtin/update-index.c >>> @@ -121,7 +121,7 @@ static int test_if_untracked_cache_is_supported(void) >>

Re: Multiple fetches when unshallowing a shallow clone

2015-12-07 Thread Duy Nguyen
On Mon, Dec 7, 2015 at 8:57 PM, Jason Paller-Rzepka wrote: > Duy, you mentioned that depth=0 means "do not change depth". I assume that > means the server should use exactly the shallows that the client sent, and > it does not need to traverse the tree or modify the shallow or unshallow > sets at

Re: [PATCH 3/2] git.c: make sure we do not leak GIT_* to alias scripts

2015-12-08 Thread Duy Nguyen
On Mon, Dec 7, 2015 at 7:54 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Let's hope there will be no third report about this commit.. > > Hmm, why does this additional test fail only under prove but pass > without it? It passes with prove for me. Some mysterious variable leaks

Re: git-clone fails when current user is not in /etc/passwd

2015-12-09 Thread Duy Nguyen
On Wed, Dec 2, 2015 at 9:10 PM, Taylor Braun-Jones wrote: > My use case it running git clone inside a docker container with > `docker run --user $(id -u):$(id -g) --volume /foo:/foo ...`. I want > all /foo/* file creation/access from inside the Docker container to be > done as the current uid/gid

Re: git-clone fails when current user is not in /etc/passwd

2015-12-09 Thread Duy Nguyen
On Wed, Dec 9, 2015 at 5:08 PM, Duy Nguyen wrote: > On Wed, Dec 2, 2015 at 9:10 PM, Taylor Braun-Jones > wrote: >> My use case it running git clone inside a docker container with >> `docker run --user $(id -u):$(id -g) --volume /foo:/foo ...`. I want >> all /foo/* f

Re: [PATCH] completion: remove 'git column' from porcelain commands

2015-12-11 Thread Duy Nguyen
On Fri, Dec 11, 2015 at 7:16 PM, Junio C Hamano wrote: > SZEDER Gábor writes: > >> 'git column' is an internal helper, so it should not be offered on >> 'git ' along with porcelain commands. >> >> Signed-off-by: SZEDER Gábor >> --- > > I think this makes sense. > Objections? Not from me. -- Du

Re: [PATCH 7/8] config: add core.untrackedCache

2015-12-15 Thread Duy Nguyen
On Tue, Dec 15, 2015 at 4:34 PM, Christian Couder wrote: > On Mon, Dec 14, 2015 at 10:30 PM, Junio C Hamano wrote: >> Junio C Hamano writes: >> >> The primary reason why I do not like your "configuration decides" is >> it will be a huge source of confusions and bugs. Imagine what >> should happ

Re: update index mtime etc metadata

2015-12-15 Thread Duy Nguyen
On Tue, Dec 15, 2015 at 3:44 AM, Joey Hess wrote: > Is there any available plumbing that can change the mtime etc metadata > that is recorded in the index for a file, to user-provided values? Or, > to force the current file stat metadata to be updated in the index? I don't think there is a way. W

Re: [PATCH 7/8] config: add core.untrackedCache

2015-12-17 Thread Duy Nguyen
On Thu, Dec 17, 2015 at 2:44 PM, Jeff King wrote: > I think we may actually be thinking of the same thing. Naively, I would > expect: > > .. > - if there is cache data in the index but that config flag is not set, > presumably we would not update it (we could even explicitly drop it, > b

Re: [PATCH 7/8] config: add core.untrackedCache

2015-12-17 Thread Duy Nguyen
On Wed, Dec 16, 2015 at 4:53 AM, Ævar Arnfjörð Bjarmason wrote: > On Tue, Dec 15, 2015 at 8:40 PM, Junio C Hamano wrote: >> Ævar Arnfjörð Bjarmason writes: >> I still have a problem with the approach from "design cleanliness" >> point of view[...] >> >> In any case I think we already have agreed

Re: -C option with pull doesn't seem to be respected in aliases in git 2.6.4.

2015-12-20 Thread Duy Nguyen
On Fri, Dec 18, 2015 at 8:35 AM, Cameron Esfahani wrote: > I have git project checked out at ~/llvm. Inside of there, inside of a > “tools” directory, I have another project checked out as “lldb”: > > ~/llvm/tools/lldb > > I wrote an alias which would help me update all my projects: > >

Re: -C option with pull doesn't seem to be respected in aliases in git 2.6.4.

2015-12-21 Thread Duy Nguyen
On Mon, Dec 21, 2015 at 8:17 AM, Duy Nguyen wrote: > On Fri, Dec 18, 2015 at 8:35 AM, Cameron Esfahani wrote: >> I have git project checked out at ~/llvm. Inside of there, inside of a >> “tools” directory, I have another project checked out as “lldb”: >> >> ~/llvm/

Re: [git-for-windows] Case insensitive branch names

2015-12-21 Thread Duy Nguyen
On Mon, Dec 21, 2015 at 6:01 PM, Philip Oakley wrote: > On the Git User's list, Diego J. reported that: > > 'When I "checkout" a branch using different Upper Case/Lower Case than the > original, the branch doesn't show in "git branch [--list]"' [1] > > While case sensitivity for filenames is a com

Re: [PATCH] Revert "setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR"

2015-12-21 Thread Duy Nguyen
On Tue, Dec 22, 2015 at 1:31 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Nguyễn Thái Ngọc Duy writes: >> >>> This commit has caused three regression reports so far. All of them are >>> about spawning git subprocesses, where the new presence of GIT_WORK_TREE >>> either changes comman

Re: [PATCH 7/8] config: add core.untrackedCache

2015-12-22 Thread Duy Nguyen
On Tue, Dec 22, 2015 at 1:30 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Thu, Dec 17, 2015 at 2:44 PM, Jeff King wrote: >>> I think we may actually be thinking of the same thing. Naively, I would >>> expect: >>> >>> .. >>> -

Re: [PATCH v2 0/3] nd/clear-gitenv-upon-use-of-alias

2015-12-22 Thread Duy Nguyen
On Tue, Dec 22, 2015 at 4:18 AM, Junio C Hamano wrote: > Thanks. I wiggled these three on top of the "Revert the earlier > one"; while I think the result is correct, I'd appreciate if you can > double check the result when I push the topic out later today. Looks good. "prove" passed too by the w

Re: `format:%>` padding and `git log --graph`

2015-12-22 Thread Duy Nguyen
On Sun, Dec 20, 2015 at 10:41:44AM -0600, Elliott Cable wrote: > I'm not sure what version the `%>` / `<|` / etc padding showed up in, > but they're truly excellent for building beautiful one-line `git log` > output. Somebody found my code useful!! :-D > This may be a long-shot, but, unfortunatel

Re: [PATCH v2 0/3] nd/clear-gitenv-upon-use-of-alias

2015-12-22 Thread Duy Nguyen
On Tue, Dec 22, 2015 at 5:57 PM, Duy Nguyen wrote: > On Tue, Dec 22, 2015 at 4:18 AM, Junio C Hamano wrote: >> Thanks. I wiggled these three on top of the "Revert the earlier >> one"; while I think the result is correct, I'd appreciate if you can >> double ch

Re: [PATCH 1/3] pretty: Pass graph width to pretty formatting for use in '%>|(N)'

2015-12-22 Thread Duy Nguyen
(I'm joining the newer thread [1] back to this one, thanks for reminding me about this) [1] http://thread.gmane.org/gmane.comp.version-control.git/282771 On Tue, Sep 22, 2015 at 2:40 AM, Junio C Hamano wrote: > Josef Kufner writes: > >> Pass graph width to pretty formatting, so N in '%>|(N)' in

Re: [PATCH v2 0/3] nd/clear-gitenv-upon-use-of-alias

2015-12-23 Thread Duy Nguyen
On Wed, Dec 23, 2015 at 4:37 PM, Jeff King wrote: > On Tue, Dec 22, 2015 at 10:13:03AM -0800, Junio C Hamano wrote: > >> > Another by the way, this "forcing aliases as external commands" now >> > shows something like "error: git-log died of signal 13" when the pager >> > exits early, for an alias

Re: [PATCH v2 0/3] nd/clear-gitenv-upon-use-of-alias

2015-12-24 Thread Duy Nguyen
On Thu, Dec 24, 2015 at 4:31 AM, Jeff King wrote: > 2. I doubt anybody is actually seeing this in practice anymore. But > maybe I am misunderstanding something in Duy's series that changes > this. There are two parts in your patch, one (that you two seemed to focus on) about return co

Re: [PATCH 7/8] config: add core.untrackedCache

2015-12-24 Thread Duy Nguyen
On Thu, Dec 24, 2015 at 8:56 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Duy Nguyen writes: >> >>> In that case we can just check config once in read_index_from and >>> destroy UNTR extension. Or the middle ground, we check config once in &

Re: [PATCH v3 04/11] update-index: add untracked cache notifications

2015-12-24 Thread Duy Nguyen
On Thu, Dec 24, 2015 at 4:03 AM, Christian Couder wrote: > Attempting to flip the untracked-cache feature on for a random index > file with > > cd /random/unrelated/place > git --git-dir=/somewhere/else/.git update-index --untracked-cache > > would not work as you might expect. Because fli

Re: [PATCH v3 10/11] config: add core.untrackedCache

2015-12-24 Thread Duy Nguyen
On Thu, Dec 24, 2015 at 4:03 AM, Christian Couder wrote: > --force-untracked-cache:: > - For safety, `--untracked-cache` performs tests on the working > - directory to make sure untracked cache can be used. These > - tests can take a few seconds. `--force-untracked-cache` can be

Re: [PATCH] worktree: stop supporting moving worktrees manually

2015-12-29 Thread Duy Nguyen
On Mon, Dec 28, 2015 at 1:22 PM, Eric Sunshine wrote: > On Sun, Dec 27, 2015 at 10:43:16AM +0700, Nguyễn Thái Ngọc Duy wrote: >> The current update_linked_gitdir() has a bug that can create "gitdir" >> file in non-multi-worktree setup. Instead of fixing this, we step back a >> bit. The original de

Re: [PATCH 3/6] apply: fix adding new files on i-t-a entries

2015-12-29 Thread Duy Nguyen
On Mon, Dec 28, 2015 at 10:01 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Suppose that you came up with some contents to register at path F in >> your working tree, told Git about your intention with "add -N F", and >> then tried to apply a patch that wants to _create_ F: >> >>

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