Re: [PATCH 1/2] fetch: avoid calling write_or_die()

2019-03-04 Thread Duy Nguyen
On Sun, Mar 3, 2019 at 11:55 PM Jeff King wrote: > > The write_or_die() function has one quirk that a caller might not > expect: when it sees EPIPE from the write() call, it translates that > into a death by SIGPIPE. This doesn't change the overall behavior (the > program exits either way), but it

Re: [PATCH v3] commit-tree: utilize parse-options api

2019-03-04 Thread Duy Nguyen
On Mon, Mar 4, 2019 at 3:02 AM Brandon Richardson wrote: > > Rather than parse options manually, which is both difficult to > read and error prone, parse options supplied to commit-tree > using the parse-options api. > > It was discovered that the --no-gpg-sign option was documented > but not impl

Re: [PATCH v3 1/1] worktree add: sanitize worktree names

2019-03-04 Thread Duy Nguyen
On Mon, Mar 04, 2019 at 06:19:15PM +0700, Duy Nguyen wrote: > On Wed, Feb 27, 2019 at 11:05 PM Jeff King wrote: > > > > On Wed, Feb 27, 2019 at 09:23:33AM -0500, Eric Sunshine wrote: > > > > > > If we just cared about saying "is this worktree name valid"

Re: [PATCH v3 1/1] worktree add: sanitize worktree names

2019-03-04 Thread Duy Nguyen
On Wed, Feb 27, 2019 at 11:05 PM Jeff King wrote: > > On Wed, Feb 27, 2019 at 09:23:33AM -0500, Eric Sunshine wrote: > > > > If we just cared about saying "is this worktree name valid", I'd suggest > > > actually constructing a sample refname with the worktree name embedded > > > in it and feeding

Re: [GSoC] Query regarding microproject

2019-03-03 Thread Duy Nguyen
On Mon, Mar 4, 2019 at 2:43 PM Junio C Hamano wrote: > > Umang Parmar writes: > > > I am interested in micro project "Add configuration options for > > some commonly used command-line”. So can you point me out to > > implementations of some current commands which have configuration > > options an

Re: Questions on GSoC 2019 Ideas

