Re: [PATCH v4 4/4] t7800: run both builtin and scripted difftool, for now

2017-01-08 Thread Johannes Schindelin
Hi Junio, On Sun, 8 Jan 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > This is uglier than a simple > > > > touch "$GIT_EXEC_PATH/use-builtin-difftool" > > > > of course. But oh well. > > That is totally irrelevant. > > The more important

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-08 Thread Johannes Schindelin
Hi, On Sun, 8 Jan 2017, Junio C Hamano wrote: > How about explaining it like this then? > > (only the log message has been corrected; diff is from the original). > > commit c9bb5d101ca657fa466afa8c4368c43ea7b7aca8 > Author: Johannes Schindelin > Date: Mon Jan 2

Re: [PATCH] connect: handle putty/plink also in GIT_SSH_COMMAND

2017-01-08 Thread Johannes Schindelin
Hi Junio, On Sun, 8 Jan 2017, Junio C Hamano wrote: > Junio C Hamano writes: > > > I suspect that this will break when GIT_SSH_COMMAND, which is meant > > to be processed by the shell, hence the user can write anything, > > begins with a one-shot environment variable

Re: Preserve/Prune Old Pack Files

2017-01-08 Thread Mike Hommey
On Mon, Jan 09, 2017 at 01:21:37AM -0500, Jeff King wrote: > On Wed, Jan 04, 2017 at 09:11:55AM -0700, Martin Fick wrote: > > > I am replying to this email across lists because I wanted to > > highlight to the git community this jgit change to repacking > > that we have up for review > > > >

Re: Preserve/Prune Old Pack Files

2017-01-08 Thread Jeff King
On Wed, Jan 04, 2017 at 09:11:55AM -0700, Martin Fick wrote: > I am replying to this email across lists because I wanted to > highlight to the git community this jgit change to repacking > that we have up for review > > https://git.eclipse.org/r/#/c/87969/ > > This change introduces a new

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-08 Thread Jeff King
On Sun, Jan 08, 2017 at 05:25:00PM -0800, Junio C Hamano wrote: > > If this patch is only to appease coverity (as the commit message eludes > > to) I think this may be a bad idea for upstream. If this patch fixes an > > actual problem, then the commit message needs to spell that out. > > That

[PATCH v3 02/13] t7610: update branch names to match test number

2017-01-08 Thread Richard Hansen
Rename the testNN branches so that NN matches the test number. This should make it easier to troubleshoot test issues. Use $test_count to keep this future-proof. Signed-off-by: Richard Hansen --- t/t7610-mergetool.sh | 82

[PATCH v3 06/13] t7610: run 'git reset --hard' after each test to clean up

2017-01-08 Thread Richard Hansen
Use test_when_finished to run 'git reset --hard' after each test so that the repository is left in a saner state for the next test. This is a step toward making the tests more independent so that if one test fails it doesn't cause subsequent tests to fail. Signed-off-by: Richard Hansen

[PATCH v3 10/13] t7610: spell 'git reset --hard' consistently

2017-01-08 Thread Richard Hansen
Signed-off-by: Richard Hansen --- t/t7610-mergetool.sh | 37 +++-- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index 54164a320..c031ecd9e 100755 --- a/t/t7610-mergetool.sh +++

[PATCH v3 07/13] t7610: delete some now-unnecessary 'git reset --hard' lines

2017-01-08 Thread Richard Hansen
Tests now always run 'git reset --hard' at the end (even if they fail), so it's no longer necessary to run 'git reset --hard' at the beginning of a test. Signed-off-by: Richard Hansen --- t/t7610-mergetool.sh | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v3 04/13] t7610: use test_when_finished for cleanup tasks

2017-01-08 Thread Richard Hansen
This is a step toward making the tests more independent so that if one test fails it doesn't cause subsequent tests to fail. Signed-off-by: Richard Hansen --- t/t7610-mergetool.sh | 71 +++- 1 file changed, 37 insertions(+), 34

