[PATCH v5 2/3] config.c: introduce 'git_config_color' to parse ANSI colors

2018-04-05 Thread Taylor Blau
In preparation for adding `--type=color` to the `git-config(1)` builtin, let's introduce a color parsing utility, `git_config_color` in a similar fashion to `git_config_`. Signed-off-by: Taylor Blau --- config.c | 10 ++ config.h | 1 + 2 files changed, 11 insertions(+) diff --

[PATCH v5 3/3] builtin/config: introduce `color` type specifier

2018-04-05 Thread Taylor Blau
er `--get-color` alone. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 7 +++ builtin/config.c | 22 ++ t/t1300-repo-config.sh | 30 ++ 3 files changed, 59 insertions(+) diff --git a/Documentation/g

[PATCH v6 0/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-05 Thread Taylor Blau
com/T/#mab6aee239c023445fd72693728b566cad5e0fc66 Taylor Blau (2): builtin/config.c: treat type specifiers singularly builtin/config.c: support `--type=` as preferred alias for `--type` Documentation/git-config.txt | 73 +++--- builtin/config.c

[PATCH v6 1/2] builtin/config.c: treat type specifiers singularly

2018-04-05 Thread Taylor Blau
`OPT_BIT` is. (2) a future patch will introduce `--type=`, and we would like not to complain in the following situation: $ git config --int --type=int Signed-off-by: Taylor Blau --- builtin/config.c | 49 +++--- t/t1300-repo-config.sh | 11 ++

[PATCH v6 2/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-05 Thread Taylor Blau
ch to support querying a color value with a default via `--type=color --default=...`, without squandering `--color`. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 73 builtin/config.c | 27 + t/t1300-repo-config.sh |

Re: [PATCH v5 2/2] builtin/config.c: prefer `--type=bool` over `--bool`, etc.

2018-04-05 Thread Taylor Blau
On Fri, Apr 06, 2018 at 02:14:34AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 1:29 AM, Taylor Blau wrote: > > builtin/config.c: prefer `--type=bool` over `--bool`, etc. > > This patch isn't just preferring --type; it's actually introducing the > functionali

Re: [PATCH v6 2/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 03:04:53AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:39 AM, Taylor Blau wrote: > > [...] > > In this patch, we support `--type=` in > > addition to `--int`, `--bool`, and etc. This allows the aforementioned > > upcoming patch to sup

Re: [PATCH v5 3/3] builtin/config: introduce `color` type specifier

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 03:29:48AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: > > [...] > > For consistency, let's introduce `--type=color` and encourage its use > > with `--default` together over `--get-color` alone. > > A

Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 02:53:45AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: > > [...] > > This commit (and those following it in this series) aim to eventually > > replace `--get-color` with a consistent alternative. By introducing >

Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 03:40:56AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:53 AM, Eric Sunshine wrote: > > On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: > >> +test_expect_success 'uses entry when available' ' > >> + echo ba

Re: [PATCH v5 2/2] builtin/config.c: prefer `--type=bool` over `--bool`, etc.

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 10:55:18AM -0400, Jeff King wrote: > On Fri, Apr 06, 2018 at 02:14:34AM -0400, Eric Sunshine wrote: > > > > diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt > > > @@ -9,13 +9,13 @@ git-config - Get and set repository or global options > > > SYNOPSIS

[PATCH v7 2/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-09 Thread Taylor Blau
ch to support querying a color value with a default via `--type=color --default=...`, without squandering `--color`. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 71 builtin/config.c | 27 ++ t/t1300-repo-config.sh |

[PATCH v7 0/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-09 Thread Taylor Blau
gh I am glad that we hashed out the important details. I have a better idea of how to discuss on this list without increasing the re-roll count so much. Thanks in advance for your review :-). Thanks, Taylor [1]: https://public-inbox.org/git/capig+cqxjulwpxfwhq98a23wfaazkzpkovqwbdxakkhliw-

[PATCH v7 1/2] builtin/config.c: treat type specifiers singularly

2018-04-09 Thread Taylor Blau
`OPT_BIT` is. (2) a future patch will introduce `--type=`, and we would like not to complain in the following situation: $ git config --int --type=int Signed-off-by: Taylor Blau --- builtin/config.c | 49 +++--- t/t1300-repo-config.sh | 11 ++

[PATCH v6 0/3] Teach `--default` to `git-config(1)`

2018-04-09 Thread Taylor Blau
ic's suggestions. - Remove extraneous braces, newlines from builtin/config.c. (cc: Eric). - Rename, reorder tests in t1310 to make clear which tests are duals of one another. Use '-c' to introduce short-lived configuration values. (cc: Eric). Thanks, Taylor Taylor Bl

[PATCH v6 2/3] config.c: introduce 'git_config_color' to parse ANSI colors

2018-04-09 Thread Taylor Blau
In preparation for adding `--type=color` to the `git-config(1)` builtin, let's introduce a color parsing utility, `git_config_color` in a similar fashion to `git_config_`. Signed-off-by: Taylor Blau --- config.c | 10 ++ config.h | 1 + 2 files changed, 11 insertions(+) diff --

[PATCH v6 3/3] builtin/config: introduce `color` type specifier

2018-04-09 Thread Taylor Blau
er `--get-color` alone. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 6 ++ builtin/config.c | 22 ++ t/t1300-repo-config.sh | 30 ++ 3 files changed, 58 insertions(+) diff --git a/Documentation/g

[PATCH v6 3/3] builtin/config: introduce `color` type specifier

2018-04-09 Thread Taylor Blau
er `--get-color` alone. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 6 ++ builtin/config.c | 22 ++ t/t1300-repo-config.sh | 30 ++ 3 files changed, 58 insertions(+) diff --git a/Documentation/g

[PATCH v6 1/3] builtin/config: introduce `--default`

2018-04-09 Thread Taylor Blau
with `--default`) will be sufficient to replace `--get-color`. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 4 builtin/config.c | 18 ++ t/t1310-config-default.sh| 36 3 files changed, 58 insertions(+) c

Re: [PATCH v4 1/3] builtin/config: introduce `--default`

2018-04-09 Thread Taylor Blau
On Mon, Apr 09, 2018 at 08:18:18AM +0900, Junio C Hamano wrote: > Jeff King writes: > > > On Wed, Apr 04, 2018 at 07:59:12PM -0700, Taylor Blau wrote: > > > >> @@ -286,6 +288,16 @@ static int get_value(const char *key_, const char > >> *regex_) > >>

Re: [PATCH v7 1/2] builtin/config.c: treat type specifiers singularly

2018-04-09 Thread Taylor Blau
On Tue, Apr 10, 2018 at 10:22:25AM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > > Internally, we represent `git config`'s type specifiers as a bitset > > using OPT_BIT. 'bool' is 1<<0, 'int' is 1<<1, and so on. This technique > &

Re: [PATCH v7 2/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-09 Thread Taylor Blau
On Tue, Apr 10, 2018 at 10:44:18AM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > > `git config` has long allowed the ability for callers to provide a 'type > > specifier', which instructs `git config` to (1) ensure that incoming > > values are satisfi

[PATCH v8 0/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-10 Thread Taylor Blau
fval. I think that the above is the best-of-all-worlds choice, but I am curious to hear everyone else's thoughts. Thanks in advance for your review. Thanks, Taylor Taylor Blau (2): builtin/config.c: treat type specifiers singularly builtin/config.c: support `--type=` as preferred alias f

[PATCH v8 1/2] builtin/config.c: treat type specifiers singularly

2018-04-10 Thread Taylor Blau
`OPT_BIT` is. (2) a future patch will introduce `--type=`, and we would like not to complain in the following situation: $ git config --int --type=int Signed-off-by: Taylor Blau --- builtin/config.c | 49 +++--- t/t1300-repo-config.sh | 11 ++

[PATCH v8 2/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-10 Thread Taylor Blau
its commutative pair) does not complain, but `--bool --type=int` (and its commutative pair) does. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 71 builtin/config.c | 62 --- t/t

Re: [PATCH v8 0/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-10 Thread Taylor Blau
On Wed, Apr 11, 2018 at 10:24:45AM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > > Attached is the eighth re-roll of my series to add `--type=` as > > the preferred alternative for `--`. > > > > The main changes since v7 concern handling degenerate cases, s

Re: git-lfs question

2018-04-10 Thread Taylor Blau
On Wed, Apr 11, 2018 at 01:16:42AM +, John Sullivan wrote: > Hello - I've seen instructions that say after installing git to also install > git-lfs. > > But today when installing git I noticed that in the install options > there was a default selected options stating "Git LFS (Large File > Sup

Re: [PATCH v8 0/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-10 Thread Taylor Blau
On Wed, Apr 11, 2018 at 12:11:47PM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > >> > +#define OPT_CALLBACK_VALUE(s, l, h, f, i) \ > >> > +{ OPTION_CALLBACK, (s), (l), NULL, NULL, (h), PARSE_OPT_NOARG | > >> > \ > >> > +

Re: [PATCH 8/8] gpg-interface: handle alternative signature types

2018-04-17 Thread Taylor Blau
On Tue, Apr 17, 2018 at 12:08:20PM -0600, Ben Toews wrote: > On Mon, Apr 16, 2018 at 7:54 PM, Junio C Hamano wrote: > > "brian m. carlson" writes: > > > >> If we just want to add gpgsm support, that's fine, but we should be > >> transparent about that fact and try to avoid making an interface whi

Re: [PATCH] docs/pretty-formats: mention commas in %(trailers) syntax

2017-12-08 Thread Taylor Blau
On Fri, Dec 08, 2017 at 12:16:36AM -0500, Jeff King wrote: > Commit 84ff053d47 (pretty.c: delimit "%(trailers)" arguments > with ",", 2017-10-01) switched the syntax of the trailers > placeholder, but forgot to update the documentation in > pretty-formats.txt. > > There's need to mention the old sy

Re: [PATCH v3 4/4] convert: add "status=delayed" to filter process protocol

2017-04-12 Thread Taylor Blau
milar to window size (again!) in e.g TCP) > > > > The number of outstanding blobs is may be less important, and it is more > > important to monitor the number of bytes we keep in memory in some way. > > > > Something like "we set a limit to 500K of out standng data", once we are > > above the limit, don't send any new blobs. > > I don't expect the filter to keep everything in memory. If there is no memory > anymore then I expect the filter to spool to disk. This keeps the protocol > simple. > If this turns out to be not sufficient then we could improve that later, too. Agree. -- Thanks, Taylor Blau

Re: [PATCH v3 4/4] convert: add "status=delayed" to filter process protocol

2017-04-12 Thread Taylor Blau
was tenatively thinking of suggesting to remove this command and instead allow the filter to send readied blobs in sequence after all unique checkout entries had been sent from Git to the filter. But I think this allows approach allows us more flexibility, and isn't that much extra complication or bytes across the pipe. -- Thanks, Taylor Blau

Re: [PATCH v3 4/4] convert: add "status=delayed" to filter process protocol

2017-04-18 Thread Taylor Blau
anks for correcting my thinking here. I ran a simple command to get the longest path names in a large repository, as: $ find . -type f | awk '{ print length($1) }' | sort -r -n | uniq -c And found a few files close to the 200 character mark as the longest pathnames in the repository. I think 50k files at 1k bytes per pathname is quite enough head-room :-). -- Thanks, Taylor Blau

Re: [PATCH v4 4/4] convert: add "status=delayed" to filter process protocol

2017-05-22 Thread Taylor Blau
I have no remaining concerns about the protocol specification in terms of implementing a filter with this capability.

[PATCH v9 0/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-18 Thread Taylor Blau
ack and eventual consensus on the interface. Thanks, Taylor Taylor Blau (2): builtin/config.c: treat type specifiers singularly builtin/config.c: support `--type=` as preferred alias for `--type` Documentation/git-config.txt | 71 +--- builtin/config.c

[PATCH v9 1/2] builtin/config.c: treat type specifiers singularly

2018-04-18 Thread Taylor Blau
`OPT_BIT` is. (2) a future patch will introduce `--type=`, and we would like not to complain in the following situation: $ git config --int --type=int Signed-off-by: Taylor Blau --- builtin/config.c | 49 +++--- t/t1300-repo-config.sh | 11 ++

[PATCH v9 2/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-18 Thread Taylor Blau
its commutative pair) does not complain, but `--bool --type=int` (and its commutative pair) does. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 71 builtin/config.c | 63 +--- t/t

Re: [PATCH v9 2/2] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-18 Thread Taylor Blau
On Thu, Apr 19, 2018 at 11:47:50AM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > > diff --git a/builtin/config.c b/builtin/config.c > > index 92fb8d56b1..bd7a8d0ce7 100644 > > --- a/builtin/config.c > > +++ b/builtin/config.c > > @@ -61,6 +61,58 @@

[PATCH 1/6] grep.c: take regmatch_t as argument in match_line()

2018-04-20 Thread Taylor Blau
as described above). The return condition remains unchanged, therefore the only change required of callers is the addition of a single argument. Signed-off-by: Taylor Blau --- grep.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/grep.c b/grep.c index 65b90c10a3..1c257

[PATCH 6/6] contrib/git-jump/git-jump: use column number when grep-ing

2018-04-20 Thread Taylor Blau
This patch adds the '--column-number' synonym '-m' to the default grep command so that callers are brought to the correct line _and_ column of each matched location. Signed-off-by: Taylor Blau --- contrib/git-jump/git-jump | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH 0/6] Teach '--column-number' to 'git-grep(1)'

2018-04-20 Thread Taylor Blau
The description in each patch is extensive, and can serve as a reference during review. Thank you in advance for your time, and--as always--I look forward to your feedback :-). Thanks, Taylor Taylor Blau (6): grep.c: take regmatch_t as argument in match_line() grep.c: take column number

[PATCH 2/6] grep.c: take column number as argument to show_line()

2018-04-20 Thread Taylor Blau
calls to show_line() in order to pass the new required argument. Signed-off-by: Taylor Blau --- grep.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/grep.c b/grep.c index 1c25782355..29bc799ecf 100644 --- a/grep.c +++ b/grep.c @@ -1361,7 +1361,7 @@ static int next

[PATCH 4/6] grep.c: display column number of first match

2018-04-20 Thread Taylor Blau
_line() differentiates between context and non-context lines through the '&& cno' check. 'cno' will be equal to zero if and only if show_line() is invoked on a context line. It will be a non-zero value otherwise. Signed-off-by: Taylor Blau --- grep.c | 6 ++ 1 file ch

[PATCH 5/6] builtin/grep.c: show column numbers via --column-number

2018-04-20 Thread Taylor Blau
.clang-format:64:7:# int foo(); .clang-format:75:8:# void foo() Now that configuration variables such as grep.columnNumber and color.grep.columnNumber have a visible effect, we document them in this patch as well. Signed-off-by: Taylor Blau --- Documentation/config.txt | 5 + Docume

[PATCH 3/6] grep.[ch]: teach columnnum, color_columnno to grep_opt

2018-04-20 Thread Taylor Blau
, respectively. (These options remain undocumented until 'git-grep(1)' learns the --column option in a forthcoming commit.) Signed-off-by: Taylor Blau --- grep.c | 8 grep.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/grep.c b/grep.c index 29bc799ecf..7872a5d868 1

Re: What's cooking in git.git (Apr 2018, #02; Tue, 17)

2018-04-22 Thread Taylor Blau
On Tue, Apr 17, 2018 at 03:07:46PM +0900, Junio C Hamano wrote: > * tb/config-type (2018-04-10) 2 commits > - builtin/config.c: support `--type=` as preferred alias for `--` > - builtin/config.c: treat type specifiers singularly > (this branch is used by tb/config-default.) > > The "git config"

[PATCH v2 0/6] Teach '--column-number' to 'git-grep(1)'

2018-04-22 Thread Taylor Blau
this series. It was suggested by Martin in [2]. Thanks in advance for your second round of review :-). Thanks, Taylor [1]: https://public-inbox.org/git/cef29224-718f-21e9-0242-8bcd8e9c2...@web.de/ [2]: https://public-inbox.org/git/can0hesp_bgqkf26g4tdow6wpsvr2cew6eqf3ajtkcv5pou_...@mail.gmail

[PATCH v2 5/6] builtin/grep.c: show column numbers via --column-number

2018-04-22 Thread Taylor Blau
p.lineNumber to match the casing of nearby variables. Signed-off-by: Taylor Blau --- Documentation/config.txt | 7 ++- Documentation/git-grep.txt | 8 +++- builtin/grep.c | 1 + t/t7810-grep.sh| 22 ++ 4 files changed, 36 insertions(+), 2 d

[PATCH v2 4/6] grep.c: display column number of first match

2018-04-22 Thread Taylor Blau
_line() differentiates between context and non-context lines through the '&& cno' check. 'cno' will be equal to zero if and only if show_line() is invoked on a context line. It will be a non-zero value otherwise. Signed-off-by: Taylor Blau --- grep.c | 6 ++ 1 file ch

[PATCH v2 3/6] grep.[ch]: teach columnnum, color_columnno to grep_opt

2018-04-22 Thread Taylor Blau
, respectively. (These options remain undocumented until 'git-grep(1)' learns the --column option in a forthcoming commit.) Signed-off-by: Taylor Blau --- grep.c | 8 grep.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/grep.c b/grep.c index 29bc799ecf..922ab92eff 1

[PATCH v2 6/6] contrib/git-jump/git-jump: use column number when grep-ing

2018-04-22 Thread Taylor Blau
This patch adds the '--column-number' synonym '-m' to the default grep command so that callers are brought to the correct line _and_ column of each matched location. Signed-off-by: Taylor Blau --- contrib/git-jump/git-jump | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH v2 2/6] grep.c: take column number as argument to show_line()

2018-04-22 Thread Taylor Blau
calls to show_line() in order to pass the new required argument. Signed-off-by: Taylor Blau --- grep.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/grep.c b/grep.c index 1c25782355..29bc799ecf 100644 --- a/grep.c +++ b/grep.c @@ -1361,7 +1361,7 @@ static int next

[PATCH v2 1/6] grep.c: take regmatch_t as argument in match_line()

2018-04-22 Thread Taylor Blau
as described above). The return condition remains unchanged, therefore the only change required of callers is the addition of a single argument. Signed-off-by: Taylor Blau --- grep.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/grep.c b/grep.c index 65b90c10a3..1c257

