Re: git status OOM on mmap of large file

2019-01-24 Thread Duy Nguyen
On Thu, Jan 24, 2019 at 7:11 PM Jeff King wrote: > > On Tue, Jan 22, 2019 at 06:07:14PM -0400, Joey Hess wrote: > > > joey@darkstar:~/tmp/t> ls -l big-file > > -rw-r--r-- 1 joey joey 11811160064 Jan 22 17:48 big-file > > joey@darkstar:~/tmp/t> git status > > fatal: Out of memory, realloc failed >

Re: [PATCH v3 7/8] checkout: introduce --{,no-}overlay option

2019-01-25 Thread Duy Nguyen
On Fri, Jan 25, 2019 at 9:26 AM Jonathan Nieder wrote: > > Junio C Hamano wrote: > > Jonathan Nieder writes: > > >> I find --ignore-removal fairly easy to understand, and I had no idea > >> what --overlay would mean. > >> > >> I realize this is just one user's experience. > > > > Exactly. My imp

Re: [PATCH 2/2] Setup working tree in describe

2019-01-26 Thread Duy Nguyen
On Sat, Jan 26, 2019 at 5:44 PM Sebastian Staudt wrote: > > This ensures the given working tree is used for --dirty and --broken. > > Signed-off-by: Sebastian Staudt > --- > builtin/describe.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/builtin/describe.c b/builtin/describe.c > in

Re: [PATCH] fetch: prefer suffix substitution in compact fetch.output

2019-01-26 Thread Duy Nguyen
On Sat, Jan 26, 2019 at 4:36 AM Junio C Hamano wrote: > > Nguyễn Thái Ngọc Duy writes: > > > I have a remote named "jch" and it has a branch with the same name. And > > fetch.output is set to "compact". Fetching this remote looks like this > > > > From https://github.com/gitster/git > > + eb7

Re: [PATCH v2 1/3] Add tests for describe with --work-tree

2019-01-26 Thread Duy Nguyen
On Sun, Jan 27, 2019 at 3:51 AM Sebastian Staudt wrote: > > The dirty ones are already passing, but just because describe is comparing > with the wrong working tree. > > Signed-off-by: Sebastian Staudt > --- > t/t6120-describe.sh | 24 > 1 file changed, 24 insertions(+)

Re: [PATCH v2 2/3] Setup working tree in describe

2019-01-26 Thread Duy Nguyen
On Sun, Jan 27, 2019 at 3:51 AM Sebastian Staudt wrote: > > This ensures the given working tree is used for --dirty. > > The implementation of --broken uses diff-index which calls > setup_work_tree() itself. It would be nice to have a test case covering --broken even if no fix is needed (so that

Re: [PATCH v2 3/3] Add test for describe with a bare repository

2019-01-26 Thread Duy Nguyen
On Sun, Jan 27, 2019 at 3:51 AM Sebastian Staudt wrote: > > This ensures that nothing breaks the basic functionality of describe for > bare repositories. Please note that --broken and --dirty need a working > tree. > > Signed-off-by: Sebastian Staudt > --- > t/t6120-describe.sh | 7 +++ > 1

Re: There should be a `.gitbless; file, protecting files from git clean

2019-01-27 Thread Duy Nguyen
On Mon, Jan 28, 2019 at 9:54 AM Sebastian Gniazdowski wrote: > > Hello, > Keepiing repo clean with `git clean -dxf' is a very pleasant experience. > However, ability to use it ends when one gets untracked but *wanted* files in > the repo, like an untracked TODO. > > Could a .gitbless file be a s

Re: [PATCH v2 1/3] Add tests for describe with --work-tree

2019-01-28 Thread Duy Nguyen
On Sun, Jan 27, 2019 at 08:13:51AM +0100, Sebastian Staudt wrote: > Am So., 27. Jan. 2019 um 01:07 Uhr schrieb Duy Nguyen : > > > > On Sun, Jan 27, 2019 at 3:51 AM Sebastian Staudt wrote: > > > > > > The dirty ones are already passing, but just because describe

Re: [PATCH/RFC] completion: complete refs in multiple steps

2019-01-28 Thread Duy Nguyen
On Tue, Jan 29, 2019 at 12:27 AM Jeff King wrote: > > On Mon, Jan 28, 2019 at 03:38:28PM +0100, SZEDER Gábor wrote: > > > > - __gitcomp_direct "$(__git_refs "$remote" "$track" "$pfx" "$cur_" > > > "$sfx")" > > > + __gitcomp_direct "$(__git_refs "$remote" "$track" "$pfx" "$cur_" > > > "$sfx"

Re: There should be a `.gitbless; file, protecting files from git clean

2019-01-28 Thread Duy Nguyen
On Mon, Jan 28, 2019 at 12:24 PM Sebastian Gniazdowski wrote: > > On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclo...@gmail.com) wrote: > > On Mon, Jan 28, 2019 at 9:54 AM Sebastian Gniazdowski > > wrote: > > > > > > Hello, > > > Could a .gitbles

Re: There should be a `.gitbless; file, protecting files from git clean

2019-01-28 Thread Duy Nguyen
On Mon, Jan 28, 2019 at 10:30 PM Sebastian Gniazdowski wrote: > > > > On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclo...@gmail.com) wrote: > > There's a patch that adds "precious" git attribute [1]. I was going to > > resend once the backup-log [2

