Re: [PATCH] help: allow redirecting to help for aliased command

2018-09-26 Thread Duy Nguyen
On Wed, Sep 26, 2018 at 12:29 PM Rasmus Villemoes wrote: > > I often use 'git --help' as a quick way to get the documentation > for a command. However, I've also trained my muscle memory to use my > aliases (cp=cherry-pick, co=checkout etc.), which means that I often end > up doing > > git cp

Re: [PATCH] git help: promote 'git help -av'

2018-09-25 Thread Duy Nguyen
On Tue, Sep 25, 2018 at 05:15:38PM +0200, Duy Nguyen wrote: > On Mon, Sep 24, 2018 at 10:58 PM Junio C Hamano wrote: > > I personally find "help -av" a bit too loud to my taste than plain > > "-a", and more importantly, I look at "help -a" primarily

Re: [PATCH 2/8] Add a place for (not) sharing stuff between worktrees

2018-09-25 Thread Duy Nguyen
On Tue, Sep 25, 2018 at 6:24 PM Stefan Beller wrote: > > > That sounds dangerous to me. There is already a concept of > > > local and remote-tracking branches. So I would think that local > > > may soon become an overused word, (just like "index" today or > > > "recursive" to a lesser extend). >

Re: bug in 'git describe'?

2018-09-25 Thread Duy Nguyen
On Tue, Sep 25, 2018 at 6:05 PM Duy Nguyen wrote: > > On Tue, Sep 25, 2018 at 5:41 PM Sebastian Kuzminsky wrote: > > That behavior seems to me to be different from what the (2.11) manpage says: > > Good opportunity to improve the man page anyway even if Junio is > right. I a

Re: bug in 'git describe'?

2018-09-25 Thread Duy Nguyen
On Tue, Sep 25, 2018 at 5:41 PM Sebastian Kuzminsky wrote: > That behavior seems to me to be different from what the (2.11) manpage says: Good opportunity to improve the man page anyway even if Junio is right. I agree that the section about "search strategy" is a bit misleading because it does

Re: [PATCH] worktree: add per-worktree config files