Some mutt(1) patches and scripts

2018-04-22 Thread Taylor Blau
Hi, I have spent more time contributing to the Git list lately, and as such have grown a number of patches and scripts that have been useful for my workflow. I am interested in sharing them here in the hopes that they will be useful for others as well :-). My workflow is as follows: 1. Write s

Re: [PATCH v2 3/6] grep.[ch]: teach columnnum, color_columnno to grep_opt

2018-04-22 Thread Taylor Blau
On Sun, Apr 22, 2018 at 11:42:48PM +0200, Ævar Arnfjörð Bjarmason wrote: > On Sun, Apr 22 2018, Taylor Blau wrote: > > > In preparation of adding --column-number to 'git-grep(1)', we extend > > grep_opt to take in the requisite new members. > > Just a nit: Makes s

Re: [PATCH v2 5/6] builtin/grep.c: show column numbers via --column-number

2018-04-22 Thread Taylor Blau
On Sun, Apr 22, 2018 at 11:48:53PM +0200, Ævar Arnfjörð Bjarmason wrote: > > On Sun, Apr 22 2018, Taylor Blau wrote: > > I think this part though... > > > While we're at it, change color.grep.linenumber to color.grep.lineNumber > > to matc

Re: [PATCH v2 6/6] contrib/git-jump/git-jump: use column number when grep-ing

