Re: [BUG] incorrect line numbers reported in git am

2019-10-02 Thread Duy Nguyen
On Thu, Oct 3, 2019 at 7:52 AM Junio C Hamano wrote: > > In fact, running `git am --show-current-patch` shows the whole mail, not > > only the 'patch' file so users would have no reason to expect the line > > numbers to refer to the 'patch' file. > > Yeah, show-current-patch was a misguided attemp

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-30 Thread Duy Nguyen
On Thu, Aug 29, 2019 at 11:44 PM Matheus Tavares Bernardino wrote: > > I'm sure there are other gotchas in the config code, though, related to > > things for which we _do_ need a repository. E.g., include_by_branch() > > looks at the_repository, and should use a repository struct matching the > >

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-29 Thread Duy Nguyen
On Thu, Aug 29, 2019 at 11:24 AM Matheus Tavares Bernardino wrote: > > On Tue, Aug 27, 2019 at 8:46 PM Matheus Tavares Bernardino > wrote: > > > > Hi, Duy > > > > On Tue, Aug 27, 2019 at 6:26 AM Duy Nguyen wrote: > > > > > > On Tue, A

Re: Support for an interactive confirmation prompt when users can possibly lose their work like some UNIX commands

2019-08-28 Thread Duy Nguyen
On Wed, Aug 28, 2019 at 10:05 PM Jeff King wrote: > > > Note that there _are_ some commands which are not reversible: mostly > > > things that drop content from the working tree. So "git reset --hard" is > > > one, and "git clean" is another. There have been discussions and even > > > some patches

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

2019-08-27 Thread Duy Nguyen
On Tue, Aug 27, 2019 at 6:57 AM Matheus Tavares wrote: > > Currently, config_with_options() relies on the global the_repository > when it has to configure from a blob. Not really reading the patch, but my last experience with moving config.c away from the_repo [1] shows that there are more hidden

Re: What's cooking in git.git (Jul 2019, #07; Mon, 29)

2019-07-30 Thread Duy Nguyen
On Tue, Jul 30, 2019 at 4:49 AM Junio C Hamano wrote: > * nd/index-dump-in-json (2019-06-26) 11 commits > - SQUASH??? > - t3008: use the new SINGLE_CPU prereq > - read-cache.c: dump "IEOT" extension as json > - read-cache.c: dump "EOIE" extension as json > - resolve-undo.c: dump "REUC" extens

Re: [PATCH v6 07/27] checkout: inform the user when removing branch state

2019-07-04 Thread Duy Nguyen
On Wed, Jul 3, 2019 at 12:51 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > > I agree, this is not "canceling". I think this series causes conflicts > > with pw/clean-sequencer-state-upon-final-commit and the warning is > > accidentally enabled (partl

Re: [PATCH v2 05/10] split-index.c: dump "link" extension as json

2019-07-04 Thread Duy Nguyen
On Fri, Jul 5, 2019 at 3:01 AM SZEDER Gábor wrote: > > On Mon, Jun 24, 2019 at 08:02:21PM +0700, Nguyễn Thái Ngọc Duy wrote: > > diff --git a/t/t3011-ls-files-json.sh b/t/t3011-ls-files-json.sh > > index 082fe8e966..dbb572ce9d 100755 > > --- a/t/t3011-ls-files-json.sh > > +++ b/t/t3011-ls-files-js

Re: [PATCH v2 1/3] repo-settings: create core.featureAdoptionRate setting

2019-07-02 Thread Duy Nguyen
On Tue, Jul 2, 2019 at 5:47 PM Ævar Arnfjörð Bjarmason wrote: > > > On Wed, Jun 19 2019, Derrick Stolee via GitGitGadget wrote: > > > core.commitGraph:: > > If true, then git will read the commit-graph file (if it exists) > > - to parse the graph structure of commits. Defaults to false.

Re: [PATCH v3 1/3] repo-settings: create core.featureAdoptionRate setting

2019-07-02 Thread Duy Nguyen
On Mon, Jul 1, 2019 at 10:32 PM Derrick Stolee via GitGitGadget wrote: > @@ -601,3 +602,22 @@ core.abbrev:: > in your repository, which hopefully is enough for > abbreviated object names to stay unique for some time. > The minimum length is 4. > + > +core.featureAdoptionRat

Re: [PATCH v6 07/27] checkout: inform the user when removing branch state

2019-07-02 Thread Duy Nguyen
On Tue, Jul 02, 2019 at 10:06:11AM +0200, SZEDER Gábor wrote: > On Fri, Mar 29, 2019 at 05:38:59PM +0700, Nguyễn Thái Ngọc Duy wrote: > > After a successful switch, if a merge, cherry-pick or revert is ongoing, > > it is canceled. This behavior has been with us from the very early > > beginning, so

Re: [PATCH/RFC] get_oid: new extended SHA-1 syntax to control resolution process

2019-06-30 Thread Duy Nguyen
On Sun, Jun 30, 2019 at 4:30 PM Jakub Narebski wrote: > > Bikeshed painting ahead. > > Nguyễn Thái Ngọc Duy writes: > [...] > > The problem is we try every possible way to resolve a rev. Let's have > > some annotation to express that we only want to resolve a rev in a > > certain way: > > > > - @

Re: Git Test Coverage Report (Thurs. June 27)

2019-06-28 Thread Duy Nguyen
On Fri, Jun 28, 2019 at 12:35 AM Derrick Stolee wrote: > > dir.c > > 3b2385cf 2840) static void jw_object_untracked_cache_dir(struct json_writer > > *jw, > > 3b2385cf 2845) jw_object_bool(jw, "valid", ucd->valid); > > 3b2385cf 2846) jw_object_bool(jw, "check-only", ucd->check_only); > > 3b2385cf

