Re: [PATCH v1 02/11] restore: take tree-ish from --source option instead

2019-03-10 Thread Eric Sunshine
On Fri, Mar 8, 2019 at 5:17 AM Nguyễn Thái Ngọc Duy wrote: > This is another departure from 'git checkout' syntax, which uses -- to > separate ref and pathspec. The observation is restore (or "git > checkout ,, ") is most often used to restore some files from What is the ",," thing? > the index.

[GSoC][PATCH v2 1/5] t0000-basic: fix an indentation error

2019-03-10 Thread Jonathan Chang
Hi, Thanks for the reviews. Here are the changes in the second version: - bug fixes - add preparatory patch - seperate different files to different patch - change to use test_line_count in a seperate patch Also I found that there is no such function as test_char_c

[GSoC][PATCH v2 2/5] t0000-basic: avoid using pipes

2019-03-10 Thread Jonathan Chang
The exit code of the upstream in a pipe is ignored thus we should avoid using it. By writing out the output of the git command to a file, we can test the exit codes of both the commands. Signed-off-by: Jonathan Chang diff --git a/t/t-basic.sh b/t/t-basic.sh index 53821f5817..47666b013e 1

[GSoC][PATCH v2 3/5] t0003-attributes: avoid using pipes

2019-03-10 Thread Jonathan Chang
The exit code of the upstream in a pipe is ignored thus we should avoid using it. By writing out the output of the git command to a file, we can test the exit codes of both the commands. Signed-off-by: Jonathan Chang diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh index 71e63d8b50..14

[GSoC][PATCH v2 4/5] t0022-crlf-rename: avoid using pipes

2019-03-10 Thread Jonathan Chang
The exit code of the upstream in a pipe is ignored thus we should avoid using it. By writing out the output of the git command to a file, we can test the exit codes of both the commands. Signed-off-by: Jonathan Chang diff --git a/t/t0022-crlf-rename.sh b/t/t0022-crlf-rename.sh index 7af3fbcc7b..

[GSoC][PATCH v2 5/5] t0000-basic: use test_line_count instead of wc -l

2019-03-10 Thread Jonathan Chang
Signed-off-by: Jonathan Chang diff --git a/t/t-basic.sh b/t/t-basic.sh index 47666b013e..aa25694b45 100755 --- a/t/t-basic.sh +++ b/t/t-basic.sh @@ -1136,8 +1136,8 @@ test_expect_success 'git commit-tree omits duplicated parent in a commit' ' parent=$(sed -n -e "s/^parent

Re: [GSoC][PATCH] tests: avoid using pipes

2019-03-10 Thread ttjtftx
Thanks for the reminders. On Sun, Mar 10, 2019 at 2:06 PM Christian Couder wrote: > If you take a look at c6f44e1da5 ("t9813: avoid using pipes", > 2017-01-04) you can see the following: > > - it changes only one test file: t9813-git-p4-preserve-users.sh > - its title starts with "t9813:

Re: [GSoC][PATCH v2 5/5] t0000-basic: use test_line_count instead of wc -l

2019-03-10 Thread Eric Sunshine
On Sun, Mar 10, 2019 at 4:11 AM Jonathan Chang wrote: > Signed-off-by: Jonathan Chang > > diff --git a/t/t-basic.sh b/t/t-basic.sh > @@ -1136,8 +1136,8 @@ test_expect_success 'git commit-tree omits duplicated > parent in a commit' ' > - numparent=$(sed -n -e "s/^parent //p" -e "/^a

Re: [GSoC][PATCH v2 4/5] t0022-crlf-rename: avoid using pipes

2019-03-10 Thread Eric Sunshine
On Sun, Mar 10, 2019 at 4:10 AM Jonathan Chang wrote: > The exit code of the upstream in a pipe is ignored thus we should avoid > using it. By writing out the output of the git command to a file, we can > test the exit codes of both the commands. > > Signed-off-by: Jonathan Chang All of the patc

Re: [PATCH v3 19/21] t: add tests for switch