2019-03-03 Thread Duy Nguyen
On Sun, Mar 3, 2019 at 5:12 PM Duy Nguyen wrote: > This is a good point. My guess is the pack access consists of two > parts: deflate zlib, resolve delta objects (which is just another form s/deflate/inflate/ (i keep making this mistake) -- Duy

Re: Questions on GSoC 2019 Ideas

2019-03-03 Thread Duy Nguyen
On Sun, Mar 3, 2019 at 2:18 PM Christian Couder wrote: > One thing I am still worried about is if we are sure that adding > parallelism is likely to get us a significant performance improvement > or not. If the performance of this code is bounded by disk or memory > access, then adding parallelism

Re: Questions on GSoC 2019 Ideas

2019-03-03 Thread Duy Nguyen
On Sat, Mar 2, 2019 at 10:09 PM Thomas Gummerer wrote: > > On 03/01, Duy Nguyen wrote: > > On Fri, Mar 1, 2019 at 5:20 AM Christian Couder > > wrote: > > > > > > Hi Matheus, > > > > > > On Thu, Feb 28, 2019 at 10:46 PM Matheus Tavares Ber

Re: [BUG] completion.commands does not remove multiple commands

2019-03-01 Thread Duy Nguyen
On Sat, Mar 2, 2019 at 6:08 AM Jeff King wrote: > > On Fri, Mar 01, 2019 at 05:15:51PM -0500, Todd Zullinger wrote: > > > Hmm. The comments in list_cmds_by_config() made me wonder > > if not using a local repo config was intentional: > > > > /* > > * There's no actual repository

Re: Questions on GSoC 2019 Ideas

2019-03-01 Thread Duy Nguyen
On Fri, Mar 1, 2019 at 5:20 AM Christian Couder wrote: > > Hi Matheus, > > On Thu, Feb 28, 2019 at 10:46 PM Matheus Tavares Bernardino > wrote: > > > > I've been in the mailing list for a couple weeks now, mainly working > > on my gsoc micro-project[1] and in other patches that derived from it. >

Re: Tags from each remote in a separate "name-space"?

2019-02-28 Thread Duy Nguyen
On Thu, Feb 28, 2019 at 08:54:23AM +0300, Sergey Organov wrote: > Hello, > > How do I configure git to handle tags from remotes in a manner similar > to branches? > > Specifically, I want tag 'tag_name' from remote 'origin' to have local > name 'origin/tag_name', not 'tag_name', as it is by defau

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-27 Thread Duy Nguyen
On Wed, Feb 27, 2019 at 10:24 PM Brandon Richardson wrote: > > > +static int parse_file_arg_callback(const struct option *opt, > > > + const char *arg, int unset) > > > > I would suggest you do the same for -F, i.e. collect a string list of > > paths then do the heavy lifting afterwa

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-27 Thread Duy Nguyen
On Wed, Feb 27, 2019 at 7:36 PM SZEDER Gábor wrote: > > On Wed, Feb 27, 2019 at 06:49:53PM +0700, Duy Nguyen wrote: > > On Wed, Feb 27, 2019 at 6:37 PM SZEDER Gábor wrote: > > > > > > On Wed, Feb 27, 2019 at 06:07:42PM +0700, Duy Nguyen wrote: > > > >

Re: [WIP RFC PATCH v2 5/5] clone: use dir-iterator to avoid explicit dir traversal

2019-02-27 Thread Duy Nguyen
On Thu, Feb 28, 2019 at 12:40 AM Matheus Tavares Bernardino wrote: > > > @@ -463,7 +460,11 @@ static void copy_or_link_directory(struct strbuf > > > *src, struct strbuf *dest, > > > if (copy_file_with_time(dest->buf, src->buf, 0666)) > > > die_errno(_("fail

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-27 Thread Duy Nguyen
On Wed, Feb 27, 2019 at 6:37 PM SZEDER Gábor wrote: > > On Wed, Feb 27, 2019 at 06:07:42PM +0700, Duy Nguyen wrote: > > > It was discovered that the --no-gpg-sign option was documented > > > but not implemented in 55ca3f99, and the existing implementation > > >

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-27 Thread Duy Nguyen
On Wed, Feb 27, 2019 at 6:43 AM Brandon Richardson wrote: > > Hi Andrei, > > > > would attempt to translate the option as a tree oid.It was also > > > > Missing space after period. > > Oops, thanks for pointing that out. > > > > > > + { OPTION_CALLBACK, 'p', NULL, &parents, "parent", >

Re: [PATCH] commit-tree: utilize parse-options api

2019-02-27 Thread Duy Nguyen
On Wed, Feb 27, 2019 at 3:10 AM Brandon wrote: > > From: Brandon Richardson > > Rather than parse options manually, which is both difficult to > read and error prone, parse options supplied to commit-tree > using the parse-options api. > > It was discovered that the --no-gpg-sign option was docum

Re: [PATCH v3 1/1] t3600: use test_path_is_* functions

2019-02-27 Thread Duy Nguyen
On Wed, Feb 27, 2019 at 5:49 AM Rohit Ashiwal via GitGitGadget wrote: > > From: Rohit Ashiwal > > Replace `test -(d|f|e)` calls in t3600-rm.sh > > Previously we were using `test -(d|f|e)` to verify > the presence of a directory/file, but we already > have helper functions, viz, `test_path_is_dir`

Re: Do test-path_is_{file,dir,exists} make sense anymore with -x?

2019-02-27 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 11:10 PM Ævar Arnfjörð Bjarmason wrote: > > > On Tue, Feb 26 2019, Duy Nguyen wrote: > > > On Tue, Feb 26, 2019 at 8:42 PM Rohit Ashiwal via GitGitGadget > > wrote: > >> > >> From: Rohit Ashiwal > >> > >> t3600-

Re: [PATCH 1/1] tests: replace `test -(d|f)` with test_path_is_(dir|file)

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 8:42 PM Rohit Ashiwal via GitGitGadget wrote: > > From: Rohit Ashiwal > > t3600-rm.sh: Previously we were using `test -(d|f)` > to verify the presencee of a directory/file, but we > already have helper functions, viz, test_path_is_dir > and test_path_is_file with same func

Re: [WIP RFC PATCH v2 5/5] clone: use dir-iterator to avoid explicit dir traversal

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares wrote: > > Replace usage of opendir/readdir/closedir API to traverse directories > recursively, at copy_or_link_directory function, by the dir-iterator > API. This simplifies the code and avoid recursive calls to > copy_or_link_directory. > > This p

Re: [WIP RFC PATCH v2 0/5] clone: dir iterator refactoring with tests

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 6:36 PM Ævar Arnfjörð Bjarmason wrote: > > > On Tue, Feb 26 2019, Matheus Tavares wrote: > > > Ævar sent v1: > > https://public-inbox.org/git/20190226002625.13022-1-ava...@gmail.com/ > > Tip. Use --in-reply-to with git format-patch, then the whole discussion > goes in the

Re: [WIP RFC PATCH v2 4/5] clone: extract function from copy_or_link_directory

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares wrote: > > Extract dir creation code snippet from copy_or_link_directory to its own > function named mkdir_if_missing. This change will help removing > copy_or_link_directory's explicit recursion, which will be done in a > following patch. Also make

Re: [WIP RFC PATCH v2 3/5] clone: copy hidden paths at local clone

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares wrote: > > Make the copy_or_link_directory function no longer skip hidden paths. It's actually only hidden directories because of the S_ISDIR check right above. Not that it matters much... > This function, used to copy .git/objects, currently skip

Re: [WIP RFC PATCH v2 1/5] dir-iterator: add flags parameter to dir_iterator_begin

2019-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2019 at 12:18 PM Matheus Tavares wrote: > int dir_iterator_advance(struct dir_iterator *dir_iterator) > { > struct dir_iterator_int *iter = > (struct dir_iterator_int *)dir_iterator; > + int ret; > > while (1) { > struct dir_i

Re: [GSoC][PATCH 3/3] clone: use dir-iterator to avoid explicit dir traversal

2019-02-25 Thread Duy Nguyen
On Sun, Feb 24, 2019 at 9:45 PM Ævar Arnfjörð Bjarmason wrote: > .. > Can't the utility function we're moving to just be made to be > bug-compatible with what we're doing now with symlinks? I haven't really followed closely this thread. But I think the first step should be bug-compatible (it real

Re: `git status -u no` suppresses modified files too.

2019-02-25 Thread Duy Nguyen
On Mon, Feb 25, 2019 at 12:37 PM Rusty Russell wrote: > > Jeff King writes: > > On Fri, Feb 08, 2019 at 12:18:57PM +1030, Rusty Russell wrote: > > > >> This broke my "is this clean?" sanity check and very much violates > >> the man page description. > > > > Wow, this one had me scratching my head

Re: Ideas for even more compact fetch.output=compact output

2019-02-22 Thread Duy Nguyen
On Fri, Feb 22, 2019 at 4:52 PM Ævar Arnfjörð Bjarmason wrote: > Just using this as a bounce-off point for a related discussion, one case > where I still see duplicates is things like: > > From github.com:git/git >a7da99ff1b..28d0017056 next-> origin/* > + e911e94

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-22 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 6:11 PM Clemens Buchacher wrote: > >And requiring to mark trashable files manually duplicates a > >lot of ignore patterns. Have a look at any .gitignore file, the > >majority of them is for discardable files because "ignored" class was > >created with those in mind (*.o and

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-22 Thread Duy Nguyen
On Thu, Feb 21, 2019 at 5:39 AM Junio C Hamano wrote: > > So now you would need to > > add more or less the same set of ignore rules in .gitattributes to > > mark them trashable, and gitignore/gitattributes rules are not exactly > > compatible, you can't just blindly copy them over. Every time you

Re: [PATCH 2/2] setup: don't fail if commondir reference is deleted.

2019-02-22 Thread Duy Nguyen
On Fri, Feb 22, 2019 at 12:07 AM Phillip Wood wrote: > > Hi Michal/Duy > > On 21/02/2019 13:50, Michal Suchánek wrote: > > On Thu, 21 Feb 2019 17:50:38 +0700 > > Duy Nguyen wrote: > > > >> On Tue, Feb 19, 2019 at 12:05 AM Michal Suchanek wrote: > >

Re: [PATCH 2/2] setup: don't fail if commondir reference is deleted.

2019-02-22 Thread Duy Nguyen
On Thu, Feb 21, 2019 at 8:50 PM Michal Suchánek wrote: > > On Thu, 21 Feb 2019 17:50:38 +0700 > Duy Nguyen wrote: > > > On Tue, Feb 19, 2019 at 12:05 AM Michal Suchanek wrote: > > > > > > When adding wotktrees git can die in get_common_dir_noenv while > &

Re: [PATCH v2 1/1] worktree add: sanitize worktree names

2019-02-22 Thread Duy Nguyen
On Fri, Feb 22, 2019 at 12:42 AM Ramsay Jones wrote: > > +static void sanitize_worktree_name(struct strbuf *name) > > +{ > > + char *orig_name = xstrdup(name->buf); > > + int i; > > + > > + /* > > + * All special chars replaced with dashes. See > > + * check_refname_component

Re: [ANNOUNCE] Git v2.21.0-rc2

2019-02-22 Thread Duy Nguyen
On Fri, Feb 22, 2019 at 6:55 AM brian m. carlson wrote: > > On Thu, Feb 21, 2019 at 08:10:00PM +0700, Duy Nguyen wrote: > > On Thu, Feb 21, 2019 at 2:41 AM Junio C Hamano wrote: > > > Another mention of /dev/zero appears in t/helper/test-sha1.sh (not > > > to be co

Re: [PATCH] format-patch: notice failure to open cover letter for writing

2019-02-21 Thread Duy Nguyen
On Fri, Feb 22, 2019 at 1:28 PM Jeff King wrote: > > diff --git a/builtin/log.c b/builtin/log.c > > index 3e145fe502..43fc9a07df 100644 > > --- a/builtin/log.c > > +++ b/builtin/log.c > > @@ -1047,7 +1047,7 @@ static void make_cover_letter(struct rev_info *rev, > > int use_stdout, > > > > i

Re: [ANNOUNCE] Git v2.21.0-rc2

2019-02-21 Thread Duy Nguyen
On Thu, Feb 21, 2019 at 2:41 AM Junio C Hamano wrote: > Another mention of /dev/zero appears in t/helper/test-sha1.sh (not > to be confused with t/helper/test-sha1.c). This seems to be run > only with an explicit "make -C t/helper check-sha1" request, so > perhaps nobody on your platform ran it t

Re: Feature Request git clone shallow-include

2019-02-21 Thread Duy Nguyen
uld not run on the server side. On the other hand, the latter will not be as thoroughly tested because it only runs by shallow code. That's my problem though. I think I might be able to find a third option somewhere in between. > > Joe > > > On Tue, Feb 19, 2019 at 7:22 PM Duy

Re: [PATCH] worktree add: sanitize worktree names

2019-02-21 Thread Duy Nguyen
On Thu, Feb 21, 2019 at 6:44 PM Konstantin Kharlamov wrote: > >> > + > >> > + /* last resort, should never ever happen in practice */ > >> > + if (name->len == 0) > >> > + strbuf_addstr(name, "worktree"); > >> > >> I assume this means a user have passed a zero-sized worktr

Re: [PATCH] worktree add: sanitize worktree names

2019-02-21 Thread Duy Nguyen
On Thu, Feb 21, 2019 at 6:28 PM Konstantin Kharlamov wrote: > > > > On Чт, Feb 21, 2019 at 2:00 PM, > =?UTF-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41j?= Duy wrote: > > Worktree names are based on $(basename $GIT_WORK_TREE). They aren't > > significant until 3a3b9d8cde (refs: new ref types to make per-workt

Re: [PATCH 2/2] setup: don't fail if commondir reference is deleted.

2019-02-21 Thread Duy Nguyen
On Tue, Feb 19, 2019 at 12:05 AM Michal Suchanek wrote: > > When adding wotktrees git can die in get_common_dir_noenv while > examining existing worktrees because the commondir file does not exist. > Rather than testing if the file exists before reading it handle ENOENT. I don't think we could go

Re: "Submodule registered for path" output with config aliases mixed in

2019-02-20 Thread Duy Nguyen
On Thu, Feb 21, 2019 at 9:19 AM brian m. carlson wrote: > > On Tue, Feb 19, 2019 at 05:51:05PM +0100, Mateusz Loskot wrote: > > Hi, > > > > $ git version > > git version 2.20.1.windows.1 > > > > I'm running `git clone --recurse-submodules https://XXX` > > The command seems to run well and complete

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-20 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 4:19 PM Ævar Arnfjörð Bjarmason wrote: > > I personally do not believe in "backup log"; if we can screw up and > > can fail to stop an operation that must avoid losing info, then we > > can screw up the same way and fail to design and implement "backup" > > to save info bef

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

2019-02-19 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 5:05 AM Elijah Newren wrote: > > On Tue, Feb 19, 2019 at 11:10 AM Junio C Hamano wrote: > > > > Junio C Hamano writes: > > > > > I am getting the impression that to save typing, you would want to > > > make "--index --worktree" the default (i.e. among the above, only > >

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

2019-02-19 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 5:29 AM Junio C Hamano wrote: > > Elijah Newren writes: > > > On Tue, Feb 19, 2019 at 11:10 AM Junio C Hamano wrote: > >> > >> Junio C Hamano writes: > >> > >> > I am getting the impression that to save typing, you would want to > >> > make "--index --worktree" the defau

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

2019-02-19 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 2:10 AM Junio C Hamano wrote: > > Junio C Hamano writes: > > > I am getting the impression that to save typing, you would want to > > make "--index --worktree" the default (i.e. among the above, only > > --no-index and --no-worktree need to be spelled explicitly), but > >

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

2019-02-19 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 5:36 AM Junio C Hamano wrote: > > Elijah Newren writes: > > >> As long as worktree-only mode does not lose track of a > >> previously-untracked path in the index (perhaps use the i-t-a bit), > >> I do not have a strong objection against making the worktree-only > >> mode t

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-19 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 1:08 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > > On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason > > wrote: > >> > >> > >> On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: > >> > >> [

Re: Feature Request git clone shallow-include

2019-02-19 Thread Duy Nguyen
On Wed, Feb 20, 2019 at 7:07 AM Joe Enzminger wrote: > > Currently, git clone supports shallow-exclude=. The client > will clone up to, but not including, the commit with the tag. > > It would be useful to have the ability to include the commit with the > tag. The suggestion would be to add a "s

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

2019-02-19 Thread Duy Nguyen
On Tue, Feb 19, 2019 at 9:42 PM Elijah Newren wrote: > > OK this hopefully will be the final design > > > > (git restore) "[--worktree] " restores worktree paths from index > > > > "--index " restores the index from HEAD (aka "git reset") > > > > "--source (--index|--worktree) " restores index or

Re: git rebase --continue after solving conflicts doesn't work anymore

2019-02-19 Thread Duy Nguyen
On Tue, Feb 19, 2019 at 9:04 PM Sebastián Mancilla wrote: > And the content of .git/rebase-merge/author-script is always the same: > > GIT_AUTHOR_NAME='Sebastián Mancilla' > GIT_AUTHOR_EMAIL='smanc...@jlab.org' > GIT_AUTHOR_DATE='@1550530007 -0300 > Just to be clear, the l

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

2019-02-18 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: git gc fails with "unable to resolve reference" for worktree

2019-02-18 Thread Duy Nguyen
On Mon, Feb 18, 2019 at 10:09 PM wrote: > > > > On Пн, Feb 18, 2019 at 6:02 PM, Duy Nguyen wrote: > > On Mon, Feb 18, 2019 at 9:44 PM wrote: > >> > >> # Steps to reproduce (in terms of terminal commands) > >> > >> $ mkdir foo > &g

Re: git gc fails with "unable to resolve reference" for worktree

2019-02-18 Thread Duy Nguyen
On Mon, Feb 18, 2019 at 9:44 PM wrote: > > # Steps to reproduce (in terms of terminal commands) > > $ mkdir foo > $ cd foo > $ git init > Initialized empty Git repository in /tmp/foo/.git/ > $ echo hello > testfile > $ git add testfile && git commit -m "my commit1" > [m

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-18 Thread Duy Nguyen
On Mon, Feb 18, 2019 at 4:53 PM Ævar Arnfjörð Bjarmason wrote: > > > On Sun, Feb 17 2019, Duy Nguyen wrote: > > > On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason > > wrote: > >> > >> > >> On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote:

Re: [PATCH 1/1] Introduce "precious" file concept

2019-02-17 Thread Duy Nguyen
On Sun, Feb 17, 2019 at 2:36 AM Ævar Arnfjörð Bjarmason wrote: > > > On Sat, Feb 16 2019, Nguyễn Thái Ngọc Duy wrote: > > [Re-CC some people involved the last time around] > > > A new attribute "precious" is added to indicate that certain files > > have valuable content and should not be easily di

Re: [PATCH] read-cache.c: index format v5 -- 30% smaller/faster than v4

2019-02-14 Thread Duy Nguyen
On Thu, Feb 14, 2019 at 5:02 PM Ævar Arnfjörð Bjarmason wrote: > > Take a look at stat data, st_dev, st_uid, st_gid and st_mode are the > > same most of the time. ctime should often be the same (or differs just > > slightly). And sometimes mtime is the same as well. st_ino is also > > always zero

Re: Feature request on git log --oneline -- ...

2019-02-13 Thread Duy Nguyen
On Wed, Feb 13, 2019 at 4:27 PM Petri Gynther wrote: > > git developers: > > Small feature request on: > git log --oneline -- ... > > Could we add an option to: > 1) display all commits in unconditionally > 2) use a special marker (e.g. star) for commits that touch ... > and list the files from

Re: [PATCH v2 2/3] git-submodule.txt: make subcommands underlined

2019-02-13 Thread Duy Nguyen
On Wed, Feb 13, 2019 at 3:15 PM Denton Liu wrote: > > On Tue, Feb 12, 2019 at 01:56:11AM -0800, Denton Liu wrote: > > In git-remote.txt, the subcommands are underlined. Following that, we > > also underline the subcommands in git-submodule.txt. > > I'd like to retract this patch. I realised that b

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-02-12 Thread Duy Nguyen
On Tue, Feb 12, 2019 at 8:45 PM Duy Nguyen wrote: > > On Fri, Feb 08, 2019 at 08:36:21PM -0600, Dan McGregor wrote: > > Commit 8dd2e88a92 ("http: support file handles for HTTP_KEEP_ERROR", > > 2019-01-10) introduced an implicit assumption that rewind, fileno, and

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-02-12 Thread Duy Nguyen
On Fri, Feb 08, 2019 at 08:36:21PM -0600, Dan McGregor wrote: > 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 such > passing a void * fai

Re: Git v2.21.0-rc0 broken on *BSD, maybe others

2019-02-12 Thread Duy Nguyen
On Tue, Feb 12, 2019 at 7:43 PM Duy Nguyen wrote: > The test failures on NetBSD and Solaris/Sparc, not sure if we can do > anything without test logs or access to these systems. Actually if you could tweak your ci script a bit to run tests with -v, that would help. -- Duy

Re: Git v2.21.0-rc0 broken on *BSD, maybe others

2019-02-12 Thread Duy Nguyen
On Tue, Feb 12, 2019 at 01:13:35PM +0100, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Feb 07 2019, Junio C Hamano wrote: > > > An early preview release Git v2.21.0-rc0 is now available for > > testing at the usual places. It is comprised of 426 non-merge > > commits since v2.20.0, contributed by

Re: [PATCH] git-submodule.txt: document default behavior

2019-02-11 Thread Duy Nguyen
On Tue, Feb 12, 2019 at 11:04 AM Denton Liu wrote: > > This patch documents the default behavior of git-submodule if no > subcommands are given, similar to how git-remote.txt documents it. > > Signed-off-by: Denton Liu > --- > Documentation/git-submodule.txt | 3 +++ > 1 file changed, 3 insertio

Re: [Breakage] 2.20.0-rc0 t1404: test_i18ngrep reports 1 instead of 0 on NonStop in one case

2019-02-11 Thread Duy Nguyen
On Mon, Feb 11, 2019 at 2:09 AM Randall S. Becker wrote: > > Hi All, > > I tracked down a breakage in t1404 subtest 52. The line > > test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: File exists" err The message does not match, does it? Here we grep for "File exists" but the message you sho

Re: could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000'

2019-02-09 Thread Duy Nguyen
On Sat, Feb 9, 2019 at 4:58 PM Luke Diamand wrote: > > On Sat, 9 Feb 2019 at 05:01, Duy Nguyen wrote: > > > > On Fri, Feb 8, 2019 at 11:39 PM Luke Diamand wrote: > > > > > > On Fri, 8 Feb 2019 at 10:02, Duy Nguyen wrote: > > > > > > >

Re: [PATCH v2 18/19] completion: support switch

2019-02-08 Thread Duy Nguyen
On Fri, Feb 8, 2019 at 9:19 PM SZEDER Gábor wrote: > > On Fri, Feb 08, 2019 at 04:04:00PM +0700, Nguyễn Thái Ngọc Duy wrote: > > Completion support for --guess could be made better. If no --detach is > > given, we should only provide a list of refs/heads/* and dwim ones, > > not the entire ref spa

Re: could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000'

2019-02-08 Thread Duy Nguyen
On Fri, Feb 8, 2019 at 11:39 PM Luke Diamand wrote: > > On Fri, 8 Feb 2019 at 10:02, Duy Nguyen wrote: > > > > On Wed, Feb 06, 2019 at 10:25:25AM +, Luke Diamand wrote: > > > I've recently started seeing a lot of this message when doing a rebase: > >

Re: could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000'

2019-02-08 Thread Duy Nguyen
On Sat, Feb 9, 2019 at 12:24 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > > On Wed, Feb 06, 2019 at 10:25:25AM +, Luke Diamand wrote: > >> I've recently started seeing a lot of this message when doing a rebase: > >> > >>warning: coul

Re: could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000'

2019-02-08 Thread Duy Nguyen
On Wed, Feb 06, 2019 at 10:25:25AM +, Luke Diamand wrote: > I've recently started seeing a lot of this message when doing a rebase: > >warning: could not freshen shared index > '/home/ldiamand/git/dev_full/.git/worktrees/gcc8-take-2/sharedindex.' Th

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

2019-02-08 Thread Duy Nguyen
On Thu, Jan 31, 2019 at 8:09 PM SZEDER Gábor wrote: > > On Wed, Jan 30, 2019 at 04:48:20PM +0700, Nguyễn Thái Ngọc Duy wrote: > > diff --git a/Documentation/git-switch.txt b/Documentation/git-switch.txt > > new file mode 100644 > > index 00..953c9747b2 > > > +--orphan :: > > + Create a

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

2019-02-06 Thread Duy Nguyen
On Thu, Feb 7, 2019 at 7:00 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] 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] 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] 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] 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 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 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: 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] 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-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 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: [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 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] 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 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 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 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: 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 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: 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: 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: [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: [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: 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 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: [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 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] 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 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 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

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