[PATCH v3 2/2] diff: document the format of the -O (diff.orderFile) file

2017-01-15 Thread Richard Hansen
Signed-off-by: Richard Hansen <hans...@google.com> --- Documentation/diff-config.txt | 5 ++--- Documentation/diff-options.txt | 34 -- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/Documentation/diff-config.txt b/Documentation/diff-conf

[PATCH v3 0/2] diff orderfile documentation improvements

2017-01-15 Thread Richard Hansen
Changes from v2: * The orderfile feature doesn't set the WM_PATHNAME flag when it calls wildmatch(), so document the pattern format accordingly. Richard Hansen (2): diff: document behavior of relative diff.orderFile diff: document the format of the -O (diff.orderFile) file

[PATCH v3 1/2] diff: document behavior of relative diff.orderFile

2017-01-15 Thread Richard Hansen
Document that a relative pathname for diff.orderFile is interpreted as relative to the top-level work directory. Signed-off-by: Richard Hansen <hans...@google.com> --- Documentation/diff-config.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/diff-config

Re: [PATCH 2/2] diff: document the pattern format for diff.orderFile

2017-01-11 Thread Richard Hansen
On 2017-01-11 13:15, Junio C Hamano wrote: Richard Hansen <hans...@google.com> writes: On 2017-01-10 21:46, Junio C Hamano wrote: Richard Hansen <hans...@google.com> writes: I was looking at the code to see how the two file formats differed and noticed that match_order()

Re: [PATCH 2/2] diff: document the pattern format for diff.orderFile

2017-01-11 Thread Richard Hansen
On 2017-01-10 21:46, Junio C Hamano wrote: Richard Hansen <hans...@google.com> writes: I was looking at the code to see how the two file formats differed and noticed that match_order() doesn't set the WM_PATHNAME flag when it calls wildmatch(). That's unintentional (a bug), right?

[PATCH v2 0/2] diff orderfile documentation improvements

2017-01-10 Thread Richard Hansen
Changes from v1: * Don't reference gitignore for the file format because they're not quite the same. Richard Hansen (2): diff: document behavior of relative diff.orderFile diff: document the format of the -O (diff.orderFile) file Documentation/diff-config.txt | 7

[PATCH v2 2/2] diff: document the format of the -O (diff.orderFile) file

2017-01-10 Thread Richard Hansen
Signed-off-by: Richard Hansen <hans...@google.com> --- Documentation/diff-config.txt | 5 ++-- Documentation/diff-options.txt | 54 -- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/Documentation/diff-config.txt b/Documentatio

[PATCH v2 1/2] diff: document behavior of relative diff.orderFile

2017-01-10 Thread Richard Hansen
Document that a relative pathname for diff.orderFile is interpreted as relative to the top-level work directory. Signed-off-by: Richard Hansen <hans...@google.com> --- Documentation/diff-config.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/diff-config

Re: [PATCH 2/2] diff: document the pattern format for diff.orderFile

2017-01-10 Thread Richard Hansen
On 2017-01-10 15:14, Junio C Hamano wrote: Richard Hansen <hans...@google.com> writes: Document the format of the patterns used for the diff.orderFile setting and diff's '-O' option by referring the reader to the gitignore[5] page. Signed-off-by: Richard Hansen <hans...@g

Re: [PATCH 1/2] diff: document behavior of relative diff.orderFile

2017-01-10 Thread Richard Hansen
On 2017-01-10 15:23, Junio C Hamano wrote: Junio C Hamano <gits...@pobox.com> writes: Richard Hansen <hans...@google.com> writes: On 2017-01-10 01:58, Jeff King wrote: ... What happens in a bare repository? I'm guessing it's relative to the top-level of the repository,

[PATCH v5 06/14] t7610: don't rely on state from previous test

2017-01-10 Thread Richard Hansen
the tests more independent so that if one test fails it doesn't cause subsequent tests to fail. Signed-off-by: Richard Hansen <hans...@google.com> --- t/t7610-mergetool.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index f62ceffdc..2d9

[PATCH v5 03/14] t7610: update branch names to match test number

2017-01-10 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 <hans...@google.com> --- t/t7610-mergetool.s

[PATCH v5 04/14] t7610: Move setup code to the 'setup' test case.

2017-01-10 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 <hans...@google.com> --- t/t7610-mergetool.s

[PATCH v5 02/14] rev-parse doc: pass "--" to rev-parse in the --prefix example