2019-03-10 Thread Andrei Rybak
On 3/8/19 10:57 AM, Nguyễn Thái Ngọc Duy wrote: > --- > t/t2060-switch.sh | 87 +++ > 1 file changed, 87 insertions(+) > create mode 100755 t/t2060-switch.sh > > diff --git a/t/t2060-switch.sh b/t/t2060-switch.sh > new file mode 100755 > index

Re: [GSoC][PATCH v2 3/5] t0003-attributes: avoid using pipes

2019-03-10 Thread Eric Sunshine
On Sun, Mar 10, 2019 at 4:09 AM Jonathan Chang wrote: > The exit code of the upstream in a pipe is ignored thus we should avoid > using it. By writing out the output of the git command to a file, we can > test the exit codes of both the commands. > > Signed-off-by: Jonathan Chang > > diff --git a

Re: [PATCH v1 00/11] And new command "restore"

2019-03-10 Thread Duy Nguyen
On Fri, Mar 8, 2019 at 5:17 PM Nguyễn Thái Ngọc Duy wrote: > - --index has a different meaning in git-apply. I don't have a good > suggestion except "yeah we have two different worlds now, the old > and the new one" I will rename --index to --staged to avoid this. It is already used as synony

[GSOC][PATCH] Fixed an issue which contained extra unnecessary code

2019-03-10 Thread sushmaunnibhavi
>From 5a6c233c6bf0a35aca000b32b9e936a34532900a Mon Sep 17 00:00:00 2001 From: sushmaunnibhavi Date: Sun, 10 Mar 2019 19:37:33 +0530 Subject: [GSOC][PATCH] Fixed an issue which contained extra unnecessary code Signed-off-by: Sushma Unnibhavi --- Since '\n' and '\0' are char_len==1,it is not necess

Re: [GSoC][PATCH] tests: avoid using pipes

2019-03-10 Thread Christian Couder
On Sun, Mar 10, 2019 at 9:28 AM ttjtftx wrote: > > On Sun, Mar 10, 2019 at 2:06 PM Christian Couder > wrote: > > > If you take a look at c6f44e1da5 ("t9813: avoid using pipes", > > 2017-01-04) you can see the following: > > > > - it changes only one test file: t9813-git-p4-preserve-users.sh >

[PATCH 0/2] fix spurious space after linkgit, now in *.html

2019-03-10 Thread Martin Ågren
On Sun, 3 Mar 2019 at 02:25, Junio C Hamano wrote: > > "brian m. carlson" writes: > > > On Wed, Feb 27, 2019 at 07:17:51PM +0100, Martin Ågren wrote: > >> Just like v1 [1], this v2 removes a spurious space which shows up in a > >> large number of places in our manpages when Asciidoctor expands th

[PATCH 2/2] asciidoctor-extensions: fix spurious space after linkgit in *.html

2019-03-10 Thread Martin Ågren
I really should have caught this when I wrote c3b4efa030 ("asciidoctor-extensions: fix spurious space after linkgit", 2019-02-27). Turns out that when we create html-files, we take a different path through this macro. So similar to c3b4efa030, we need to drop a "\n" which turns into a space before

[PATCH 1/2] Documentation/Makefile: add missing dependencies on asciidoctor-extensions

2019-03-10 Thread Martin Ågren
I really should have caught this when I wrote 00c87bceaa ("Documentation/Makefile: add missing dependency on asciidoctor-extensions", 2019-02-27). That commit made sure that the xml-files depend on our Asciidoctor-specific extensions, but that just helps for the ".txt -> .xml -> .[157]" transformat

Re: New Ft. for Git : Allow resumable cloning of repositories.

2019-03-10 Thread Kapil Jain
On Fri, Mar 8, 2019 at 11:13 PM Jonathan Tan wrote: > This is indeed a nice feature to have, and thanks for details of how > this would be accomplished. > > One issue is that when cloning a repository, we do not download many > files - we only download one dynamically generated packfile containing

Re: [GSoC][PATCH v2 1/5] t0000-basic: fix an indentation error