2018-04-22 Thread Taylor Blau
On Sun, Apr 22, 2018 at 11:49:39PM +0200, Ævar Arnfjörð Bjarmason wrote: > > On Sun, Apr 22 2018, Taylor Blau wrote: > > > This patch adds the '--column-number' synonym '-m' to the default > > grep command so that callers are brought to the correct line

Re: [PATCH v2 1/6] grep.c: take regmatch_t as argument in match_line()

2018-04-22 Thread Taylor Blau
On Sun, Apr 22, 2018 at 07:14:58PM -0400, Eric Sunshine wrote: > On Sun, Apr 22, 2018 at 4:47 PM, Taylor Blau wrote: > > In a subsequent patch, we teach show_line() to optionally include the > > column number of the first match on each matched line. > > > > The regmat

Re: [PATCH v2 0/6] Teach '--column-number' to 'git-grep(1)'

2018-04-22 Thread Taylor Blau
On Mon, Apr 23, 2018 at 08:28:14AM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > > diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh > > index 0cf654824d..7349c7fadc 100755 > > --- a/t/t7810-grep.sh > > +++ b/t/t7810-grep.sh > > @@ -106,7 +106,7 @@ do &g

Re: What's cooking in git.git (Apr 2018, #02; Tue, 17)

2018-04-22 Thread Taylor Blau
On Mon, Apr 23, 2018 at 08:33:11AM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > > I noticed that tb/config-default, however, only landed two commits: > > > > - builtin/config: introduce `color` type specifier > > - config.c: introduce 'git