2018-09-25 Thread Duy Nguyen
On Mon, Sep 24, 2018 at 4:21 PM Taylor Blau wrote: > > +cmp_config() { > > + if [ "$1" = "-C" ]; then > > + shift && > > + GD="-C $1" && > > + shift > > + else > > + GD= > > + fi && > > + echo "$1" >expected && > > + shift && > >

Re: [PATCH 3/8] refs: new ref types to make per-worktree refs visible to all worktrees

2018-09-25 Thread Duy Nguyen
On Tue, Sep 25, 2018 at 4:48 AM Stefan Beller wrote: > > This patch also makes it possible to specify refs from one worktree in > > another one, e.g. > > > > git log worktrees/foo/HEAD > > This has strong similarities to remote refs: > Locally I may have a branch master, whose (stale local

Re: [PATCH 2/8] Add a place for (not) sharing stuff between worktrees

2018-09-25 Thread Duy Nguyen
On Tue, Sep 25, 2018 at 4:35 AM Stefan Beller wrote: > > On Sat, Sep 22, 2018 at 11:05 AM Nguyễn Thái Ngọc Duy > wrote: > > > > When multiple worktrees are used, we need rules to determine if > > something belongs to one worktree or all of them. Instead of keeping > > adding rules when new

Re: [PATCH] git help: promote 'git help -av'

2018-09-25 Thread Duy Nguyen
On Mon, Sep 24, 2018 at 10:58 PM Junio C Hamano wrote: > I personally find "help -av" a bit too loud to my taste than plain > "-a", and more importantly, I look at "help -a" primarily to check > the last section "avaialble from elsewhere on your $PATH" to find > things like "clang-format", which

Re: [PATCH v5 8/8] Documentation/config: add odb..promisorRemote

2018-09-25 Thread Duy Nguyen
On Tue, Sep 25, 2018 at 1:54 PM Christian Couder wrote: > > From: Christian Couder > > Signed-off-by: Junio C Hamano > --- > Documentation/config.txt | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index ad0f4510c3..9df988adb9

Re: git fetch behaves weirdely when run in a worktree

2018-09-24 Thread Duy Nguyen
On Sun, Sep 23, 2018 at 10:19 PM Kaartic Sivaraam wrote: > > Hi, > > I was actually trying to automae the building and installation of Git > source code to reduce my burden. I tried to automate it with the help > of a script that runs daily via cron and a separate worktree used only > by the

Re: [PATCH 5/8] revision.c: better error reporting on ref from different worktrees

2018-09-23 Thread Duy Nguyen
On Sun, Sep 23, 2018 at 10:25 AM Eric Sunshine wrote: > > @@ -487,6 +487,28 @@ int submodule_uses_worktrees(const char *path) > > +void strbuf_worktree_ref(const struct worktree *wt, > > +struct strbuf *sb, > > +const char *refname) > > +{ > > +

Re: [PATCH 3/8] refs: new ref types to make per-worktree refs visible to all worktrees

2018-09-23 Thread Duy Nguyen
On Sun, Sep 23, 2018 at 10:06 AM Eric Sunshine wrote: > > On Sat, Sep 22, 2018 at 2:05 PM Nguyễn Thái Ngọc Duy > wrote: > > [...] > > The main worktree has to be treated specially because well.. it's > > special from the beginning. So HEAD from the main worktree is > > acccessible via the name

Re: Very simple popen() code request, ground-shaking functionality openned by it

2018-09-23 Thread Duy Nguyen
On Sat, Sep 22, 2018 at 1:30 AM Ævar Arnfjörð Bjarmason wrote: > Duy's > https://public-inbox.org/git/20180920161928.ga13...@duynguyen.home/ is > another recent thing that reminded me of this, i.e. that suggested > "\\|/-" spinner could be made much neater with non-ASCII. > > > 1. Add a

Re: [PATCH] git help: promote 'git help -av'

2018-09-23 Thread Duy Nguyen
On Sat, Sep 22, 2018 at 9:29 PM Ævar Arnfjörð Bjarmason wrote: > > > On Sat, Sep 22 2018, Nguyễn Thái Ngọc Duy wrote: > > > When you type "git help" (or just "git") you are greeted with a list > > with commonly used commands and their short description and are > > suggested to use "git help -a"

Re: [PATCH] userdiff.h: add missing declaration (hdr-check)

2018-09-21 Thread Duy Nguyen
On Fri, Sep 21, 2018 at 6:24 PM Junio C Hamano wrote: > > Ramsay Jones writes: > > > Signed-off-by: Ramsay Jones > > --- > > > > Hi Junio, > > > > ... and this is the patch I needed for the current 'pu' branch. > > Which in turn means that this is to fix 5b338d60 ("userdiff.c: > remove implicit

Re: git check-ignore ignores negated entries

2018-09-21 Thread Duy Nguyen
On Thu, Sep 20, 2018 at 7:25 PM David Alphus wrote: > In looking through check-ignore.c, it appears that we check that > last_exclude_matching() returns an exclude object. It should be noted > that we do not consider that exclude struct can be set with the > EXC_FLAG_NEGATIVE flag. This flag says

Re: [PATCH 2/3] git-column.1: clarify initial description, provide examples

2018-09-20 Thread Duy Nguyen
On Wed, Sep 19, 2018 at 03:59:58PM -0700, Junio C Hamano wrote: > > @@ -23,7 +26,7 @@ OPTIONS > > > > --mode=:: > > Specify layout mode. See configuration variable column.ui for option > > - syntax. > > + syntax (in git-config(1)). I think we usually link to other commands with

Re: [PATCH] reflog expire: add progress output

2018-09-20 Thread Duy Nguyen
On Wed, Sep 19, 2018 at 07:22:44PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> @@ -225,14 +226,20 @@ static void mark_reachable(struct > >> expire_reflog_policy_cb *cb) > >> struct commit_list *pending; > >> timestamp_t expire_limit = cb->mark_limit; > >> struct commit_list

Re: [PATCH] reflog expire: add progress output

2018-09-19 Thread Duy Nguyen
On Wed, Sep 19, 2018 at 4:23 PM Ævar Arnfjörð Bjarmason wrote: > Before this change the "git reflog expire" command didn't report any > progress. I love these progress additions you've been pushing lately :) > diff --git a/builtin/reflog.c b/builtin/reflog.c > index 3acef5a0ab..d3075ee75a

Re: [PATCH v2 0/1] Make 'git commit' not accidentally lose staged content

2018-09-19 Thread Duy Nguyen
On Wed, Sep 19, 2018 at 1:19 AM Jeff King wrote: > > On Tue, Sep 18, 2018 at 12:36:06PM -0700, Jacob Keller wrote: > > > > I like that, too. It's a little more costly just because it may involve > > > object-db writes, but I think in most cases it would be fine. I almost > > > always "git stash"

Re: Cannot negate `*` ignore pattern for directory with space in the name

2018-09-18 Thread Duy Nguyen
On Tue, Sep 18, 2018 at 6:13 AM Victor Engmark wrote: > > To reproduce (from ): > > $ cd "$(mktemp --directory)" > $ mkdir foo\ bar > $ touch foo\ bar/test > $ git init > Initialized empty Git repository in /tmp/tmp.iGmBR6y2xR/.git/ > $ git status

Re: [PATCH v2 0/1] Make 'git commit' not accidentally lose staged content

2018-09-17 Thread Duy Nguyen
On Mon, Sep 17, 2018 at 8:15 PM Jeff King wrote: > On Mon, Sep 17, 2018 at 07:29:26PM +0200, Duy Nguyen wrote: > > I don't see a good way to get to recover this situation. I could go > > back to the "index log" idea, where we keep a log of index changes (or >

Re: [PATCH v5 1/5] eoie: add End of Index Entry (EOIE) extension

2018-09-17 Thread Duy Nguyen
On Mon, Sep 17, 2018 at 7:31 PM Junio C Hamano wrote: > > Duy Nguyen writes: > > > But it _is_ available now. If you need it, you write the extension > > out. > > Are you arguing for making it omitted when it is not needed (e.g. > small enough index file)? IOW, di

Re: [PATCH v2 0/1] Make 'git commit' not accidentally lose staged content

2018-09-17 Thread Duy Nguyen
On Mon, Sep 17, 2018 at 7:09 PM Junio C Hamano wrote: > > Nguyễn Thái Ngọc Duy writes: > > > This is about mixing "git add -p" and "git commit -a" (or "git commit > > ") where you may accidentally lose staged changes. After the > > discussion with Jonathan, I'm going with a bit different

Re: [PATCH v4 02/23] read-cache.c: remove 'const' from index_has_changes()

2018-09-17 Thread Duy Nguyen
On Mon, Sep 17, 2018 at 6:25 PM Junio C Hamano wrote: > > Nguyễn Thái Ngọc Duy writes: > > > This function calls do_diff_cache() which eventually needs to set this > > "istate" to unpack_options->src_index (*). This is an unfortunate fact > > that unpack_trees() _will_ destroy src_index so we

Re: [PATCH v5 2/5] read-cache: load cache extensions on a worker thread

2018-09-17 Thread Duy Nguyen
On Mon, Sep 17, 2018 at 6:26 PM Ben Peart wrote: > > > > On 9/15/2018 6:22 AM, Duy Nguyen wrote: > >> +index.threads:: > >> + Specifies the number of threads to spawn when loading the index. > >> + This is meant to reduce ind

Re: [Bug] Pathspec matching breaks the add command

2018-09-17 Thread Duy Nguyen
On Mon, Sep 17, 2018 at 3:55 AM wrote: > > The following: > > git add -u :\(glob,attr:-someAttr\):src/** > > Produces an error that, according to the source code, should never be visible > to the user. This attribute/pathspec *should* be supported according to the > documentation provided by

Re: [PATCH v5 1/5] eoie: add End of Index Entry (EOIE) extension

2018-09-17 Thread Duy Nguyen
On Mon, Sep 17, 2018 at 4:55 PM Ben Peart wrote: > On 9/15/2018 6:02 AM, Duy Nguyen wrote: > > >> default: > >> if (*ext < 'A' || 'Z' < *ext) > >> return error("index uses %.4s extension, which

Re: [PATCH v2 2/2] commit-graph verify: add progress output

2018-09-16 Thread Duy Nguyen
On Fri, Sep 7, 2018 at 8:30 PM Ævar Arnfjörð Bjarmason wrote: > @@ -989,11 +990,14 @@ int verify_commit_graph(struct repository *r, struct > commit_graph *g) > if (verify_commit_graph_error & ~VERIFY_COMMIT_GRAPH_ERROR_HASH) > return verify_commit_graph_error; > > +

Re: What's cooking in git.git (Sep 2018, #03; Fri, 14)

2018-09-16 Thread Duy Nguyen
On Fri, Sep 14, 2018 at 11:56 PM Junio C Hamano wrote: > * jn/gc-auto (2018-07-17) 3 commits > - gc: do not return error for prior errors in daemonized mode > - gc: exit with status 128 on failure > - gc: improve handling of errors reading gc.log > > "gc --auto" ended up calling exit(-1) upon

Re: [PATCH v5 2/5] read-cache: load cache extensions on a worker thread

2018-09-15 Thread Duy Nguyen
On Sat, Sep 15, 2018 at 12:22 PM Duy Nguyen wrote: > Wait there's no way to disable this parallel reading? Does not sound > right. And if ordinary numbers mean the number of threads then 0 > should mean no threading. Auto detection could have a new keyword, > like 'auto'. My ba

Re: [PATCH v5 3/5] read-cache: load cache entries on worker threads

2018-09-15 Thread Duy Nguyen
On Wed, Sep 12, 2018 at 6:18 PM Ben Peart wrote: > #ifndef NO_PTHREADS > nr_threads = git_config_get_index_threads(); > - if (!nr_threads) > - nr_threads = online_cpus(); > + if (!nr_threads) { > + cpus = online_cpus(); > + nr_threads

Re: [PATCH v5 3/5] read-cache: load cache entries on worker threads

2018-09-15 Thread Duy Nguyen
On Sat, Sep 15, 2018 at 01:07:46PM +0200, Duy Nguyen wrote: > 12:50:00.084237 read-cache.c:1721 start loading index > 12:50:00.119941 read-cache.c:1943 performance: 0.034778758 s: loaded > all extensions (1667075 bytes) > 12:50:00.185352 read-cache.c:2029

Re: [PATCH v5 3/5] read-cache: load cache entries on worker threads

2018-09-15 Thread Duy Nguyen
On Wed, Sep 12, 2018 at 6:18 PM Ben Peart wrote: > > This patch helps address the CPU cost of loading the index by creating > multiple threads to divide the work of loading and converting the cache > entries across all available CPU cores. > > It accomplishes this by having the primary thread

Re: [PATCH v5 3/5] read-cache: load cache entries on worker threads

2018-09-15 Thread Duy Nguyen
On Wed, Sep 12, 2018 at 6:18 PM Ben Peart wrote: > > This patch helps address the CPU cost of loading the index by creating > multiple threads to divide the work of loading and converting the cache > entries across all available CPU cores. > > It accomplishes this by having the primary thread

Re: [PATCH v5 2/5] read-cache: load cache extensions on a worker thread

2018-09-15 Thread Duy Nguyen
On Sat, Sep 15, 2018 at 12:22 PM Duy Nguyen wrote: > > @@ -1944,6 +1993,26 @@ int do_read_index(struct index_state *istate, const > > char *path, int must_exist) > > istate->cache = xcalloc(istate->cache_alloc, > > sizeof(*istate->cache)); &g

Re: [PATCH v5 2/5] read-cache: load cache extensions on a worker thread

2018-09-15 Thread Duy Nguyen
On Wed, Sep 12, 2018 at 6:18 PM Ben Peart wrote: > > This patch helps address the CPU cost of loading the index by loading > the cache extensions on a worker thread in parallel with loading the cache > entries. > > In some cases, loading the extensions takes longer than loading the > cache

Re: [PATCH v5 1/5] eoie: add End of Index Entry (EOIE) extension

2018-09-15 Thread Duy Nguyen
On Wed, Sep 12, 2018 at 6:18 PM Ben Peart wrote: > > The End of Index Entry (EOIE) is used to locate the end of the variable > length index entries and the beginning of the extensions. Code can take > advantage of this to quickly locate the index extensions without having > to parse through all

Re: Temporary git files for the gitdir created on a separate drive in workdir

2018-09-11 Thread Duy Nguyen
On Mon, Sep 10, 2018 at 12:27 PM Hultqvist wrote: > > Sending again without HTML > > Den mån 10 sep. 2018 kl 12:28 skrev Hultqvist : > > > > First I need to correct my previous observations. Please don't top-post. > > Today there appeared new set of config files in the root. > > I looked into a

Re: [PATCH v3 14/23] patch-ids.c: remove implicit dependency on the_index

2018-09-11 Thread Duy Nguyen
On Mon, Sep 10, 2018 at 8:50 PM Stefan Beller wrote: > > On Sun, Sep 9, 2018 at 1:54 AM Nguyễn Thái Ngọc Duy wrote: > > > > --- > > Junio would have to forge your Sign off here? I _knew_ I missed something in that "git format-patch" command but couldn't figure out what! Will resend (I have to

Re: Help on autocompletion not localized?

2018-09-11 Thread Duy Nguyen
On Tue, Sep 11, 2018 at 2:55 PM Jean-Noël Avila wrote: > > Hi, > > > When invoking the autocompletion help with after a double > hyphen under zsh, the help list is not localized. I guess the help list > comes from some usage output of the on-going git command, but I wasn't > able to find where

Re: [PATCH 0/6] Merge remaining t/helper binaries to test-tool

2018-09-09 Thread Duy Nguyen
On Sun, Sep 9, 2018 at 8:09 PM Ævar Arnfjörð Bjarmason wrote: > > > On Sun, Sep 09 2018, Nguyễn Thái Ngọc Duy wrote: > > > Last time when I added test-tool in 27f25845cf (Merge branch > > 'nd/combined-test-helper' - 2018-04-11) I left out a few test programs > > because there were a couple

Re: [PATCH v2 24/24] Rename functions to avoid breaking in-flight topics

2018-09-09 Thread Duy Nguyen
On Wed, Sep 5, 2018 at 11:04 PM Junio C Hamano wrote: > > now and here, but at some later date, we would want to > > 'git revert 24/24' after fixing all in-flights of today. > > No. We do not want to revert the whole thing. > > If the function that takes a_repository is called repo_rerere(), as

Re: [PATCH 12/21] patch-ids.c: remove implicit dependency on the_index

2018-09-09 Thread Duy Nguyen
On Tue, Sep 4, 2018 at 9:54 PM Stefan Beller wrote: > > On Mon, Sep 3, 2018 at 11:03 AM Duy Nguyen wrote: > > > > On Mon, Aug 27, 2018 at 9:13 PM Stefan Beller wrote: > > > > > > > -int init_patch_ids(struct patch_ids *ids) > > > > +int init

Re: [RFC PATCH 5/5] split-index: smudge and add racily clean cache entries to split index

2018-09-08 Thread Duy Nguyen
On Thu, Sep 6, 2018 at 4:48 AM SZEDER Gábor wrote: > > Ever since the split index feature was introduced [1], refreshing a > split index is prone to a variant of the classic racy git problem. > > Consider the following sequence of commands updating the split index > when the shared index contains

Re: [PATCH 1/5] t1700-split-index: drop unnecessary 'grep'

2018-09-08 Thread Duy Nguyen
On Thu, Sep 6, 2018 at 4:48 AM SZEDER Gábor wrote: > > The test 'disable split index' in 't1700-split-index.sh' runs the > following pipeline: > > cmd | grep | sed s/// > > Drop that 'grep' from the pipeline, and let 'sed' take over its > duties. Years of using sed and I never realized -n

Re: Temporary git files for the gitdir created on a separate drive in workdir

2018-09-08 Thread Duy Nguyen
On Sat, Sep 8, 2018 at 3:09 PM Duy Nguyen wrote: > > On Sat, Sep 8, 2018 at 11:28 AM Hultqvist wrote: > > > > The bash commands are using a git and bash bundle that was installed > > in parallel with gitextensions(a gui for git) > > > > G:\Min enhet> set

Re: [PATCH] config.mak.dev: add -Wformat-security

2018-09-08 Thread Duy Nguyen
On Fri, Sep 7, 2018 at 8:21 PM Jeff King wrote: > > We currently build cleanly with -Wformat-security, and it's > a good idea to make sure we continue to do so (since calls > that trigger the warning may be security vulnerabilities). Nice. I had this flag in my config.mak too before switching to

Re: [RFC PATCH v4 2/3] Show the call history when an alias is looping

2018-09-08 Thread Duy Nguyen
On Sat, Sep 8, 2018 at 12:44 AM Tim Schumacher wrote: > > Just printing the command that the user entered is not particularly > helpful when trying to find the alias that causes the loop. > > Print the history of substituted commands to help the user find the > offending alias. Mark the

Re: [RFC PATCH v4 1/3] Add support for nested aliases

2018-09-08 Thread Duy Nguyen
On Sat, Sep 8, 2018 at 12:44 AM Tim Schumacher wrote: > + /* > +* It could be an alias -- this works around the insanity > * of overriding "git log" with "git show" by having > * alias.log = show > */ I think this

Re: [PATCH v3 0/4] read-cache: speed up index load through parallelization

2018-09-08 Thread Duy Nguyen
On Fri, Sep 7, 2018 at 7:21 PM Junio C Hamano wrote: > > Ben Peart writes: > > > On further investigation with the previous patch, I noticed that my test > > repos didn't contain the cache tree extension in their index. After doing a > > commit to ensure they existed, I realized that in some

Re: Temporary git files for the gitdir created on a separate drive in workdir

2018-09-08 Thread Duy Nguyen
On Sat, Sep 8, 2018 at 11:28 AM Hultqvist wrote: > > The bash commands are using a git and bash bundle that was installed > in parallel with gitextensions(a gui for git) > > G:\Min enhet> set GIT_TRACE_SETUP=1 > G:\Min enhet> git st > 10:40:28.881927 trace.c:318 setup: git_dir: >

Re: Temporary git files for the gitdir created on a separate drive in workdir

2018-09-08 Thread Duy Nguyen
On Fri, Sep 7, 2018 at 6:48 PM Junio C Hamano wrote: > > Hultqvist writes: > > > Considering that the gitdir could be located on a different drive than > > the workdir wouldn't it make more sense to create the temporary files > > in a subdirectory inside the gitdir rather tan in the workdir? > >

Re: [PATCH] merge-recursive: remove superfluous semicolon

2018-09-05 Thread Duy Nguyen
On Wed, Sep 5, 2018 at 6:49 PM Elijah Newren wrote: > > Signed-off-by: Elijah Newren > --- > Once I saw it, I couldn't unsee it, and it quickly started getting on my > nerves... Bad Elijah! Should have grepped and fixed all three ;-) $ git grep ';;$' -- '*.c' builtin/receive-pack.c:

Re: What's cooking in git.git (Sep 2018, #01; Tue, 4)

2018-09-05 Thread Duy Nguyen
On Wed, Sep 5, 2018 at 6:35 PM Junio C Hamano wrote: > > Junio C Hamano writes: > > > Here are the topics that have been cooking. Commits prefixed with > > '-' are only in 'pu' (proposed updates) while commits prefixed with > > '+' are in 'next'. The ones marked with '.' do not appear in any

Re: [RFC PATCH v2] Allow aliases that include other aliases

2018-09-05 Thread Duy Nguyen
On Wed, Sep 5, 2018 at 10:56 AM Tim Schumacher wrote: > > Aliases can only contain non-alias git commands and their > arguments, not other user-defined aliases. Resolving further > (nested) aliases is prevented by breaking the loop after the > first alias was processed. Git then fails with a

Re: [PATCH] reopen_tempfile(): truncate opened file

2018-09-05 Thread Duy Nguyen
On Wed, Sep 5, 2018 at 5:35 PM Jeff King wrote: > > > + after=$(wc -c <.git/index) && > > > + > > > + # double check that the index shrank > > > + test $before -gt $after && > > > + > > > + # and that our index was not corrupted > > > + git fsck > > > > If the index

Re: [PATCH] reopen_tempfile(): truncate opened file

2018-09-05 Thread Duy Nguyen
On Wed, Sep 5, 2018 at 1:36 AM Jeff King wrote: > It turned out not to be too bad to write a test. It feels a little like > black magic, since I empirically determined a way in which the > cache-tree happens to shrink with the current code. Aha! I attempted to reproduce with a verylongpathname

Re: [PATCH v2 0/1] Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage

2018-09-04 Thread Duy Nguyen
On Tue, Sep 04, 2018 at 01:12:55PM -0400, Derrick Stolee wrote: > On 9/4/2018 12:49 PM, Duy Nguyen wrote: > > On Wed, Aug 29, 2018 at 2:49 PM Derrick Stolee via GitGitGadget > > wrote: > >> The commit-graph (and multi-pack-index) features are optional data > >

Re: [PATCH v2 0/1] Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage

2018-09-04 Thread Duy Nguyen
On Wed, Aug 29, 2018 at 2:49 PM Derrick Stolee via GitGitGadget wrote: > > The commit-graph (and multi-pack-index) features are optional data > structures that can make Git operations faster. Since they are optional, we > do not enable them in most Git tests. The commit-graph is tested in >

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-09-04 Thread Duy Nguyen
On Thu, Aug 30, 2018 at 7:22 PM Elijah Newren wrote: > > Hi Duy, > > On Tue, Aug 21, 2018 at 7:52 AM Duy Nguyen wrote: > > > > On Mon, Aug 20, 2018 at 8:16 PM Elijah Newren wrote: > > > Playing with sparse-checkout, it feels to me like a half-baked > > &g

Re: [PATCH v4 00/12] Hash-independent tests (part 3)

2018-09-04 Thread Duy Nguyen
On Tue, Sep 4, 2018 at 1:26 AM brian m. carlson wrote: > > This is the next in the series of improvements to make tests > hash-independent. If it helps, I looked over the series and didn't find anything questionable. -- Duy

Re: [BUG] index corruption with git commit -p

2018-09-04 Thread Duy Nguyen
On Tue, Sep 4, 2018 at 5:57 PM Junio C Hamano wrote: > > Jeff King writes: > > >> diff --git a/builtin/commit.c b/builtin/commit.c > >> index 2be7bdb331..60f30b3780 100644 > >> --- a/builtin/commit.c > >> +++ b/builtin/commit.c > >> @@ -432,6 +432,7 @@ static const char *prepare_index(int argc,

Re: [PATCH] read-cache.c: optimize reading index format v4

2018-09-04 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 12:36:27PM -0700, Junio C Hamano wrote: > > PS. I notice that v4 does not pad to align entries at 4 byte boundary > > like v2/v3. This could cause a slight slow down on x86 and segfault on > > some other platforms. > > Care to elaborate? > > Long time ago, we used to

Re: [PATCH] i18n: fix dangling dot in die() messages

2018-09-04 Thread Duy Nguyen
On Tue, Sep 4, 2018 at 5:08 PM Ævar Arnfjörð Bjarmason wrote: > > On Tue, Sep 4, 2018 at 4:59 PM Jean-Noel Avila wrote: > > Your commit message says "dangling dot"... > > > diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c > > index b56028ba9d..a011abfd7c 100644 > > ---

Re: [PATCH v2 2/3] read-cache: load cache extensions on worker thread

2018-09-03 Thread Duy Nguyen
On Mon, Sep 3, 2018 at 9:21 PM Duy Nguyen wrote: > > I used p0002-read-cache.sh to generate some performance data on the > > cumulative impact: > > > > 100,000 entries > > > > Test

Re: [PATCH v2 2/3] read-cache: load cache extensions on worker thread

2018-09-03 Thread Duy Nguyen
On Wed, Aug 29, 2018 at 5:25 PM Ben Peart wrote: > > This patch helps address the CPU cost of loading the index by loading > the cache extensions on a worker thread in parallel with loading the cache > entries. > > This is possible because the current extensions don't access the cache > entries

Re: [PATCH v2 1/3] read-cache: speed up index load through parallelization

2018-09-03 Thread Duy Nguyen
On Wed, Aug 29, 2018 at 5:25 PM Ben Peart wrote: > diff --git a/read-cache.c b/read-cache.c > index 7b1354d759..c30346388a 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -1889,16 +1889,229 @@ static size_t estimate_cache_size(size_t > ondisk_size, unsigned int entries) > return

test files with same names?

2018-09-03 Thread Duy Nguyen
We have these test files with the same description: t0410-partial-clone.sh t5616-partial-clone.sh t2000-checkout-cache-clash.sh t2001-checkout-cache-clash.sh t4134-apply-submodule.sh t4137-apply-submodule.sh t7500-commit.sh t7501-commit.sh t7502-commit.sh t7509-commit.sh partial-clone files, I

Re: [PATCH 12/21] patch-ids.c: remove implicit dependency on the_index

2018-09-03 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 9:13 PM Stefan Beller wrote: > > > -int init_patch_ids(struct patch_ids *ids) > > +int init_patch_ids(struct patch_ids *ids, struct repository *repo) > > { > > memset(ids, 0, sizeof(*ids)); > > - diff_setup(>diffopts, the_repository); > > +

Re: [PATCH] bisect.c: make show_list() build again

2018-09-03 Thread Duy Nguyen
On Sun, Sep 2, 2018 at 9:57 AM Christian Couder wrote: > > On Sun, Sep 2, 2018 at 9:42 AM, Nguyễn Thái Ngọc Duy > wrote: > > > In order to stop this from happening again, the function is now > > compiled unconditionally but exits early unless DEBUG_BISECT is > > non-zero. > > Thanks for going

Re: [PATCH v6] Implement --first-parent for git rev-list --bisect

2018-09-02 Thread Duy Nguyen
On Tue, Aug 28, 2018 at 6:45 PM Junio C Hamano wrote: > > @@ -146,10 +147,14 @@ static void show_list(const char *debug, int counted, > > int nr, > > An unrelated tangent, but I think I just spotted a bug in the > existing code on the line immediately before this hunk, which reads > >

Re: [BUG] index corruption with git commit -p

2018-09-02 Thread Duy Nguyen
On Sun, Sep 02, 2018 at 01:08:03AM -0400, Jeff King wrote: > On Sun, Sep 02, 2018 at 12:17:53AM +0200, Ævar Arnfjörð Bjarmason wrote: > > > > Here are the steps to reproduce it: > > > $ git clone git://github.com/lucvoo/sparse-dev.git > > > $ cd > > > $ git co index-corruption > > > $

Re: [PATCH 00/21] Kill the_index part 4

2018-08-28 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 7:32 PM Stefan Beller wrote: > > Besides some small conflicts on 'pu', like the previous part, it also > > breaks 'pu' because of API changes. The fix is trivial though, just > > prepend the_repository as the first argument for the broken function > > calls. > > This

Re: [PATCH 02/21] read-cache.c: remove 'const' from index_has_changes()

2018-08-28 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 8:37 PM Stefan Beller wrote: > > On Sun, Aug 26, 2018 at 3:03 AM Nguyễn Thái Ngọc Duy > wrote: > > > > This function calls do_diff_cache() which eventually needs to set this > > "istate" to unpack_options->src_index (*). This is an unfornate fact > > unfortunate > > >

Re: [PATCH] read-cache.c: optimize reading index format v4

2018-08-28 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 9:36 PM Junio C Hamano wrote: > > PS. I notice that v4 does not pad to align entries at 4 byte boundary > > like v2/v3. This could cause a slight slow down on x86 and segfault on > > some other platforms. > > Care to elaborate? > > Long time ago, we used to mmap and read

Re: Automatic core.autocrlf?

2018-08-27 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 5:37 PM Torsten Bögershausen wrote: > > In those cases, when it falls back to > > configuration for line ending management, I want it to be > > automatically configured based on the host platform. > > There is > git config core.eol native An alternative is supporting

Re: [PATCH v1] read-cache: speed up index load through parallelization

2018-08-24 Thread Duy Nguyen
On Fri, Aug 24, 2018 at 8:40 PM Ben Peart wrote: > > > > On 8/24/2018 2:20 PM, Duy Nguyen wrote: > > On Fri, Aug 24, 2018 at 5:37 PM Duy Nguyen wrote: > >> On Thu, Aug 23, 2018 at 10:36 PM Ben Peart wrote: > >>>> Nice to see this done without a new i

Re: [PATCH v1] read-cache: speed up index load through parallelization

2018-08-24 Thread Duy Nguyen
On Thu, Aug 23, 2018 at 7:33 PM Stefan Beller wrote: > > +core.fastIndex:: > > + Enable parallel index loading > > ++ > > +This can speed up operations like 'git diff' and 'git status' especially > > +when the index is very large. When enabled, Git will do the index > > +loading from the

Re: [PATCH v1] read-cache: speed up index load through parallelization

2018-08-24 Thread Duy Nguyen
On Fri, Aug 24, 2018 at 5:37 PM Duy Nguyen wrote: > On Thu, Aug 23, 2018 at 10:36 PM Ben Peart wrote: > > > Nice to see this done without a new index extension that records > > > offsets, so that we can load existing index files in parallel. > > > > > > >

Re: [PATCH v1] read-cache: speed up index load through parallelization

2018-08-24 Thread Duy Nguyen
On Fri, Aug 24, 2018 at 05:37:20PM +0200, Duy Nguyen wrote: > Since we're cutting corners to speed things up, could you try > something like this? > > I notice that reading v4 is significantly slower than v2 and > apparently strlen() (at least from glibc) is much cleverer and at &

Re: [PATCH v1] read-cache: speed up index load through parallelization

2018-08-24 Thread Duy Nguyen
Since we're cutting corners to speed things up, could you try something like this? I notice that reading v4 is significantly slower than v2 and apparently strlen() (at least from glibc) is much cleverer and at least gives me a few percentage time saving. diff --git a/read-cache.c b/read-cache.c

Re: worktree duplicates, was: [PATCH] SubmittingPatches: mention doc-diff

2018-08-24 Thread Duy Nguyen
Jeff, you're doing crazy things beyond my (admittedly very limited) imagination :P I did not see this at all when I implemented the worktree stuff. On Thu, Aug 23, 2018 at 8:21 PM Eric Sunshine wrote: > > > In this case, it might make sense for "git worktree add" to refuse to > > > operate if an

Re: [PATCH/RFC] commit: new option to abort -a something is already staged

2018-08-24 Thread Duy Nguyen
On Fri, Aug 24, 2018 at 5:02 AM Jacob Keller wrote: > > On Thu, Aug 23, 2018 at 9:28 AM Junio C Hamano wrote: > > I think the above example forgets "-a" on the final "git commit" > > step. With it added, I can understand the concern (and I am sure > > you would, too). > > > > The user is trying

Re: [PATCH/RFC] commit: new option to abort -a something is already staged

2018-08-23 Thread Duy Nguyen
On Thu, Aug 23, 2018 at 4:15 AM Jonathan Nieder wrote: > > The remaining question becomes scripts. A script might do > > > > ... modify old-file and create new-file ... > > git add new-file > > git commit -m "some great message" > > > > which would trip this error. For that

Re: [ANNOUNCE] Git v2.19.0-rc0

2018-08-22 Thread Duy Nguyen
On Wed, Aug 22, 2018 at 6:49 PM Derrick Stolee wrote: > > On 8/22/2018 12:26 PM, Jeff King wrote: > > On Wed, Aug 22, 2018 at 06:14:24PM +0200, Duy Nguyen wrote: > > > >> On Wed, Aug 22, 2018 at 6:08 PM Duy Nguyen wrote: > >>> On Wed, Aug 22, 2018 at 6:03

Re: [ANNOUNCE] Git v2.19.0-rc0

2018-08-22 Thread Duy Nguyen
On Wed, Aug 22, 2018 at 6:08 PM Duy Nguyen wrote: > > On Wed, Aug 22, 2018 at 6:03 PM Jeff King wrote: > > > > On Wed, Aug 22, 2018 at 07:14:42AM -0400, Derrick Stolee wrote: > > > > > The other thing I was going to recommend (and I'll try to test this

Re: [ANNOUNCE] Git v2.19.0-rc0

2018-08-22 Thread Duy Nguyen
On Wed, Aug 22, 2018 at 6:03 PM Jeff King wrote: > > On Wed, Aug 22, 2018 at 07:14:42AM -0400, Derrick Stolee wrote: > > > The other thing I was going to recommend (and I'll try to test this out > > myself later) is to see if 'the_hash_algo->rawsz' is being treated as a > > volatile variable,

Re: [PATCH] config: fix commit-graph related config docs

2018-08-22 Thread Duy Nguyen
On Wed, Aug 22, 2018 at 3:18 PM Derrick Stolee wrote: > > The core.commitGraph config setting was accidentally removed from > the config documentation. In that same patch, the config setting > that writes a commit-graph during garbage collection was incorrectly > written to the doc as

Re: [PATCH v6 6/6] list-objects-filter: implement filter tree:0

2018-08-21 Thread Duy Nguyen
On Mon, Aug 20, 2018 at 8:38 PM Stefan Beller wrote: > > On Mon, Aug 20, 2018 at 6:18 AM Matthew DeVore wrote: > > > > There were many instances in this file where it seemed like BUG would be > > better, so I created a new commit before this one to switch them over. The > > interdiff is below. >

Re: Antw: Re: non-smooth progress indication for git fsck and git gc

2018-08-21 Thread Duy Nguyen
On Tue, Aug 21, 2018 at 3:13 AM Jeff King wrote: > I _think_ they should work together OK without further modification. > Once upon a time the caller had to say "don't show if we're past N% > after M seconds", but I think with the current code we'd just show it if > we're not completely finished

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-08-21 Thread Duy Nguyen
On Mon, Aug 20, 2018 at 8:16 PM Elijah Newren wrote: > Playing with sparse-checkout, it feels to me like a half-baked > feature. It seems like it required too much manual work, and it was > sometimes hard to tell if I was misunderstanding configuration rules > or I was just running into bugs in

Re: [PATCH/RFC] commit: new option to abort -a something is already staged

2018-08-21 Thread Duy Nguyen
On Mon, Aug 20, 2018 at 9:30 PM Jonathan Nieder wrote: > > Hi, > > Nguyễn Thái Ngọc Duy wrote: > > > So many times I have carefully cherry picked changes to the index with > > `git add -p` then accidentally did `git commit -am ` (usually by > > retrieving a command from history and pressing

Re: [PATCH 0/9] multi-pack-index cleanups

2018-08-21 Thread Duy Nguyen
On Mon, Aug 20, 2018 at 6:53 PM Derrick Stolee wrote: > To better understand the implications of the multi-pack-index with > other scenarios, I ran the test suite after adding a step to 'git repack' > to write a multi-pack-index, and to default core.multiPackIndex to 'true'. > This commit is

Re: [PATCH v7 09/16] fetch: support filters

2018-08-19 Thread Duy Nguyen
On Fri, Dec 8, 2017 at 5:00 PM Jeff Hostetler wrote: > > From: Jeff Hostetler > > Teach fetch to support filters. This is only allowed for the remote > configured in extensions.partialcloneremote. > > Signed-off-by: Jonathan Tan > --- > builtin/fetch.c | 23 +-- >

Re: [PATCH v5 0/7] Speed up unpack_trees()

2018-08-18 Thread Duy Nguyen
On Sun, Aug 19, 2018 at 12:01 AM Elijah Newren wrote: > > On Sat, Aug 18, 2018 at 7:41 AM Nguyễn Thái Ngọc Duy > wrote: > > > > v5 fixes some minor comments from round 4 and a big mistake in 5/5. > > Junio's scary feeling turns out true. There is a missing invalidation > > in keep_entry() which

Re: [PATCH v6 6/6] list-objects-filter: implement filter tree:0

2018-08-18 Thread Duy Nguyen
On Thu, Aug 16, 2018 at 1:54 AM Matthew DeVore wrote: > diff --git a/list-objects-filter.c b/list-objects-filter.c > index a0ba78b20..8e3caf5bf 100644 > --- a/list-objects-filter.c > +++ b/list-objects-filter.c > @@ -80,6 +80,55 @@ static void *filter_blobs_none__init( > return d; > } >

Re: [PATCH 7/7] submodule--helper: introduce new update-module-mode helper

2018-08-18 Thread Duy Nguyen
On Tue, Aug 14, 2018 at 12:45 AM Stefan Beller wrote: > +static int module_update_module_mode(int argc, const char **argv, const char > *prefix) > +{ > + const char *path, *update = NULL; > + int just_cloned; > + struct submodule_update_strategy update_strategy = { .type = >

Re: [GSoC][PATCH v7 05/26] stash: convert apply to builtin

2018-08-18 Thread Duy Nguyen
On Wed, Aug 8, 2018 at 9:00 PM Paul-Sebastian Ungureanu wrote: > + strbuf_init(>revision, 0); > + if (!commit) { > + if (!ref_exists(ref_stash)) { > + free_stash_info(info); > + fprintf_ln(stderr, "No stash entries found.");

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