Re: [PATCH v2] checkout: print something when checking out paths

2019-01-28 Thread Duy Nguyen
On Tue, Jan 29, 2019 at 4:58 AM Junio C Hamano wrote: > One small bug I saw since this was merged is that the message that > is given when unmerging, i.e. > > git merge other-branch ;# conflicts > git checkout --m > > is misleading. It gives the same "checked out ... out of the

Re: t5702 failing under ASan on master

2019-01-30 Thread Duy Nguyen
On Wed, Jan 30, 2019 at 3:59 PM brian m. carlson wrote: > > It looks like t5702 is failing on master under ASan (output below). It > bisects to the merge of my sha-256 series, but the error makes it look > like it's unrelated. I'm wondering if we just happened to have a > different memory layout w

Re: [PATCH 08/19] checkout: split part of it to new command switch

2019-01-30 Thread Duy Nguyen
On Thu, Jan 31, 2019 at 7:50 AM Eric Sunshine wrote: > > On Wed, Jan 30, 2019 at 4:49 AM Nguyễn Thái Ngọc Duy > wrote: > > "git checkout" doing too many things is a source of confusion for many > > users (and it even bites old timers sometimes). To remedy that, the > > command will be split into

Re: [PATCH 6/8] checkout: add --cached option

2019-01-30 Thread Duy Nguyen
On Wed, Dec 12, 2018 at 2:23 AM Duy Nguyen wrote: > > On Tue, Dec 11, 2018 at 7:12 AM Elijah Newren wrote: > > > > On Mon, Dec 10, 2018 at 7:13 PM Junio C Hamano wrote: > > > > > > Duy Nguyen writes: > > > > > > > Elijah wan

Re: [PATCH 08/19] checkout: split part of it to new command switch

2019-01-30 Thread Duy Nguyen
On Thu, Jan 31, 2019 at 1:25 PM Eric Sunshine wrote: > I find, however, that the top-level git-switch "DESCRIPTION" section, > which talks about "switching branches" doesn't actually ever explain > what it means to "switch" to a branch. Even adding a simple sentence > stating that "switching to a

Re: [PATCH] git-commit.txt: better description what it does

2019-01-31 Thread Duy Nguyen
On Thu, Jan 31, 2019 at 5:49 PM Eric Sunshine wrote: > > On Thu, Jan 31, 2019 at 4:21 AM Nguyễn Thái Ngọc Duy > wrote: > > The description of git-commit jumps right into the commit content, which > > is important, but it fails to mention how the commit is "added" to the > > repository. Update th

Re: [PATCH 19/19] doc: promote "git switch"