Re: [PATCH v2 3/6] grep.[ch]: teach columnnum, color_columnno to grep_opt

2018-04-22 Thread Taylor Blau
On Sun, Apr 22, 2018 at 08:21:33PM -0400, Eric Sunshine wrote: > On Sun, Apr 22, 2018 at 7:24 PM, Taylor Blau wrote: > > On Sun, Apr 22, 2018 at 11:42:48PM +0200, Ęvar Arnfjörš Bjarmason wrote: > >> On Sun, Apr 22 2018, Taylor Blau wrote: > >> > In preparation of

Re: [PATCH v2 4/6] grep.c: display column number of first match

2018-04-22 Thread Taylor Blau
On Sun, Apr 22, 2018 at 08:24:55PM -0400, Eric Sunshine wrote: > On Sun, Apr 22, 2018 at 4:47 PM, Taylor Blau wrote: > > Building upon our work in the previous commit to add members 'columnnum' > > and 'color_columno' to 'grep_opt', we teach

Re: [PATCH v2 5/6] builtin/grep.c: show column numbers via --column-number

2018-04-22 Thread Taylor Blau
On Sun, Apr 22, 2018 at 08:32:28PM -0400, Eric Sunshine wrote: > On Sun, Apr 22, 2018 at 4:47 PM, Taylor Blau wrote: > > This commit teaches 'git-grep(1)' a new option, '--column-number'. This > > option builds upon previous commits to show the column num