[PATCH v3 08/13] t7610: always work on a test-specific branch

2017-01-08 Thread Richard Hansen
Create and use a test-specific branch when the test might create a commit. This is not always necessary for correctness, but it improves debuggability by ensuring a commit created by test #N shows up on the testN branch, not the branch for test #N-1. Signed-off-by: Richard Hansen

[PATCH v3 12/13] mergetool: take the "-O" out of $orderfile

2017-01-08 Thread Richard Hansen
This will make it easier for a future commit to convert a relative orderfile pathname to either absolute or relative to the top-level directory. It also improves code readability. Signed-off-by: Richard Hansen --- git-mergetool.sh | 4 ++-- 1 file changed, 2 insertions(+),

[PATCH v3 13/13] mergetool: fix running in subdir when rerere enabled

2017-01-08 Thread Richard Hansen
If rerere is enabled and no pathnames are given, run cd_to_toplevel before running 'git diff --name-only' so that 'git diff --name-only' sees the files named by 'git rerere remaining', which outputs pathnames relative to the top-level directory. The cd_to_toplevel command could be run after 'git

[PATCH v3 11/13] t7610: add test case for rerere+mergetool+subdir bug

2017-01-08 Thread Richard Hansen
If rerere is enabled and mergetool is run from a subdirectory, mergetool always prints "No files need merging". Add an expected failure test case for this situation. Signed-off-by: Richard Hansen --- t/t7610-mergetool.sh | 21 - 1 file changed, 20

[PATCH v3 05/13] t7610: don't rely on state from previous test

2017-01-08 Thread Richard Hansen
If the repository must be in a particular state (beyond what is already done by the 'setup' test case) before the test can run, make the necessary repository changes in the test script even if it means duplicating some lines of code from the previous test case. This is a step toward making the

[PATCH v3 03/13] t7610: Move setup code to the 'setup' test case.

2017-01-08 Thread Richard Hansen
Multiple test cases depend on these hunks, so move them to the 'setup' test case. This is a step toward making the tests more independent so that if one test fails it doesn't cause subsequent tests to fail. Signed-off-by: Richard Hansen --- t/t7610-mergetool.sh | 65

[PATCH v3 09/13] t7610: don't assume the checked-out commit

2017-01-08 Thread Richard Hansen
Always check out the required commit at the beginning of the test so that a failure in a previous test does not cause the test to work off of the wrong commit. This is a step toward making the tests more independent so that if one test fails it doesn't cause subsequent tests to fail.

[PATCH v3 00/13] fix mergetool+rerere+subdir regression

2017-01-08 Thread Richard Hansen
If rerere is enabled, no pathnames are given, and mergetool is run from a subdirectory, mergetool always prints "No files need merging". Fix the bug. This regression was introduced in 57937f70a09c12ef484c290865dac4066d207c9c (v2.11.0). Changes since v2: * Added entries to .mailmap. * Patch

[PATCH v3 01/13] .mailmap: Use my personal email address as my canonical

2017-01-08 Thread Richard Hansen
When I changed employers my work address changed from rhan...@bbn.com to hans...@google.com. Rather than map my old work address to my new, map them both to my permanent personal email address. (I will still use my work address in commits I submit so that my employer gets some credit.)

Re: [PATCH v3] log --graph: customize the graph lines with config log.graphColors

2017-01-08 Thread Jeff King
On Sun, Jan 08, 2017 at 05:13:33PM +0700, Nguyễn Thái Ngọc Duy wrote: > If you have a 256 colors terminal (or one with true color support), then > the predefined 12 colors seem limited. On the other hand, you don't want > to draw graph lines with every single color in this mode because the two >

Re: [PATCH v3] log --graph: customize the graph lines with config log.graphColors