2017-01-10 Thread Richard Hansen
The "--" argument avoids "ambiguous argument: unknown revision or path not in the working tree" errors when a pathname argument refers to a non-existent file. The "--" passed explicitly to set was removed because rev-parse outputs the "--" argument that it

[PATCH v5 05/14] t7610: use test_when_finished for cleanup tasks

2017-01-10 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 <hans...@google.com> --- t/t7610-mergetool.sh | 71 +++- 1 file changed, 37 insertions(

[PATCH v5 10/14] t7610: don't assume the checked-out commit

2017-01-10 Thread Richard Hansen
-by: Richard Hansen <hans...@google.com> --- t/t7610-mergetool.sh | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index efcf5c3f1..54164a320 100755 --- a/t/t7610-mergetool.sh +++ b/t/t7610-mergetool.sh @@ -184,7

[PATCH v5 08/14] t7610: delete some now-unnecessary 'git reset --hard' lines

2017-01-10 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 <hans...@google.com> --- t/t7610-mergetool.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/t

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

2017-01-10 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 <hans...@google.com> --- git-mergetool.sh | 4 ++-- 1 file changed, 2 inse

[PATCH v5 11/14] t7610: spell 'git reset --hard' consistently

2017-01-10 Thread Richard Hansen
Signed-off-by: Richard Hansen <hans...@google.com> --- 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 v5 07/14] t7610: run 'git reset --hard' after each test to clean up

2017-01-10 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 <h

[PATCH v5 14/14] mergetool: fix running in subdir when rerere enabled

2017-01-10 Thread Richard Hansen
relative pathnames so that 'git mergetool' does not fail when run from a subdirectory with rerere enabled. This fixes a regression introduced in 57937f70a09c12ef484c290865dac4066d207c9c (v2.11.0). Based-on-patch-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Richard Hansen <hans...@g

[PATCH v5 12/14] t7610: add test case for rerere+mergetool+subdir bug

2017-01-10 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 <hans...@google.com> --- t/t7610-mergetool.sh | 21 - 1

[PATCH v5 00/14] fix mergetool+rerere+subdir regression

2017-01-10 Thread Richard Hansen
-parse --sq -- "$@")" shift for both 02/14 and 14/14. Richard Hansen (14): .mailmap: Use my personal email address as my canonical rev-parse doc: pass "--" to rev-parse in the --prefix example t7610: update branch names to match test number t7610: Move setup co

[PATCH v5 01/14] .mailmap: Use my personal email address as my canonical

2017-01-10 Thread Richard Hansen
-off-by: Richard Hansen <hans...@google.com> --- .mailmap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.mailmap b/.mailmap index 9cc33e925..9c87a3840 100644 --- a/.mailmap +++ b/.mailmap @@ -192,6 +192,8 @@ Philippe Bruhat <b...@cpan.org> Ralf Thielow <ralf.thie...@gmail.

[PATCH v5 09/14] t7610: always work on a test-specific branch

2017-01-10 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 <h

Re: [PATCH 1/2] diff: document behavior of relative diff.orderFile

2017-01-10 Thread Richard Hansen
On 2017-01-10 01:58, Jeff King wrote: On Mon, Jan 09, 2017 at 07:40:30PM -0500, Richard Hansen wrote: Document that a relative pathname for diff.orderFile is interpreted as relative to the top-level work directory. Signed-off-by: Richard Hansen <hans...@google.com> --- Documentatio

Re: [PATCH v4 14/14] mergetool: fix running in subdir when rerere enabled

2017-01-10 Thread Richard Hansen
On 2017-01-10 01:17, Johannes Sixt wrote: Am 10.01.2017 um 00:29 schrieb Richard Hansen: The pathnames output by the 'git rerere remaining' command are relative to the top-level directory but the 'git diff --name-only' command expects its pathname arguments to be relative to the current working

[PATCH 2/2] diff: document the pattern format for diff.orderFile

2017-01-09 Thread Richard Hansen
Document the format of the patterns used for the diff.orderFile setting and diff's '-O' option by referring the reader to the gitignore[5] page. Signed-off-by: Richard Hansen <hans...@google.com> --- Documentation/diff-config.txt | 3 ++- Documentation/diff-options.txt | 3 ++- 2 files c

[PATCH 1/2] diff: document behavior of relative diff.orderFile