Re: [PATCH v2 2/6] grep.c: take column number as argument to show_line()

2018-04-22 Thread Taylor Blau
On Sun, Apr 22, 2018 at 08:16:12PM -0400, Eric Sunshine wrote: > On Sun, Apr 22, 2018 at 4:47 PM, Taylor Blau wrote: > > show_line() currently receives the line number within the > > 'grep_opt->buf' in order to determine which line number to display. In > > orde

Re: [PATCH v2 2/6] grep.c: take column number as argument to show_line()

2018-04-23 Thread Taylor Blau
On Mon, Apr 23, 2018 at 03:34:21AM -0400, Eric Sunshine wrote: > On Mon, Apr 23, 2018 at 3:27 AM, Ævar Arnfjörð Bjarmason > wrote: > > On Mon, Apr 23 2018, Eric Sunshine wrote: > >> One important issue I noticed is that patch 3/7 neglects to update > >> grep.c:init_grep_defaults() to initialize op

Re: [PATCH v2 2/6] grep.c: take column number as argument to show_line()

2018-04-23 Thread Taylor Blau
On Mon, Apr 23, 2018 at 10:01:17AM +0200, Ævar Arnfjörð Bjarmason wrote: > > On Mon, Apr 23 2018, Taylor Blau wrote: > > > For your consideration: > > https://github.com/ttaylorr/git/compare/tb/grep-colno > > Looks good to me aside from two minor issues I noticed:

[PATCH v3 0/7] Teach '--column-number' to 'git-grep(1)'

2018-04-23 Thread Taylor Blau
=po0scvwco_2agxudaosf...@mail.gmail.com [6]: https://public-inbox.org/git/capig+cr0unm2ukcaphyafrvmypx4vgsw4wdswb_gnwe4ecy...@mail.gmail.com [7]: https://public-inbox.org/git/20180424043140.GA82406@syl.local Taylor Blau (7): Documentation/config.txt: camel-case lineNumber for consistency grep.c: expose matched column in match_line(

[PATCH v3 2/7] grep.c: expose matched column in match_line()

2018-04-23 Thread Taylor Blau
tarting and ending offset from the beginning of the line. This additional argument has no effect when opt->extended is non-zero. We will later pass the starting offset from 'regmatch_t *' to show_line() in order to display the column number of the first match. Signed-off-by: Taylor B

[PATCH v3 1/7] Documentation/config.txt: camel-case lineNumber for consistency

2018-04-23 Thread Taylor Blau
lineNumber has casing that is inconsistent with surrounding options, like color.grep.matchContext, and color.grep.matchSelected. Re-case this documentation in order to be consistent with the text around it, and to ensure that new entries are consistent, too. Signed-off-by: Taylor Blau

[PATCH v3 3/7] grep.[ch]: extend grep_opt to allow showing matched column

2018-04-23 Thread Taylor Blau
To support showing the matched column when calling 'git-grep(1)', teach 'grep_opt' the normal set of options to configure the default behavior and colorization of this feature. Signed-off-by: Taylor Blau --- grep.c | 3 +++ grep.h | 2 ++ 2 files changed, 5 insertions(+) d

[PATCH v3 5/7] builtin/grep.c: add '--column-number' option to 'git-grep(1)'

2018-04-23 Thread Taylor Blau
g-format:75:8:# void foo() Signed-off-by: Taylor Blau --- Documentation/git-grep.txt | 5 - builtin/grep.c | 1 + t/t7810-grep.sh| 22 ++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Documentation/git-grep.txt b/Documentatio

[PATCH v3 4/7] grep.c: display column number of first match

2018-04-23 Thread Taylor Blau
To prepare for 'git grep' learning '--column-number', teach grep.c's show_line() how to show the column of the first match on non-context line. Signed-off-by: Taylor Blau --- grep.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --gi

[PATCH v3 6/7] grep.c: add configuration variables to show matched option

2018-04-23 Thread Taylor Blau
To support git-grep(1)'s new option, '--column-number', document and teach grep.c how to interpret relevant configuration options, similar to those associated with '--line-number'. Signed-off-by: Taylor Blau --- Documentation/config.txt | 5 + Documentation/git

[PATCH v3 7/7] contrib/git-jump/git-jump: jump to match column in addition to line

2018-04-23 Thread Taylor Blau
Take advantage of 'git-grep(1)''s new option, '--column-number' in order to teach Peff's 'git-jump' script how to jump to the correct column for any given match. 'git-grep(1)''s output is in the correct format for Vim's jump list, so no

Re: [PATCH v2 2/6] grep.c: take column number as argument to show_line()

2018-04-24 Thread Taylor Blau
On Tue, Apr 24, 2018 at 03:13:55PM +0900, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > > > I think when we add features to git-grep we should be as close to GNU > > grep as possible (e.g. not add this -m alias meaning something different > > as in your v1), but if GNU grep doesn't hav

