Re: Creating empty commits with --intent-to-add

2016-06-04 Thread Duy Nguyen
On Sun, Jun 5, 2016 at 12:54 AM, Thomas Braun wrote: > Hi, > > the following procedure > > mkdir test > cd test > git init > echo 1 >file > git add --intent-to-add file > git commit -m "blurb" > > results in a commit. I would have expected that git commit complains, > as I have not pased the --all

Re: [PATCH 1/4] diff.h: extend "flags" field to 64 bits because we're out of bits

2016-06-06 Thread Duy Nguyen
On Tue, Jun 7, 2016 at 2:45 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Current flags field is 32-bits, all used except one bit and we need one >> more bit is needed for to toggle i-t-a behavior. The 9th bit could be >> reused for this, but we could just extend it to 64 bits no

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-06-07 Thread Duy Nguyen
On Tue, Jun 7, 2016 at 3:46 PM, Christian Couder wrote: >> Any thought on object streaming support? > > No I didn't think about this. In fact I am not sure what this means. > >> It could be a big deal (might >> affect some design decisions). > > Could you elaborate on this? Object streaming api i

Re: [PATCH 2/4] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-06-07 Thread Duy Nguyen
On Tue, Jun 7, 2016 at 3:42 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> +--shift-ita:: >> + By default entries added by "git add -N" appear as an existing >> + empty file in "git diff" and a new file in "git diff --cached". >> + This option makes the entry appear as

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-06-08 Thread Duy Nguyen
On Wed, Jun 8, 2016 at 3:23 AM, Jeff King wrote: > Because this "external odb" essentially acts as a git alternate, we > would hit it only when we couldn't find an object through regular means. > Git would then make the object available in the usual on-disk format > (probably as a loose object).

Re: [PATCH] add: add --chmod=+x / --chmod=-x options