Re: [PATCH v2 05/10] split-index.c: dump "link" extension as json

2019-06-27 Thread Duy Nguyen
On Thu, Jun 27, 2019 at 8:42 PM Derrick Stolee wrote: > > On 6/27/2019 9:24 AM, Jeff Hostetler wrote: > > On 6/27/2019 6:48 AM, Duy Nguyen wrote: > >> On Tue, Jun 25, 2019 at 7:40 PM Derrick Stolee wrote: > >>> > >>> On 6/25/2019 6:29 AM, Duy Nguyen

Re: [PATCH 1/6] sha1-file.c: remove the_repo from read_object_with_reference()

2019-06-27 Thread Duy Nguyen
On Thu, Jun 27, 2019 at 7:54 PM Johannes Schindelin wrote: > > Hi Duy, > > On Mon, 24 Jun 2019, Nguyễn Thái Ngọc Duy wrote: > > > diff --git a/builtin/grep.c b/builtin/grep.c > > index 580fd38f41..85da7ee542 100644 > > --- a/builtin/grep.c > > +++ b/builtin/grep.c > > @@ -458,7 +458,8 @@ static in

Re: fprintf_ln() is slow

2019-06-27 Thread Duy Nguyen
On Thu, Jun 27, 2019 at 7:18 PM Ævar Arnfjörð Bjarmason wrote: > Why shouldn't we just move back to plain fprintf() with "\n"? Your > 9a0a30aa4b ("strbuf: convenience format functions with \n automatically > appended", 2012-04-23) doesn't explain why this is a convenience for > translators. > > Wh

Re: [PATCH v2 05/10] split-index.c: dump "link" extension as json

2019-06-27 Thread Duy Nguyen
On Tue, Jun 25, 2019 at 7:40 PM Derrick Stolee wrote: > > On 6/25/2019 6:29 AM, Duy Nguyen wrote: > > On Tue, Jun 25, 2019 at 3:06 AM Jeff Hostetler > > wrote: > >> I'm curious how big these EWAHs will be in practice and > >> how useful an arr

Re: fprintf_ln() is slow