Re: [PATCH v3 7/7] contrib/git-jump/git-jump: jump to match column in addition to line

2018-04-24 Thread Taylor Blau
On Tue, Apr 24, 2018 at 01:37:36AM -0400, Eric Sunshine wrote: > On Tue, Apr 24, 2018 at 1:07 AM, Taylor Blau wrote: > > Take advantage of 'git-grep(1)''s new option, '--column-number' in order > > to teach Peff's 'git-jump' script ho

[PATCH 2/5] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-25 Thread Taylor Blau
its commutative pair) does not complain, but `--bool --type=int` (and its commutative pair) does. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 71 builtin/config.c | 66 ++--- t/t

[PATCH 4/5] config.c: introduce 'git_config_color' to parse ANSI colors

2018-04-25 Thread Taylor Blau
In preparation for adding `--type=color` to the `git-config(1)` builtin, let's introduce a color parsing utility, `git_config_color` in a similar fashion to `git_config_`. Signed-off-by: Taylor Blau --- config.c | 10 ++ config.h | 1 + 2 files changed, 11 insertions(+) diff --

[PATCH 5/5] builtin/config: introduce `color` type specifier

2018-04-25 Thread Taylor Blau
er `--get-color` alone. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 6 ++ builtin/config.c | 20 t/t1300-repo-config.sh | 30 ++ 3 files changed, 56 insertions(+) diff --git a/Documentation/git-config.txt

[PATCH 0/5] builtin/config.c: combined series '--type', '--default'

2018-04-25 Thread Taylor Blau
/xmqq8t9jgbe1@gitster-ct.c.googlers.com [2]: https://public-inbox.org/git/xmqqk1tf4yhl@gitster-ct.c.googlers.com [3]: https://public-inbox.org/git/20180419030142.GA28273@syl.local [4]: https://public-inbox.org/git/CAPig+cSr744Y293qvgLG8jLHdNsGypkHU6QUQ-AcOyk=-ja...@mail.gmail.com Taylor Blau (5):

[PATCH 3/5] builtin/config: introduce `--default`

2018-04-25 Thread Taylor Blau
with `--default`) will be sufficient to replace `--get-color`. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 4 builtin/config.c | 18 ++ t/t1310-config-default.sh| 36 3 files changed, 58 insertions(+) c

[PATCH 1/5] builtin/config.c: treat type specifiers singularly

2018-04-25 Thread Taylor Blau
`OPT_BIT` is. (2) a future patch will introduce `--type=`, and we would like not to complain in the following situation: $ git config --int --type=int Signed-off-by: Taylor Blau --- builtin/config.c | 49 +++--- t/t1300-repo-config.sh | 11 ++

[PATCH v2 4/5] config.c: introduce 'git_config_color' to parse ANSI colors

2018-04-25 Thread Taylor Blau
In preparation for adding `--type=color` to the `git-config(1)` builtin, let's introduce a color parsing utility, `git_config_color` in a similar fashion to `git_config_`. Signed-off-by: Taylor Blau --- config.c | 10 ++ config.h | 1 + 2 files changed, 11 insertions(+) diff --

[PATCH v2 1/5] builtin/config.c: treat type specifiers singularly

2018-04-25 Thread Taylor Blau
`OPT_BIT` is. (2) a future patch will introduce `--type=`, and we would like not to complain in the following situation: $ git config --int --type=int Signed-off-by: Taylor Blau --- builtin/config.c | 49 +++--- t/t1300-repo-config.sh | 11 ++

[PATCH v2 3/5] builtin/config: introduce `--default`

2018-04-25 Thread Taylor Blau
with `--default`) will be sufficient to replace `--get-color`. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 4 builtin/config.c | 18 ++ t/t1310-config-default.sh| 36 3 files changed, 58 insertions(+) c

[PATCH v2 5/5] builtin/config: introduce `color` type specifier

2018-04-25 Thread Taylor Blau
er `--get-color` alone. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 6 ++ builtin/config.c | 22 ++ t/t1300-repo-config.sh | 30 ++ 3 files changed, 58 insertions(+) diff --git a/Documentation/g

[PATCH v2 0/5] builtin/config.c: combined series '--type', '--default'

2018-04-25 Thread Taylor Blau
qq36zi352x....@gitster-ct.c.googlers.com Taylor Blau (5): builtin/config.c: treat type specifiers singularly builtin/config.c: support `--type=` as preferred alias for `--` builtin/config: introduce `--default` config.c: introduce 'git_config_color' to parse ANSI colors

[PATCH v2 2/5] builtin/config.c: support `--type=` as preferred alias for `--`