2017-01-09 Thread Richard Hansen
Document that a relative pathname for diff.orderFile is interpreted as relative to the top-level work directory. Signed-off-by: Richard Hansen <hans...@google.com> --- Documentation/diff-config.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/diff-config

[PATCH 0/2] minor diff orderfile documentation improvements

2017-01-09 Thread Richard Hansen
Richard Hansen (2): diff: document behavior of relative diff.orderFile diff: document the pattern format for diff.orderFile Documentation/diff-config.txt | 5 - Documentation/diff-options.txt | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) -- 2.11.0.390.gc69c2f50cf-goog

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

2017-01-09 Thread Richard Hansen
On 2017-01-09 18:29, Junio C Hamano wrote: Junio C Hamano writes: Junio C Hamano writes: I wonder if it makes more sense to always move to toplevel upfront and consistently use path from the toplevel, perhaps like the patch s/the patch/the attached

[PATCH v4 11/14] t7610: spell 'git reset --hard' consistently

2017-01-09 Thread Richard Hansen
Signed-off-by: Richard Hansen <hans...@google.com> --- 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 v4 08/14] t7610: delete some now-unnecessary 'git reset --hard' lines

2017-01-09 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 <hans...@google.com> --- t/t7610-mergetool.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/t

[PATCH v4 14/14] mergetool: fix running in subdir when rerere enabled

2017-01-09 Thread Richard Hansen
relative pathnames so that 'git mergetool' does not fail when run from a subdirectory with rerere enabled. This fixes a regression introduced in 57937f70a09c12ef484c290865dac4066d207c9c (v2.11.0). Based-on-patch-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Richard Hansen <hans...@g

[PATCH v4 12/14] t7610: add test case for rerere+mergetool+subdir bug

2017-01-09 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 <hans...@google.com> --- t/t7610-mergetool.sh | 21 - 1

[PATCH v4 10/14] t7610: don't assume the checked-out commit

2017-01-09 Thread Richard Hansen
-by: Richard Hansen <hans...@google.com> --- t/t7610-mergetool.sh | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index efcf5c3f1..54164a320 100755 --- a/t/t7610-mergetool.sh +++ b/t/t7610-mergetool.sh @@ -184,7

[PATCH v4 03/14] t7610: update branch names to match test number

2017-01-09 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 <hans...@google.com> --- t/t7610-mergetool.s

[PATCH v4 05/14] t7610: use test_when_finished for cleanup tasks