2016-06-08 Thread Duy Nguyen
On Wed, Jun 1, 2016 at 5:08 AM, Edward Thomson wrote: > @@ -263,6 +265,7 @@ static struct option builtin_add_options[] = { > OPT_BOOL( 0 , "refresh", &refresh_only, N_("don't add, only refresh > the index")), > OPT_BOOL( 0 , "ignore-errors", &ignore_add_errors, N_("just skip > fi

Re: [PATCH v2 4/4] bundle v3: the beginning

2016-06-09 Thread Duy Nguyen
On Wed, Jun 8, 2016 at 11:19 PM, Jeff King wrote: > On Wed, Jun 08, 2016 at 05:44:06PM +0700, Duy Nguyen wrote: > >> On Wed, Jun 8, 2016 at 3:23 AM, Jeff King wrote: >> > Because this "external odb" essentially acts as a git alternate, we >> > would hit

Re: [PATCH 24/26] upload-pack: split check_unreachable() in two, prep for get_reachable_list()

2016-06-10 Thread Duy Nguyen
On Mon, Jun 6, 2016 at 2:43 AM, Eric Sunshine wrote: >> /* >> * The commits out of the rev-list are not ancestors of >> * our ref. >> */ >> - i = read_in_full(cmd.out, namebuf, 1); >> + i = read_in_full(cmd.out, buf, 1); > > s/1/sizeof(buf)/ perhaps o

lib-httpd/apache.conf and mod_unixd.so

2016-06-12 Thread Duy Nguyen
I need help from apache experts. On my system (gentoo 64bit, apache-2.4.20), running an httpd test gives me -- 8< -- Initialized empty Git repository in /home/pclouds/w/git/temp/t/trash directory.t5539-fetch-http-shallow/.git/ checking prerequisite: NOT_ROOT mkdir -p "$TRASH_DIRECTORY/prereq-test

Re: lib-httpd/apache.conf and mod_unixd.so

2016-06-12 Thread Duy Nguyen
On Sun, Jun 12, 2016 at 8:00 PM, Jeff King wrote: > On Sun, Jun 12, 2016 at 05:48:42PM +0700, Duy Nguyen wrote: > >> A quick search shows that loading mod_unixd.so will do (and did make >> httpd run for me). Problem is, can I just update apache.conf to load >> it when

Re: [PATCH] parse-options-cb.c: use string_list_append_nodup in OPT_STRING_LIST()

2016-06-12 Thread Duy Nguyen
On Mon, Jun 13, 2016 at 5:03 AM, Jeff King wrote: > On Fri, Jun 10, 2016 at 06:57:26PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> If the given string list has strdup_strings set (*), the string will be >> duplicated again. Pointless and leak memory. Ignore that flag. >> >> (*) only interpret-trailers

Re: Repacking a repository uses up all available disk space

2016-06-12 Thread Duy Nguyen
On Mon, Jun 13, 2016 at 5:13 AM, Jeff King wrote: > On Sun, Jun 12, 2016 at 05:54:36PM -0400, Konstantin Ryabitsev wrote: > >> > git gc --prune=now >> >> You are correct, this solves the problem, however I'm curious. The usual >> maintenance for these repositories is a regular run of: >> >> - gi

Re: [PATCH 0/3] fix parse-opt string_list leaks

2016-06-13 Thread Duy Nguyen
On Mon, Jun 13, 2016 at 12:32 PM, Jeff King wrote: > On Mon, Jun 13, 2016 at 07:08:55AM +0700, Duy Nguyen wrote: > >> > So if we are doing the conservative thing, then I think the resulting >> > code should either look like: >> > >> > if

Re: [RFC/PATCH 0/8] Add initial experimental external ODB support

2016-06-13 Thread Duy Nguyen
On Mon, Jun 13, 2016 at 3:55 PM, Christian Couder wrote: > Future work > ~~~ > > From the discussions it appear that using the bundle v3 mechanism to > tranfer external ODB data could work, but only if the server has access > to its own external ODB. > > Another possible mechanism to trans

Re: [PATCH 4/3] use string_list initializer consistently

2016-06-13 Thread Duy Nguyen
On Mon, Jun 13, 2016 at 5:04 PM, Jeff King wrote: > -- >8 -- > Subject: use string_list initializer consistently > > There are two types of string_lists: those that own the > string memory, and those that don't. You can tell the > difference by the strdup_strings flag, and one should use > either

Re: [PATCH] lib-httpd.sh: print error.log on error

2016-06-13 Thread Duy Nguyen
On Sun, Jun 12, 2016 at 08:59:21AM -0400, Jeff King wrote: > On Sun, Jun 12, 2016 at 05:41:54PM +0700, Nguyễn Thái Ngọc Duy wrote: > > > Failure to bring up httpd for testing is not considered an error, so the > > trash directory, which contains this error.log file, is removed and we > > don't kno

Re: [PATCH v4 1/6] worktree.c: add find_worktree()

2016-06-13 Thread Duy Nguyen
On Fri, Jun 3, 2016 at 10:00 PM, Ramsay Jones wrote: > > > On 03/06/16 13:19, Nguyễn Thái Ngọc Duy wrote: >> So far we haven't needed to identify an existing worktree from command >> line. Future commands such as lock or move will need it. The current >> implementation identifies worktrees by path

Re: [PATCH 00/27] nd/shallow-deepen updates

2016-06-14 Thread Duy Nguyen
On Tue, Jun 14, 2016 at 12:10 AM, Junio C Hamano wrote: > Eric Sunshine writes: > >> I agree with Junio that moving the sigchain_pop() into the error >> handling code-path, if possible, would be a nice improvement. > > Yeah, "if possible" is really what I was not sure about---is it safe > to do t

Re: [PATCH] fetch: document that pruning happens before fetching

2016-06-14 Thread Duy Nguyen
On Tue, Jun 14, 2016 at 6:58 AM, Jeff King wrote: > This was changed in 10a6cc8 (fetch --prune: Run prune before > fetching, 2014-01-02), but it seems that nobody in that > discussion realized we were advertising the "after" > explicitly. Ah... ok. Good to know it's moved up top on purpose becaus

Re: [PATCH] fetch: document that pruning happens before fetching

2016-06-14 Thread Duy Nguyen
On Tue, Jun 14, 2016 at 5:22 PM, Jeff King wrote: > I think the documentation should be updated either way. This is not > about the ordering in the status table, but rather about the order of > the real operations. The user may care about that ordering if they want > to know what races are possibl

Re: What's cooking in git.git (Jun 2016, #04; Tue, 14)

2016-06-15 Thread Duy Nguyen
On Wed, Jun 15, 2016 at 5:08 AM, Junio C Hamano wrote: > * nd/i-t-a-commitable (2016-06-06) 3 commits > - commit: don't count i-t-a entries when checking if the new commit is empty > - Resurrect "diff-lib.c: adjust position of i-t-a entries in diff" > - diff.h: extend "flags" field to 64 bits b

Re: bug: compactionheuristic config var case issue

2016-06-15 Thread Duy Nguyen
On Wed, Jun 15, 2016 at 5:39 PM, Brian Lalor wrote: > I’m very happy to see the new compaction heuristic option; it’s the way I > always thought diffs should read! > > The config option in the documentation references “diff.compactionHeuristic”, > but diff.c does a case-sensitive comparison on “

Re: Git clone 2.9.0

2016-06-15 Thread Duy Nguyen
On Wed, Jun 15, 2016 at 8:08 PM, Wojciech Rybiński wrote: > Hi, > > I have installed version 2.9.0 and when I’m trying to clone repo with > specific tag I get error: unknown option `single-branch’ and next warning: > Remote branch a3.0.26 not found in upstream origin, using HEAD instead. My > c

Re: [PATCH] grep: fix grepping for "intent to add" files

2016-06-16 Thread Duy Nguyen
On Thu, Jun 16, 2016 at 07:53:24AM +0100, Charles Bailey wrote: > From: Charles Bailey > > This reverts commit 4d552005323034c1d6311796ac1074e9a4b4b57e. > > This commit caused 'git grep' to no longer find matches in new files in > the working tree where the corresponding index entry had the "int

Re: [PATCH] grep: fix grepping for "intent to add" files

2016-06-16 Thread Duy Nguyen
On Thu, Jun 16, 2016 at 4:47 PM, Charles Bailey wrote: > On Thu, Jun 16, 2016 at 02:47:09PM +0700, Duy Nguyen wrote: >> I don't think revert is right. It rather needs a re-fix like below. >> Basically we want grep_file() to run as normal, but grep_sha1() >> (i.e. git gr

Re: [PATCH] grep: fix grepping for "intent to add" files

2016-06-16 Thread Duy Nguyen
On Thu, Jun 16, 2016 at 6:44 PM, Charles Bailey wrote: > On Thu, Jun 16, 2016 at 05:57:18PM +0700, Duy Nguyen wrote: >> >> "git grep --cached" searches file content that will be committed by >> "git commit" (no -a). An i-t-a entry will not be committed

Re: [PATCH 0/2] Log pretty format alignment improvements

2016-06-17 Thread Duy Nguyen
On Thu, Jun 16, 2016 at 11:25:28AM -0700, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > > > The first patch was from a long time ago. The concern was it may be > > breaking existing user expectation [1]. I still maintain that it's a good > > thing to do and should not break anything. He

Re: [PATCH v12 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-06-17 Thread Duy Nguyen
On Fri, May 20, 2016 at 4:45 AM, David Turner wrote: > diff --git a/read-cache.c b/read-cache.c > index 1719f5a..8ec4be3 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -1235,7 +1235,7 @@ int refresh_index(struct index_state *istate, unsigned > int flags, > if (!new) { >

Re: [PATCH v6 01/11] grep: allow -F -i combination

2016-06-17 Thread Duy Nguyen
On Sat, Jun 18, 2016 at 4:54 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> -F means "no regex", not "case sensitive" so it should not override -i > > That logic is flawed, isn't it? > > "-F" means "no regex", so it should not touch opt.regflags at all. > >> Signed-off-by: Nguyễn

Re: [PATCH v6 00/11] Fix icase grep on non-ascii

2016-06-17 Thread Duy Nguyen
On Sat, Jun 18, 2016 at 6:17 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> v6 fixes comments from Ramsay and Eric. Interdiff below. > > Another thing I noticed with this is that the non-ascii test breaks > when run under dash (but passes under bash). You need to have is_IS > loc

Re: [PATCH] Speed up sparse checkout when $GIT_DIR/info/sparse-checkout is unchanged

2016-08-13 Thread Duy Nguyen
Ping.. On Tue, Jul 12, 2016 at 1:15 AM, Nguyễn Thái Ngọc Duy wrote: > When a "tree unpacking" operation is needed, which is part of > switching branches using "git checkout", the following happens in a > sparse checkout: > > 1) Run all existing entries through $GIT_DIR/info/sparse-checkout, >

Re: [PATCH v4] config: add conditional include

2016-08-13 Thread Duy Nguyen
Ping.. On Thu, Jul 14, 2016 at 10:33 PM, Nguyễn Thái Ngọc Duy wrote: > Helped-by: Jeff King > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > The diff from v3 is mostly clarification in code and document. > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index 18623ee.

Re: storing cover letter of a patch series?

2016-08-13 Thread Duy Nguyen
On Tue, Aug 9, 2016 at 12:27 AM, Stefan Beller wrote: > On Thu, Sep 10, 2015 at 9:28 AM, Jacob Keller wrote: >> Hey, >> >> does anyone know of any tricks for storing a cover letter for a patch >> series inside of git somehow? I'd guess the only obvious way currently >> is to store it at the top o

Re: storing cover letter of a patch series?

2016-08-15 Thread Duy Nguyen
On Mon, Aug 15, 2016 at 1:28 PM, Stefan Beller wrote: > On Sun, Aug 14, 2016 at 12:15 AM, Jacob Keller wrote: >> On Sat, Aug 13, 2016 at 1:49 AM, Duy Nguyen wrote: >>> On Tue, Aug 9, 2016 at 12:27 AM, Stefan Beller wrote: >>>> is what you want. Maybe we wan

Re: storing cover letter of a patch series?

2016-08-15 Thread Duy Nguyen
On Mon, Aug 15, 2016 at 7:37 PM, Philip Oakley wrote: > I appreciate there has been a lot of discussion, but it mainly appears to be > about an upstream / integration viewpoint. > > I'd hate it if there was a one size fits all solution that was only focused > on one important use case, rather than

Re: storing cover letter of a patch series?

2016-08-15 Thread Duy Nguyen
On Tue, Aug 16, 2016 at 3:46 AM, Philip Oakley wrote: > From: "Jacob Keller" > [nip] >>> >>> >>> I've no problem with more extensive methods for those preparing very big >>> patch series, or with those needing to merge together a lot of series and >>> want to keep the cover letters, but ensuring

Re: storing cover letter of a patch series?

2016-08-15 Thread Duy Nguyen
On Tue, Aug 16, 2016 at 12:26 PM, Jacob Keller wrote: >>> They can just add "squash! cover! " commits for that ;-) Though more >>> likely the advanced workflow would be used... We'll need both (more than >>> one) options. >> >> Or even better, "git commit --reword $SHA1" brings up the editor with

Re: What's cooking in git.git (Aug 2016, #06; Sun, 14)

2016-08-17 Thread Duy Nguyen
On Mon, Aug 15, 2016 at 5:46 AM, Junio C Hamano wrote: > * dt/index-helper (2016-07-06) 21 commits > > A new "index-helper" daemon has been introduced to give newly > spawned Git process a quicker access to the data in the index, and > optionally interface with the watchman daemon to further re

Re: [PATCH v4] config: add conditional include

2016-08-22 Thread Duy Nguyen
On Sun, Aug 21, 2016 at 4:08 AM, Jakub Narębski wrote: > W dniu 19.08.2016 o 15:54, Jeff King pisze: >> On Sat, Aug 13, 2016 at 03:40:59PM +0700, Duy Nguyen wrote: >> >>> Ping.. >> >> There was some discussion after v4. I think the open issues are: >> >

Re: [PATCH v4] config: add conditional include

2016-08-22 Thread Duy Nguyen
On Mon, Aug 22, 2016 at 7:59 PM, Matthieu Moy wrote: > Duy Nguyen writes: > >> On Sun, Aug 21, 2016 at 4:08 AM, Jakub Narębski wrote: >>> W dniu 19.08.2016 o 15:54, Jeff King pisze: >>>> On Sat, Aug 13, 2016 at 03:40:59PM +0700, Duy Nguyen wrote: >>&

Re: Working with public-inbox.org [Was: [PATCH] rev-parse: respect core.hooksPath in --git-path]

2016-08-22 Thread Duy Nguyen
On Mon, Aug 22, 2016 at 8:06 PM, Johannes Schindelin wrote: > My point stands. We are way more uninviting to contributors than > necessary. And a huge part of the problem is that we require contributors > to send their patches inlined into whitespace-preserving mails. We probably can settle this

Re: [PATCH v4] config: add conditional include

2016-08-22 Thread Duy Nguyen
On Mon, Aug 22, 2016 at 8:22 PM, Matthieu Moy wrote: >>> I think the syntax should be design to allow arbitrary boolean >>> expression later if needed. >> >> I would be against that. We may extend it more in future, but it >> should be under control, not full boolean expressions. > > Why? > > I'm

Re: [git-for-windows] Re: [ANNOUNCE] Git for Windows 2.9.3

2016-08-22 Thread Duy Nguyen
On Thu, Aug 18, 2016 at 3:37 PM, Johannes Schindelin wrote: > Hi Junio, > > On Wed, 17 Aug 2016, Junio C Hamano wrote: > >> Johannes Schindelin writes: >> >> >> And then your "git cat-file" patch can be upstreamed with the option >> >> renamed to (or with an additional synonym) "--filters", which

Re: Bug with git worktrees and git init

2016-08-24 Thread Duy Nguyen
On Tue, Aug 23, 2016 at 10:21 PM, Michael J Gruber wrote: > I've cc'ed the master of worktrees. Thanks for the analysis. I'll provide some patch as soon as possible. This git-init may also be a good place to repair broken worktrees too (e.g. because you moved a worktree manually).. PS. Master? W

Re: [PATCH v4] config: add conditional include

2016-08-24 Thread Duy Nguyen
On Tue, Aug 23, 2016 at 8:42 PM, Johannes Schindelin wrote: > Hi Duy, > > On Mon, 22 Aug 2016, Duy Nguyen wrote: > >> On Mon, Aug 22, 2016 at 8:22 PM, Matthieu Moy >> wrote: >> >>> I think the syntax should be design to allow arbitrary boolean >>

Re: [PATCH] checkout: swap the order of ambiguity check for :/ syntax

2016-08-25 Thread Duy Nguyen
On Wed, Aug 24, 2016 at 11:35 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> It's not wonderful, but it's in line with how git-checkout stops caring >> about ambiguity after the first argument can be resolved as a ref >> (there's even a test for it, t2010.6). > > But that is justi

Re: [PATCH] checkout: swap the order of ambiguity check for :/ syntax

2016-08-26 Thread Duy Nguyen
On Fri, Aug 26, 2016 at 12:19 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Wed, Aug 24, 2016 at 11:35 PM, Junio C Hamano wrote: >>> Nguyễn Thái Ngọc Duy writes: >>> >>>> It's not wonderful, but it's in line with how git-checko

how to showing a merge graph?

2016-08-30 Thread Duy Nguyen
I want to see a "git log --oneline --graph" with all non-merge commits removed, but history is rewritten so that the merge commits represent the entire topics and are shown to have all the parents of the base commits. e.g. if the full graph is * 8118403 Merge commit 'bbb2437' |\ | * bbb2437 3p |

"fatal error in commit_refs" from pushing to github

2016-09-07 Thread Duy Nguyen
I got the message in the subject when pushing to github today. Yes I know it's github, not git. But according to stackoveflow [1] it's a local problem. Which makes me think, if we know exactly what this is (or at least roughly the problem area), maybe we could improve git to catch it locally in the

Re: "fatal error in commit_refs" from pushing to github

2016-09-08 Thread Duy Nguyen
On Thu, Sep 8, 2016 at 8:25 AM, Jeff King wrote: > On Thu, Sep 08, 2016 at 07:49:12AM +0700, Duy Nguyen wrote: > >> I got the message in the subject when pushing to github today. Yes I >> know it's github, not git. But according to stackoveflow [1] it's a >> l

Re: [PATCH 2/3] t0001: work around the bug that reads config file before repo setup

2016-09-09 Thread Duy Nguyen
On Fri, Sep 9, 2016 at 3:02 AM, Jeff King wrote: > On Thu, Sep 08, 2016 at 08:47:18PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> git-init somehow reads '.git/config' at current directory and sets >> log_all_ref_updates based on this file. Because log_all_ref_updates is >> not unspecified (-1) any mor

Re: [PATCH 3/3] init: do not set core.worktree more often than necessary

2016-09-09 Thread Duy Nguyen
On Fri, Sep 9, 2016 at 2:54 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> +/* >> + * Return the first ".git" that we have encountered. >> + * FIXME this function for not entirely correct because >> + * setup_git_directory() and enter_repo() do not update first_git_dir >> + * when

Re: [PATCH 1/3] init: correct re-initialization from a linked worktree

2016-09-09 Thread Duy Nguyen
On Fri, Sep 9, 2016 at 2:37 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> When 'git init' is called from a linked worktree, '.git' dir as the main >> '.git' (i.e. $GIT_COMMON_DIR) and populate the whole repository skeleton >> in there. It does not harm anything (*) but it is stil

Re: [PATCH 5/5] versioncmp: cope with common leading parts in versionsort.prereleaseSuffix

2016-09-09 Thread Duy Nguyen
On Wed, Sep 7, 2016 at 10:48 PM, SZEDER Gábor wrote: > Now, while I believe this is the right thing to do to fix this bug, > there is a corner case, where multiple configured prerelease suffixes > might match the same tagname: > > $ git config --get-all versionsort.prereleaseSuffix > -bar >

Re: git commit -p with file arguments

2016-09-09 Thread Duy Nguyen
On Tue, Sep 6, 2016 at 4:08 AM, Christian Neukirchen wrote: > Hi, > > I noticed the following suprising behavior: > > % git --version > git version 2.10.0 > > % git add bar > % git status -s > A bar > M foo > > % git commit -p foo > [stage a hunk] > ... > # Explicit paths specified without -i or

Re: Two bugs in --pretty with %C(auto)

2016-09-19 Thread Duy Nguyen
On Sun, Sep 18, 2016 at 1:25 AM, René Scharfe wrote: > Am 17.09.2016 um 14:51 schrieb Anatoly Borodin: >> Hi All! >> >> First bug: >> >> git log -3 --pretty='%C(cyan)%C(auto)%h%C(auto)%d %s' >> >> prints %h with the default color (normal yellow), but >> >> git log -3 --pretty='%C(bold

Re: [PATCH 02/11] Resumable clone: add prime-clone endpoints

2016-09-19 Thread Duy Nguyen
On Fri, Sep 16, 2016 at 7:12 AM, Kevin Wern wrote: > static struct daemon_service daemon_service[] = { > { "upload-archive", "uploadarch", upload_archive, 0, 1 }, > { "upload-pack", "uploadpack", upload_pack, 1, 1 }, > { "receive-pack", "receivepack", receive_pack, 0, 1 },

Re: git add --intent-to-add silently creates empty commits

2016-09-19 Thread Duy Nguyen
On Fri, Sep 16, 2016 at 12:48 AM, Junio C Hamano wrote: > Aviv Eyal writes: > >> Using `git add -N` allows creating of empty commits: >> >> git init test && cd test >> echo text > file >> git add --intent-to-add file >> git commit -m 'Empty commit' >> echo $?#

Re: [PATCH 09/11] path: add resumable marker

2016-09-19 Thread Duy Nguyen
On Fri, Sep 16, 2016 at 7:12 AM, Kevin Wern wrote: > Create function to get gitdir file RESUMABLE. A very good opportunity to explain what this file is or will be (and whether its content matters or just its existence). Either as commit message, or even better in Documentation/gitrepository-layou

Re: [PATCH 04/11] Resumable clone: add prime-clone to remote-curl

2016-09-19 Thread Duy Nguyen
On Fri, Sep 16, 2016 at 7:12 AM, Kevin Wern wrote: > +static void prime_clone(void) > +{ > + char *result, *result_full, *line; > + size_t result_len; > + int err = 0, one_successful = 0; > + > + if (request_service("git-prime-clone", &result_full, &result, > +

Re: [PATCH 11/11] Resumable clone: implement primer logic in git-clone

2016-09-19 Thread Duy Nguyen
On Fri, Sep 16, 2016 at 7:12 AM, Kevin Wern wrote: > builtin/clone.c | 590 > +--- Argh.. this is too big for my brain at this hour. It might be easier to follow if you separate out some code move (I think I've seen some, not sure). I'll try to

Re: What's cooking in git.git (Sep 2016, #05; Mon, 19)

2016-09-21 Thread Duy Nguyen
On Tue, Sep 20, 2016 at 6:30 AM, Junio C Hamano wrote: > * nd/checkout-disambiguation (2016-09-09) 4 commits > - fixup! checkout.txt: document a common case that ignores ambiguation rules > - checkout: fix ambiguity check in subdir > - checkout.txt: document a common case that ignores ambiguati

Re: [PATCH v2 2/3] init: do not set core.worktree more often than necessary

2016-09-22 Thread Duy Nguyen
On Thu, Sep 22, 2016 at 1:44 AM, Junio C Hamano wrote: >> @@ -314,6 +315,8 @@ static void create_object_directory(void) >> int set_git_dir_init(const char *git_dir, const char *real_git_dir, >>int exist_ok) >> { >> + original_git_dir = xstrdup(real_path(git_dir)); >> + >>

Re: [PATCH v2 4/3] init: combine set_git_dir_init() and init_db() into one

2016-09-24 Thread Duy Nguyen
On Sat, Sep 24, 2016 at 11:55:33AM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > I think this 4/3 is not quite enough to fix the damage to the code > > caused by 2/3. > > ... > > after 4/3 is applied, we should be able to remove the global > > variable 2/3 introduced, make init_db()

Re: [PATCH 2/4] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-09-27 Thread Duy Nguyen
(sorry for a very late reply, I'm just picking this series up again) On Thu, Jun 9, 2016 at 11:18 PM, Johannes Schindelin wrote: > Hi Duy, > > On Mon, 6 Jun 2016, Nguyễn Thái Ngọc Duy wrote: > >> diff --git a/diff.h b/diff.h >> index b497078..9e42556 100644 >> --- a/diff.h >> +++ b/diff.h >> @@ -

Re: [PATCH 2/4] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-09-27 Thread Duy Nguyen
On Tue, Sep 27, 2016 at 5:58 PM, Duy Nguyen wrote: >> but then you also have to change the type of xdl_opts >> to uint64_t, which in turn means that you will have to change the >> definition of xpparam_t's "flags" field from unsigned long to uint64_t. > >

Re: [PATCH 0/3] i-t-a entries in git-status, and git-commit

2016-09-28 Thread Duy Nguyen
On Wed, Sep 28, 2016 at 6:43 PM, Nguyễn Thái Ngọc Duy wrote: > 1) and 2) are fixed by changing the position of ita entries in diff > code. ita entries should be seen as a new file when compared between > worktree and HEAD Big typo. "between worktree and index". -- Duy

Re: [PATCH v2 01/11] i18n: add--interactive: mark strings for translation

2016-09-28 Thread Duy Nguyen
On Wed, Sep 28, 2016 at 7:43 PM, Vasco Almeida wrote: > A Dom, 25-09-2016 às 15:52 -0700, Junio C Hamano escreveu: >> > @@ -252,7 +253,7 @@ sub list_untracked { >> > } >> > >> > my $status_fmt = '%12s %12s %s'; >> > -my $status_head = sprintf($status_fmt, 'staged', 'unstaged', 'path'); >> > +my

Re: [PATCH 1/3] Resurrect "diff-lib.c: adjust position of i-t-a entries in diff"

2016-10-03 Thread Duy Nguyen
On Thu, Sep 29, 2016 at 2:28 AM, Junio C Hamano wrote: > After reading the three patches through, however, I do not think we > use the command line option anywhere. I'm inclined to say that we > shouldn't add it at all. Or at least do so in a separate follow-up > patch "now we have an internal m

Re: Merge conflicts in .gitattributes can cause trouble

2016-10-04 Thread Duy Nguyen
On Tue, Oct 4, 2016 at 5:19 PM, Lars Schneider wrote: > Hi, > > > If there is a conflict in the .gitattributes during a merge then it looks > like as if the attributes are not applied (which kind of makes sense as Git > would not know what to do). As a result Git can treat e.g. binary files > as t

Re: Git 2.7.0 gitignore behaviour regression

2016-01-06 Thread Duy Nguyen
On Thu, Jan 7, 2016 at 9:04 AM, Jeff King wrote: >> Yup, an area that is reasonably isolated from the remainder of the system >> like >> this might be a good starting point. But I suspect that the invasion needs to >> happen in the opposite direction in this particular case before it happens. >>

Re: [BUG?] worktree setup broken in subdirs with git alias

2016-01-07 Thread Duy Nguyen
On Thu, Jan 7, 2016 at 4:26 PM, Duy Nguyen wrote: > You forgot to mention what version you used. Gaaah i need to work on my reading skills. You did mention 'next' in >> sorry I can't dig deeper now, but the worktree code from next seems to So it matches my expectatio

Re: [PATCH 2/7] diff.c: take "prefix" argument in diff_opt_parse()

2016-01-21 Thread Duy Nguyen
On Wed, Jan 20, 2016 at 01:49:21PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > On Wed, Jan 20, 2016 at 12:23:38PM -0800, Junio C Hamano wrote: > > > >> Nguyễn Thái Ngọc Duy writes: > >> > >> > This will be important later when diff_opt_parse() accepts paths as > >> > arguments. Path

Re: [PATCH 4/7] log: add --rename-notes to correct renames per commit

2016-01-21 Thread Duy Nguyen
On Thu, Jan 21, 2016 at 6:29 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> For simplicity, the note of commit A implies rename correction between >> A^ and A. If parents are manipulated (e.g. "git log --reflog") then >> the rename output may surprise people. > > I do not think "g

Re: [PATCH 7/7] merge: add --rename-notes

2016-01-21 Thread Duy Nguyen
On Fri, Jan 22, 2016 at 12:53 AM, Junio C Hamano wrote: > This uses _all_ merge notes attached to _any_ commit in the history, > without even checking if the commit is involved in the current merge > being done? How would that be useful? > > I also suspect that the data structure to keep track re

Re: Issue when changing staged files in a pre-commit hook

2016-01-22 Thread Duy Nguyen
On Tue, Jan 19, 2016 at 05:44:22PM -0800, Junio C Hamano wrote: > Duy Nguyen writes: > > > On Wed, Jan 20, 2016 at 6:41 AM, Junio C Hamano wrote: > > > >> The only sensible thing we can do at that point in the code after > >> re-reading the index is to make

Minor bug, git ls-files -o aborts because of broken submodules

2016-01-22 Thread Duy Nguyen
$ git init abc $ cd abc $ mkdir def $ echo 'gitdir: blah blah' >def/.git $ git ls-files -o fatal: Not a git repository: def/blah blah If some directory looks like a submodule but turns out not, that's not a fatal error. The stack trace is something like this. I suspect do_submodule_path should use

Add post-worktree-add hook?

2016-01-22 Thread Duy Nguyen
I started moving my git work space to multi-worktree and found it annoying that every time I add a new worktree, my first step must be copy my config.mak over. Room for improvement. I see three options: 1) add an option in 'worktree add' to copy all untracked files from current worktree over Only

Re: [PATCH v6 02/11] update-index: use enum for untracked cache options

2016-01-22 Thread Duy Nguyen
On Wed, Jan 20, 2016 at 4:59 PM, Christian Couder wrote: > Signed-off-by: Christian Couder > Helped-by: Duy Nguyen Nit. I think usually your s-o-b comes last -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger

Re: [PATCH v6 09/11] config: add core.untrackedCache

2016-01-22 Thread Duy Nguyen
On Wed, Jan 20, 2016 at 4:59 PM, Christian Couder wrote: > diff --git a/read-cache.c b/read-cache.c > index 84616c8..1d5696c 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -1622,6 +1622,20 @@ int read_index_from(struct index_state *istate, const > char *path) > return istat

Re: What's cooking in git.git (Jan 2016, #02; Mon, 11)

2016-01-25 Thread Duy Nguyen
On Tue, Jan 12, 2016 at 6:45 AM, Junio C Hamano wrote: > * jk/graph-format-padding (2015-09-14) 1 commit > - pretty: pass graph width to pretty formatting for use in '%>|(N)' > > Redefine the way '%>|(N)' padding and the "--graph" option > interacts. It has been that the available columns to d

Re: [BUG] typo DWIMery with alias broken (cd to random dir)

2016-01-26 Thread Duy Nguyen
On Tue, Jan 26, 2016 at 2:37 PM, Michael J Gruber wrote: > Hi there, > > with current next (989ee58 plus local additions) it seems that typo > DWIMery with aliases is broken, see below. > > It appears that the typo DWIMery is broken only when there is a unique > automatic DWIM substitution for a m

Re: [PATCH] git.c: fix help.autocorrect after 57ea712 breaks it

2016-01-27 Thread Duy Nguyen
On Wed, Jan 27, 2016 at 1:49 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> I spoke too soon, I am afraid. >> ... >> I wonder if this would be better done as a multi-part series that >> goes like this: >> ... > > So here is the first of the three-patch series to replace it. This is much

Re: [PATCH v3 4/6] worktree: new config file hierarchy

2016-01-28 Thread Duy Nguyen
On Thu, Jan 28, 2016 at 5:22 AM, Junio C Hamano wrote: >> With this patch, since worktree v1, the repo config file (or worktree >> config file in multi worktree context) is no longer shared. Main >> worktree reads $C/config. Linked worktrees read $C/worktrees/xxx/config >> and a new file, $C/work

Re: [PATCH v3 1/6] worktree: new repo extension to manage worktree behaviors

2016-01-28 Thread Duy Nguyen
On Thu, Jan 28, 2016 at 5:12 AM, Junio C Hamano wrote: >> +WORKTREE VERSIONS AND MIGRATION >> +--- >> +Multiple worktree is still an experimental feature and evolving. Every >> +time the behavior is changed, the "worktree version" is stepped >> +up. Worktree version is

Re: [PATCH v3 4/6] worktree: new config file hierarchy

2016-01-31 Thread Duy Nguyen
On Fri, Jan 29, 2016 at 1:45 AM, Junio C Hamano wrote: > Would it make it simpler to invent a specific value for 'xxx' that > denotes the main worktree (hence $C/worktrees/xxx/config will always > be read by worktrees including the primary one), not to add > $C/common/ anything, and use $C/config

Re: [PATCH v3 5/6] config: select .git/common/config with --repo

2016-01-31 Thread Duy Nguyen
On Sun, Jan 31, 2016 at 5:10 AM, Max Kirillov wrote: > On Tue, Jan 26, 2016 at 06:44:44PM +0700, Nguyễn Thái Ngọc Duy wrote: >> This new option allows the user to write to or read from >> .git/common/config in worktree v1. In worktree v0, --repo is an alias >> of --local. > > Looks like by default

Re: [PATCH v3 1/6] worktree: new repo extension to manage worktree behaviors

2016-01-31 Thread Duy Nguyen
On Mon, Feb 1, 2016 at 9:41 AM, Stefan Monnier wrote: >> One lessor key phrase above is "so far", I think, and another one >> you forgot to use is s/which requires/that we know &/, which to me >> is a more serious one. IOW, I do think it is premature for us to >> say that that config split issue

Re: [PATCH v3 6/6] worktree add: switch to worktree version 1

2016-01-31 Thread Duy Nguyen
On Mon, Feb 1, 2016 at 12:33 PM, Max Kirillov wrote: > On Tue, Jan 26, 2016 at 06:44:45PM +0700, Nguyễn Thái Ngọc Duy wrote: >> + for (key_p = per_wortree_keys; *key_p; key_p++) { >> + const char *key = *key_p; >> + char *value = get_key(sb.buf,

Re: [PATCH] Trick to force setup of a specific configured E-Mail per repo

2016-02-02 Thread Duy Nguyen
On Wed, Feb 3, 2016 at 10:56 AM, Jeff King wrote: > I find it disappointing that we go back to looking for magic sequences > in the string. Could we perhaps do this more cleanly with a new config > option? Like a "user.guessIdent" which defaults to true, but people can > set to false. And without

Re: [PATCH] Trick to force setup of a specific configured E-Mail per repo

2016-02-02 Thread Duy Nguyen
On Wed, Feb 3, 2016 at 12:22 PM, Jeff King wrote: > On Wed, Feb 03, 2016 at 12:19:20PM +0700, Duy Nguyen wrote: > >> On Wed, Feb 3, 2016 at 10:56 AM, Jeff King wrote: >> > I find it disappointing that we go back to looking for magic sequences >> > in the string.

Re: [PATCH v3 15/20] init: allow alternate backends to be set for new repos

2016-02-04 Thread Duy Nguyen
(picking a random series version because I didn't follow it closely) On Thu, Jan 14, 2016 at 11:26 PM, David Turner wrote: > + if (requested_ref_storage_backend) > + ref_storage_backend = requested_ref_storage_backend; > + if (strcmp(ref_storage_backend, "files")) { > +

Re: [PATCH v3 19/20] refs: add LMDB refs backend

2016-02-04 Thread Duy Nguyen
On Thu, Jan 14, 2016 at 11:26 PM, David Turner wrote: > diff --git a/refs/lmdb-backend.c b/refs/lmdb-backend.c > new file mode 100644 > index 000..470c79f > --- /dev/null > +++ b/refs/lmdb-backend.c > @@ -0,0 +1,2051 @@ > +/* > + * This file implements a lmdb backend for refs. > + * > + * The

Re: [PATCH v3 00/20] refs backend rebase on pu

2016-02-04 Thread Duy Nguyen
On Wed, Feb 3, 2016 at 3:08 AM, David Turner wrote: > Are there any more reviews on this? I do have some changes from this > set, but they're pretty minor so I don't want to post a new one (unless > folks would rather see those changes before reviewing). Let me know. I think you need to keep "r

Re: [PATCH v3 00/20] refs backend rebase on pu

2016-02-04 Thread Duy Nguyen
On Wed, Feb 3, 2016 at 3:08 AM, David Turner wrote: > Are there any more reviews on this? I do have some changes from this > set, but they're pretty minor so I don't want to post a new one (unless > folks would rather see those changes before reviewing). Let me know. Last note. Since this is ne

Re: git grep argument parser bug

2016-02-04 Thread Duy Nguyen
On Fri, Feb 5, 2016 at 5:02 AM, Dylan Grafmyre wrote: > In both ubuntu versions of git 1.9.1 and 2.7.0 > > git grep '-test' > git grep '--help' (Un)Quoting is done by shell and stripped out before "git" is executed. We just don't see them. > Or any other expressions literal leading with

Re: [PATCH 8/8] one ugly test to verify basic functionality

2016-02-05 Thread Duy Nguyen
On Fri, Feb 5, 2016 at 6:57 PM, Elia Pinto wrote: >> + mv `ls .git/objects/pack/*.pack` pack && > > No, please. From the git coding guideline : "We prefer $( ... ) for > command substitution; unlike ``, it properly nests. I was being too subtle with the word "ugly". I assure you this test c

Re: [PATCH 2/8] pack-objects: produce a stable pack when --skip is given

2016-02-05 Thread Duy Nguyen
On Sat, Feb 6, 2016 at 1:43 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c >> index 417c830..c58a9cb 100644 >> --- a/builtin/pack-objects.c >> +++ b/builtin/pack-objects.c >> @@ -2709,6 +2709,11 @@ int cmd_pack_objects(i

Re: [PATCH v2 03/25] transport-helper.c: do not send null option to remote helper

2016-02-06 Thread Duy Nguyen
On Fri, Feb 5, 2016 at 6:22 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- > > This is even more strange. Are the current callers broken and some > sends value==NULL for an option that is not is_bool, resulting in > a call to quote_c_st

Re: git show doesn't work on file names with square brackets

2016-02-06 Thread Duy Nguyen
On Sat, Feb 6, 2016 at 11:10 PM, Johannes Schindelin wrote: > Hi Kirill, > > On Sat, 6 Feb 2016, Kirill Likhodedov wrote: > >> > On 06 Feb 2016, at 17:21 , Johannes Schindelin >> > wrote: >> > >> > This is expected behavior of the Bash you are using. The commands that I >> > think would reflect

<    2   3   4   5   6   7   8   9   10   11   >