2019-06-27 Thread Duy Nguyen
On Thu, Jun 27, 2019 at 1:00 PM Jeff King wrote: > > On Thu, Jun 27, 2019 at 01:25:15AM -0400, Jeff King wrote: > > > Taylor and I noticed a slowdown in p1451 between v2.20.1 and v2.21.0. I > > was surprised to find that it bisects to bbb15c5193 (fsck: reduce word > > legos to help i18n, 2018-11-1

Re: [GSoC][PATCH v7 06/10] dir-iterator: add flags parameter to dir_iterator_begin

2019-06-27 Thread Duy Nguyen
On Thu, Jun 27, 2019 at 1:04 AM Junio C Hamano wrote: > > Johannes Schindelin writes: > > > Hi Matheus, > > > > On Tue, 18 Jun 2019, Matheus Tavares wrote: > > > >>[...] > >> +/* > >> + * Look for a recursive symlink at iter->base.path pointing to any > >> directory on > >> + * the previous stac

Re: [PATCH 0/4] Some more on top of nd/switch-and-restore

2019-06-27 Thread Duy Nguyen
On Thu, Jun 27, 2019 at 9:53 AM Duy Nguyen wrote: > > On Thu, Jun 27, 2019 at 2:58 AM Junio C Hamano wrote: > > > > Nguyễn Thái Ngọc Duy writes: > > > > > This is small refinements (except 4/4). > > > > What's the status of these? > >

Re: [PATCH 0/4] Some more on top of nd/switch-and-restore

2019-06-26 Thread Duy Nguyen
On Thu, Jun 27, 2019 at 2:58 AM Junio C Hamano wrote: > > Nguyễn Thái Ngọc Duy writes: > > > This is small refinements (except 4/4). > > What's the status of these? Small test fixup needed. I should be able to do it later today. > As another low-prio topic interferes > with the code touched by

Re: [PATCH/RFC] get_oid: new extended SHA-1 syntax to control resolution process

2019-06-26 Thread Duy Nguyen
On Thu, Jun 27, 2019 at 1:51 AM Junio C Hamano wrote: > > - @{literal} only accepts full ref. No turning "master" into > > "refs/heads/master". > > This is already doable by saying "refs/heads/master", isn't it? Any > ambiguous ones like a branch or a tag whose name is 'refs/heads/master' > (i.

Re: [PATCH v2 00/10] Add 'ls-files --debug-json' to dump the index in json

2019-06-25 Thread Duy Nguyen
On Tue, Jun 25, 2019 at 6:27 PM Johannes Schindelin wrote: > > Hi Duy, > > On Tue, 25 Jun 2019, Duy Nguyen wrote: > > > On Tue, Jun 25, 2019 at 1:00 AM Johannes Schindelin > > wrote: > > > > - extension location is printed, in case you need to dec

Re: specifying revision - how to enforce matching a tag/branch-name or revision only

2019-06-25 Thread Duy Nguyen
On Fri, Jun 21, 2019 at 10:16 PM Junio C Hamano wrote: > > Kyle Meyer writes: > > >> git rev-parse "${BRANCH_NAME}" || git rev-parse > >> "refs/remotes/${UPSTREAM}/${BRANCH_NAME}" > >> > >> Unfortunately somebody used the branch name "add-gcc10" and `git > >> rev-parse` which didn't exist on o

Re: [PATCH] submodule foreach: fix recursion of options

2019-06-25 Thread Duy Nguyen
On Tue, Jun 25, 2019 at 5:02 AM Morian Sonnet wrote: > > Calling > > git submodule foreach --recursive -- > > leads to an error stating that the option -- is unknown to > submodule--helper. That is of course only, when is not a valid > option for git submodule foreach. > > The reason for thi

Re: [PATCH v2 05/10] split-index.c: dump "link" extension as json

2019-06-25 Thread Duy Nguyen
On Tue, Jun 25, 2019 at 3:06 AM Jeff Hostetler wrote: > I'm curious how big these EWAHs will be in practice and > how useful an array of integers will be (especially as the > pretty format will be one integer per line). Perhaps it > would helpful to have an extended example in one of the > tests.

Re: [PATCH v2 01/10] ls-files: add --json to dump the index

2019-06-25 Thread Duy Nguyen
On Tue, Jun 25, 2019 at 2:15 AM Jeff Hostetler wrote: > > @@ -202,6 +202,28 @@ void jw_object_null(struct json_writer *jw, const char > > *key) > > strbuf_addstr(&jw->json, "null"); > > } > > > > +void jw_object_filemode(struct json_writer *jw, const char *key, mode_t > > mode) > > +{ >

Re: [PATCH v2 00/10] Add 'ls-files --debug-json' to dump the index in json

2019-06-25 Thread Duy Nguyen
On Tue, Jun 25, 2019 at 1:00 AM Johannes Schindelin wrote: > > - extension location is printed, in case you need to decode the > > extension by yourself (previously only the size is printed) > > - all extensions are printed in the same order they appear in the file > > (previously eoie and ieo

Re: [PATCH 13/14] completion: add default options

2019-06-24 Thread Duy Nguyen
On Tue, Jun 25, 2019 at 8:38 AM Felipe Contreras wrote: > > On Mon, Jun 24, 2019 at 12:22 PM Junio C Hamano wrote: > > > > Duy Nguyen writes: > > > > > On Sat, Jun 22, 2019 at 5:31 AM Felipe Contreras > > > wrote: > > >> > > >&

Re: [PATCH] rm: add --intent-to-add, to be used with --cached

2019-06-24 Thread Duy Nguyen
On Mon, Jun 24, 2019 at 5:52 PM Johannes Schindelin wrote: > > Hi Duy, > > On Sat, 22 Jun 2019, Nguyễn Thái Ngọc Duy wrote: > > > An index entry serves two purposes: to keep the content to be committed, > > and to mark that the same path on worktree is tracked. When > > > > git rm --cached foo

Re: [PATCH 3/6] tree-walk.c: remove the_repo from get_tree_entry()

2019-06-24 Thread Duy Nguyen
On Mon, Jun 24, 2019 at 9:20 PM Derrick Stolee wrote: > > On 6/24/2019 5:55 AM, Nguyễn Thái Ngọc Duy wrote: > > Signed-off-by: Nguyễn Thái Ngọc Duy > > --- > > archive.c | 4 +++- > > blame.c| 4 ++-- > > builtin/rm.c | 2 +- > > builtin/update-index.c |

Re: [PATCH 6/6] Use the right 'struct repository' instead of the_repository

2019-06-24 Thread Duy Nguyen
On Mon, Jun 24, 2019 at 9:24 PM Derrick Stolee wrote: > > On 6/24/2019 5:55 AM, Nguyễn Thái Ngọc Duy wrote: > > There are a couple of places where 'struct repository' is already passed > > around, but the_repository is still used. Use the right repo. > > > > Signed-off-by: Nguyễn Thái Ngọc Duy >

Re: [PATCH 1/8] ls-files: add --json to dump the index

2019-06-24 Thread Duy Nguyen
On Wed, Jun 19, 2019 at 8:03 PM Derrick Stolee wrote: > > - show_files(the_repository, &dir); > > - > > - if (show_resolve_undo) > > - show_ru_info(the_repository->index); > > + if (!show_json) { > > + show_files(the_repository, &dir); > > + > > + if

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-24 Thread Duy Nguyen
On Mon, Jun 24, 2019 at 4:32 PM Johannes Schindelin wrote: > > Hi Duy, > > On Fri, 21 Jun 2019, Duy Nguyen wrote: > > > On Fri, Jun 21, 2019 at 8:16 PM Johannes Schindelin > > wrote: > > > > > > I think your warning in the manpage that this is for deb

Re: [PATCH v3] l10n: localizable upload progress messages

2019-06-22 Thread Duy Nguyen
On Sat, Jun 22, 2019 at 4:37 PM Dimitriy Ryazantcev wrote: > diff --git a/strbuf.c b/strbuf.c > index 0e18b259ce..0a3ebc3749 100644 > --- a/strbuf.c > +++ b/strbuf.c > @@ -814,20 +814,28 @@ void strbuf_addstr_urlencode(struct strbuf *sb, const > char *s, > void strbuf_humanise_bytes(struct strbu

Re: [PATCH] l10n: localizable upload progress messages

2019-06-21 Thread Duy Nguyen
On Sat, Jun 22, 2019 at 2:18 AM Junio C Hamano wrote: > > Dimitriy Ryazantcev writes: > > > Signed-off-by: Dimitriy Ryazantcev > > --- > > progress.c | 3 ++- > > strbuf.c | 8 > > 2 files changed, 6 insertions(+), 5 deletions(-) > > > > diff --git a/progress.c b/progress.c > > index

Re: [PATCH 13/14] completion: add default options

2019-06-21 Thread Duy Nguyen
On Sat, Jun 22, 2019 at 5:31 AM Felipe Contreras wrote: > > Versions of Git older than v2.17 don't know about > --git-completion-helper, so provide some defaults for them. > > Also, some commands fail if there's no Git repository available. > > Signed-off-by: Felipe Contreras > --- > contrib/com

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Duy Nguyen
On Sat, Jun 22, 2019 at 6:31 AM brian m. carlson wrote: > > On 2019-06-19 at 09:58:50, Nguyễn Thái Ngọc Duy wrote: > > This is probably just my itch. Every time I have to do something with > > the index, I need to add a little bit code here, a little bit there to > > get a better "view" of the ind

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Duy Nguyen
On Fri, Jun 21, 2019 at 8:16 PM Johannes Schindelin wrote: > > I think your warning in the manpage that this is for debugging is fine, > > as it does not put us on the hook for maintaining the feature nor its > > format forever. We might want to call it "--debug=json" or something, > > though, in

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-21 Thread Duy Nguyen
On Thu, Jun 20, 2019 at 2:17 AM Jeff King wrote: > I think your warning in the manpage that this is for debugging is fine, > as it does not put us on the hook for maintaining the feature nor its > format forever. We might want to call it "--debug=json" or something, Hmm.. does it mean we make --d

Re: [PATCH 2/4] switch: allow to switch in the middle of bisect

2019-06-20 Thread Duy Nguyen
On Thu, Jun 20, 2019 at 9:02 PM Derrick Stolee wrote: > > On 6/20/2019 5:55 AM, Nguyễn Thái Ngọc Duy wrote: > > In c45f0f525d (switch: reject if some operation is in progress, > > 2019-03-29), a check is added to prevent switching when some operation > > is in progress. The reason is it's often no

Re: [PATCH 4/4] restore: add --intent-to-add (restoring worktree only)

2019-06-20 Thread Duy Nguyen
On Thu, Jun 20, 2019 at 9:34 PM Derrick Stolee wrote: > > On 6/20/2019 5:55 AM, Nguyễn Thái Ngọc Duy wrote: > > "git restore --source" (without --staged) could create new files > > (i.e. not present in index) on worktree to match the given source. But > > the new files are not tracked, so both "gi

Re: [RFC/PATCH] gc: run more pre-detach operations under lock

2019-06-20 Thread Duy Nguyen
On Thu, Jun 20, 2019 at 5:49 AM Ævar Arnfjörð Bjarmason wrote: > > > On Wed, Jun 19 2019, Jeff King wrote: > > > On Wed, Jun 19, 2019 at 08:01:55PM +0200, Ævar Arnfjörð Bjarmason wrote: > > > >> > You could sort of avoid the problem here too with > >> > > >> > parallel 'git fetch --no-auto-gc {}'

Re: [PATCH] fetch: only run 'gc' once when fetching multiple remotes

2019-06-20 Thread Duy Nguyen
On Thu, Jun 20, 2019 at 1:59 AM Jeff King wrote: > I was surprised that we needed a new command-line option here, but I > guess the sub-fetch processes really have no idea that they're > subservient to a multi-remote fetch (they do get "--append", but of > course somebody could specify that indepe

Re: [PATCH 6/8] read-cache.c: dump "IEOT" extension as json

2019-06-19 Thread Duy Nguyen
On Wed, Jun 19, 2019 at 8:18 PM Derrick Stolee wrote: > > On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote:> @@ -2266,7 +2271,7 @@ int > do_read_index(struct index_state *istate, const char *path, int must_exist) > >* to multi-thread the reading of the cache entries. > >*/ > >

Re: [RFC/PATCH] gc: run more pre-detach operations under lock

2019-06-19 Thread Duy Nguyen
On Wed, Jun 19, 2019 at 5:26 PM Ævar Arnfjörð Bjarmason wrote: > This patch is part of a WIP branch I have that's a bit of a mess. It's > more-gc-detach-under-lock on github.com/avar/git.git. It doesn't apply > on master because it relies on some previous test work, but for RFC > purposes I figure

Re: [PATCH 0/8] Add 'ls-files --json' to dump the index in json

2019-06-19 Thread Duy Nguyen
On Wed, Jun 19, 2019 at 6:58 PM Derrick Stolee wrote: > > On 6/19/2019 5:58 AM, Nguyễn Thái Ngọc Duy wrote: > > This is probably just my itch. Every time I have to do something with > > the index, I need to add a little bit code here, a little bit there to > > get a better "view" of the index. > >

Re: [PATCH] completion: do not cache if --git-completion-helper fails

2019-06-15 Thread Duy Nguyen
On Fri, Jun 14, 2019 at 1:07 PM Felipe Contreras wrote: > > On Thu, Jun 13, 2019 at 9:53 PM Duy Nguyen wrote: > > > > On Fri, Jun 14, 2019 at 7:30 AM Felipe Contreras > > wrote: > > > > One way or the other, shouldn't my tests be merged? The issue is

Re: [PATCH] completion: do not cache if --git-completion-helper fails

2019-06-13 Thread Duy Nguyen
On Fri, Jun 14, 2019 at 7:30 AM Felipe Contreras wrote: > > On Wed, Jun 12, 2019 at 3:52 AM Duy Nguyen wrote: > > > > On Sat, Jun 8, 2019 at 12:33 AM Felipe Contreras > > wrote: > > > > Something like this should work: > > > > > > struc

Re: Reducing git size by building libgit.so

2019-06-12 Thread Duy Nguyen
On Wed, Jun 12, 2019 at 4:42 PM Ævar Arnfjörð Bjarmason wrote: > I.e. we'd just have one git binary, everything else symlinking to that, > and we'd route to the right program by inspecting argv, which we mostly > do already. If I remember correctly libcurl.so startup time was the reason it's spli

Re: Reducing git size by building libgit.so

2019-06-12 Thread Duy Nguyen
On Wed, Jun 12, 2019 at 2:11 PM brian m. carlson wrote: > > On 2019-06-11 at 19:52:18, Elmar Pruesse wrote: > > Hi! > > > > The total compiled size of libexec/git-core is currently somewhere > > around 30 MB. This is largely due to a number of binaries linking > > statically against libgit.a. For

Re: What's cooking in git.git (Jun 2019, #02; Thu, 6)

2019-06-12 Thread Duy Nguyen
On Fri, Jun 7, 2019 at 3:19 AM Junio C Hamano wrote: > * nd/switch-and-restore (2019-05-07) 43 commits > - Declare both git-switch and git-restore experimental > - help: move git-diff and git-reset to different groups > - doc: promote "git restore" > - user-manual.txt: prefer 'merge --abort' o

Re: [PATCH] completion: do not cache if --git-completion-helper fails

2019-06-12 Thread Duy Nguyen
On Sat, Jun 8, 2019 at 12:33 AM Felipe Contreras wrote: > > On Fri, Jun 7, 2019 at 5:02 AM SZEDER Gábor wrote: > > > > On Fri, Jun 07, 2019 at 04:30:34PM +0700, Nguyễn Thái Ngọc Duy wrote: > > > "git --git-completion-helper" could fail if the command checks for > > > a repo before parse_options(

Re: worktree add already exists

2019-06-06 Thread Duy Nguyen
On Wed, Jun 5, 2019 at 10:30 PM Ingo Wolf wrote: > > Am 05.06.2019 um 12:17 schrieb Duy Nguyen: > > "worktree add --no-checkout --keep-worktree" is quite readable > > worktree add --no-checkout -f (orce) > > I've expected to work on an not empty directory

Re: [RFC/PATCH 0/5] Fix fetch regression with transport helpers

2019-06-05 Thread Duy Nguyen
On Wed, Jun 5, 2019 at 6:27 PM Jeff King wrote: > > On Wed, Jun 05, 2019 at 10:12:12AM +0200, Johannes Schindelin wrote: > > > This fails on macOS, in t5601, both in our osx-clang and osx-gcc jobs, as > > well as in the StaticAnalysis job. For details, see > > https://dev.azure.com/gitgitgadget/gi

Re: worktree add already exists

2019-06-05 Thread Duy Nguyen
On Tue, Jun 4, 2019 at 1:32 AM Eric Sunshine wrote: > > On Mon, Jun 3, 2019 at 5:47 AM Duy Nguyen wrote: > > On Sun, Jun 2, 2019 at 2:11 PM Eric Sunshine > > wrote: > > > On Mon, May 27, 2019 at 11:32 AM Ingo Wolf wrote: > > > > I would like to attach an

Re: [PATCH v2] config: learn the "onbranch:" includeIf condition

2019-06-05 Thread Duy Nguyen
On Sat, Jun 1, 2019 at 2:34 AM Denton Liu wrote: > > Currently, if a user wishes to have individual settings per branch, they > are required to manually keep track of the settings in their head and > manually set the options on the command-line or change the config at > each branch. > > Teach conf

Re: worktree add already exists

2019-06-03 Thread Duy Nguyen
On Sun, Jun 2, 2019 at 2:11 PM Eric Sunshine wrote: > > On Mon, May 27, 2019 at 11:32 AM Ingo Wolf wrote: > > $ ls -a barework > > ./ ../ test.txt > > $ git -C bare worktree add --no-checkout ../barework > > Preparing worktree (new branch 'barework') > > fatal: '../barework' already exists > >

Re: [Proposal] git am --check

2019-06-03 Thread Duy Nguyen
On Mon, Jun 3, 2019 at 4:29 PM Christian Couder wrote: > > On Sun, Jun 2, 2019 at 7:38 PM Drew DeVault wrote: > > > > This flag would behave similarly to git apply --check, or in other words > > would exit with a nonzero status if the patch is not applicable without > > actually applying the patc

Re: [GSoC] How to protect cached_objects

2019-05-25 Thread Duy Nguyen
On Sat, May 25, 2019 at 11:04 PM Matheus Tavares Bernardino wrote: > > On Fri, May 24, 2019 at 6:55 AM Duy Nguyen wrote: > > > > On Thu, May 23, 2019 at 11:51 PM Matheus Tavares Bernardino > > wrote: > > > > > > > > Hi, everyone > > &g

Re: [PATCH 0/1] trace2: fix tracing when NO_PTHREADS is defined

2019-05-25 Thread Duy Nguyen
On Thu, May 23, 2019 at 12:51 PM Jeff King wrote: > For fun, here's a constant-time zero-allocation implementation that I > came up with. It passes t0211 with NO_PTHREADS, but I didn't test it > beyond that. > > diff --git a/thread-utils.h b/thread-utils.h > index 4961487ed9..f466215742 100644 > -

Re: Incorrect diff-parseopt conversion?

2019-05-25 Thread Duy Nguyen
On Fri, May 24, 2019 at 5:08 PM Ævar Arnfjörð Bjarmason wrote: > >> OK, I just had a look at the code in parse-options.c. > >> Hmm, somewhat ugly! :-D > > > > Yeah it's a bit hackish. The problem is parse-options (and also config > > parser) does not allow passing user data to the callback. Changi

Re: [PATCH 0/3] fix diff-parseopt regressions

2019-05-25 Thread Duy Nguyen
On Sat, May 25, 2019 at 12:36 AM Todd Zullinger wrote: > > Hi, > > Nguyễn Thái Ngọc Duy wrote: > > This should fix the diff tests failure on s360x. It's a serious problem > > and I plan to do something to prevent it from happening again. > > Thanks for looking at this! > > I applied this on top of

Re: [GSoC] How to protect cached_objects

2019-05-24 Thread Duy Nguyen
On Thu, May 23, 2019 at 11:51 PM Matheus Tavares Bernardino wrote: > > Hi, everyone > > As one of my first tasks in GSoC, I'm looking to protect the global > states at sha1-file.c for future parallelizations. Currently, I'm > analyzing how to deal with the cached_objects array, which is a small >

Re: Incorrect diff-parseopt conversion?

2019-05-24 Thread Duy Nguyen
On Wed, May 22, 2019 at 7:35 AM Ramsay Jones wrote: > > > > On 22/05/2019 01:11, Duy Nguyen wrote: > > On Wed, May 22, 2019 at 2:56 AM Ramsay Jones > > wrote: > >> > >> Hi Duy, > >> > >> I am in the middle of rebasing a long runni

Re: New diff test failures on s390x architecture (was: [ANNOUNCE] Git v2.22.0-rc1)

2019-05-23 Thread Duy Nguyen
On Fri, May 24, 2019 at 2:14 AM Todd Zullinger wrote: > > I wrote: > > While running the 2.22.0-rc1 tests on Fedora, I hit a few > > new test failures since 2.21.0 -- but only on the s390x > > architecture. > > > > I haven't had time to dig into these the past few days, so I > > thought I would se

Re: Incorrect diff-parseopt conversion?

2019-05-21 Thread Duy Nguyen
On Wed, May 22, 2019 at 2:56 AM Ramsay Jones wrote: > > Hi Duy, > > I am in the middle of rebasing a long running branch onto > current master (v2.22.0-rc1) and noticed something odd with > commit af2f368091 ("diff-parseopt: convert --output-*", > 2019-02-21). > > As part of the branch I am rebasi

Re: [Breakage] 2.22.0-rc1 - t0211-trace2-perf.sh

2019-05-21 Thread Duy Nguyen
On Tue, May 21, 2019 at 6:51 PM Ævar Arnfjörð Bjarmason wrote: > But the real bug looks like the trace2 code unconditionally depending on > pthreads, even though NonStop has 'NO_PTHREADS = UnfortunatelyYes' > defined. > > That's why we get this th%d:unknown stuff, the trace2/tr2_tls.c code > using

Re: [ANNOUNCE] Git v2.22.0-rc1

2019-05-21 Thread Duy Nguyen
On Tue, May 21, 2019 at 6:24 PM Ævar Arnfjörð Bjarmason wrote: > > > On Tue, May 21 2019, Duy Nguyen wrote: > > > (dropping lkml and git-packagers) > > > > On Tue, May 21, 2019 at 3:31 PM Duy Nguyen wrote: > >> > The bug there is that the old

Re: [PATCH] repository.c: always allocate 'index' at repo init time

2019-05-21 Thread Duy Nguyen
On Mon, May 20, 2019 at 8:17 PM Jeff King wrote: > The patch looks good, though I wonder if we could simplify even further > by just embedding an index into the repository object. The purpose of > having it as a pointer, I think, is so that the_repository can point to > the_index. But we could pos

Re: [ANNOUNCE] Git v2.22.0-rc1

2019-05-21 Thread Duy Nguyen
(dropping lkml and git-packagers) On Tue, May 21, 2019 at 3:31 PM Duy Nguyen wrote: > > The bug there is that the old opt_arg() code would be torelant to empty > > values. I noticed a similar change the other day with the --abbrev > > option, but didn't think it was wor

Re: [ANNOUNCE] Git v2.22.0-rc1

2019-05-21 Thread Duy Nguyen
On Tue, May 21, 2019 at 5:27 AM Ævar Arnfjörð Bjarmason wrote: > > > On Mon, May 20 2019, Bryan Turner wrote: > > > On Sun, May 19, 2019 at 10:00 AM Junio C Hamano wrote: > >> > >> * The diff machinery, one of the oldest parts of the system, which > >>long predates the parse-options API, use

Re: Command to list Branches on a specific Remote (i.e. select from rtb's)

2019-05-19 Thread Duy Nguyen
On Sun, May 19, 2019 at 2:55 AM Philip Oakley wrote: > I'll add the answer to one on the stackoverflow Q&A's I'd looked at. I > hadn't put the branch -a and -l options together. Maybe update/add some examples in our man pages too. -- Duy

Re: Command to list Branches on a specific Remote (i.e. select from rtb's)

2019-05-19 Thread Duy Nguyen
On Sun, May 19, 2019 at 1:41 AM Ævar Arnfjörð Bjarmason wrote: > That's: > > git for-each-ref 'refs/remotes//' > git branch -a -l '/' > > The latter will conflate with any local branches you happen to > have prefixed with . That problem should be gone if you use -r instead of -a. -- Duy

Re: Missing branches after clone

2019-05-18 Thread Duy Nguyen
On Tue, May 14, 2019 at 6:10 PM Philip Oakley wrote: > >> It is a 'branch which tracks a remote', and it is has the 'last time I > >> looked' state of the branch that is on the remote server, which may > >> have, by now, advanced or changed. > >> > >> So you need to have the three distinct views i

Re: [PATCH] worktree add: be tolerant of corrupt worktrees

2019-05-18 Thread Duy Nguyen
On Fri, May 17, 2019 at 2:46 PM Eric Sunshine wrote: > > On Mon, May 13, 2019 at 6:50 AM Nguyễn Thái Ngọc Duy > wrote: > > find_worktree() can die() unexpectedly because it uses real_path() > > instead of the gentler version. When it's used in 'git worktree add' [1] > > and there's a bad worktre

Re: [PATCH] clone: add `--remote-submodules` flag

2019-05-18 Thread Duy Nguyen
On Fri, May 17, 2019 at 12:50 AM Ben Avison wrote: > > On 16/05/2019 12:31, Duy Nguyen wrote: > > On Tue, May 14, 2019 at 2:46 AM Ben Avison wrote: > >> > >> When using `git clone --recurse-submodules` there was previously no way to > >> pass a `--remote

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-18 Thread Duy Nguyen
On Fri, May 17, 2019 at 3:55 PM Jeff King wrote: > > On Fri, May 17, 2019 at 02:20:42PM +0700, Duy Nguyen wrote: > > > On Fri, May 17, 2019 at 12:35 PM Jeff King wrote: > > > As it turns out, index-pack does not handle these complicated cases at > > > all! I

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-17 Thread Duy Nguyen
On Fri, May 17, 2019 at 12:35 PM Jeff King wrote: > As it turns out, index-pack does not handle these complicated cases at > all! In the final fix_unresolved_deltas(), we are only looking for thin > deltas, and anything that was not yet resolved is assumed to be a thin > object. In many of these c

Re: Feedback on git-restore

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 7:12 PM Philip Oakley wrote: > Maybe we need a `git index` command to make it far more visible to > average users (or `git staging-area --show`, with a --cached option ;-). Not commenting on the other parts (and also Junio's mail) since I still need more time to process.

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 7:15 PM Eric Sunshine wrote: > > On Thu, May 16, 2019 at 7:42 AM Duy Nguyen wrote: > > On Thu, May 16, 2019 at 6:33 PM Eric Sunshine > > wrote: > > > You run afoul of it in other situations, as well. For instance, say > > > you ha

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 6:39 PM Eric Sunshine wrote: > > On Thu, May 16, 2019 at 7:33 AM Eric Sunshine wrote: > > I researched this also and concluded that it's a bug in git-commit. > > You run afoul of it in other situations, as well. For instance, say > > you have your index file in a non-stand

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 6:33 PM Eric Sunshine wrote: > I researched this also and concluded that it's a bug in git-commit. > You run afoul of it in other situations, as well. For instance, say > you have your index file in a non-standard location: > > $ export GIT_INDEX_FILE=../storage/index >

Re: [PATCH] clone: add `--remote-submodules` flag

2019-05-16 Thread Duy Nguyen
On Tue, May 14, 2019 at 2:46 AM Ben Avison wrote: > > When using `git clone --recurse-submodules` there was previously no way to > pass a `--remote` switch to the implicit `git submodule update` command for > any use case where you want the submodules to be checked out on their > remote-tracking b

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Duy Nguyen
On Tue, May 14, 2019 at 9:53 PM Cosmin Polifronie wrote: > > Hello! I am trying to run 'git worktree add HEAD' in the > 'pre-commit' hook, more specifically in a Python script that is being > called from the hook. When doing so, I am greeted with the following > error: > > On Windows 10: > Prepar

Re: [PATCH v2 3/7] rebase: add support for multiple hooks

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 5:55 AM brian m. carlson wrote: > > On Tue, May 14, 2019 at 07:56:49PM +0700, Duy Nguyen wrote: > > On Tue, May 14, 2019 at 7:24 AM brian m. carlson > > wrote: > > > - close(cp.in); > > > > In the old code, we close cp.in...

Re: Feedback on git-restore

2019-05-15 Thread Duy Nguyen
On Wed, May 15, 2019 at 12:59:17PM +0200, Ævar Arnfjörð Bjarmason wrote: > One thing that would be really useful (and maybe it even exists, I just > haven't seen it in the mails) is some abbreviated cheatsheet style doc > of before/after in the UI. Similar to cheatsheets like e.g.: > > https:/

Re: Feedback on git-restore

2019-05-15 Thread Duy Nguyen
On Wed, May 15, 2019 at 09:38:59AM +, Poughon Victor wrote: > Hi > > I came across a description of a new git command currently in > development called 'git restore'. Since it's still not out, and the > original poster [1] seemed to ask for feedback, I though I'd send > some here. Hope that's

Re: [PATCH] get_oid: handle NULL repo->index

2019-05-15 Thread Duy Nguyen
On Wed, May 15, 2019 at 12:16 PM Junio C Hamano wrote: > > Jeff King writes: > > > Also from my earlier message, if you missed it: > > > > I also wondered if we should simply allocate an empty index whenever > > we have a non-toplevel "struct repository", which might be less > > surprising

Re: [PATCH] get_oid: handle NULL repo->index

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 8:54 PM Jeff King wrote: > diff --git a/sha1-name.c b/sha1-name.c > index 775a73d8ad..455e9fb1ea 100644 > --- a/sha1-name.c > +++ b/sha1-name.c > @@ -1837,7 +1837,7 @@ static enum get_oid_result > get_oid_with_context_1(struct repository *repo, > if (flags

Re: [PATCH v2 7/7] docs: document multiple hooks

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 7:24 AM brian m. carlson wrote: > +It is possible to provide multiple hooks for a single function. If the > +main hook file is absent, If I remember 1/7 correctly, if the hook "file" is a directory, you ignore it and check for hook.d too. Which makes me think, can we just

Re: [PATCH v2 0/7] Multiple hook support

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 7:23 AM brian m. carlson wrote: > > This series introduces multiple hook support. > > I've thought a lot about the discussion over whether this series should > use the configuration as the source for multiple hooks. Ultimately, I've > come to the decision that it's not a go

Re: [PATCH v2 6/7] config: allow configuration of multiple hook error behavior

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 7:24 AM brian m. carlson wrote: > > There are a variety of situations in which a user may want an error > behavior for multiple hooks other than the default. Add a config option, > hook..errorBehavior to allow users to customize this behavior on a An alternative name is on

Re: [PATCH v2 3/7] rebase: add support for multiple hooks

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 7:24 AM brian m. carlson wrote: > diff --git a/builtin/am.c b/builtin/am.c > index 912d9821b1..340eacbd44 100644 > --- a/builtin/am.c > +++ b/builtin/am.c > @@ -441,24 +441,8 @@ static int run_applypatch_msg_hook(struct am_state > *state) > */ > static int run_post_rewr

Re: [PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 7:24 AM brian m. carlson wrote: > -int run_hook_ve(const char *const *env, const char *name, va_list args) > +int find_hooks(const char *name, struct string_list *list) > { > - struct child_process hook = CHILD_PROCESS_INIT; > - const char *p; > + struct

Re: "add worktree" fails with "fatal: Invalid path" error

2019-05-14 Thread Duy Nguyen
On Mon, May 13, 2019 at 7:55 PM Shaheed Haque wrote: > The original code used the more obvious "git worktree remove" rather > than "git worktree prune" but I switched partly because remove seemed > slow (I cannot now quantify what caused me to think that), and partly > because I was having other i

Re: some git confusion (where git's advice didn't help)

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 07:21:15AM -0400, Jeff King wrote: > I also think the "warning: refname ... is ambiguous" message would > probably be a bit more helpful if it showed _which_ candidates it found > (and which one it chose!). Alternatively, just refuse to resolve ambiguous refs. It's not alwa

Re: Missing branches after clone

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 5:33 PM Philip Oakley wrote: > > Hi Ulrich, > On 14/05/2019 11:12, Duy Nguyen wrote: > >> Then I > >> foundhttps://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches > >> which handles the subject... > >> B

Re: Is git-checkout's restoring d/f conflict really sane?

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 5:37 PM Junio C Hamano wrote: > > Duy Nguyen writes: > > > $ echo data > one > > $ git add one > > $ rm one > > $ mkdir one > > $ echo two > one/two > > $ echo three > one/three > > $ git checkout one > &g

Re: Missing branches after clone

2019-05-14 Thread Duy Nguyen
On Tue, May 14, 2019 at 4:42 PM Ulrich Windl wrote: > > Hi! > > While wondering why some branches are not being displayed by "git branch" in > a cloned repository, I was reading the obvious man pages (man git-branch, man > git-remote), but still couldn't find the reason or the solution. Local a

  1   2   3   4   5   6   7   8   9   10   >