2018-04-25 Thread Taylor Blau
its commutative pair) does not complain, but `--bool --type=int` (and its commutative pair) does. Signed-off-by: Taylor Blau --- Documentation/git-config.txt | 71 builtin/config.c | 64 +--- t/t

Re: [PATCH 2/5] builtin/config.c: support `--type=` as preferred alias for `--type`

2018-04-25 Thread Taylor Blau
On Thu, Apr 26, 2018 at 02:25:44PM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > > Subject: Re: [PATCH 2/5] builtin/config.c: support `--type=` as > > preferred alias for `--type` > > I'd retitle while queuing, as the last 'type' is a placeholder

Re: [PATCH 5/5] builtin/config: introduce `color` type specifier

2018-04-25 Thread Taylor Blau
On Thu, Apr 26, 2018 at 02:32:54PM +0900, Junio C Hamano wrote: > Taylor Blau writes: > > > diff --git a/builtin/config.c b/builtin/config.c > > index d7acf912cd..ec5c11293b 100644 > > --- a/builtin/config.c > > +++ b/builtin/config.c > > @@ -61,6 +61,7 @@

[PATCH v4 4/7] grep.c: display column number of first match

2018-05-04 Thread Taylor Blau
To prepare for 'git grep' learning '--column', teach grep.c's show_line() how to show the column of the first match on non-context line. Signed-off-by: Taylor Blau --- grep.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --gi

[PATCH v4 1/7] Documentation/config.txt: camel-case lineNumber for consistency

2018-05-04 Thread Taylor Blau
lineNumber has casing that is inconsistent with surrounding options, like color.grep.matchContext, and color.grep.matchSelected. Re-case this documentation in order to be consistent with the text around it, and to ensure that new entries are consistent, too. Signed-off-by: Taylor Blau

[PATCH v4 0/7] Teach '--column' to 'git-grep(1)'

2018-05-04 Thread Taylor Blau
the new flag name. Thanks in advance for your review. I am going to send out my next patch (which Ævar suggested) to add '--only-matching' to 'git-grep(1)'. Thanks, Taylor [1]: https://public-inbox.org/git/874lk2e4he@evledraar.gmail.com Taylor Blau (7): Documentation

[PATCH v4 6/7] grep.c: add configuration variables to show matched option

2018-05-04 Thread Taylor Blau
To support git-grep(1)'s new option, '--column', document and teach grep.c how to interpret relevant configuration options, similar to those associated with '--line-number'. Signed-off-by: Taylor Blau --- Documentation/config.txt | 5 + Documentation/git

[PATCH v4 5/7] builtin/grep.c: add '--column' option to 'git-grep(1)'

2018-05-04 Thread Taylor Blau
# void foo() Signed-off-by: Taylor Blau --- Documentation/git-grep.txt | 5 - builtin/grep.c | 1 + t/t7810-grep.sh| 22 ++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.

[PATCH v4 2/7] grep.c: expose matched column in match_line()

2018-05-04 Thread Taylor Blau
tarting and ending offset from the beginning of the line. This additional argument has no effect when opt->extended is non-zero. We will later pass the starting offset from 'regmatch_t *' to show_line() in order to display the column number of the first match. Signed-off-by: Taylor B

[PATCH v4 3/7] grep.[ch]: extend grep_opt to allow showing matched column

2018-05-04 Thread Taylor Blau
To support showing the matched column when calling 'git-grep(1)', teach 'grep_opt' the normal set of options to configure the default behavior and colorization of this feature. Signed-off-by: Taylor Blau --- grep.c | 3 +++ grep.h | 2 ++ 2 files changed, 5 insertions(+) d

[PATCH v4 7/7] contrib/git-jump/git-jump: jump to match column in addition to line

2018-05-04 Thread Taylor Blau
Take advantage of 'git-grep(1)''s new option, '--column' in order to teach Peff's 'git-jump' script how to jump to the correct column for any given match. 'git-grep(1)''s output is in the correct format for Vim's jump list, so no

[PATCH 1/2] grep.c: extract show_line_header()

2018-05-04 Thread Taylor Blau
implementation. For now, show_line_header() provides no benefit over the change before this patch. The following patch will call conditionally call show_line_header() multiple times per invocation to show_line(), which is the desired benefit of this change. Signed-off-by: Taylor Bl

[PATCH 0/2] builtin/grep.c: teach '-o', '--only-matching'

2018-05-04 Thread Taylor Blau
ttps://public-inbox.org/git/87in9ucsbb@evledraar.gmail.com Taylor Blau (2): grep.c: extract show_line_header() builtin/grep.c: teach '-o', '--only-matching' to 'git-grep' Documentation/git-grep.txt | 6 +++- builtin/grep.c | 1 + grep.c | 67 +++

<    1   2   3   4   5   6   >