2019-03-10 Thread Thomas Gummerer
On 03/10, Jonathan Chang wrote: > Hi, > > Thanks for the reviews. > > Here are the changes in the second version: > - bug fixes > - add preparatory patch > - seperate different files to different patch > - change to use test_line_count in a seperate patch > > Also I found

Re: [GSOC][PATCH] Fixed an issue which contained extra unnecessary code

2019-03-10 Thread Christian Couder
On Sun, Mar 10, 2019 at 4:30 PM sushmaunnibhavi wrote: > > From 5a6c233c6bf0a35aca000b32b9e936a34532900a Mon Sep 17 00:00:00 2001 > From: sushmaunnibhavi > Date: Sun, 10 Mar 2019 19:37:33 +0530 > Subject: [GSOC][PATCH] Fixed an issue which contained extra unnecessary code > Signed-off-by: Sushma

Re: [GSOC][PATCH] Fixed an issue which contained extra unnecessary code

2019-03-10 Thread Thomas Gummerer
> Subject: [GSOC][PATCH] Fixed an issue which contained extra unnecessary code Commit messages (and titles) should always be in the imperative mood. The title in particular should be a short description of what the patch is doing, and should give meaningful information to people reading the output

Re: What's cooking in git.git (Mar 2019, #01; Wed, 6)

2019-03-10 Thread Thomas Gummerer
On 03/09, Elijah Newren wrote: > Hi, > > On Sat, Mar 9, 2019 at 9:29 AM Thomas Gummerer wrote: > > > > On 03/07, Duy Nguyen wrote: > > > On Thu, Mar 7, 2019 at 7:34 PM Philip Oakley wrote: > > > > The one point I noted is that "Overlay" is a new magic term without any > > > > explanation within

Re: [PATCH v3 11/14] switch-branch: only allow explicit detached HEAD

