commit: support commit.verbose and --no-verbose

2014-05-23 Thread Caleb Thompson
This patch allows people to set `commit.verbose` to implicitly send `--verbose` to `git commit`. It also introduces `--no-verbose` to override the configuration setting. Caleb Thompson From aa2a5d48e6cd53082613f53990bc9d0fa60809f4 Mon Sep 17 00:00:00 2001 From: Caleb Thompson Date: Fri, 23 May

[PATCH v2] commit: support commit.verbose and --no-verbose

2014-05-24 Thread Caleb Thompson
ose`, and `--no-verbose`, but no `-V` as a shortened form of `--no-verbose`. commit 1a49356b87c9028e68e731f34790c11a3075f736 Author: Caleb Thompson Date: Fri May 23 11:47:44 2014 -0500 commit: support commit.verbose and --no-verbose Add a new configuration variable commit.verbose t

[PATCH v3 1/5] commit test: Use test_config instead of git-config

2014-05-26 Thread Caleb Thompson
Some of the tests in t/t7507-commit-verbose.sh were still using git-config to set configuration. Change them to use the test_config helper. Signed-off-by: Caleb Thompson --- t/t7507-commit-verbose.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t7507-commit

[PATCH v3 4/5] commit test: test_set_editor in each test

2014-05-26 Thread Caleb Thompson
required GIT_EDITOR=cat to avoid using a subshell and simplify their logic. Signed-off-by: Caleb Thompson --- t/t7507-commit-verbose.sh | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh index e62d921

[PATCH v3 2/5] commit test: Change $PWD to $(pwd)

2014-05-26 Thread Caleb Thompson
Signed-off-by: Caleb Thompson --- t/t7507-commit-verbose.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh index 6d778ed..3b06d73 100755 --- a/t/t7507-commit-verbose.sh +++ b/t/t7507-commit-verbose.sh @@ -8,7 +8,7 @@ cat

[PATCH v3 0/5] commit: support commit.verbose and --no-verbose

2014-05-26 Thread Caleb Thompson
to t/t7505-commit-verbose.sh to bring it closer to the current state of the tests as Eric has explained them to me, then adds the verbose config and --no-verbose flag. Caleb Thompson (5): commit test: Use test_config instead of git-config commit test: Change $PWD to $(pwd) commit

[PATCH v3 3/5] commit test: Use write_script

2014-05-26 Thread Caleb Thompson
Use write_script from t/test-lib-functions instead of cat, shebang, and chmod. Signed-off-by: Caleb Thompson --- t/t7507-commit-verbose.sh | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh index 3b06d73..e62d921

[PATCH v3 5/5] commit: support commit.verbose and --no-verbose

2014-05-26 Thread Caleb Thompson
Add a new configuration variable commit.verbose to implicitly pass `--verbose` to `git-commit`. Add `--no-verbose` to commit to negate that setting. Signed-off-by: Caleb Thompson --- Documentation/config.txt | 5 + Documentation/git-commit.txt | 8 +++- builtin

Re: [PATCH v3 5/5] commit: support commit.verbose and --no-verbose

2014-05-26 Thread Caleb Thompson
The editors, `check-for-diff` and `check-for-no-diffs`, are grepping for the output and lack thereof, respectively. On Mon, May 26, 2014 at 01:33:04PM -0700, Jeremiah Mahler wrote: > j > On Mon, May 26, 2014 at 01:56:26PM -0500, Caleb Thompson wrote: > > Add a new configurat

Re: [PATCH v3 0/5] commit: support commit.verbose and --no-verbose

2014-05-26 Thread Caleb Thompson
xpect_success 'commit --no-verbose overrides commit.verbose true' ' echo evenmorecontent >>file && git add file && test_config commit.verbose true && On Mon, May 26, 2014 at 03:34:20PM -0700, Jeremiah Mahler wrote: > Caleb, &g

Re: [PATCH v4 4/4] commit: support commit.verbose and --no-verbose

2014-06-11 Thread Caleb Thompson
y works without this hunk. I had no idea, but you're quite right. I suppose that option was just a no-op before, or could cancel a previous --verbose flag? Updated diff with that hunk removed follows. I rebuilt the branch and the tests I added for --no-verbose work as expected, as does actually us

Re: [PATCH v4 1/4] commit test: Use test_config instead of git-config

2014-06-12 Thread Caleb Thompson
I assume that you're running it against master? I rebased the branch yesterday, but I'll give it another shot. Obviously I didn't use git-am, but I can try that. Caleb Thompson On Thu, Jun 12, 2014 at 01:41:52AM -0700, Jeremiah Mahler wrote: > On Wed, Jun 11, 2014 at 01

Re: [PATCH v4 4/4] commit: support commit.verbose and --no-verbose

2014-06-12 Thread Caleb Thompson
Another update to also use quotes around the check-for-no-diff script body. If I don't get any more feedback in the next few hours I'll send another full version of the patch. Caleb Thompson >8 Add a new configuration variable comm

Re: [PATCH v4 1/4] commit test: Use test_config instead of git-config

2014-06-12 Thread Caleb Thompson
Jeremiah, On Thu, Jun 12, 2014 at 11:04:59AM -0700, Jeremiah Mahler wrote: > > Thanks for checking. Unfortunately the problem persists for me. > > It seems to be related to there not being a space at the left most part > of the patch. It is just a tab with no space. So 'git am' has a > problem

Re: [PATCH v4 1/4] commit test: Use test_config instead of git-config

2014-06-12 Thread Caleb Thompson
Jeremiah, That looks great. Since I'm not seeing any more feedback on the code for this set of patches, I'll go ahead and send up another set. Thank you for those pointers. Caleb Thompson On Thu, Jun 12, 2014 at 11:46:37AM -0700, Jeremiah Mahler wrote: > Caleb, > > On Thu,

[PATCH v5 0/4] commit: Add commit.verbose configuration

2014-06-12 Thread Caleb Thompson
ld work correctly with git-am. ------ Caleb Thompson (4): commit test: Use test_config instead of git-config commit test: Use write_script commit test: test_set_editor in each test commit: add commit.verbose configuration Documentation/config.txt | 5 +++ Documentation/

[PATCH v5 1/4] commit test: Use test_config instead of git-config

2014-06-12 Thread Caleb Thompson
Some of the tests in t/t7507-commit-verbose.sh were still using git-config to set configuration. Change them to use the test_config helper. Signed-off-by: Caleb Thompson --- t/t7507-commit-verbose.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t7507-commit

[PATCH v5 2/4] commit test: Use write_script

2014-06-12 Thread Caleb Thompson
Use write_script from t/test-lib-functions.sh instead of cat, shebang, and chmod. This protects us from potential shell meta-characters in the name of our trash directory, which would be interpreted if we set $EDITOR directly. Signed-off-by: Caleb Thompson --- t/t7507-commit-verbose.sh | 6

[PATCH v5 3/4] commit test: test_set_editor in each test

2014-06-12 Thread Caleb Thompson
relying upon the editor set once at script start. Besides being in line with current practices, it also allows the tests which set GIT_EDITOR=cat manually to avoid using a subshell and simplify their logic. Signed-off-by: Caleb Thompson --- t/t7507-commit-verbose.sh | 18 +++--- 1

[PATCH v5 4/4] commit: Add commit.verbose configuration

2014-06-12 Thread Caleb Thompson
Add a new configuration variable commit.verbose to implicitly pass --verbose to git-commit. Ensure that --no-verbose to git-commit negates that setting. Signed-off-by: Caleb Thompson --- Documentation/config.txt | 5 + Documentation/git-commit.txt | 8

Re: [PATCH v5 2/4] commit test: Use write_script

2014-06-13 Thread Caleb Thompson
Jun 12, 2014 at 02:39:00PM -0500, Caleb Thompson wrote: > > > Use write_script from t/test-lib-functions.sh instead of cat, shebang, > > and chmod. This protects us from potential shell meta-characters in the > > name of our trash directory, which would be interpreted if we set

Re: [PATCH v5 3/4] commit test: test_set_editor in each test

2014-06-13 Thread Caleb Thompson
On Fri, Jun 13, 2014 at 02:59:42AM -0400, Jeff King wrote: > On Thu, Jun 12, 2014 at 02:39:01PM -0500, Caleb Thompson wrote: > > > t/t7507-commit-verbose.sh was using a global test_set_editor call to > > build its environment. > > > > Improve robustness against globa

Re: [PATCH v5 0/4] commit: Add commit.verbose configuration

2014-06-13 Thread Caleb Thompson
On Thu, Jun 12, 2014 at 01:30:10PM -0700, Jeremiah Mahler wrote: > On Thu, Jun 12, 2014 at 02:38:58PM -0500, Caleb Thompson wrote: > > This patch allows people to set commit.verbose to implicitly send > > --verbose to git-commit. > > > > This version incorporates changes

Re: [PATCH v5 3/4] commit test: test_set_editor in each test

2014-06-13 Thread Caleb Thompson
On Fri, Jun 13, 2014 at 07:16:53PM +0200, Jakub Narębski wrote: > W dniu 2014-06-13 18:36, Caleb Thompson pisze: > >On Fri, Jun 13, 2014 at 02:59:42AM -0400, Jeff King wrote: > > >>[1] It might make sense for test_set_editor, when run from within a > >> test, t

Re: [PATCH v5 3/4] commit test: test_set_editor in each test

2014-06-16 Thread Caleb Thompson
the tests, or they might start > silently passing for the wrong reason). For this reason, and that the scope of this change has already ballooned, I'd rather not make this change in this patch if that's alright. Caleb Thompson pgpZqKhmomVpV.pgp Description: PGP signature

Re: [PATCH v5 4/4] commit: Add commit.verbose configuration

2014-06-16 Thread Caleb Thompson
On Fri, Jun 13, 2014 at 10:48:55AM -0700, Junio C Hamano wrote: > Caleb Thompson writes: > > > diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh > > index 35a4d06..402d6a1 100755 > > --- a/t/t7507-commit-verbose.sh > > +++ b/t/t7507-commi

Re: [PATCH v5 4/4] commit: Add commit.verbose configuration

2014-06-16 Thread Caleb Thompson
On Mon, Jun 16, 2014 at 02:50:57PM -0500, Caleb Thompson wrote: > On Fri, Jun 13, 2014 at 10:48:55AM -0700, Junio C Hamano wrote: > > Caleb Thompson writes: > > > > > diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh > > > index 35a4d06..402d6a1

Re: [PATCH v5 4/4] commit: Add commit.verbose configuration

2014-06-16 Thread Caleb Thompson
On Mon, Jun 16, 2014 at 01:06:45PM -0700, Junio C Hamano wrote: > Caleb Thompson writes: > > > On Fri, Jun 13, 2014 at 10:48:55AM -0700, Junio C Hamano wrote: > >> Caleb Thompson writes: > >> > >> > diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commi

[PATCH v6 2/4] commit test: Use write_script

2014-06-17 Thread Caleb Thompson
. Signed-off-by: Caleb Thompson Reviewed-by: Jeremiah Mahler --- t/t7507-commit-verbose.sh | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh index 6d778ed..db09107 100755 --- a/t/t7507-commit-verbose.sh +++ b/t/t7507-commit

[PATCH v6 3/4] commit test: test_set_editor in each test

2014-06-17 Thread Caleb Thompson
being configured globally. This also helps readers grok the tests as the setup is closer to the verification. Signed-off-by: Caleb Thompson Reviewed-by: Jeremiah Mahler --- t/t7507-commit-verbose.sh | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/t/t7507

[PATCH v6 1/4] commit test: Use test_config instead of git-config

2014-06-17 Thread Caleb Thompson
Some of the tests in t/t7507-commit-verbose.sh were still using git-config to set configuration. Change them to use the test_config helper. Signed-off-by: Caleb Thompson Reviewed-by: Jeremiah Mahler --- t/t7507-commit-verbose.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v6 0/4] commit: Add commit.verbose configuration

2014-06-17 Thread Caleb Thompson
. Since the last version of this patch (http://thread.gmane.org/gmane.comp.version-control.git/251486), there have been a couple of commit message clarifications and the body of the check-for-no-diff script in the last patch was changed to simply negate check-for-diff. Caleb Thompson

[PATCH v6 4/4] commit: Add commit.verbose configuration

2014-06-17 Thread Caleb Thompson
Add a new configuration variable commit.verbose to implicitly pass --verbose to git-commit. Ensure that --no-verbose to git-commit negates that setting. Signed-off-by: Caleb Thompson --- Documentation/config.txt | 5 + Documentation/git-commit.txt | 8

Re: [PATCH v6 0/4] commit: Add commit.verbose configuration

2015-03-02 Thread Caleb Thompson
is feedback if you'd like. Caleb Thompson On Fri, Feb 27, 2015 at 10:13:36AM +0100, Torstein Hegge wrote: > On Tue, Jun 17, 2014 at 14:38:56 -0500, Caleb Thompson wrote: > > This patch allows people to set commit.verbose to implicitly send > > --verbose to git-commit. > >