2017-01-09 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 <hans...@google.com> --- t/t7610-mergetool.sh | 71 +++- 1 file changed, 37 insertions(

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

2017-01-09 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 <hans...@google.com> --- git-mergetool.sh | 4 ++-- 1 file changed, 2 inse

[PATCH v4 07/14] t7610: run 'git reset --hard' after each test to clean up

2017-01-09 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 <h

[PATCH v4 06/14] t7610: don't rely on state from previous test

2017-01-09 Thread Richard Hansen
the tests more independent so that if one test fails it doesn't cause subsequent tests to fail. Signed-off-by: Richard Hansen <hans...@google.com> --- t/t7610-mergetool.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index f62ceffdc..2d9

[PATCH v4 04/14] t7610: Move setup code to the 'setup' test case.

2017-01-09 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 <hans...@google.com> --- t/t7610-mergetool.s

[PATCH v4 09/14] t7610: always work on a test-specific branch

2017-01-09 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 <h

[PATCH v4 02/14] rev-parse doc: use "--" in the --prefix example

2017-01-09 Thread Richard Hansen
The "--" argument avoids "ambiguous argument: unknown revision or path not in the working tree" errors when a pathname argument refers to a non-existent file. Signed-off-by: Richard Hansen <hans...@google.com> --- Documentation/git-rev-parse.txt | 3 ++- 1 file c

[PATCH v4 00/14] fix mergetool+rerere+subdir regression

2017-01-09 Thread Richard Hansen
ocs to use "--" in the --prefix example. * Unconditionally run cd_to_toplevel at the beginning to simplify the control flow. Thanks Junio! * Test -O when there is also a branch named . Richard Hansen (14): .mailmap: Use my personal email address as my canonical rev-parse doc: use

[PATCH v4 01/14] .mailmap: Use my personal email address as my canonical

2017-01-09 Thread Richard Hansen
-off-by: Richard Hansen <hans...@google.com> --- .mailmap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.mailmap b/.mailmap index 9cc33e925..9c87a3840 100644 --- a/.mailmap +++ b/.mailmap @@ -192,6 +192,8 @@ Philippe Bruhat <b...@cpan.org> Ralf Thielow <ralf.thie...@gmail.

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

2017-01-09 Thread Richard Hansen
On 2017-01-09 14:05, Junio C Hamano wrote: Junio C Hamano writes: I wonder if it makes more sense to always move to toplevel upfront and consistently use path from the toplevel, perhaps like the patch s/the patch/the attached patch/ I meant. does. The first hunk is

[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 <hans...@google.com> --- t/t7610-mergetool.s

[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 <h

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

2017-01-08 Thread Richard Hansen
Signed-off-by: Richard Hansen <hans...@google.com> --- 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 <hans...@google.com> --- t/t7610-mergetool.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/t

[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 <hans...@google.com> --- t/t7610-mergetool.sh | 71 +++- 1 file changed, 37 insertions(

[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 <h

[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 <hans...@google.com> --- git-mergetool.sh | 4 ++-- 1 file changed, 2 inse

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

2017-01-08 Thread Richard Hansen
in 57937f70a09c12ef484c290865dac4066d207c9c (v2.11.0). Signed-off-by: Richard Hansen <hans...@google.com> --- git-mergetool.sh | 32 t/t7610-mergetool.sh | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/git-mergetool.sh b/git-mergetool.sh index b506896dc..22f

[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 <hans...@google.com> --- t/t7610-mergetool.sh | 21 - 1

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

2017-01-08 Thread Richard Hansen
the tests more independent so that if one test fails it doesn't cause subsequent tests to fail. Signed-off-by: Richard Hansen <hans...@google.com> --- t/t7610-mergetool.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index f62ceffdc..2d9

[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 <hans...@google.com> --- t/t7610-mergetool.s

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

2017-01-08 Thread Richard Hansen
-by: Richard Hansen <hans...@google.com> --- t/t7610-mergetool.sh | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index efcf5c3f1..54164a320 100755 --- a/t/t7610-mergetool.sh +++ b/t/t7610-mergetool.sh @@ -184,7

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

2017-01-08 Thread Richard Hansen
* Patch 2/4 was split into multiple separate commits. * Moved '-O' out of $orderfile. * $orderfile is now adjusted after running cd_to_toplevel. * Added lots of comments. * Other minor tweaks to address review feedback. Richard Hansen (13): .mailmap: Use my personal email address as my

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

2017-01-08 Thread Richard Hansen
-off-by: Richard Hansen <hans...@google.com> --- .mailmap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.mailmap b/.mailmap index 9cc33e925..9c87a3840 100644 --- a/.mailmap +++ b/.mailmap @@ -192,6 +192,8 @@ Philippe Bruhat <b...@cpan.org> Ralf Thielow <ralf.thie...@gmail.

Re: [PATCH v2 4/4] mergetool: fix running in subdir when rerere enabled

2017-01-06 Thread Richard Hansen
On 2017-01-06 04:42, Johannes Sixt wrote: Am 06.01.2017 um 02:09 schrieb 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 pathnames emitted by 'git rerere remaining'. Also run

Re: [PATCH v2 2/4] t7610: make tests more independent and debuggable

2017-01-06 Thread Richard Hansen
On 2017-01-05 20:31, Stefan Beller wrote: On Thu, Jan 5, 2017 at 5:09 PM, Richard Hansen <hans...@google.com> wrote: Reduce how much a test can interfere other tests: A bullet point list as an unordered list often indicates that you're doing multiple things at once, possibly unrelat

[PATCH v2 0/4] fix mergetool+rerere+subdir regression

2017-01-05 Thread Richard Hansen
to improve the commit message, improve test case independence even further, and use 'test_when_finished "git reset --hard"' instead of a plain 'git reset --hard'. Richard Hansen (4): t7610: update branch names to match test number t7610: make tests more independent and debuggab

[PATCH v2 2/4] t7610: make tests more independent and debuggable

2017-01-05 Thread Richard Hansen
-by: Richard Hansen <hans...@google.com> --- t/t7610-mergetool.sh | 146 +-- 1 file changed, 84 insertions(+), 62 deletions(-) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index 14090739f..2c06cf73f 100755 --- a/t/t7610-mergetool.sh

[PATCH v2 4/4] mergetool: fix running in subdir when rerere enabled

2017-01-05 Thread Richard Hansen
changed to print pathnames relative to the current directory rather than to $GIT_WORK_TREE. This fixes a regression introduced in 57937f70a09c12ef484c290865dac4066d207c9c (v2.11.0). Signed-off-by: Richard Hansen <hans...@google.com> --- git-mergetool.sh | 1 + t/t7610-mergetool.sh | 2 +- 2

[PATCH v2 1/4] t7610: update branch names to match test number

2017-01-05 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 <hans...@google.com> --- t/t7610-mergetool.s

[PATCH v2 3/4] t7610: add test case for rerere+mergetool+subdir bug

2017-01-05 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 <hans...@google.com> --- t/t7610-mergetool.sh | 21 - 1

Re: [PATCH 2/4] t7610: make tests more independent and debuggable

2017-01-05 Thread Richard Hansen
On 2017-01-04 15:27, Stefan Beller wrote: On Tue, Jan 3, 2017 at 4:50 PM, Richard Hansen <hans...@google.com> wrote: If a test fails it might leave the repository in a strange state. Add 'git reset --hard' at the beginning of each test to increase the odds of passing when an earlier test

Re: [PATCH 2/4] t7610: make tests more independent and debuggable

2017-01-05 Thread Richard Hansen
On 2017-01-05 07:20, Simon Ruderich wrote: On Tue, Jan 03, 2017 at 07:50:40PM -0500, Richard Hansen wrote: [snip] @@ -145,8 +148,13 @@ test_expect_success 'mergetool in subdir' ' ' test_expect_success 'mergetool on file in parent dir' ' + git reset --hard && + git che

Re: [PATCH 2/4] t7610: make tests more independent and debuggable

2017-01-05 Thread Richard Hansen
On 2017-01-04 15:27, Stefan Beller wrote: On Tue, Jan 3, 2017 at 4:50 PM, Richard Hansen <hans...@google.com> wrote: If a test fails it might leave the repository in a strange state. Add 'git reset --hard' at the beginning of each test to increase the odds of passing when an earlie

[PATCH 0/4] fix mergetool+rerere+subdir regression

2017-01-03 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). Richard Hansen (4): t7610: update branch name

[PATCH 1/4] t7610: update branch names to match test number

2017-01-03 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 <hans...@google.com> --- t/t7610-mergetool.s

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

2017-01-03 Thread Richard Hansen
changed to print pathnames relative to the current directory rather than to $GIT_WORK_TREE. This fixes a regression introduced in 57937f70a09c12ef484c290865dac4066d207c9c (v2.11.0). Signed-off-by: Richard Hansen <hans...@google.com> --- git-mergetool.sh | 1 + t/t7610-mergetool.sh | 2 +- 2

[PATCH 3/4] t7610: add test case for rerere+mergetool+subdir bug

2017-01-03 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 <hans...@google.com> --- t/t7610-mergetool.sh | 21 - 1

[PATCH 2/4] t7610: make tests more independent and debuggable

2017-01-03 Thread Richard Hansen
-off-by: Richard Hansen <hans...@google.com> --- t/t7610-mergetool.sh | 27 +++ 1 file changed, 27 insertions(+) diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index 14090739f..8e2b4e147 100755 --- a/t/t7610-mergetool.sh +++ b/t/t7610-mergetool.sh @@ -94,6

[PATCH 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Richard Hansen
of a subshell and two invocations of tput per call to say_color(). Signed-off-by: Richard Hansen rhan...@bbn.com --- t/test-lib.sh | 53 - 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 57212ec..4a59bfb

[PATCH 1/2] Revert test-lib.sh: do tests for color support after changing HOME

2015-06-17 Thread Richard Hansen
This reverts commit 102fc80d32094ad6598b17ab9d607516ee8edc4a. There are two issues with that commit: * It is buggy. In pseudocode, it is doing: color is set || TERM != dumb color works color=t when it should be doing: color is set || { TERM != dumb color works color=t

[PATCH 0/2] redo fix for test-lib.sh color support

2015-06-17 Thread Richard Hansen
it properly, I hope :) Richard Hansen (2): Revert test-lib.sh: do tests for color support after changing HOME test-lib.sh: fix color support when tput needs ~/.terminfo t/test-lib.sh | 103 +- 1 file changed, 51 insertions(+), 52 deletions

Re: [PATCH 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Richard Hansen
On 2015-06-17 15:43, Jeff King wrote: On Wed, Jun 17, 2015 at 03:06:26PM -0400, Richard Hansen wrote: +say_color_error=$(tput bold; tput setaf 1) # bold red +say_color_skip=$(tput setaf 4) # blue +say_color_warn=$(tput setaf 3) # brown/yellow +say_color_pass=$(tput setaf 2

[PATCH v2 0/2] redo fix for test-lib.sh color support

2015-06-17 Thread Richard Hansen
. This avoids the need to test whether the variable say_color_$1 is set. * Rename say_color_sgr0 to say_color_reset. * Add a new variable say_color_ (set to the empty string) as a way of documenting that $1 is expected to be the empty string for normal text. Richard Hansen (2

[PATCH v2 1/2] Revert test-lib.sh: do tests for color support after changing HOME

2015-06-17 Thread Richard Hansen
This reverts commit 102fc80d32094ad6598b17ab9d607516ee8edc4a. There are two issues with that commit: * It is buggy. In pseudocode, it is doing: color is set || TERM != dumb color works color=t when it should be doing: color is set || { TERM != dumb color works color=t

[PATCH v2 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo

2015-06-17 Thread Richard Hansen
of a subshell and two invocations of tput per call to say_color(). Signed-off-by: Richard Hansen rhan...@bbn.com --- t/test-lib.sh | 57 - 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 57212ec

[PATCH v2 0/2] Documentation/githooks: mention pwd, $GIT_PREFIX

2015-01-10 Thread Richard Hansen
patch 1/2 is the same as v1 patch 2/2 has been reworked to incorporate Hannes's feedback (thank you!) -Richard Richard Hansen (2): Documentation/githooks: mention pwd, $GIT_PREFIX t1020-subdirectory.sh: check hook pwd, $GIT_PREFIX Documentation/githooks.txt | 6 ++ t/t1020

[PATCH 0/2] Documentation/githooks: mention pwd, $GIT_PREFIX

2015-01-09 Thread Richard Hansen
for alias.* should also be shored up. -Richard Richard Hansen (2): Documentation/githooks: mention pwd, $GIT_PREFIX t1020-subdirectory.sh: check hook pwd, $GIT_PREFIX Documentation/githooks.txt | 6 ++ t/t1020-subdirectory.sh| 34 ++ 2 files changed

[PATCH 2/2] t1020-subdirectory.sh: check hook pwd, $GIT_PREFIX

2015-01-09 Thread Richard Hansen
Make sure hooks are executed at the top-level directory and that GIT_PREFIX is set (as documented). Signed-off-by: Richard Hansen rhan...@bbn.com --- t/t1020-subdirectory.sh | 34 ++ 1 file changed, 34 insertions(+) diff --git a/t/t1020-subdirectory.sh b/t/t1020

[PATCH 1/2] Documentation/githooks: mention pwd, $GIT_PREFIX

2015-01-09 Thread Richard Hansen
Document that hooks are run from the top-level directory and that GIT_PREFIX is set to the name of the original subdirectory (relative to the top-level directory). Signed-off-by: Richard Hansen rhan...@bbn.com --- Documentation/githooks.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH v2 1/2] use 'test ...' instead of '[ ... ]'

2015-01-06 Thread Richard Hansen
(see Documentation/CodingGuidelines) Signed-off-by: Richard Hansen rhan...@bbn.com --- t/test-lib.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 9acdc88..3670eed 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -184,10 +184,10

[PATCH v2 0/2] test-lib.sh: do tests for color support after changing HOME

2015-01-06 Thread Richard Hansen
to fix them with a follow-up patch? I added a prequel patch to address this. Thank you for taking a look, Richard Richard Hansen (2): use 'test ...' instead of '[ ... ]' test-lib.sh: do tests for color support after changing HOME t/test-lib.sh | 92

[PATCH v2 2/2] test-lib.sh: do tests for color support after changing HOME

2015-01-06 Thread Richard Hansen
directory, NetBSD uses a ~/.terminfo.cdb database file). Signed-off-by: Richard Hansen rhan...@bbn.com --- t/test-lib.sh | 90 +++ 1 file changed, 47 insertions(+), 43 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 3670eed..bb1402d

[PATCH v5 0/2] git-prompt.sh: Option to hide prompt for ignored pwd

2015-01-06 Thread Richard Hansen
the SP after (but not before) redirection operator . Done. Thanks for the review, Richard Jess Austin (1): git-prompt.sh: Option to hide prompt for ignored pwd Richard Hansen (1): git-prompt.sh: if pc mode, immediately set PS1 to a plain prompt contrib/completion/git-prompt.sh | 24

[PATCH v5 1/2] git-prompt.sh: if pc mode, immediately set PS1 to a plain prompt

2015-01-06 Thread Richard Hansen
At the beginning of __git_ps1, right after determining that the function is running in pc mode, set PS1 to a plain (undecorated) prompt. This makes it possible to simply return early without having to set PS1 if the prompt should not be decorated. Signed-off-by: Richard Hansen rhan...@bbn.com

[PATCH v5 2/2] git-prompt.sh: Option to hide prompt for ignored pwd

2015-01-06 Thread Richard Hansen
this patch helps one shut off that noise. Signed-off-by: Jess Austin jess.aus...@gmail.com Signed-off-by: Richard Hansen rhan...@bbn.com Reviewed-by: Richard Hansen rhan...@bbn.com --- contrib/completion/git-prompt.sh | 13 + t/t9903-bash-prompt.sh | 106

[PATCH] test-lib.sh: do tests for color support after changing HOME

2015-01-05 Thread Richard Hansen
to the lack of a standard name for the terminfo database (for example, instead of a ~/.terminfo directory, NetBSD uses a ~/.terminfo.cdb database file). Signed-off-by: Richard Hansen rhan...@bbn.com --- t/test-lib.sh | 90 +++ 1 file changed, 47

[PATCH v4] git-prompt.sh: Option to hide prompt for ignored pwd

2015-01-04 Thread Richard Hansen
this patch helps one shut off that noise. Signed-off-by: Jess Austin jess.aus...@gmail.com Signed-off-by: Richard Hansen rhan...@bbn.com Reviewed-by: Richard Hansen rhan...@bbn.com --- This is the patch from: http://article.gmane.org/gmane.comp.version-control.git/258313 modified to include

Re: [PATCH] git-prompt.sh: Option to hide prompt for ignored pwd

2014-10-15 Thread Richard Hansen
On 2014-10-15 00:06, Jess Austin wrote: @@ -501,6 +506,13 @@ __git_ps1 () local f=$w$i$s$u local gitstring=$c$b${f:+$z$f}$r$p + if [ -n ${GIT_PS1_HIDE_IF_PWD_IGNORED} ] +[ $(git config --bool bash.hideIfPwdIgnored) != false ] +git check-ignore -q . +

Re: [PATCH] git-prompt.sh: Hide prompt for ignored pwd

2014-10-14 Thread Richard Hansen
On 2014-10-14 14:47, Johannes Sixt wrote: Am 14.10.2014 um 04:32 schrieb Jess Austin: diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index c5473dc..d7559ff 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -84,6 +84,11

Re: [PATCH] git-prompt.sh: Hide prompt for ignored pwd

2014-10-14 Thread Richard Hansen
that noise. Signed-off-by: Jess Austin jess.aus...@gmail.com --- On Thu, Oct 9, 2014 at 5:09 PM, Richard Hansen rhan...@bbn.com wrote: On 2014-10-09 06:27, Jess Austin wrote: Would you want this configured in each repo (i.e. via a line in .git/config), or would you prefer something global so

Re: [PATCH] git-prompt.sh: Omit prompt for ignored directories

2014-10-09 Thread Richard Hansen
On 2014-10-09 06:27, Jess Austin wrote: On Thu, Oct 9, 2014 at 12:37 AM, Richard Hansen rhan...@bbn.com wrote: On 2014-10-08 17:37, Jess Austin wrote: On Wed, Oct 8, 2014 at 4:12 PM, Richard Hansen rhan...@bbn.com wrote: On 2014-10-08 15:04, Jess Austin wrote: Introduce a new environmental

Re: [PATCH] git-prompt.sh: Omit prompt for ignored directories

2014-10-08 Thread Richard Hansen
On 2014-10-08 15:04, Jess Austin wrote: Introduce a new environmental variable, GIT_PS1_OMITIGNORED, which tells __git_ps1 to display nothing when the current directory is set (e.g. via .gitignore) to be ignored by git. In the absence of GIT_PS1_OMITIGNORED this change has no effect. Many

  1   2   3   >