2019-03-10 Thread Eckhard Maaß
On Thu, Nov 29, 2018 at 10:58:46PM +0100, Nguyễn Thái Ngọc Duy wrote: > + if (!opts->implicit_detach && > + !opts->new_branch && > + !opts->new_branch_force && > + new_branch_info->name && > + !new_branch_info->path) > + die(_("a branch is expected, g

Re: [PATCH v1 06/11] restore: add --worktree and --index

2019-03-10 Thread Eric Sunshine
On Sat, Mar 9, 2019 at 1:52 PM Elijah Newren wrote: > On Fri, Mar 8, 2019 at 2:17 AM Nguyễn Thái Ngọc Duy wrote: > > + if (!opts->checkout_worktree && !opts->checkout_index) > > + die(_("neither '%s' or '%s' is specified"), > > + "--index", "--worktree"); > >

`git add <>` results in "fatal: ... is outside repository"

2019-03-10 Thread Anthony Sottile
(In case 8.3 filename isn't a familiar term): https://en.wikipedia.org/wiki/8.3_filename This is distilled down from an actual issue to a minimal testcase. The original failure involves an automated test while running on azure pipelines: https://asottile.visualstudio.com/asottile/_build/results?b

Re: [PATCH v1 00/11] And new command "restore"

2019-03-10 Thread Jacob Keller
On March 10, 2019 4:19:28 AM PDT, Duy Nguyen wrote: >On Fri, Mar 8, 2019 at 5:17 PM Nguyễn Thái Ngọc Duy >wrote: >> - --index has a different meaning in git-apply. I don't have a good >> suggestion except "yeah we have two different worlds now, the old >> and the new one" > >I will rename

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

2019-03-10 Thread Jacob Keller
On March 8, 2019 1:57:41 AM PST, "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 two new ones: switch and >something-to-checkout-paths. The goo

Re: [PATCH v13 12/27] stash: convert drop and clear to builtin

2019-03-10 Thread Jeff King
On Sat, Mar 09, 2019 at 06:30:21PM +, Thomas Gummerer wrote: > On 03/07, Jeff King wrote: > > On Mon, Feb 25, 2019 at 11:16:16PM +, Thomas Gummerer wrote: > > > > > +static int do_drop_stash(const char *prefix, struct stash_info *info, > > > int quiet) > > > > This series hit next recen

Re: bitmaps by default? [was: prune: use bitmaps for reachability traversal]

2019-03-10 Thread Jeff King
On Sat, Mar 09, 2019 at 02:49:44AM +, Eric Wong wrote: > Jeff King wrote: > > Pruning generally has to traverse the whole commit graph in order to > > see which objects are reachable. This is the exact problem that > > reachability bitmaps were meant to solve, so let's use them (if they're >

Re: [PATCH v13 12/27] stash: convert drop and clear to builtin

2019-03-10 Thread Junio C Hamano
Thomas Gummerer writes: > Agreed, I'd be happy to keep the parameter there. Looking at your > fork, you seem to have some WIP patches to introduce a UNUSED macro > for parameters like this, which I don't think I've seen on the list > yet (though I may have just missed them). > > I guess it's pro

Re: [PATCH v13 18/27] stash: convert create to builtin

2019-03-10 Thread Junio C Hamano
Thomas Gummerer writes: > Subject: [PATCH 1/2] stash: pass pathspec as pointer > > Passing the pathspec by value is potentially confusing, as the copy is > only a shallow copy, so save the overhead of the copy, and pass the > pathspec struct as a pointer. > > In addition use copy_pathspec to copy

Re: [PATCH v2] line-log: suppress diff output with "-s"

2019-03-10 Thread Junio C Hamano
Jeff King writes: > On Fri, Mar 08, 2019 at 04:38:44PM +0100, Johannes Schindelin wrote: > >> On Thu, 7 Mar 2019, Jeff King wrote: >> >> > When "-L" is in use, we ignore any diff output format that the user >> > provides to us, and just always print a patch (with extra context lines >> > coverin

Re: [GSoC][PATCH v2 3/3] t3600: use helpers to replace test -d/f/e/s

2019-03-10 Thread Junio C Hamano
Eric Sunshine writes: > On Fri, Mar 8, 2019 at 12:38 AM Junio C Hamano wrote: >> An unrelated tangent, but what do you think of this patch? In the >> context of testing "git rm", if foo is a dangling symbolic link, >> "git rm foo && test_path_is_missing foo" would need something like >> this to

Re: [PATCH v3 1/2] worktree: fix worktree add race.

2019-03-10 Thread Junio C Hamano
Duy Nguyen writes: > Junio, it seems 2/2 is stuck in an endless discussion. But 1/2 is good > regardless, maybe pick it up now and let 2/2 come later whenever it's > ready? Thanks for poking, and I think it is a good idea.

Re: One failed self test on Fedora 29

2019-03-10 Thread Junio C Hamano
Jeffrey Walton writes: > I think this is the patch for sha1dc/sha1.c . It stops using unaligned > accesses by default, but still honors SHA1DC_FORCE_UNALIGNED_ACCESS > for those who want it. Folks who want the undefined behavior have to > do something special. Hmph, I somehow thought that folks

Re: One failed self test on Fedora 29

2019-03-10 Thread Jeffrey Walton
On Sun, Mar 10, 2019 at 10:00 PM Junio C Hamano wrote: > > Jeffrey Walton writes: > > > I think this is the patch for sha1dc/sha1.c . It stops using unaligned > > accesses by default, but still honors SHA1DC_FORCE_UNALIGNED_ACCESS > > for those who want it. Folks who want the undefined behavior h

Re: is it "git gc --prune=now" or "git gc --prune=all"?

2019-03-10 Thread Junio C Hamano
"Robert P. J. Day" writes: > On Wed, 6 Mar 2019, Junio C Hamano wrote: > >> Jeff King writes: >> >> > ... I do think the documentation should recommend "now". Possibly >> > builtin/gc.c should be smarter about recognizing "all" in the >> > conditional you quoted, too, though I don't know that it

Re: [PATCH/RFC v1 1/1] convert.c: Escape sequences only for a tty in trace_encoding()

2019-03-10 Thread Junio C Hamano
tbo...@web.de writes: > I am temped to remove the "dim" functionality all together, > or to remove the printout of the values which are now dimmed, > what do others think ? I am for removing the color settings we see here for two reasons. One is that the tracing is primarily for machine readab

Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html

2019-03-10 Thread Jeff King
On Sun, Mar 10, 2019 at 04:14:22PM +0100, Martin Ågren wrote: > [1] I could have sworn I checked the html docs and saw that they didn't > have this extra space. Looking at git-scm.com again reveals that it's > not there. Huh. Seems like the site's html-rendering doesn't go through our > Makefile a

Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html

2019-03-10 Thread Junio C Hamano
Martin Ågren writes: > Bleh. For some reason [1] I thought the html-files were exempt from this > "extra space after linkgit" problem. They're not, as I just noticed. To > add insult to injury, my original patch 2 which adds a missing > dependency to the xml targets fails to add the exact same de

Re: One failed self test on Fedora 29

2019-03-10 Thread Jeff King
On Sat, Mar 09, 2019 at 07:34:15AM -0500, Jeffrey Walton wrote: > > It would probably help to know what commit you're building. > > The verbose test output would also be useful, e.g.: > > I built with CFLAGS += -fsanitize=undefined. It looks like the > misaligned accesses generate UBsan findings,

disabling sha1dc unaligned access, was Re: One failed self test on Fedora 29

2019-03-10 Thread Jeff King
On Mon, Mar 11, 2019 at 11:00:25AM +0900, Junio C Hamano wrote: > Jeffrey Walton writes: > > > I think this is the patch for sha1dc/sha1.c . It stops using unaligned > > accesses by default, but still honors SHA1DC_FORCE_UNALIGNED_ACCESS > > for those who want it. Folks who want the undefined be

[PATCH v7 0/8] Fix scissors bug during conflict

2019-03-10 Thread Denton Liu
This is a complete replacement for dl/merge-cleanup-scissors-fix. Previous discussion on the cherry-pick/revert changes can be found here[1]. Changes since revert/cherry-pick v3: * Rebased on top of latest master * Reordered and squashed patches * Added populate_opts_cb and save_opts to save def

[PATCH v7 2/8] t3507: cleanup space after redirection operators

2019-03-10 Thread Denton Liu
Signed-off-by: Denton Liu --- t/t3507-cherry-pick-conflict.sh | 34 - 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh index 0db166152a..74ff925526 100755 --- a/t/t3507-cherry-pick-con

[PATCH v7 1/8] t7600: clean up 'merge --squash c3 with c7' test

2019-03-10 Thread Denton Liu
This cleans up the original test by removing some unnecessary braces and removing a pipe. Helped-by: SZEDER Gábor Signed-off-by: Denton Liu --- t/t7600-merge.sh | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index 106148254d..d879e

[PATCH v7 4/8] sequencer.c: remove duplicate code

2019-03-10 Thread Denton Liu
Since we implemented get_cleanup_mode, we had some duplicate code in git_sequencer_config which essentially performed the same operations. Refactor git_sequencer_config to take advantage of the logic already in get_cleanup_mode. Note that we had to introduce a separate argument to get_cleanup_mode

[PATCH v7 5/8] merge: cleanup messages like commit

2019-03-10 Thread Denton Liu
This change allows git-merge messages to be cleaned up with the commit.cleanup configuration or --cleanup option, just like how git-commit does it. We also give git-pull the passthrough option of --cleanup so that it can also take advantage of this change. Finally, add testing to ensure that mess

[PATCH v7 7/8] sequencer.c: define get_config_from_cleanup

2019-03-10 Thread Denton Liu
Define a function which allows us to get the string configuration value of a enum commit_msg_cleanup_mode. This is done by refactoring get_cleanup_mode such that it uses a lookup table to find the mappings between string and enum and then using the same LUT in reverse to define get_config_from_clea

[PATCH v7 8/8] cherry-pick/revert: add scissors line on merge conflict

2019-03-10 Thread Denton Liu
Fix a bug where the scissors line is placed after the Conflicts: section, in the case where a merge conflict occurs and commit.cleanup = scissors. Signed-off-by: Denton Liu --- Documentation/git-cherry-pick.txt | 7 +++ Documentation/git-revert.txt | 7 +++ builtin/merge.c

[PATCH v7 3/8] commit: extract cleanup_mode functions to sequencer

2019-03-10 Thread Denton Liu
Signed-off-by: Denton Liu --- builtin/commit.c | 25 ++--- sequencer.c | 29 + sequencer.h | 6 ++ 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index f17537474a..0df15e4851 10064

[PATCH v7 6/8] merge: add scissors line on merge conflict

2019-03-10 Thread Denton Liu
This fixes a bug where the scissors line is placed after the Conflicts: section, in the case where a merge conflict occurs and commit.cleanup = scissors. Next, if commit.cleanup = scissors is specified, don't produce a scissors line in commit if one already exists in the MERGE_MSG file. Signed-of

Re: [PATCH v2] line-log: suppress diff output with "-s"

2019-03-10 Thread Jeff King
On Fri, Mar 08, 2019 at 07:44:22PM +0100, Johannes Schindelin wrote: > > Do we want to do something like this: > > > > diff --git a/revision.c b/revision.c > > index eb8e51bc63..a1b4fe2aa6 100644 > > --- a/revision.c > > +++ b/revision.c > > @@ -2689,6 +2689,10 @@ int setup_revisions(int argc, co

Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html

2019-03-10 Thread Martin Ågren
On Mon, 11 Mar 2019 at 04:02, Junio C Hamano wrote: > > Martin Ågren writes: > > > Since this has hit "next", here are two patches on top to address this. > > > > Sorry about this. > > Thanks. > > If it makes it easier, we can eject ma/asciidoctor-fixes out of > 'next' when we rebuild 'next'. I

Re: [PATCH 0/2] fix spurious space after linkgit, now in *.html

2019-03-10 Thread Martin Ågren
On Mon, 11 Mar 2019 at 03:59, Jeff King wrote: > > On Sun, Mar 10, 2019 at 04:14:22PM +0100, Martin Ågren wrote: > > > [1] I could have sworn I checked the html docs and saw that they didn't > > have this extra space. Looking at git-scm.com again reveals that it's > > not there. Huh. Seems like th

Re: [PATCH v7 5/8] merge: cleanup messages like commit

2019-03-10 Thread Eric Sunshine
On Sun, Mar 10, 2019 at 11:42 PM Denton Liu wrote: > This change allows git-merge messages to be cleaned up with the > commit.cleanup configuration or --cleanup option, just like how > git-commit does it. > > We also give git-pull the passthrough option of --cleanup so that it can > also take adva

Re: [PATCH v7 6/8] merge: add scissors line on merge conflict

2019-03-10 Thread Eric Sunshine
On Sun, Mar 10, 2019 at 11:42 PM Denton Liu wrote: > This fixes a bug where the scissors line is placed after the Conflicts: > section, in the case where a merge conflict occurs and > commit.cleanup = scissors. > > Next, if commit.cleanup = scissors is specified, don't produce a > scissors line in

Re: [PATCH v7 7/8] sequencer.c: define get_config_from_cleanup

2019-03-10 Thread Eric Sunshine
On Sun, Mar 10, 2019 at 11:42 PM Denton Liu wrote: > Define a function which allows us to get the string configuration value > of a enum commit_msg_cleanup_mode. This is done by refactoring > get_cleanup_mode such that it uses a lookup table to find the mappings > between string and enum and then

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

2019-03-10 Thread Junio C Hamano
Eric Sunshine writes: >> case 2: >> + if (last == '.') { /* Refname contains "..". */ >> + if (sanitized) >> + sanitized->len--; /* collapse ".." >> to single "." */ > > I think this needs t

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

2019-03-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Update 'worktree add' code to remove special characters to follow > these rules. In the future the user will be able to specify the > worktree name by themselves if they're not happy with this dumb > character substitution. This replaces both of the two patches in

Re: [PATCH v7 0/8] Fix scissors bug during conflict

2019-03-10 Thread Junio C Hamano
Denton Liu writes: > This is a complete replacement for dl/merge-cleanup-scissors-fix. Thanks; will take a look and requeue.