Re: Change in .gitignore handling: intended or bug?

2016-03-09 Thread Duy Nguyen
On Wed, Mar 9, 2016 at 1:10 AM, Junio C Hamano wrote: > diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt > index 3ded6fd..91d1ce2 100644 > --- a/Documentation/gitignore.txt > +++ b/Documentation/gitignore.txt > @@ -148,7 +148,43 @@ excluded, the following conditions must be m

Re: libcurl dependency for implementing RFC3161 timestamps

2016-03-09 Thread Duy Nguyen
On Wed, Mar 9, 2016 at 6:24 PM, Anton Wuerfel wrote: > -As git tag is a builtin part of the main git executable, introduce a > libcurl dependency for the main executable (maybe not best-practice). libcurl was part of the main executable and then split out because it increased startup time [1]. I

Re: Change in .gitignore handling: intended or bug?

2016-03-09 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 1:02 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Wed, Mar 9, 2016 at 1:10 AM, Junio C Hamano wrote: >>> diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt >>> index 3ded6fd..91d1ce2 100644 >>> ---

Re: [PATCH] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-09 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 12:55 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Side note, it's probably a bad idea to use basename matching on a >> negative rule (ie. no slashes in the pattern) because what the pattern >> says is "re-include _any_ directory named 'dir'", not just th

Re: [RFC/PATCH 01/48] builtin/apply: avoid parameter shadowing 'p_value' global

2016-03-09 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 6:27 AM, Junio C Hamano wrote: > Christian Couder writes: > >> Signed-off-by: Christian Couder >> --- >> builtin/apply.c | 24 >> 1 file changed, 12 insertions(+), 12 deletions(-) > > To be honest, I have to say that I do not like this change fro

Re: [RFC/PATCH 00/48] Libifying git apply

2016-03-10 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 12:48 AM, Christian Couder wrote: > This is a patch series about libifying "git apply" functionality, to > be able to use this functionality in "git am" without spawning new > processes. This should make "git am" and "git rebase" significantly > faster. > > This has been di

Re: Change in .gitignore handling: intended or bug?

2016-03-10 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 7:59 AM, Junio C Hamano wrote: > In any case, back to "on topic" part again; I couldn't come up with > a better rewrite using named rules (partly because you need to > clearly define each rule before referring them, and some of the > rules are temporary workarounds for the

Re: [PATCH 01/19] trace.c: add GIT_TRACE_PACK_STATS for pack usage statistics

2016-03-10 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 7:05 AM, David Turner wrote: > On Wed, 2016-03-09 at 14:58 -0800, Junio C Hamano wrote: >> David Turner writes: > ... >> > trace_stats() is intended for GIT_TRACE_*_STATS variable group and >> > GIT_TRACE_PACK_STATS is more like an example how new vars can be >> > added. >

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