2017-01-08 Thread Jeff King
On Sun, Jan 08, 2017 at 07:05:12PM -0800, Junio C Hamano wrote: > > +{ > > + static char **colors; > > + static int colors_max, colors_alloc; > > + char *string = NULL; > > + const char *end, *start; > > + int i; > > + > > + for (i = 0; i < colors_max; i++) > > +

Re: git branch -D doesn't work with deleted worktree

2017-01-08 Thread Jacob Keller
On Fri, Jan 6, 2017 at 2:05 AM, Duy Nguyen wrote: > On Thu, Jan 5, 2017 at 9:02 PM, Stefan Beller wrote: >> On Thu, Jan 5, 2017 at 2:06 AM, Roland Illig wrote: >>> Git 2.11.0 gives a wrong error message after the following commands:

What's cooking in git.git (preview)

2017-01-08 Thread Junio C Hamano
There still are topics that haven't been looked at, but here is a snapshot of my tonight's status. The tip of 'pu' is known to be broken, so those who want to vet and veto topics that are outside but close to 'next' may want to try the tip of 'jch' instead (find it in "git log --first-parent

Re: [PATCH] Makefile: POSIX windres

2017-01-08 Thread Junio C Hamano
Steven Penny writes: > When environment variable POSIXLY_CORRECT is set, the "input -o output" syntax > is not supported. > > http://cygwin.com/ml/cygwin/2017-01/msg00036.html > > Signed-off-by: Steven Penny > --- Who other than cygwin build uses this

Re: [PATCH] Makefile: put LIBS after LDFLAGS for imap-send

2017-01-08 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Steven, > > On Sun, 8 Jan 2017, Steven Penny wrote: > >> On Sun, Jan 8, 2017 at 5:54 AM, Johannes Schindelin wrote: >> > I am curious: how do you build Git? I ask because I build Git on Windows >> > many times a day, and I did not

Re: [PATCH v3] log --graph: customize the graph lines with config log.graphColors

2017-01-08 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/graph.c b/graph.c > index dd17201..048f5cb 100644 > --- a/graph.c > +++ b/graph.c > @@ -62,6 +62,49 @@ enum graph_state { > static const char **column_colors; > static unsigned short column_colors_max; > > +static void

Re: [PATCHv6 2/2] pathspec: give better message for submodule related pathspec error

2017-01-08 Thread Junio C Hamano
Stefan Beller writes: > Every once in a while someone complains to the mailing list to have > run into this weird assertion[1]. The usual response from the mailing > list is link to old discussions[2], and acknowledging the problem > stating it is known. > > This patch

Re: [PATCHv6 1/2] submodule tests: don't use itself as a submodule

2017-01-08 Thread Junio C Hamano
Stefan Beller writes: > This provides an easier way to have submodules in tests, by just setting > TEST_CREATE_SUBMODULE to a non empty string, similar to > TEST_NO_CREATE_REPO. Yuck. I find it doubtful that it is a good idea to create two submodule repositories by merely

Re: [PATCH v5 00/16] pathspec cleanup

2017-01-08 Thread Junio C Hamano
Duy Nguyen writes: > On Thu, Jan 5, 2017 at 1:03 AM, Brandon Williams wrote: >> Changes in v5: >> * Move GUARD_PATHSPEC to prevent checking if pathspec is null twice. >> * Mark a string containing 'mnemonic' for translation. > > Argh.. I've run out of

Re: [PATCH 1/2] stash: fix USAGE text

2017-01-08 Thread Junio C Hamano
Marc Strapetz writes: > Add missing usage description for stash subcommands > 'create' and 'store'. I think we didn't add them to usage description when we added them because these two are not end-user facing commands but for script writers (who do not use "$ git

Re: [PATCH v4 4/4] t7800: run both builtin and scripted difftool, for now

2017-01-08 Thread Junio C Hamano
Johannes Schindelin writes: > This is uglier than a simple > > touch "$GIT_EXEC_PATH/use-builtin-difftool" > > of course. But oh well. That is totally irrelevant. The more important point is that we do the same set of tests so instead of running just one, we

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-08 Thread Junio C Hamano
Stefan Beller writes: > On Mon, Jan 2, 2017 at 8:22 AM, Johannes Schindelin > wrote: >> Technically, it is correct that git_exec_path() returns a possibly >> malloc()ed string. Practically, it is *sometimes* not malloc()ed. So >> let's just use a

Re: [PATCH] connect: handle putty/plink also in GIT_SSH_COMMAND

2017-01-08 Thread Junio C Hamano
Junio C Hamano writes: > I suspect that this will break when GIT_SSH_COMMAND, which is meant > to be processed by the shell, hence the user can write anything, > begins with a one-shot environment variable assignment, e.g. > > [core] sshcommand = VAR1=VAL1 VAR2=VAL2

Re: [PATCH v1] convert: add "status=delayed" to filter process protocol

2017-01-08 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > Some `clean` / `smudge` filters might require a significant amount of > time to process a single blob. During this process the Git checkout > operation is blocked and Git needs to wait until the filter is done

Re: [PATCH v1] convert: add "status=delayed" to filter process protocol

2017-01-08 Thread Eric Wong
larsxschnei...@gmail.com wrote: > +++ b/t/t0021/rot13-filter.pl > +$DELAY{'test-delay1.r'} = 1; > +$DELAY{'test-delay3.r'} = 3; > > open my $debug, ">>", "rot13-filter.log" or die "cannot open log file: $!"; > > @@ -166,6 +176,15 @@ while (1) { > packet_txt_write("status=abort");

Re: [PATCH v1] convert: add "status=delayed" to filter process protocol

2017-01-08 Thread Torsten Bögershausen
On Sun, Jan 08, 2017 at 08:17:36PM +0100, larsxschnei...@gmail.com wrote: > From: Lars Schneider > > Some `clean` / `smudge` filters might require a significant amount of > time to process a single blob. During this process the Git checkout > operation is blocked and

[PATCH v1] convert: add "status=delayed" to filter process protocol

2017-01-08 Thread larsxschneider
From: Lars Schneider Some `clean` / `smudge` filters might require a significant amount of time to process a single blob. During this process the Git checkout operation is blocked and Git needs to wait until the filter is done to continue with the checkout. Teach the

Re: [PATCH] Makefile: put LIBS after LDFLAGS for imap-send

2017-01-08 Thread Johannes Schindelin
Hi Steven, On Sun, 8 Jan 2017, Steven Penny wrote: > On Sun, Jan 8, 2017 at 5:54 AM, Johannes Schindelin wrote: > > I am curious: how do you build Git? I ask because I build Git on Windows > > many times a day, and I did not encounter any link problems. > > My end goal is to build static native

[PATCH v4 1/2] don't use test_must_fail with grep

2017-01-08 Thread Pranit Bauva
test_must_fail should only be used for testing git commands. To test the failure of other commands use `!`. Reported-by: Stefan Beller Signed-off-by: Pranit Bauva --- t/t3510-cherry-pick-sequence.sh | 6 +++--- t/t5504-fetch-receive-strict.sh | 2

[PATCH v4 2/2] t9813: avoid using pipes

2017-01-08 Thread Pranit Bauva
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: Pranit Bauva --- t/t9813-git-p4-preserve-users.sh | 8 1

Re: [PATCH] don't use test_must_fail with grep

2017-01-08 Thread Pranit Bauva
Hey Junio, On Sun, Jan 8, 2017 at 2:48 AM, Junio C Hamano wrote: > I see v3 that has 2>&1 but according to Luke's comment ("the message > comes from cat"), it shouldn't be there? I am behind clearing the > backlog in my mailbox and I could tweak it out from v3 while >

Re: [PATCH] Makefile: put LIBS after LDFLAGS for imap-send

2017-01-08 Thread Steven Penny
On Sun, Jan 8, 2017 at 5:54 AM, Johannes Schindelin wrote: > I am curious: how do you build Git? I ask because I build Git on Windows > many times a day, and I did not encounter any link problems. My end goal is to build static native Windows Git via Cygwin and the mingw64-x86_64-gcc-core

Re: [PATCH] Makefile: put LIBS after LDFLAGS for imap-send

2017-01-08 Thread Johannes Schindelin
Hi Steven, On Sun, 8 Jan 2017, Steven Penny wrote: > This matches up with the targets git-%, git-http-fetch, git-http-push > and git-remote-testsvn. It must be done this way on Windows else lcrypto > cannot find lgdi32 and lws2_32 I am curious: how do you build Git? I ask because I build Git on

[PATCH v3] log --graph: customize the graph lines with config log.graphColors

2017-01-08 Thread Nguyễn Thái Ngọc Duy
If you have a 256 colors terminal (or one with true color support), then the predefined 12 colors seem limited. On the other hand, you don't want to draw graph lines with every single color in this mode because the two colors could look extremely similar. This option allows you to hand pick the

Re: [ANNOUNCE] git-test: run automated tests against a range of Git commits

2017-01-08 Thread Michael Haggerty
On 01/07/2017 08:18 AM, Jeff King wrote: > On Fri, Jan 06, 2017 at 04:52:16PM +0100, Michael Haggerty wrote: > >> I just released `git test`, a script for running automated >> tests across a range of Git commits and keeping track of the results in >> git notes: >> >>

[PATCH 6/6] worktree remove: new command

2017-01-08 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-worktree.txt | 21 + builtin/worktree.c | 79 ++ contrib/completion/git-completion.bash | 5 ++- t/t2028-worktree-move.sh | 26

[PATCH 5/6] worktree move: refuse to move worktrees with submodules

2017-01-08 Thread Nguyễn Thái Ngọc Duy
Submodules contains .git files with relative paths. After a worktree move, these files need to be updated or they may point to nowhere. This is a bandage patch to make sure "worktree move" don't break people's worktrees by accident. When .git file update code is in place, this

[PATCH 4/6] worktree move: accept destination as directory

2017-01-08 Thread Nguyễn Thái Ngọc Duy
Similar to "mv a b/", which is actually "mv a b/a", we extract basename of source worktree and create a directory of the same name at destination if dst path is a directory. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/worktree.c | 19 ++- 1 file changed,

[PATCH 1/6] worktree.c: add validate_worktree()

2017-01-08 Thread Nguyễn Thái Ngọc Duy
This function is later used by "worktree move" and "worktree remove" to ensure that we have a good connection between the repository and the worktree. For example, if a worktree is moved manually, the worktree location recorded in $GIT_DIR/worktrees/.../gitdir is incorrect and we should not move

[PATCH 2/6] worktree.c: add update_worktree_location()

2017-01-08 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- worktree.c | 21 + worktree.h | 6 ++ 2 files changed, 27 insertions(+) diff --git a/worktree.c b/worktree.c index 929072a..7684951 100644 --- a/worktree.c +++ b/worktree.c @@ -354,6 +354,27 @@ int

[PATCH 0/6] git worktree move/remove

2017-01-08 Thread Nguyễn Thái Ngọc Duy
This version is the same as nd/worktree-move but with the recursive directory copy code removed. We rely on rename() to move directories. Nguyễn Thái Ngọc Duy (6): worktree.c: add validate_worktree() worktree.c: add update_worktree_location() worktree move: new command worktree move:

[PATCH 3/6] worktree move: new command

2017-01-08 Thread Nguyễn Thái Ngọc Duy
There are two options to move the main worktree, but both have complications, so it's not implemented yet. Anyway the options are: - convert the main worktree to a linked one and move it away, leave the git repository where it is. The repo essentially becomes bare after this move. - move