2019-01-31 Thread Duy Nguyen
On Thu, Jan 31, 2019 at 2:39 PM Eric Sunshine wrote: > > diff --git a/builtin/clone.c b/builtin/clone.c > > @@ -491,7 +491,7 @@ static enum { > > static const char junk_leave_repo_msg[] = > > N_("Clone succeeded, but checkout failed.\n" > > "You can inspect what was checked out with 'git sta

Re: [PATCH 00/19] Add new command "switch"

2019-01-31 Thread Duy Nguyen
On Thu, Jan 31, 2019 at 8:37 PM SZEDER Gábor wrote: > > On Wed, Jan 30, 2019 at 04:48:12PM +0700, Nguyễn Thái Ngọc Duy wrote: > > The > > only one left is adding options similar to "git reset" (but with > > better names this time than --soft and --hard, hopefully). > > Oh no, what for?! As the co

Re: [PATCH 6/8] checkout: add --cached option

2019-01-31 Thread Duy Nguyen
On Fri, Feb 1, 2019 at 2:05 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > > I've changed my mind. I'm not using --index and --cached for "git > > restore" (formerly "git restore-files"). So how about this? > > > > gi

Re: Worktree creation race

2019-01-31 Thread Duy Nguyen
Thanks for including me. Apparently I did miss some emails :) On Fri, Feb 1, 2019 at 1:27 PM Eric Sunshine wrote: > > On Mon, Jan 28, 2019 at 7:58 AM Marketa Calabkova wrote: > > On 15/01/2019 15:03, Marketa Calabkova wrote: > > > I am writing to report a bug. The original report is from my coll

Re: [PATCH] help: align the longest command in the command listing

2019-02-01 Thread Duy Nguyen
On Fri, Feb 1, 2019 at 2:42 PM Johannes Schindelin wrote: > > diff --git a/help.c b/help.c > > index ff05fd22df..520c9080e8 100644 > > --- a/help.c > > +++ b/help.c > > @@ -85,7 +85,8 @@ static void print_command_list(const struct cmdname_help > > *cmds, > > if (cmds[i].category & m

Re: Worktree creation race

2019-02-01 Thread Duy Nguyen
On Fri, Feb 01, 2019 at 02:06:43PM +0700, Duy Nguyen wrote: > worrying about races like this. The mkdir loop would be one way to go. > But I'm going to add a new option to let the user control this > directory name. This is necessary since this name is now exposed via > "

Re: [PATCH 6/8] checkout: add --cached option

2019-02-02 Thread Duy Nguyen
On Sat, Feb 2, 2019 at 12:57 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > > Of course we could just do --index and --worktree, each option > > restores the respective part. Then it's combinable (and extensible in > > the future). But then "gi

Re: [PATCH 00/19] Add new command "switch"

2019-02-02 Thread Duy Nguyen
On Fri, Feb 1, 2019 at 1:23 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > >> Adding '--soft|--hard' from 'git reset' would go in the opposite > >> direction. > > > > If it's about the confusion, I think we can avoid it. If it&

Re: [PATCH] http: cast result to FILE *

2019-02-02 Thread Duy Nguyen
On Sat, Feb 2, 2019 at 4:21 AM Junio C Hamano wrote: > > Dan McGregor writes: > > > Commit 8dd2e88a92 ("http: support file handles for HTTP_KEEP_ERROR", > > 2019-01-10) introduced an implicit assumption that rewind, fileno, and > > fflush are functions. At least on FreeBSD fileno is not, and as s

Re: [PATCH] fetch-pack: clear alternate shallow when complete

2019-02-04 Thread Duy Nguyen
On Mon, Feb 4, 2019 at 7:06 AM brian m. carlson wrote: > > When we write an alternate shallow file in update_shallow, we write it > into the lock file. The string stored in alternate_shallow_file is > copied from the lock file path, but it is freed the moment that the lock > file is closed, since

Re: [PATCH] diff-tree doc: correct & remove wrong documentation

2019-02-04 Thread Duy Nguyen
On Mon, Feb 4, 2019 at 5:36 PM Ævar Arnfjörð Bjarmason wrote: > > The documentation saying that diff-tree didn't support anything except > literal prefixes hasn't been true since > d38f28093e ("tree_entry_interesting(): support wildcard matching", > 2010-12-15), but this documentation was not upda

Re: [PATCH] http: cast result to FILE *

2019-02-04 Thread Duy Nguyen
On Mon, Feb 4, 2019 at 6:44 PM Johannes Schindelin wrote: > > Hi Duy, > > On Sat, 2 Feb 2019, Duy Nguyen wrote: > > > On Sat, Feb 2, 2019 at 4:21 AM Junio C Hamano wrote: > > > > > > Dan McGregor writes: > > > > > > > Commit

Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'

2019-03-28 Thread Duy Nguyen
On Wed, Mar 27, 2019 at 5:24 PM Phillip Wood wrote: > > On 26/03/2019 15:48, Elijah Newren wrote: > > On Tue, Mar 26, 2019 at 8:24 AM Duy Nguyen wrote: > >> On Tue, Mar 26, 2019 at 10:01 PM Elijah Newren wrote: > > > >> Yeah.. --ignore-in-proces

Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'

2019-03-29 Thread Duy Nguyen
On Fri, Mar 29, 2019 at 6:04 PM Phillip Wood wrote: > > I am especially concerned with the idea of > > having something like "git switch --ignore-in-progress > > --discard-changes" being used to quit merges or cherry-picks or > > reverts or even rebases. In my opinion, doing so is creating flags t

Re: Feature Request git clone shallow-include

2019-03-30 Thread Duy Nguyen
On Thu, Feb 21, 2019 at 7:06 AM Duy Nguyen wrote: > > > > On Thu, Feb 21, 2019 at 1:07 AM Joe Enzminger > > wrote: > > > > > > That is correct. What you suggest is actually what I tried (using > > > sha-1 syntax). For my purposes, excluding th

Re: Typo in the .gitignore docs?

2019-03-31 Thread Duy Nguyen
On Sun, Mar 31, 2019 at 2:53 AM Dr. Adam Nielsen wrote: > > Hi everyone, > > I think there is a typo in the gitignore docs. > > Its stated on https://git-scm.com/docs/gitignore that > > >If the pattern does not contain a slash /, Git treats it as a shell > >glob pattern and checks for a match agai

Re: Typo in the .gitignore docs?

2019-03-31 Thread Duy Nguyen
On Sun, Mar 31, 2019 at 4:54 PM Duy Nguyen wrote: > The "does not contain" is correct, but perhaps the wording is a bit > too easy to misunderstand. If you go back to the original version of > this document in cedb8d5d33 (Create a new manpage for the gitignore > format, and

Re: Typo in the .gitignore docs?

2019-03-31 Thread Duy Nguyen
sion > from there: Actually if you want to reach the git development community, this is the place. > Am So., 31. März 2019 um 11:54 Uhr schrieb Duy Nguyen : >> >> On Sun, Mar 31, 2019 at 2:53 AM Dr. Adam Nielsen wrote: >> > >> > Hi everyone, >>

Re: [PATCH] mailinfo: support Unicode scissors

2019-04-01 Thread Duy Nguyen
On Mon, Apr 1, 2019 at 5:03 AM Andrei Rybak wrote: > > 'git am --scissors' allows cutting a patch from an email at a scissors > line. Such a line should contain perforation, i.e. hyphens, and a > scissors symbol. Only ASCII graphics scissors '8<' '>8' '%<' '>%' are > recognized by 'git am --scis

Re: [PATCH 1/2] commit/reset: try to clean up sequencer state

2019-04-01 Thread Duy Nguyen
On Fri, Mar 29, 2019 at 11:32 PM Phillip Wood wrote: > > From: Phillip Wood > > When cherry-picking or reverting a sequence of commits and if the final > pick/revert has conflicts and the user uses `git commit` to commit the > conflict resolution and does not run `git cherry-pick --continue` then

Re: [PATCH] read-tree.txt: clarify --reset and worktree changes

2019-04-01 Thread Duy Nguyen
On Mon, Apr 1, 2019 at 5:47 PM Junio C Hamano wrote: > > Nguyễn Thái Ngọc Duy writes: > > > diff --git a/Documentation/git-read-tree.txt > > b/Documentation/git-read-tree.txt > > index 5c70bc2878..12a25bc954 100644 > > --- a/Documentation/git-read-tree.txt > > +++ b/Documentation/git-read-tree.

Re: Make the git codebase thread-safe

2019-04-01 Thread Duy Nguyen
On Tue, Apr 2, 2019 at 7:52 AM Matheus Tavares wrote: > I downloaded chromium to give it a try and got (on a machine with i7 and > SSD, running Manjaro Linux): > > - 17s on blame for a file with long history[2] > - 2m on blame for a huge file[3] > - 15s on log for both [2] and [3] > - 1s for git s

Re: test suite: why does git add large_file create a pack, rather than an object?

2019-04-02 Thread Duy Nguyen
On Mon, Apr 1, 2019 at 10:10 PM Philip Oakley wrote: > > hi Junio, > On 01/04/2019 11:47, Junio C Hamano wrote: > > Philip Oakley writes: > > > >> At the moment I'm using an extended _test_ case that starts by adding > >> a ~5.1Gb file and then using verify-pack, which aborts with an error. > >>

Re: Make the git codebase thread-safe

2019-04-02 Thread Duy Nguyen
On Tue, Apr 2, 2019 at 5:30 PM David Kastrup wrote: > > Duy Nguyen writes: > > > On Tue, Apr 2, 2019 at 7:52 AM Matheus Tavares > > wrote: > >> I downloaded chromium to give it a try and got (on a machine with i7 and > >> SSD, running Manjaro Linux): &

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

2019-04-03 Thread Duy Nguyen
On Wed, Apr 3, 2019 at 2:45 PM Junio C Hamano wrote: > > David Kastrup writes: > > > When a parent blob already has chunks queued up for blaming, dropping > > the blob at the end of one blame step will cause it to get reloaded > > right away, doubling the amount of I/O and unpacking when processi

Re: [PATCH] blame.c: don't drop origin blobs as eagerly

2019-04-03 Thread Duy Nguyen
On Wed, Apr 3, 2019 at 6:36 PM Jeff King wrote: > I suspect we could do even better by storing and reusing not just the > original blob between diffs, but the intermediate diff state (i.e., the > hashes produced by xdl_prepare(), which should be usable between > multiple diffs). That's quite a bit

Re: What's cooking in git.git (Apr 2019, #01; Thu, 4)

2019-04-04 Thread Duy Nguyen
On Thu, Apr 4, 2019 at 5:29 PM Junio C Hamano wrote: > * nd/precious (2019-04-01) 1 commit > - Introduce "precious" file concept > > "git clean" learned to pay attention to the 'precious' attributes > and keep untracked paths with the attribute instead of removing. > > Will merge to 'next'. T

Re: [PATCH v2 01/32] rebase: 'make coccicheck' cleanup

2019-04-05 Thread Duy Nguyen
On Fri, Apr 5, 2019 at 12:25 AM SZEDER Gábor wrote: > > On Wed, Apr 03, 2019 at 06:34:26PM +0700, Nguyễn Thái Ngọc Duy wrote: > > Signed-off-by: Nguyễn Thái Ngọc Duy > > --- > > builtin/rebase.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/builtin/rebase.c

Re: [PATCH v2 10/32] commit.c: add repo_get_commit_tree()

2019-04-05 Thread Duy Nguyen
On Fri, Apr 5, 2019 at 12:04 AM SZEDER Gábor wrote: > > struct object_id *get_commit_tree_oid(const struct commit *); > > > > /* > > diff --git a/contrib/coccinelle/commit.cocci > > b/contrib/coccinelle/commit.cocci > > index c49aa558f0..f5bc639981 100644 > > --- a/contrib/coccinelle/commit.coc

Re: [PATCH v2 2/2] diff: batch fetching of missing blobs

2019-04-05 Thread Duy Nguyen
On Sat, Mar 30, 2019 at 4:40 AM Jonathan Tan wrote: > > When running a command like "git show" or "git diff" in a partial clone, > batch all missing blobs to be fetched as one request. > > This is similar to c0c578b33c ("unpack-trees: batch fetching of missing > blobs", 2017-12-08), but for anothe

Re: [PATCH] fixup! diff: batch fetching of missing blobs

2019-04-05 Thread Duy Nguyen
On Sat, Apr 6, 2019 at 12:09 AM Jonathan Tan wrote: > > This is a fixup on the tip of jt/batch-fetch-blobs-in-diff (571debe1d9). > > I don't know if Junio has already merged this branch to next (he marked > this as "Will merge to 'next'" in the "What's Cooking" email, but when I > fetched, it hasn

Re: [RFC] TODO in read-cache.c

2019-04-06 Thread Duy Nguyen
On Sat, Apr 6, 2019 at 6:42 PM Kapil Jain wrote: > > i found some TODO tasks inside `read-cache.c` in `read_index_from()` > function. which says: > > /* > * TODO trace2: replace "the_repository" with the actual repo instance > that is associated with the given "istate". > */ > > this same TODO occ

Re: [RFC] TODO in read-cache.c

2019-04-06 Thread Duy Nguyen
On Sat, Apr 6, 2019 at 7:14 PM Kapil Jain wrote: > > In some cases, it will be simple. For example, if you have a look at > > repo_read_index(), it already knows what repo it handles, so you can > > just extend read_index_from() to take 'struct repository *' and pass > > 'repo' to it. > > > > Be c

Re: [RFC] TODO in read-cache.c

2019-04-06 Thread Duy Nguyen
On Sat, Apr 6, 2019 at 8:30 PM Kapil Jain wrote: > > On Sat, Apr 6, 2019 at 5:49 PM Duy Nguyen wrote: > > > > On Sat, Apr 6, 2019 at 7:14 PM Kapil Jain wrote: > > > > In some cases, it will be simple. For example, if you have a look at > > > > repo_r

Re: git glossary --help ?

2019-04-06 Thread Duy Nguyen
On Sun, Apr 7, 2019 at 12:31 AM Philip Oakley wrote: > > Following the discussions about the tag peeling issue, I thought to have > a look at what the git glossary says. > > I had it in my head that when the git guides were linked to the help > system, that the --help option provided a short circu

Re: [PATCH][RFC] read-cache: read_index_from() accepts repo as arg

2019-04-07 Thread Duy Nguyen
On Sun, Apr 07, 2019 at 01:07:12PM +0530, Kapil Jain wrote: > Signed-off-by: Kapil Jain > --- > > In read-cache, the read_index_from() function had a TODO task, this > patch completes that. This line at least should be above the "---" line (i.e. part of the commit message). > diff --git a/read-

Re: [PATCH][RFC] read-cache: read_index_from() accepts repo as arg

2019-04-07 Thread Duy Nguyen
On Sun, Apr 07, 2019 at 05:00:11PM +0700, Duy Nguyen wrote: > So, with something like a patch below (not tested), you should be able > to write > > worktrees = repo_get_worktrees(revs->repo, 0); > ... > struct repository *r = repo_worktree_init(wt

Re: [GSoC][RFC] Proposal: Make pack access code thread-safe

2019-04-07 Thread Duy Nguyen
On Mon, Apr 8, 2019 at 5:52 AM Christian Couder wrote: > > Git has a very optimized mechanism to compactly store > > objects (blobs, trees, commits, etc.) in packfiles[2]. These files are > > created by[3]: > > > > 1. listing objects; > > 2. sorting the list with some good heuristics; > > 3. trave

Re: Pull without fetch

2019-04-07 Thread Duy Nguyen
On Mon, Apr 8, 2019 at 8:34 AM Junio C Hamano wrote: > > Damien Robert writes: > > > is there a way to do a git pull without it running git fetch? > > Looking at the source in builtin/pull.c does not seem to indicate so. > > The reason behind that is because it does not make any sense for > "pull

Re: [GSoC][RFC] Proposal: Make pack access code thread-safe

2019-04-07 Thread Duy Nguyen
On Mon, Apr 8, 2019 at 8:23 AM Duy Nguyen wrote: > > On Mon, Apr 8, 2019 at 5:52 AM Christian Couder > wrote: > > > Git has a very optimized mechanism to compactly store > > > objects (blobs, trees, commits, etc.) in packfiles[2]. These files are > > > c

Re: [PATCH] fixup! diff: batch fetching of missing blobs

2019-04-08 Thread Duy Nguyen
On Mon, Apr 8, 2019 at 11:06 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > >> Avoid a usage of the_repository by propagating the configured repository > >> to add_if_missing(). Also, prefetch only if the repository being diffed > >> is the_reposi

Re: [GSoC][RFC] discussion about stashing with conflicts

2019-04-08 Thread Duy Nguyen
On Mon, Apr 8, 2019 at 12:49 PM Kapil Jain wrote: > > On Mon, Apr 8, 2019 at 12:09 AM Thomas Gummerer wrote: > > > > On 04/07, Kapil Jain wrote: > > > > > > what is the use of ce_stage macro ? > > > tells about stage of an index entry. > > > if ce_stage says, stage #0 i.e staging area, then that

Re: [GSoC][RFC] discussion about stashing with conflicts

2019-04-08 Thread Duy Nguyen
On Mon, Apr 8, 2019 at 6:00 PM Kapil Jain wrote: > for finding that commit message did you do something like this: > git log -L :repo_read_index_unmerged:read-cache.c No. I'm old fashioned. I just do "git log --patch --follow " then search read_index_unmerged, which should at least appear in the

Re: Pull without fetch

2019-04-08 Thread Duy Nguyen
On Mon, Apr 8, 2019 at 7:51 PM Ævar Arnfjörð Bjarmason wrote: > > > On Mon, Apr 08 2019, Duy Nguyen wrote: > > > On Mon, Apr 8, 2019 at 8:34 AM Junio C Hamano wrote: > >> > >> Damien Robert writes: > >> > >> > is there a way to do a git

Re: [GSoC] [RFC] stashing unmerged index entries

2019-04-09 Thread Duy Nguyen
On Tue, Apr 9, 2019 at 3:16 PM Kapil Jain wrote: > > Reference: > https://git.github.io/SoC-2019-Ideas/#teach-git-stash-to-handle-unmerged-index-entries > > "When the index is unmerged, git stash refuses to do anything. That is > unnecessary, though, as it could easily craft e.g. an octopus merge

Re: [PATCH v1 01/11] checkout: split part of it to new command 'restore'

2019-04-09 Thread Duy Nguyen
(since 'git switch' is basically done, let's get back to 'git restore') On Sun, Mar 10, 2019 at 1:27 AM Elijah Newren wrote: > > On Sat, Mar 9, 2019 at 4:16 AM Duy Nguyen wrote: > > On Sat, Mar 9, 2019 at 1:01 AM Elijah Newren wrote: > > > >

Re: [RFC PATCH] pack-objects: write objects packed to trace2

2019-04-09 Thread Duy Nguyen
On Wed, Apr 10, 2019 at 4:45 AM Jonathan Tan wrote: > > This is useful when investigating performance of pushes, and other times > when no progress information is written (because the pack is written to > stdout). > > Signed-off-by: Jonathan Tan > --- > We're trying to improve push performance, a

Re: [PATCH] Introduce "precious" file concept

2019-04-10 Thread Duy Nguyen
On Tue, Apr 9, 2019 at 6:31 PM Junio C Hamano wrote: > > @@ -193,9 +203,16 @@ static int remove_dirs(struct strbuf *path, const char > > *prefix, int force_flag, > > > > strbuf_setlen(path, len); > > strbuf_addstr(path, e->d_name); > > - if (lstat(path->buf

Re: regression AGAIN in output of git-pull --rebase --recurse-submodules=yes --quiet

2019-04-10 Thread Duy Nguyen
On Wed, Apr 10, 2019 at 06:41:05AM +, Robin H. Johnson wrote: > A year ago, I raised > as an issue, > which lead to commit commit a56771a668dd4963675914bc5da0e1e015952dae. > > The exact same workload somewhere between 2.18.0 and 2.19.0 has caused > the message to come back. I noticed it firs

Re: [PATCH v3 00/33] nd/sha1-name-c-wo-the-repository updates

2019-04-10 Thread Duy Nguyen
On Thu, Apr 11, 2019 at 3:56 AM Johannes Schindelin wrote: > > @@ > > + expression c; > > ++expression r; > > + expression s; > > + @@ > > +-- get_commit_tree(c) = s > > ++- repo_get_commit_tree(r, c) = s > > + + c->maybe_tree = s > > I think this is wrong, and ad

Re: [PATCH v1 11/11] doc: promote "git restore"

2019-04-11 Thread Duy Nguyen
On Wed, Mar 13, 2019 at 11:58 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > >> Just curious: At what point did git checkout become not commonly > >> used? Git switch and git restore are not yet in git as of 2.21.0, > >> which is rather current. Maybe

Re: [PATCH/RFC 0/2] Automate updating git-completion.bash a bit

2019-04-11 Thread Duy Nguyen

Re: [PATCH/RFC 0/2] Automate updating git-completion.bash a bit

2019-04-11 Thread Duy Nguyen
Sorry mistyped 'y', please ignore. On Thu, Apr 11, 2019 at 6:10 PM Duy Nguyen wrote: > > -- Duy

incorrect range-diff output?

2019-04-11 Thread Duy Nguyen
Try git range-diff from...to with those two branches from https://gitlab.com/pclouds/git.git. The interesting part is this diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt --- a/Documentation/gitcli.txt @@ -120,10 +111,11 @@ * linkgit:git-commit[1] to

Re: Bug(feature?) on git-diff-files

2019-04-11 Thread Duy Nguyen
On Thu, Apr 11, 2019 at 7:49 PM NoName Req wrote: > > Summary >`git -C (folder path) diff-files --name-only` output is not correct > > Steps to Reproduce > 1. Apply change to a clean git repository. Go to another folder (not > within this repository) and apply the command >`git -C repo-pat

Re: incorrect range-diff output?

2019-04-12 Thread Duy Nguyen
On Fri, Apr 12, 2019 at 5:05 AM Thomas Gummerer wrote: > I'm not sure what the right solution for this is. I think one thing > I'd like range-diff to do is to add the filename, or some context > (e.g. is this part of the commit message etc.) to the @@ line (not > sure what that is called?). I do

Re: regression AGAIN in output of git-pull --rebase --recurse-submodules=yes --quiet

2019-04-12 Thread Duy Nguyen
On Fri, Apr 12, 2019 at 2:09 PM Robin H. Johnson wrote: > > -- 8< -- > (snip patch, please add my DCO signed-off-by) > Tested-by: Robin H. Johnson > Signed-off-by: Robin H. Johnson > > -- 8< -- > > > > I'm a bit reluctant to follow up with a proper patch because I can't > > digest the t5572-subm

Re: [PATCH] Introduce "precious" file concept

2019-04-13 Thread Duy Nguyen
I've had enough. Please drop this nd/precious. I'm not updating it anymore. On Sat, Apr 13, 2019 at 4:54 AM Ævar Arnfjörð Bjarmason wrote: > > > On Tue, Apr 09 2019, Nguyễn Thái Ngọc Duy wrote: > > > Here's the replacement patch that keeps "git clean" behavior the same > > as before and only ch

Re: [PATCH v2 00/16] Add new command 'restore'

2019-04-13 Thread Duy Nguyen
On Fri, Apr 12, 2019 at 12:14 PM Junio C Hamano wrote: > > - git-rm learns about --staged as an alias of --cached (in fact it's > > more the other way around). This is to keep suggestions consistent > > because we tell people to do "git foo --staged" everywhere. > > I am not sure 100% about th

Re: [PATCH v3 00/33] nd/sha1-name-c-wo-the-repository updates

2019-04-13 Thread Duy Nguyen
On Sat, Apr 13, 2019 at 7:14 PM SZEDER Gábor wrote: > > On Fri, Apr 12, 2019 at 04:25:08PM +0200, Johannes Schindelin wrote: > > Hi, > > > > On Fri, 12 Apr 2019, SZEDER Gábor wrote: > > > > > On Thu, Apr 11, 2019 at 10:58:57PM +0200, SZEDER Gábor wrote: > > > > On Thu, Apr 11, 2019 at 10:51:46PM +

Re: regression AGAIN in output of git-pull --rebase --recurse-submodules=yes --quiet

2019-04-16 Thread Duy Nguyen
On Tue, Apr 16, 2019 at 1:31 PM Paul Morelle wrote: >> The problem here is the option parser of this command would try to >> parse all options, so it considers both --quiet the same thing and are >> to tell "submodule--foreach" to be quiet, the second --quiet is not >> part of the "git pull" comma

Re: [PATCH 07/14] parse-options: allow ll_callback with OPTION_CALLBACK

2019-04-16 Thread Duy Nguyen
On Mon, Apr 15, 2019 at 9:06 PM Derrick Stolee wrote: > > On 1/26/2019 7:35 PM, Nguyễn Thái Ngọc Duy wrote: > > @@ -238,7 +249,10 @@ static enum parse_opt_result parse_short_opt(struct > > parse_opt_ctx_t *p, > > len++; > > arg = xmemdupz(p->opt, len); > >

Re: What's cooking in git.git (Apr 2019, #03; Tue, 16)

2019-04-17 Thread Duy Nguyen
On Tue, Apr 16, 2019 at 9:51 PM Ævar Arnfjörð Bjarmason wrote: > > * nd/precious (2019-04-09) 1 commit > > - Introduce "precious" file concept > > > > "git clean" learned to pay attention to the 'precious' attributes > > and keep untracked paths with the attribute instead of removing > > when

Re: [PATCH v2 00/16] Add new command 'restore'

2019-04-17 Thread Duy Nguyen
On Thu, Apr 11, 2019 at 8:12 PM Nguyễn Thái Ngọc Duy wrote: > > This is the companion of "git switch" and is based on that topic. > This command peforms the "checkout paths" from git-checkout, git-reset > and also has a third mode to reset only worktree, leaving the index > alone. It does not hav

Re: [PATCH v2] parse-options: don't emit "ambiguous option" for aliases

2019-04-17 Thread Duy Nguyen
On Wed, Apr 17, 2019 at 7:44 PM Ævar Arnfjörð Bjarmason wrote: > > Change the option parsing machinery so that e.g. "clone --recurs ..." > doesn't error out because "clone" understands both "--recursive" and > "--recurse-submodules" to mean the same thing. > > Initially "clone" just understood --r

Re: [PATCH v2] parse-options: don't emit "ambiguous option" for aliases

2019-04-18 Thread Duy Nguyen
On Thu, Apr 18, 2019 at 09:48:39AM +0900, Junio C Hamano wrote: > > But on the other hand I can see it's a bit more work to teach > > parse-options OPT_ALIAS to say "--recursive is just an alias of > > --recurse-submodules" and chances of --recursive-hard coming up are > > probably very low. > > T

Re: [PATCH v2 00/16] Add new command 'restore'

2019-04-18 Thread Duy Nguyen
On Thu, Apr 18, 2019 at 7:38 AM Junio C Hamano wrote: > It would be an excellent addition to "restore-path" (and also to > "checkout [ [--]] pathspec") to give "--dry-run". Not > just because it is destructive, but because unlike "reset --hard", > it is selectively destructive. Having a way to m

Re: [PATCH] worktree: update is_bare heuristics

2019-04-18 Thread Duy Nguyen
On Thu, Apr 18, 2019 at 4:22 AM Jonathan Tan wrote: > > When "git branch -D " is run, Git usually first checks if that > branch is currently checked out. But this check is not performed if the > Git directory of that repository is not at "/.git", which is the > case if that repository is a submodu

Re: [PATCH v2 00/16] Add new command 'restore'

2019-04-18 Thread Duy Nguyen
On Thu, Apr 18, 2019 at 5:03 PM Johannes Schindelin wrote: > > Hi, > > On Thu, 18 Apr 2019, Junio C Hamano wrote: > > > Duy Nguyen writes: > > > > > On Thu, Apr 11, 2019 at 8:12 PM Nguyễn Thái Ngọc Duy > > > wrote: > > >> > > >

Re: [PATCH] worktree: update is_bare heuristics

2019-04-18 Thread Duy Nguyen
On Fri, Apr 19, 2019 at 1:42 AM Jeff King wrote: > > On Thu, Apr 18, 2019 at 11:30:00AM -0700, Jonathan Tan wrote: > > > > > strbuf_add_absolute_path(&worktree_path, get_git_common_dir()); > > > > - is_bare = !strbuf_strip_suffix(&worktree_path, "/.git"); > > > > - if (is_bare)

Re: [PATCH 4/3] untracked-cache: use FLEX_ALLOC to create internal structs

2019-04-19 Thread Duy Nguyen
On Fri, Apr 19, 2019 at 4:24 AM Jeff King wrote: > > On Thu, Apr 18, 2019 at 05:14:08PM -0400, Jeff King wrote: > > > Just so we don't forget about it, I wrote this fix up as a patch. And in > > fact it led to a few other cleanups. I think the first one is definitely > > worth doing now, even if t

Re: [PATCH] worktree: update is_bare heuristics

2019-04-19 Thread Duy Nguyen
On Fri, Apr 19, 2019 at 1:30 AM Jonathan Tan wrote: > > > You actually didn't spell out the problem with "git branch -D", or at > > least the consequence (i.e. the submodule branch is deleted even if > > it's checked out). > > Thanks - I'll do that in the commit message. Another minor nit (becaus

Re: gettext, multiple Preferred languages, and English

2019-04-21 Thread Duy Nguyen
On Sun, Apr 21, 2019 at 6:40 PM Andrew Janke wrote: > > Hi, Git folks, > > This is a follow-up to https://marc.info/?l=git&m=154757938429747&w=2. This says the problem with "en" detection has been fixed. Would upgrading gettext fix it? You would need to upgrade something (git or gettext) and if

Re: [PATCH] revisions.txt: mention ~ form

2019-04-22 Thread Duy Nguyen
On Mon, Apr 22, 2019 at 1:14 PM Denton Liu wrote: > > In revisions.txt, the '^' form is mentioned but the '~' form > is missing. Although both forms are essentially equivalent (they each > get the first parent of the specified revision), we should mention the > latter for completeness. Make this c

Re: [PATCH] parse-options: don't emit "ambiguous option" for aliases

2019-04-22 Thread Duy Nguyen
On Mon, Apr 22, 2019 at 7:23 PM Nguyễn Thái Ngọc Duy wrote: > @@ -574,6 +615,70 @@ static int show_gitcomp(struct parse_opt_ctx_t *ctx, > return PARSE_OPT_COMPLETE; > } > > +/* > + * Scan and may produce a new option[] array, which should be used > + * instead of the original 'options'. >

Re: Resolving deltas dominates clone time

2019-04-23 Thread Duy Nguyen
On Tue, Apr 23, 2019 at 11:45 AM Jeff King wrote: > > On Mon, Apr 22, 2019 at 09:55:38PM -0400, Jeff King wrote: > > > Here are my p5302 numbers on linux.git, by the way. > > > > Test jk/p5302-repeat-fix > >

Re: [PATCH] git-compat-util: work around for access(X_OK) under root

2019-04-23 Thread Duy Nguyen
On Tue, Apr 23, 2019 at 3:41 PM CHIGOT, CLEMENT wrote: > > On some OSes like AIX, access with X_OK is always true if launched under > root. > Add NEED_ACCESS_ROOT_HANDLER in order to use an access helper function. > It checks with stat if any executable flags is set when the current user > is root

Re: [PATCH 0/5] Multiple hook support

2019-04-24 Thread Duy Nguyen
On Wed, Apr 24, 2019 at 7:54 AM brian m. carlson wrote: > > Oftentimes, people want to use multiple of the same kind of hook. This > may be because software or a project they use requires a given hook, but > they would also like to have a custom hook, or because they're using > multiple pieces of

Re: [PATCH 0/5] Multiple hook support

2019-04-24 Thread Duy Nguyen
On Thu, Apr 25, 2019 at 6:41 AM brian m. carlson wrote: > > On Wed, Apr 24, 2019 at 04:49:54PM +0700, Duy Nguyen wrote: > > Heh you beat me to it. My config-hooks branch [1] has not been updated > > for half a year. I only skimmed through quickly so no useful comments, >

Re: [PATCH v6 15/27] switch: add --discard-changes

2019-04-25 Thread Duy Nguyen
On Thu, Apr 25, 2019 at 5:02 PM Phillip Wood wrote: > > On 29/03/2019 10:39, Nguyễn Thái Ngọc Duy wrote: > > --discard-changes is a better name than --force for this option since > > it's what really happens. > > I didn't realize when I suggested the name that --force overwrites > untracked files

Re: How to undo previously set configuration? (again)

2019-04-25 Thread Duy Nguyen
On Thu, Apr 25, 2019 at 5:08 PM Ævar Arnfjörð Bjarmason wrote: > >> Solving (1) without (2) feels like a bit of a missed opportunity to > >> me. Ideally, what I would like is > >> > >>i. A central registry of trustworthy Git hooks that can be upgraded > >> using the system package manag

Re: How to undo previously set configuration? (again)

2019-04-26 Thread Duy Nguyen
On Thu, Apr 25, 2019 at 9:36 PM Jonathan Nieder wrote: > > Hi, > > Ævar Arnfjörð Bjarmason wrote: > > > Because we don't have some general config facility for this it keeps > > coming up, and various existing/proposed options have their own little > > custom hacks for doing it, e.g. this for Barre

<    7   8   9   10   11   12   13   14   15   16   >