2016-03-10 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 6:21 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> David Turner writes: >> >>> From: Nguyễn Thái Ngọc Duy >>> >>> Instead of reading the index from disk and worrying about disk >>> corruption, the index is cached in memory (memory bit-flips happen >>> too, but

Re: [PATCH 0/1] Introduce a way to create a branch and worktree at the same time

2016-03-10 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 6:34 PM, Johannes Schindelin wrote: > The invention of the `git worktree` command changed this developer's > working style dramatically. Rather than switching between branches all > the time, topic branches are created and checked out in newly-added > worktrees, to be rewor

Re: [PATCH 0/1] Introduce a way to create a branch and worktree at the same time

2016-03-10 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 6:51 PM, Duy Nguyen wrote: >> It gets rather tiresome, and also typo-prone, to call "git branch xyz >> upstream/master && git worktree add xyz xyz" all the time. > > You can actually do "git worktree -b xyz xyz upstream/master&q

Re: [BUG?] fetch into shallow sends a large number of objects

2016-03-10 Thread Duy Nguyen
On Tue, Mar 08, 2016 at 08:25:24AM -0500, Jeff King wrote: > I think this patch does roughly the right thing: > > diff --git a/upload-pack.c b/upload-pack.c > index 4859535..da76f70 100644 > --- a/upload-pack.c > +++ b/upload-pack.c > @@ -833,12 +833,41 @@ static void receive_needs(void) >

Re: [BUG?] fetch into shallow sends a large number of objects

2016-03-10 Thread Duy Nguyen
On Fri, Mar 11, 2016 at 4:40 AM, Jeff King wrote: > On Thu, Mar 10, 2016 at 01:26:08PM -0800, Junio C Hamano wrote: > >> > IMHO, that is the right thing. They asked for "C" as a shallow cut-off >> > point, so anything that is a parent of "C" should be omitted as shallow, >> > too. It has nothing t

Re: [PATCH 0/1] Introduce a way to create a branch and worktree at the same time

2016-03-10 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 8:21 PM, Johannes Schindelin wrote: > Hi Duy, > > On Thu, 10 Mar 2016, Duy Nguyen wrote: > >> On Thu, Mar 10, 2016 at 6:34 PM, Johannes Schindelin >> wrote: >> > The invention of the `git worktree` command changed this developer's &

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

2016-03-10 Thread Duy Nguyen
On Fri, Mar 11, 2016 at 3:22 AM, David Turner wrote: > Reads (ignoring SHA verification) will be slightly slower (due to the > btree overhead). If, in general, we only had to read part of the > index, that would be faster. But a fair amount of git code is written > to assume that it is reasonable

Re: [PATCH/RFC/GSoC 00/17] A barebones git-rebase in C

2016-03-14 Thread Duy Nguyen
On Sat, Mar 12, 2016 at 5:46 PM, Paul Tan wrote: > So, we have around a 1.4x-1.8x speedup for Linux users, and a 1.7x-13x speedup > for Windows users. The annoying long delay before the interactive editor is > launched on Windows is gotten rid of, which I'm very happy about :-) Nice numbers :-) S

Re: [PATCH 0/1] Introduce a way to create a branch and worktree at the same time

2016-03-15 Thread Duy Nguyen
On Tue, Mar 15, 2016 at 1:53 PM, Johannes Schindelin wrote: >> That approach to implement the UI that directly faces the end users >> via scripting would let your users choose layouts more flexibly. >> Some people may want a repository and its worktrees next to each >> other, some others may want

Re: [PATCH/RFC/GSoC 09/17] rebase-common: implement cache_has_unstaged_changes()

2016-03-15 Thread Duy Nguyen
On Tue, Mar 15, 2016 at 3:54 AM, Johannes Schindelin wrote: > In my 'interactive-rebase' branch... 64 commits! Maybe next time we should announce wip branches like this when we start doing stuff so people don't overlap. Of course these branches do not have to be perfect (and can be force pushed f

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

2016-03-15 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 1:36 AM, David Turner wrote: > Git can poke the daemon to tell it to refresh the index cache, or to > keep it alive some more minutes via UNIX signals. The reason I went with UNIX signals was because it made it possible to make a simple GetMessage loop, the only thing I ca

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

2016-03-15 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 6:09 AM, Junio C Hamano wrote: > David Turner writes: > >> From: Nguyễn Thái Ngọc Duy >> >> Instead of reading the index from disk and worrying about disk >> corruption, the index is cached in memory (memory bit-flips happen >> too, but hopefully less often). The result i

Re: [PATCH 18/19] index-helper: autorun

2016-03-15 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 1:36 AM, David Turner wrote: > Introduce a new config option, indexhelper.autorun, to automatically > run git index-helper before starting up a builtin git command. This > enables users to keep index-helper running without manual > intervention. This could be a problem on

Re: [PATCH 19/19] hack: watchman/untracked cache mashup

2016-03-15 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 1:36 AM, David Turner wrote: > static struct watchman_query *make_query(const char *last_update) > @@ -60,8 +61,24 @@ static void update_index(struct index_state *istate, > continue; > > pos = index_name_pos(istate, wm->name, strlen(

Re: [PATCH 0/1] Introduce a way to create a branch and worktree at the same time

2016-03-15 Thread Duy Nguyen
On Tue, Mar 15, 2016 at 8:56 PM, Johannes Schindelin wrote: > Sure. And with the repository being put elsewhere, you also buy the tedium > to no longer be able to simply "less .git/rebase-apply/patch". Which I > have to type *a lot*. You win some, you lose some. If you ask me, you lose > some more

Re: Can't git stash after using git add -N

2016-03-16 Thread Duy Nguyen
On Wed, Mar 16, 2016 at 11:51 AM, Junio C Hamano wrote: > Josh Triplett writes: > >> As far as I can tell, if I run "git add -N" on a file, and then commit >> without adding the file contents, it gets committed as an empty file. > > Is that true? Git once worked like that in earlier days, but I

Re: [PATCH 18/19] index-helper: autorun

2016-03-18 Thread Duy Nguyen
On Thu, Mar 17, 2016 at 9:43 PM, Johannes Schindelin wrote: > Hi Duy, > > On Thu, 17 Mar 2016, Duy Nguyen wrote: > >> On Thu, Mar 17, 2016 at 1:27 AM, Johannes Schindelin >> wrote: >> > I am much more concerned about concurrent accesses and the communication &

Re: [PATCH 3/2] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-18 Thread Duy Nguyen
On Sat, Mar 19, 2016 at 1:00 AM, Junio C Hamano wrote: > What is the ultimate goal of nd/exclusion-regression-fix topic over > the behaviour before 2.7.0 and after 2.7.1 (there was a regression > in 2.7.0 that was reverted in 2.7.1)? From the cover letter of the > series: > > Take one was bad

Re: [RFC] Code reorgnization

2016-03-18 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 4:49 AM, Junio C Hamano wrote: > John Keeping writes: > >> The organisation of the git code shouldn't make a difference since CGit >> just links with libgit.a, even if it does CGit pulls in git.git as a >> submodule so it can just fix any problems in the same commit that >

Re: [PATCH 18/19] index-helper: autorun

2016-03-18 Thread Duy Nguyen
On Thu, Mar 17, 2016 at 1:27 AM, Johannes Schindelin wrote: > I am much more concerned about concurrent accesses and the communication > between the Git processes and the index-helper. Writing to the .pid file > sounds very fragile to me, in particular when multiple processes can poke > the index-

Re: bug: sparse config interpretation incorrectness in 2.8.0-rc2

2016-03-18 Thread Duy Nguyen
On Thu, Mar 17, 2016 at 8:46 PM, Johannes Schindelin wrote: > Unfortunately, this does not help me at all. In the use case I am trying > to get to work fast, we have tons and tons of directories and need *one* > file in pretty much *all* of those directories, and exclude most of the > other files.

Re: [PATCH 3/2] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-19 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 6:49 AM, Junio C Hamano wrote: > Thanks for these 5 patches, two of which need to be discarded ;-). > I think you can pick either one of 1/2, pick the one that says > "non-NULL" (as opposed to "something") in the log message for 2/2. Sorry, I did "git send-email ... 00*" a

Re: [RFC] Code reorgnization

2016-03-19 Thread Duy Nguyen
On Thu, Mar 17, 2016 at 8:32 PM, Johannes Schindelin wrote: >> Good? Bad? Ugly? > > Disruptive. Probably a change for 3.0? We tested it with the builtin rename a long time ago, so it's probably not bad. By the principle of "dogfooding", we should try it soon and make sure it's not disruptive, or

[RFC] Code reorgnization

2016-03-19 Thread Duy Nguyen
Git's top directory is crowded and I think it's agreed that moving test-* to t/helper is a good move. I just wanted to check if we could take this opportunity (after v2.8.0) to move some other files too. I propose the following new subdirs lib --- This contains files that are about data structures

Re: [PATCH 3/2] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-19 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 1:21 PM, Durham Goode wrote: >> Skipping that tricky pair, the pairs "/*" and "!/dir1/dir2/" means >> "exclude everything except dir1/dir2" (in .gitignore sense) or >> "include everything except dir1/dir2" in sparse checkout sense. Which >> results in empty worktree. 1+2 tr

Re: [RFC] Code reorgnization

2016-03-19 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 12:24 PM, Jeff King wrote: > On Thu, Mar 17, 2016 at 06:11:36PM +0700, Duy Nguyen wrote: > >> Git's top directory is crowded and I think it's agreed that moving >> test-* to t/helper is a good move. I just wanted to check if we could >> t

Re: [PATCH] help.c: strip suffix only if the STRIP_EXTENSION defined

2016-03-19 Thread Duy Nguyen
On Wed, Mar 16, 2016 at 9:27 PM, Alexander Kuleshov wrote: > We stripping extension in the list_commands_in_dir() to get > commands without '.exe' suffix. Let's do it only if STRIP_EXTENSION > is defined to not spend time for unnecessary strip_suffix() call in > this case. Unless the time saving

Re: [PATCH 18/19] index-helper: autorun

2016-03-19 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 2:14 PM, Johannes Schindelin wrote: > Hi Duy, > > On Fri, 18 Mar 2016, Duy Nguyen wrote: > >> On Thu, Mar 17, 2016 at 9:43 PM, Johannes Schindelin >> wrote: >> >> > I know of use cases where the index weighs 300MB, and falling b

Re: [PATCH 18/19] index-helper: autorun

2016-03-19 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 2:17 PM, Johannes Schindelin wrote: > Hi Duy, > > On Fri, 18 Mar 2016, Duy Nguyen wrote: > >> > Well, the way I read the code it is possible that: >> > >> > 1. Git process 1 starts, reading the index >> > 2. Git process 2 s

Re: [PATCH 3/2] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-19 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 12:40 PM, Junio C Hamano wrote: > send-email: detect and offer to skip backup files > > Diligent people save output from format-patch to files, proofread > and edit them and then finally send the result out. If the > resulting files are sent out with "git send-email 0*", t

Re: [PATCH] read-cache: increase write buffer size

2016-03-19 Thread Duy Nguyen
On Sat, Mar 19, 2016 at 8:19 AM, David Turner wrote: > Each write() has syscall overhead, and writing a large index entails > many such calls. A larger write buffer reduces the overhead, > leading to increased performance. > > On my repo, which has an index size of 30m, this saves about 10ms of >

Re: bug: sparse config interpretation incorrectness in 2.8.0-rc2

2016-03-19 Thread Duy Nguyen
On Thu, Mar 17, 2016 at 2:51 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Wed, Mar 16, 2016 at 05:09:23PM -0700, Durham Goode wrote: >>> Using git 2.8.0-rc2, given a repo with the following files: >>> >>> - one/hideme >>> - one/d

Re: [PATCH 09/19] index-helper: add Windows support

2016-03-19 Thread Duy Nguyen
On Thu, Mar 17, 2016 at 7:18 PM, Johannes Schindelin wrote: > Please note that there is one very important difference between Windows vs > Linux when it comes to shared memory: on Windows, the memory is released > as soon as the last user goes away. I assume that can be taken care of without chan

Re: [PATCH 19/19] hack: watchman/untracked cache mashup

2016-03-19 Thread Duy Nguyen
On Thu, Mar 17, 2016 at 7:56 AM, David Turner wrote: >> So if we detect an updated file that's not in the index, we are >> prepared to invalidate that path, correct? We may invalidate more >> than >> necessary if that's true. Imagine a.o is already ignored. If it's >> rebuilt, we should not need t

Re: [PATCH 09/19] index-helper: add Windows support

2016-03-19 Thread Duy Nguyen
I think it's safe to drop this patch now. It's mostly to prove that it could work on Windows. But I don't think it's tested a lot (even I only occasionally test it under wine). On Thu, Mar 10, 2016 at 1:36 AM, David Turner wrote: > From: Nguyễn Thái Ngọc Duy > > Windows supports shared memory, b

Re: [ANNOUNCE] Git v2.8.0-rc2

2016-03-19 Thread Duy Nguyen
On Wed, Mar 16, 2016 at 8:33 PM, Michael J Gruber wrote: > In hindsight, what happened must have been like this: > > "ahead " was marked properly for l10n and translated in the past. > > 7a76c28 (status: disable translation when --porcelain is used, > 2014-03-20) introduced those extra parentheses

Re: [PATCH 18/19] index-helper: autorun

2016-03-19 Thread Duy Nguyen
On Tue, Mar 15, 2016 at 9:26 PM, Johannes Schindelin wrote: > Hi Duy, > > On Tue, 15 Mar 2016, Duy Nguyen wrote: > >> On Thu, Mar 10, 2016 at 1:36 AM, David Turner >> wrote: >> > Introduce a new config option, indexhelper.autorun, to automatically >> >

Re: Tabs in commit messages - de-tabify option in strbuf_stripspace()?

2016-03-19 Thread Duy Nguyen
On Wed, Mar 16, 2016 at 9:27 PM, Marc Branchaud wrote: > On 16-03-15 09:02 PM, Stefan Beller wrote: >> On Tue, Mar 15, 2016 at 6:00 PM, Stefan Beller wrote: >>> >>> Instead of converting to whitespaces in Git, we could make use of the >>> set_tabs capability for ttys and setup the terminal for ha

Re: 2.8.0 gitignore enhancement not working as expected

2016-03-19 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 4:31 PM, Richard Furness -X (rfurness - ENSOFT LIMITED at Cisco) wrote: > Hi, > > I've been testing out git 2.8.0 rc3 due to having a particular interest in > this enhancement from the changelog: > " Another try to improve the ignore mechanism that lets you say "this >

Re: 2.8.0 gitignore enhancement not working as expected

2016-03-19 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 9:32 PM, Richard Furness -X (rfurness - ENSOFT LIMITED at Cisco) wrote: > Hi Duy, > > I tried your exact example and it worked correctly. But then I tried adding > some more files/dirs at the top level and I still see an issue: Thank you. Phew.. I bet you hit the same bug

Re: bug: sparse config interpretation incorrectness in 2.8.0-rc2

2016-03-19 Thread Duy Nguyen
On Wed, Mar 16, 2016 at 05:09:23PM -0700, Durham Goode wrote: > Using git 2.8.0-rc2, given a repo with the following files: > > - one/hideme > - one/donthide > - two/foo > > A sparse config of: > > cat > .git/info/sparse-checkout < /* > !one/hideme > EOF > > Results in a repository that only ha

Re: [PATCH 18/19] index-helper: autorun

2016-03-19 Thread Duy Nguyen
On Sat, Mar 19, 2016 at 12:22 AM, David Turner wrote: > On Fri, 2016-03-18 at 14:44 +0700, Duy Nguyen wrote: >> > So yeah, this is the challenge: to make Git work at real-world >> > scale >> > (didn't we hear a lot about this at the latest Git Merge?) >>

Re: bug: sparse config interpretation incorrectness in 2.8.0-rc2

2016-03-19 Thread Duy Nguyen
On Thu, Mar 17, 2016 at 8:04 PM, Johannes Schindelin wrote: > Hi Duy, > > On Thu, 17 Mar 2016, Duy Nguyen wrote: > >> Good news for you is there's "sparse checkout v2" in the work, that >> would not rely on exclude engine and should be both faster and more

Re: [PATCH 3/2] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-20 Thread Duy Nguyen
On Fri, Mar 18, 2016 at 11:51 AM, Durham Goode wrote: > On 3/17/16 4:49 PM, Junio C Hamano wrote: >> >> Thanks for these 5 patches, two of which need to be discarded ;-). >> I think you can pick either one of 1/2, pick the one that says >> "non-NULL" (as opposed to "something") in the log message

Re: [PATCH] branch: update all per-worktree HEADs when renaming a branch

2016-03-21 Thread Duy Nguyen
On Tue, Mar 22, 2016 at 12:41 AM, Eric Sunshine wrote: >> diff --git a/worktree.c b/worktree.c >> @@ -217,3 +217,41 @@ char *find_shared_symref(const char *symref, const char >> *target) >> +int update_worktrees_head_symref(const char *oldref, const char *newref) >> +{ >> + int error = 0; >

Re: git-apply does not work in a sub-directory of a Git repository

2016-03-23 Thread Duy Nguyen
On Wed, Mar 23, 2016 at 5:14 AM, Stefan Beller wrote: >> Hello everyone, >> As you observed, patch wasn't applied. Is it intended behaviour of >> git-apply? Usually to apply the patch I have to copy it to top directory >> and then use git-apply. >> >> I tried out git-am to apply the patch ("git fo

Re: error: src refspec refs/heads/master matches more than one.

2016-03-23 Thread Duy Nguyen
nfusing for commands that accepts both branch and non-branch refs. There were some more discussion about unambiguously specifying full ref in git-branch but it was getting nowhere. On Wed, Feb 19, 2014 at 2:03 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> Prevent is a strong word

Re: [PATCH] sha1_name.c: add an option to abort on ambiguous refs

2016-03-23 Thread Duy Nguyen
On Wed, Mar 23, 2016 at 10:45 PM, Johannes Schindelin wrote: > Hi Duy, > > On Wed, 23 Mar 2016, Nguyễn Thái Ngọc Duy wrote: > >> There are cases when a warning on ambiguous refs may go unnoticed >> (e.g. git-log filling up the whole screen). There are also cases when >> people want to catch ambigu

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-24 Thread Duy Nguyen
On Thu, Mar 24, 2016 at 1:07 PM, Ray Zhang wrote: > By adding this option which defaults to true, we can use the > corresponding --no-checkout to make some customizations before > the checkout, like sparse checkout, etc. I think we can follow git-clone and use '-n' for this. But if it's sparse ch

Re: Gitk "External diff" broken when using worktree

2016-03-24 Thread Duy Nguyen
On Thu, Mar 24, 2016 at 9:55 AM, Daryl Van Den Brink wrote: > Hi, > > I'm using git 2.7.3 on cygwin, and have been taking advantage of the > new "git worktree" feature. I noticed that when I launch gitk from one > of the attached working directories, its "external diff" feature > doesn't seem to w

Re: git-apply does not work in a sub-directory of a Git repository

2016-03-24 Thread Duy Nguyen
On Wed, Mar 23, 2016 at 11:55 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> See >> >> http://thread.gmane.org/gmane.comp.version-control.git/288316/focus=288321 >> >> I agree it is bad that it silently ignores the path outside the >> directory. When run with --verbose, we should say

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-24 Thread Duy Nguyen
On Fri, Mar 25, 2016 at 8:29 AM, Eric Sunshine wrote: > On Thu, Mar 24, 2016 at 9:22 PM, Eric Sunshine > wrote: >> On Thu, Mar 24, 2016 at 5:52 AM, Zhang Lei wrote: >>> 2016-03-24 17:16 GMT+08:00 Duy Nguyen : >>>> I think we can follow git-clone and use '-

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Duy Nguyen
On Fri, Mar 25, 2016 at 6:31 PM, Zhang Lei wrote: > By the way, Duy, another unrelated question: why worktree name under > .git/worktrees is being named > after the working tree path basename? I think branch name is more > reasonable since we don't allow checking out > the same branch twice. Beca

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Duy Nguyen
> src1 src2 src3 under .git/worktrees > which could not be easy to maintain. If you really need to care about these names, I think a new option to let you control the naming explicitly would be better. > I agreed with you, we should give users such option. > > > 2016-03-25 19:41 G

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

2016-03-28 Thread Duy Nguyen
On Sat, Mar 19, 2016 at 8:04 AM, David Turner wrote: > From: Nguyễn Thái Ngọc Duy > > Instead of reading the index from disk and worrying about disk > corruption, the index is cached in memory (memory bit-flips happen > too, but hopefully less often). The result is faster read. Read time > is red

Re: [PATCH v2 06/17] index-helper: add --detach

2016-03-28 Thread Duy Nguyen
On Sat, Mar 19, 2016 at 8:04 AM, David Turner wrote: > @@ -237,6 +239,7 @@ int main(int argc, char **argv) > N_("exit if not used after some seconds")), > OPT_BOOL(0, "strict", &to_verify, > "verify shared memory after creating")

Re: [PATCH v2 08/17] read-cache: invalidate untracked cache data when reading WAMA

2016-03-28 Thread Duy Nguyen
On Sat, Mar 19, 2016 at 8:04 AM, David Turner wrote: > @@ -1407,10 +1472,24 @@ static int read_watchman_ext(struct index_state > *istate, const void *data, > ewah_each_bit(bitmap, mark_no_watchman, istate); > ewah_free(bitmap); > > - /* > -* TODO: update the untracke

Re: Gitk "External diff" broken when using worktree

2016-03-29 Thread Duy Nguyen
On Tue, Mar 29, 2016 at 7:17 AM, Daryl Van Den Brink wrote: > I've done that, and here are the two arguments that it gives to the diff tool: > > From the main repository (in which case the it works): > > .git/.gitk-tmp.CCxPmN/1/[1980e260494cbd225d482b5d962e77bdcdb2321c] > RemoteTransaction.C > .gi

Re: [PATCH v1 1/7] Make it possible to get sha1 for a path from the index

2016-03-29 Thread Duy Nguyen
On Tue, Mar 29, 2016 at 8:25 PM, wrote: > From: Torsten Bögershausen > > Factor out the retrival of the sha1 for a given path in > read_blob_data_from_index() into the function get_sha1_from_index(). Getting _sha1_ from index is one function call and a memory dereference or two. I think you mea

Re: [PATCH v1 1/7] Make it possible to get sha1 for a path from the index

2016-03-29 Thread Duy Nguyen
On Tue, Mar 29, 2016 at 8:28 PM, Duy Nguyen wrote: > On Tue, Mar 29, 2016 at 8:25 PM, wrote: >> From: Torsten Bögershausen >> >> Factor out the retrival of the sha1 for a given path in >> read_blob_data_from_index() into the function get_sha1_from_index(). > >

Re: `git rev-parse --is-inside-work-tree` and $GIT_WORK_TREE

2016-03-29 Thread Duy Nguyen
On Wed, Mar 30, 2016 at 3:34 AM, Jeff King wrote: > On Tue, Mar 29, 2016 at 06:42:44AM -0500, Elliott Cable wrote: > >> So, I find this behaviour a little strange; I can't determine if it's >> a subtle bug, or intentionally undefined/‘fuzzy’ behaviour: >> >> $ cd a-repo/.git/ >> $ pwd >>

Re: git-apply does not work in a sub-directory of a Git repository

2016-03-29 Thread Duy Nguyen
On Thu, Mar 24, 2016 at 11:50 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >>> On Wed, Mar 23, 2016 at 11:55 PM, Junio C Hamano wrote: The include/exclude mechanism does use wildmatch() but does not use the pathspec mechanism (it predates the pathspec machinery that was

Re: git-apply does not work in a sub-directory of a Git repository

2016-03-30 Thread Duy Nguyen
On Thu, Mar 24, 2016 at 11:50 PM, Junio C Hamano wrote: > So a better alternative may be to conditionally disable the "Paths > outside are not touched regardless of --include" logic, i.e. we > exclude paths outside by default just as before, but if there is at > least one explicit "--include" give

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

2016-04-08 Thread Duy Nguyen
On Thu, Apr 7, 2016 at 5:11 AM, David Turner wrote: > @@ -1045,4 +1046,21 @@ struct tm *git_gmtime_r(const time_t *, struct tm *); > #define getc_unlocked(fh) getc(fh) > #endif > > +#ifdef __linux__ > +#define UNIX_PATH_MAX 108 > +#elif defined(__APPLE__) || defined(BSD) > +#define UNIX_PATH_MAX

Re: [PATCH v12 2/5] test-parse-options: print quiet as integer

2016-04-08 Thread Duy Nguyen
On Tue, Apr 5, 2016 at 10:39 PM, Pranit Bauva wrote: > [+cc:Duy Nguyen, Jonathan Nieder] > > On Mon, Apr 4, 2016 at 3:00 AM, Eric Sunshine wrote: >> On Sat, Apr 2, 2016 at 7:33 PM, Pranit Bauva wrote: >>> Current implementation of parse-options.c treats OPT__QUIET() as integer >>> and not boolea

Re: [PATCH] rev-parse: fix --git-common-dir when executed from subpath of main tree

2016-04-08 Thread Duy Nguyen
On Mon, Apr 4, 2016 at 8:42 AM, Michael Rappazzo wrote: > Executing `git-rev-parse --git-common-dir` from the root of the main > worktree results in '.git', which is the relative path to the git dir. > When executed from a subpath of the main tree it returned somthing like: > 'sub/path/.git'. Cha

Re: [PATCH] log: allow --graph and --show-linear-break used together

2016-04-08 Thread Duy Nguyen
On Fri, Apr 08, 2016 at 01:21:07PM +0200, Jan Kundrát wrote: > From 1ac6bb7c31652835d3d046c82e423f0cea6e0904 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= > Date: Fri, 8 Apr 2016 13:06:31 +0200 > Subject: [PATCH] log: allow --graph and --show-linear-break used together > MIME-Ver

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

2016-04-12 Thread Duy Nguyen
On Tue, Apr 12, 2016 at 6:27 AM, David Turner wrote: > On Fri, 2016-04-08 at 18:16 -0400, David Turner wrote: >> And SHM on Macs works a bit differently than on Linux in at least two >> irritating ways. >> >> So, uh, new version to come once I actually make it work on Mac. >> Probably Monday. > >

Re: 0 bot for Git

2016-04-12 Thread Duy Nguyen
> On Mon, Apr 11, 2016 at 7:51 AM, Stefan Beller wrote: >> Hi Greg, >> >> Thanks for your talk at the Git Merge 2016! Huh? It already happened?? Any interesting summary to share with us? -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord..

Re: [PATCH v2 4/7] i18n: builtin/pull.c: mark strings for translation

2016-04-12 Thread Duy Nguyen
On Mon, Apr 11, 2016 at 5:43 PM, Vasco Almeida wrote: >>> @@ -458,13 +458,13 @@ static void NORETURN die_no_merge_candidates(const >>> char *repo, const char **refs >>> fprintf_ln(stderr, _("Please specify which branch you >>> want to merge with.")); >>> fprintf

Re: Migrating away from SHA-1?

2016-04-12 Thread Duy Nguyen
On Wed, Apr 13, 2016 at 5:38 AM, H. Peter Anvin wrote: > OK, I'm going to open this can of worms... > > At what point do we migrate from SHA-1? Brian Carlson has been slowly refactoring git code base, abstracting SHA-1 away. Once that work is done, I think we can talk about moving away from SHA-1

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

2016-04-13 Thread Duy Nguyen
On Wed, Apr 13, 2016 at 7:32 AM, David Turner wrote: > +NOTES > +- > + > +$GIT_DIR/index-helper.path is a symlink In multiple worktree context, this file will be per-worktree. So we have one daemon per worktree. I think that's fine. > to a directory in $TMPDIR > +containing a Unix domain soc

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

2016-04-14 Thread Duy Nguyen
On Thu, Apr 14, 2016 at 1:47 AM, David Turner wrote: > On Wed, 2016-04-13 at 20:43 +0700, Duy Nguyen wrote: >> On Wed, Apr 13, 2016 at 7:32 AM, David Turner < >> dtur...@twopensource.com> wrote: >> > +NOTES >> > +- >> > + >> > +

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

2016-04-14 Thread Duy Nguyen
On Wed, Apr 13, 2016 at 1:05 AM, Junio C Hamano wrote: >>> - access is slow (unless cached, but we can't be sure) >> >> We could solve this (and the other problem) with mlock. > > Probably you meant madvise(2)? > > For something of a size comparable to the index file held by > index-helper-daemon

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

2016-04-14 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 12:02 AM, David Turner wrote: >> > On webkit.git with index format v2, duplicating 8 times to 1.4m >> > entries and 200MB in size: >> > >> > (vanilla) 0.986986364 s: read_index_from .git/index >> > (index-helper) 0.267850279 s: read_index_from .git/index >> > >> > Inte

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

2016-04-14 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 1:12 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Wed, Apr 13, 2016 at 1:05 AM, Junio C Hamano wrote: >>>>> - access is slow (unless cached, but we can't be sure) >>>> >>>> We could solve this (and t

Re: [PATCH 00/25] worktree lock, move, remove and unlock

2016-04-14 Thread Duy Nguyen
On Thu, Apr 14, 2016 at 11:08 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> This is basically a resend from last time, which happened during rc >> time. > > It would have made them a much more pleasant read if you re-read > them during that time and added the missing "why" to man

Parallel checkout (Was Re: 0 bot for Git)

2016-04-15 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 12:04:49AM +0200, Christian Couder wrote: > On Tue, Apr 12, 2016 at 4:59 PM, Stefan Beller wrote: > > On Tue, Apr 12, 2016 at 2:42 AM, Duy Nguyen wrote: > >>> On Mon, Apr 11, 2016 at 7:51 AM, Stefan Beller wrote: > >>>> Hi Greg, >

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

2016-04-15 Thread Duy Nguyen
On Thu, Apr 14, 2016 at 1:47 AM, David Turner wrote: >> > + fd = unix_stream_connect(socket_path); >> > + if (refresh_cache) { >> > + ret = write_in_full(fd, "refresh", 8) != 8; >> >> Since we've moved to unix socket and had bidirectional communication, >> it's probably a

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

2016-04-15 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 6:18 PM, Christian Couder wrote: > On Fri, Apr 15, 2016 at 11:51 AM, Duy Nguyen wrote: >> On Fri, Apr 15, 2016 at 12:04:49AM +0200, Christian Couder wrote: >>> >>> There is a draft of an article about the first part of the Contributor >>

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

2016-04-15 Thread Duy Nguyen
On Sat, Apr 16, 2016 at 12:06 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> 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/ >> >> But leaves many *.o files

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

2016-04-15 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 10:08 PM, Stefan Beller wrote: > On Fri, Apr 15, 2016 at 2:51 AM, Duy Nguyen wrote: >> On Fri, Apr 15, 2016 at 12:04:49AM +0200, Christian Couder wrote: >> The idea is simple, you offload some work to process workers. In this >> patch, only entry.c:w

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

2016-04-15 Thread Duy Nguyen
On Sat, Apr 16, 2016 at 3:21 AM, David Turner wrote: > On Fri, 2016-04-15 at 18:25 +0700, Duy Nguyen wrote: >> On Thu, Apr 14, 2016 at 1:47 AM, David Turner < >> dtur...@twopensource.com> wrote: >> > > > + fd = unix_stream_connect(socket_path)

Re: Git mascot

2016-04-15 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 11:41 PM, Christian Howe wrote: > There has been talk of a git mascot a while back in 2005. Some people > mentioned a fish or a turtle. Since all the great open source projects > like Linux or RethinkDB have a cute mascot, git definitely needs one > as well. A mascot gives

Re: possible to checkout same branch in different worktree

2016-04-15 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 10:36 PM, Junio C Hamano wrote: > Reto Hablützel writes: > >> the checkout command prevents me from checking out a branch in the >> current worktree if it is already checked out in another worktree. >> >> However, if I rebase the branch in the current worktree onto the >>

Re: [PATCH v4 15/16] index-helper: optionally automatically run

2016-04-16 Thread Duy Nguyen
On Wed, Apr 13, 2016 at 7:33 AM, David Turner wrote: > @@ -536,8 +567,10 @@ static void handle_builtin(int argc, const char **argv) > } > > builtin = get_builtin(cmd); > - if (builtin) > + if (builtin) { > + maybe_run_index_helper(builtin); >

Re: [PATCH v4 08/16] Add watchman support to reduce index refresh cost

2016-04-16 Thread Duy Nguyen
On Wed, Apr 13, 2016 at 7:33 AM, David Turner wrote: > +static void update_index(struct index_state *istate, > +struct watchman_query_result *result) > +{ > + int i; > + > + if (result->is_fresh_instance) { > + /* let refresh clear them later */ >

Re: [PATCH 0/7] fix checking out a being-rebased branch

2016-04-18 Thread Duy Nguyen
On Tue, Apr 19, 2016 at 12:42 AM, Junio C Hamano wrote: >> Another option is leave wt_status_get_state() alone, factor out the >> rebase-detection code and use that for worktree/checkout. We save a >> few syscalls this way too. >> >> Comments? >> >> [01/07] path.c: add git_common_path() and strb

Re: [PATCH v5 10/15] update-index: enable/disable watchman support

2016-04-19 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 6:28 AM, David Turner wrote: > + if (use_watchman > 0) { > + the_index.last_update= xstrdup(""); > + the_index.cache_changed |= WATCHMAN_CHANGED; > + } else if (!use_watchman) { > + the_index.last_update= NULL; >

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

2016-04-19 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 6:28 AM, David Turner wrote: > @@ -317,6 +320,8 @@ int main(int argc, char **argv) > if (fd < 0) > die_errno(_("could not set up index-helper socket")); > > + if (detach && daemonize(&daemonized)) > + die_errno(_("unable to detach

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

2016-04-19 Thread Duy Nguyen
Continuing my comment from the --use-watchman patch about watchman not being supported... On Wed, Apr 20, 2016 at 6:28 AM, David Turner wrote: > +static int poke_and_wait_for_reply(int fd) > +{ > + struct strbuf buf = STRBUF_INIT; > + struct strbuf reply = STRBUF_INIT; > + int r

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

2016-04-19 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 6:27 AM, David Turner wrote: > Shared memory is done by storing files in a per-repository temporary > directory. This is more portable than shm (which requires > posix-realtime and has various quirks on OS X). It might even work on > Windows, although this has not been te

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