Re: [RFC PATCH 0/5] line-log: towards a more responsive, incremental 'git log -L'

2019-08-21 Thread SZEDER Gábor
On Mon, Aug 19, 2019 at 12:12:32PM -0400, Derrick Stolee wrote: > On 8/19/2019 11:02 AM, SZEDER Gábor wrote: > > On Mon, Aug 19, 2019 at 10:50:48AM -0400, Derrick Stolee wrote: > >> Note that I don't include the "without patch" numbers. For some > >> reason the path provided is particularly nasty a

Re: [RFC PATCH 0/5] line-log: towards a more responsive, incremental 'git log -L'

2019-08-19 Thread Derrick Stolee
On 8/19/2019 11:02 AM, SZEDER Gábor wrote: > On Mon, Aug 19, 2019 at 10:50:48AM -0400, Derrick Stolee wrote: >> Note that I don't include the "without patch" numbers. For some >> reason the path provided is particularly nasty and caused 20,000+ >> missing blobs to be downloaded one-by-one (remember

Re: [RFC PATCH 0/5] line-log: towards a more responsive, incremental 'git log -L'

2019-08-19 Thread SZEDER Gábor
On Mon, Aug 19, 2019 at 10:50:48AM -0400, Derrick Stolee wrote: > Note that I don't include the "without patch" numbers. For some > reason the path provided is particularly nasty and caused 20,000+ > missing blobs to be downloaded one-by-one (remember: VFS for Git > has many partial-clone-like beha

Re: [RFC PATCH 0/5] line-log: towards a more responsive, incremental 'git log -L'

2019-08-19 Thread Derrick Stolee
ting, which I don't usually do, hence the RFC. >> >> Hi Szeder, >> >> Thanks for sending this series! I'm particularly excited about it >> because we recently got a bug report from a user in the Windows OS >> repo about "git log -L" being very

Re: [RFC PATCH 0/5] line-log: towards a more responsive, incremental 'git log -L'

2019-08-19 Thread SZEDER Gábor
nding this series! I'm particularly excited about it > because we recently got a bug report from a user in the Windows OS > repo about "git log -L" being very slow. I put it on the backlog [1] > but haven't had time to investigate it myself. After we are done > updati

Re: [RFC PATCH 4/5] line-log: more responsive, incremental 'git log -L'

2019-08-19 Thread Derrick Stolee
On 8/18/2019 2:28 PM, SZEDER Gábor wrote: > To be clear: this patch doesn't actually optimize the line-level log, > but merely moves most of the work from the preprocessing step to the > history travelsal, so the commits modifying the line range can be s/travelsal/traversal/ -Stolee

Re: [RFC PATCH 4/5] line-log: more responsive, incremental 'git log -L'

2019-08-19 Thread SZEDER Gábor
given revision > range this preprocessing can result in a significant delay before > the first commit is shown. > > - Limiting the number of displayed commits (e.g. 'git log -3 -L...') > doesn't limit the amount of work during preprocessing, because >

Re: [RFC PATCH 0/5] line-log: towards a more responsive, incremental 'git log -L'

2019-08-19 Thread Derrick Stolee
t the rest deals with history traversal and parent > rewriting, which I don't usually do, hence the RFC. Hi Szeder, Thanks for sending this series! I'm particularly excited about it because we recently got a bug report from a user in the Windows OS repo about "git log -L" being very

[RFC PATCH 4/5] line-log: more responsive, incremental 'git log -L'

2019-08-18 Thread SZEDER Gábor
shown. - Limiting the number of displayed commits (e.g. 'git log -3 -L...') doesn't limit the amount of work during preprocessing, because that limit is applied during history traversal. Alas, by that point this expensive preprocessing step has already churned throug

[RFC PATCH 0/5] line-log: towards a more responsive, incremental 'git log -L'

2019-08-18 Thread SZEDER Gábor
R Gábor (5): completion: offer '--(no-)patch' among 'git log' options line-log: remove unused fields from 'struct line_log_data' t4211-line-log: add tests for parent oids line-log: more responsive, incremental 'git log -L' line-log: try to use generation n

Re: [PATCH 1/1] t5319: use 'test-tool path-utils' instead of 'ls -l'

2019-07-02 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Stolee, > > On Mon, 1 Jul 2019, Derrick Stolee via GitGitGadget wrote: > >> From: Derrick Stolee >> >> Using 'ls -l' and parsing the columns to find file sizes is >> problematic when the platform could report the ow

Re: [PATCH 1/1] t5319: use 'test-tool path-utils' instead of 'ls -l'

2019-07-02 Thread Johannes Schindelin
Hi Stolee, On Mon, 1 Jul 2019, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee > > Using 'ls -l' and parsing the columns to find file sizes is > problematic when the platform could report the owner as a name > with spaces. Instead, use the '

[PATCH 1/1] t5319: use 'test-tool path-utils' instead of 'ls -l'

2019-07-01 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Using 'ls -l' and parsing the columns to find file sizes is problematic when the platform could report the owner as a name with spaces. Instead, use the 'test-tool path-utils file-size' command to list only the sizes. Reported-by: Johannes Sixt

[PATCH v2 1/4] t6050: use test_line_count instead of wc -l

2019-03-31 Thread Christian Couder
-replace.sh +++ b/t/t6050-replace.sh @@ -393,9 +393,11 @@ test_expect_success 'replace ref cleanup' ' ' test_expect_success '--graft with and without already replaced object' ' - test $(git log --oneline | wc -l) = 7 && + git log --onel

[GSoC][PATCH v4 3/5] t0000: use test_line_count instead of wc -l

2019-03-30 Thread Jonathan Chang
7;git commit-tree omits duplicated parent in a commit' ' parent=$(sed -n -e "s/^parent //p" -e "/^author /q" actual | sort -u) && test "z$commit0" = "z$parent" && git show --pretty=raw $commit2 >actual &&

[PATCH v6 16/27] switch: remove -l

2019-03-29 Thread Nguyễn Thái Ngọc Duy
/checkout.c index 6d0b2ef565..d63116b686 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1376,7 +1376,6 @@ static struct option *add_common_switch_branch_options( struct checkout_opts *opts, struct option *prevopts) { struct option options[] = { - OPT_BOOL(&#

[PATCH 1/3] t6050: use test_line_count instead of wc -l

2019-03-28 Thread Christian Couder
-replace.sh @@ -393,9 +393,11 @@ test_expect_success 'replace ref cleanup' ' ' test_expect_success '--graft with and without already replaced object' ' - test $(git log --oneline | wc -l) = 7 && + git log --oneline >log && +

[PATCH v2 04/20] diff-parseopt: convert -l

2019-03-24 Thread Nguyễn Thái Ngọc Duy
) OPT_CALLBACK_F(0, "follow", options, NULL, N_("continue listing the history of a file beyond renames"), PARSE_OPT_NOARG, diff_opt_follow), + OPT_INTEGER('l', NULL, &options->rename_

[PATCH v5 15/26] switch: remove -l

2019-03-21 Thread Nguyễn Thái Ngọc Duy
100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1376,7 +1376,6 @@ static struct option *add_common_switch_branch_options( struct checkout_opts *opts, struct option *prevopts) { struct option options[] = { - OPT_BOOL('l', NULL, &opts->n

[PATCH 04/20] diff-parseopt: convert -l

2019-03-20 Thread Nguyễn Thái Ngọc Duy
) OPT_CALLBACK_F(0, "follow", options, NULL, N_("continue listing the history of a file beyond renames"), PARSE_OPT_NOARG, diff_opt_follow), + OPT_INTEGER('l', NULL, &options->rename_

Re: [GSoC][PATCH v3 3/3] t0000: use test_line_count instead of wc -l

2019-03-18 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > No objections to changing this, but I don't think it's the fault of a > commit message if someone reading it doesn't get an explanation for a > future unrelated improvement. > > The times when a commit should have such an explanation are cases like > e.g. introdu

Re: [GSoC][PATCH v3 3/3] t0000: use test_line_count instead of wc -l

2019-03-18 Thread Ævar Arnfjörð Bjarmason
git commit-tree omits >> > duplicated parent in a commit' ' >> >parent=$(sed -n -e "s/^parent //p" -e "/^author /q" actual | sort -u) && >> >test "z$commit0" = "z$parent" && >> >git sh

Re: [GSoC][PATCH v3 3/3] t0000: use test_line_count instead of wc -l

2019-03-17 Thread Thomas Gummerer
-n -e "s/^parent //p" -e "/^author /q" actual | sort -u) && > > test "z$commit0" = "z$parent" && > > git show --pretty=raw $commit2 >actual && > > - numparent=$(sed -n -e "s/^

Re: [GSoC][PATCH v3 3/3] t0000: use test_line_count instead of wc -l

2019-03-17 Thread Ævar Arnfjörð Bjarmason
test "z$commit0" = "z$parent" && > git show --pretty=raw $commit2 >actual && > - numparent=$(sed -n -e "s/^parent //p" -e "/^author /q" actual | wc -l) > && > - test $numparent = 1 > + sed -n -e &quo

[GSoC][PATCH v3 3/3] t0000: use test_line_count instead of wc -l

2019-03-17 Thread Jonathan Chang
7;git commit-tree omits duplicated parent in a commit' ' parent=$(sed -n -e "s/^parent //p" -e "/^author /q" actual | sort -u) && test "z$commit0" = "z$parent" && git show --pretty=raw $commit2 >actual &&

[PATCH v4 15/26] switch: remove -l

2019-03-17 Thread Nguyễn Thái Ngọc Duy
/checkout.c index bd94b04303..85fc60f5f2 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1376,7 +1376,6 @@ static struct option *add_common_switch_branch_options( struct checkout_opts *opts, struct option *prevopts) { struct option options[] = { - OPT_BOOL(&#

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

2019-03-11 Thread ttjtftx
t-tree omits duplicated > > parent in a commit' ' > > - numparent=$(sed -n -e "s/^parent //p" -e "/^author /q" actual | wc > > -l) && > > - test $numparent = 1 > > + sed -n -e "s/^parent //p" -e "/^a

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

2019-03-10 Thread Eric Sunshine
nt=$(sed -n -e "s/^parent //p" -e "/^author /q" actual | wc > -l) && > - test $numparent = 1 > + sed -n -e "s/^parent //p" -e "/^author /q" actual | wc -l >numparent > && > + test_line_count = 1 numparent T

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

2019-03-10 Thread Jonathan Chang
=$(sed -n -e "s/^parent //p" -e "/^author /q" actual | sort -u) && test "z$commit0" = "z$parent" && git show --pretty=raw $commit2 >actual && - numparent=$(sed -n -e "s/^parent //p" -e "/^author /q&q

[PATCH v3 12/21] switch: remove -l

2019-03-08 Thread Nguyễn Thái Ngọc Duy
100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1372,7 +1372,6 @@ static struct option *add_common_switch_branch_options( struct checkout_opts *opts, struct option *prevopts) { struct option options[] = { - OPT_BOOL('l', NULL, &opts->n

RE: [BUG] git log -L ... -s does not suppress diff output

2019-02-25 Thread Randall S. Becker
On February 25, 2019 12:18, Jeff King wrote: > To: Matthew Booth > Cc: git@vger.kernel.org > Subject: Re: [BUG] git log -L ... -s does not suppress diff output > > On Mon, Feb 25, 2019 at 05:03:50PM +, Matthew Booth wrote: > > > Example output: > > > > =

Re: [BUG] git log -L ... -s does not suppress diff output

2019-02-25 Thread Jeff King
On Mon, Feb 25, 2019 at 05:03:50PM +, Matthew Booth wrote: > Example output: > > = > $ git --version > git version 2.20.1 > > $ git log -L 2957,3107:nova/compute/manager.py -s > commit 35ce77835bb271bad3c18eaf22146edac3a42ea0 > > > diff --git

[BUG] git log -L ... -s does not suppress diff output

2019-02-25 Thread Matthew Booth
Example output: = $ git --version git version 2.20.1 $ git log -L 2957,3107:nova/compute/manager.py -s commit 35ce77835bb271bad3c18eaf22146edac3a42ea0 diff --git a/nova/compute/manager.py b/nova/compute/manager.py --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -2937,152

[PATCH v2 10/19] switch: remove -l

2019-02-08 Thread Nguyễn Thái Ngọc Duy
/checkout.c index f6de232922..f7d8fa7caa 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1357,7 +1357,6 @@ static struct option *add_common_switch_branch_options( struct checkout_opts *opts, struct option *prevopts) { struct option options[] = { - OPT_BOOL(&#

[PATCH 10/19] switch: remove -l

2019-01-30 Thread Nguyễn Thái Ngọc Duy
/checkout.c index 2251883a88..db9a2692db 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1357,7 +1357,6 @@ static struct option *add_common_switch_branch_options( struct checkout_opts *opts, struct option *prevopts) { struct option options[] = { - OPT_BOOL(&#

[PATCH 60/76] diff.c: convert -l

2019-01-17 Thread Nguyễn Thái Ngọc Duy
) OPT_CALLBACK_F(0, "follow", options, NULL, N_("continue listing the history of a file beyond renames"), PARSE_OPT_NOARG, diff_opt_follow), + OPT_INTEGER('l', NULL, &options->rename_

Re: [PATCH/RFC v1 1/1] test-lint: sed -E (or -a, -l) are not portable

2019-01-16 Thread Ævar Arnfjörð Bjarmason
On Tue, Jan 15 2019, tbo...@web.de wrote: > From: Torsten Bögershausen > > From `man sed` (on a Mac OS X box): > The -E, -a and -i options are non-standard FreeBSD extensions and may not be > available > on other operating systems. > > From `man sed` on a Linux box: > REGULAR EXPRESSIONS >

Re: [PATCH/RFC v1 1/1] test-lint: sed -E (or -a, -l) are not portable

2019-01-15 Thread Eric Sunshine
; Please update the new message to be more consistent with existing surrounding error messages. For instance: err 'sed -i/-a/-l/-E not portable (use only -e/-f/-n)' or something. Thanks.

[PATCH/RFC v1 1/1] test-lint: sed -E (or -a, -l) are not portable

2019-01-15 Thread tboegi
From: Torsten Bögershausen From `man sed` (on a Mac OS X box): The -E, -a and -i options are non-standard FreeBSD extensions and may not be available on other operating systems. From `man sed` on a Linux box: REGULAR EXPRESSIONS POSIX.2 BREs should be supported, but they aren't completel

Re: WG: [git-for-windows/git] log -L//,+1 not accepted (#1856)

2018-10-02 Thread Jeff King
On Tue, Oct 02, 2018 at 06:56:29AM +, peter.doll...@mt.com wrote: > Please see my original observation below. > Is it possible, to extend the git-log syntax in the way, that it > accepts the short -L option (without :file) of blame in unique cases > (only one file is logged or

WG: [git-for-windows/git] log -L//,+1 not accepted (#1856)

2018-10-02 Thread Peter.Dolland
Please see my original observation below. Is it possible, to extend the git-log syntax in the way, that it accepts the short -L option (without :file) of blame in unique cases (only one file is logged or respectively the -L expression may be valid for all logged files)? It would be nice for

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Jeff King wrote: > On Thu, Aug 30, 2018 at 01:29:53PM -0700, Junio C Hamano wrote: > >> >> > I do not know if the documentation that is shipped in 2.20 should >> >> > talk about how the old world looked like, though. `-l` was a short &g

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Jeff King
On Thu, Aug 30, 2018 at 01:29:53PM -0700, Junio C Hamano wrote: > >> > I do not know if the documentation that is shipped in 2.20 should > >> > talk about how the old world looked like, though. `-l` was a short > >> > for `--create-reflog` is worth saying, b

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Junio C Hamano
Jeff King writes: > On Thu, Aug 30, 2018 at 09:53:25PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> > In the SYNOPSIS section we still see "[-l]" listed; that also must >> > be replaced with "--create-reflog", or just dropped, as that is the >>

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Jeff King
On Thu, Aug 30, 2018 at 09:53:25PM +0200, Ævar Arnfjörð Bjarmason wrote: > > In the SYNOPSIS section we still see "[-l]" listed; that also must > > be replaced with "--create-reflog", or just dropped, as that is the > > default. > > Oh yes, it seems

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Ævar Arnfjörð Bjarmason
On Thu, Aug 30 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >>> +-l:: >>> --list:: >>> List branches. With optional `...`, e.g. `git >>> branch --list 'maint-*'`, list only the branches that match >>

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: >> +-l:: >> --list:: >> List branches. With optional `...`, e.g. `git >> branch --list 'maint-*'`, list only the branches that match > > I think it's better to have something like this on top: > &

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-08-30 Thread Ævar Arnfjörð Bjarmason
form `--no-create-reflog` only overrides an earlier > `--create-reflog`, but currently does not negate the setting of > `core.logAllRefUpdates`. > -+ > -The `-l` option is a deprecated synonym for `--create-reflog`. > > -f:: > --force:: > @@ -156,6 +154,7 @@ Thi

Re: [PATCH v2 3/4] branch: deprecate "-l" option

2018-06-22 Thread Jeff King
;copy a branch, even if target > exists"), 2), > OPT_BOOL(0, "list", &list, N_("list branch names")), > - OPT_BOOL('l', "create-reflog", &reflog, N_("create the branch's > reflog")), > +

Re: [PATCH v2 3/4] branch: deprecate "-l" option

2018-06-22 Thread Eric Sunshine
On Fri, Jun 22, 2018 at 05:24:14AM -0400, Jeff King wrote: > Let's deprecate "-l" in hopes of eventually re-purposing it > to "--list". > > Signed-off-by: Jeff King > --- > diff --git a/builtin/branch.c b/builtin/branch.c > @@ -36,6 +36,7 @@

[PATCH v2 4/4] branch: make "-l" a synonym for "--list"

2018-06-22 Thread Jeff King
The other "mode" options of git-branch have short-option aliases that are easy to type (e.g., "-d" and "-m"). Let's give "--list" the same treatment. This also makes it consistent with the similar "git tag -l" option. We didn't do th

[PATCH v2 3/4] branch: deprecate "-l" option

2018-06-22 Thread Jeff King
The "-l" option is short for "--create-reflog". This has caused much confusion over the years. Most people expect it to work as "--list", because that would match the other "mode" options like -d/--delete and -m/--move, as well as the similar -l/--list opt

[PATCH v2 2/4] t: switch "branch -l" to "branch --create-reflog"

2018-06-22 Thread Jeff King
In preparation for deprecating "-l", let's make sure we're using the recommended option ourselves. This patch just mechanically converts "branch -l" to "branch --create-reflog". Note that with the exception of the actual "--create-reflog" test, w

[PATCH v2 0/4] branch -l deprecation revisited

2018-06-22 Thread Jeff King
This series replaces the contents of jk/branch-l-0-deprecation, jk/branch-l-1-removal, and jk/branch-l-2-reincarnation. It implements the idea discussed in the subthread in: https://public-inbox.org/git/xmqqzi0hety4@gitster-ct.c.googlers.com/ Namely that "branch -l" would

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-06-02 Thread Jeff King
On Sat, Jun 02, 2018 at 06:46:31AM +0200, Duy Nguyen wrote: > > if (used_deprecated_reflog_option) { > > - warning("the '-l' alias for '--create-reflog' is > > deprecated;"); > > -

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-06-01 Thread Duy Nguyen
On Fri, May 25, 2018 at 4:40 AM, Jeff King wrote: > -- >8 -- > Subject: [PATCH] branch: customize "-l" warning in list mode > > People mistakenly use "git branch -l", thinking that it > triggers list mode. It doesn't, but the lack of non-option &g

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-31 Thread Junio C Hamano
Jeff King writes: > So I think you're proposing: > > - step 0: warn about "-l" when it actually gets used, and otherwise > continue ignoring > > - step 1: turn "-l" into "--list" > > - step 2: there is no step 2 > > .

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-30 Thread Kaartic.Sivaraam
On Wednesday 30 May 2018 08:22 AM, Junio C Hamano wrote: Jeff King writes: Right, what I meant by "gentler" is that we continue to perform the same behavior as the old version, alongside the warning. It's arguable here because running "git branch -l" has _always_ be

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-30 Thread Jeff King
On Wed, May 30, 2018 at 11:52:19AM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Right, what I meant by "gentler" is that we continue to perform the same > > behavior as the old version, alongside the warning. It's arguable here > > because ru

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-30 Thread Jeff King
On Wed, May 30, 2018 at 11:48:32AM +0900, Junio C Hamano wrote: > Jeff King writes: > > >> - if (list) { > >> - warning("the '-l' option is an alias for > >> '--create-reflog' and"); > >>

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Junio C Hamano
Jeff King writes: > Right, what I meant by "gentler" is that we continue to perform the same > behavior as the old version, alongside the warning. It's arguable here > because running "git branch -l" has _always_ been wrong. It's just wrong > in a

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Junio C Hamano
Jeff King writes: >> -if (list) { >> -warning("the '-l' option is an alias for >> '--create-reflog' and"); >> -warning("has no effect in list mode. This option will >> soon be&q

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Jeff King
On Tue, May 29, 2018 at 05:20:29PM -0400, Jeff King wrote: > Thanks. There's one bit missing here, because it did not cause a textual > conflict during the rebase (but it's now dead code). Patch below (to be > squashed to the tip of jk/branch-l-1-removal).

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Jeff King
it from behind the pager). > > With these two patches queued on top of jk/branch-l-0-deprecation, > the follow-up patches jk/branch-l-1-removal that makes 'branch -l' > to fail and then jk/branch-l-2-reincarnation that makes 'branch -l' > a synonym to 'branch --li

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-29 Thread Jeff King
On Sun, May 27, 2018 at 12:15:40AM +0530, Kaartic Sivaraam wrote: > > Hmm, actually, I suppose the true value of the warning is to help people > > doing "git branch -l foo", and it would still work there. The "more > > extreme" from your sugges

Re: [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l

2018-05-26 Thread Junio C Hamano
Elijah Newren writes: >> I'd expect that a reader of the commit who cares enough to bother to >> wonder by looking at the patch and seeing that 2 became 3 would know >> why already. And a reader of the resulting file would not know that >> the 3 used to be 2, and won't be helped by "we used to c

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-26 Thread Kaartic Sivaraam
On Friday 25 May 2018 08:10 AM, Jeff King wrote: > Subject: [PATCH] branch: customize "-l" warning in list mode > > People mistakenly use "git branch -l", thinking that it > triggers list mode. It doesn't, but the lack of non-option > arguments in t

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-26 Thread Kaartic Sivaraam
On Friday 25 May 2018 01:01 AM, Jeff King wrote: > On Thu, May 24, 2018 at 03:22:14PM -0400, Jeff King wrote: > > Hmm, actually, I suppose the true value of the warning is to help people > doing "git branch -l foo", and it would still work there. The "more > extr

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Jeff King writes: >> By the way, this is one of these times when I feel that we should >> have a better multi-line message support in die/error/warning/info >> functions. Ideally, I should be able to write >> >> warning(_("the '-l' o

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Junio C Hamano writes: > With these two patches queued on top of jk/branch-l-0-deprecation, > the follow-up patches jk/branch-l-1-removal that makes 'branch -l' > to fail and then jk/branch-l-2-reincarnation that makes 'branch -l' > a synonym to 'branch --li

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Junio C Hamano writes: > Yup, thanks for being extra explicit. I do imagine there are quite > a few of us who would be puzzled without this update (but with the > previous one to unhide it from behind the pager). With these two patches queued on top of jk/branch-l-0-deprecation, the

Re: [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l

2018-05-25 Thread Elijah Newren
On Thu, May 24, 2018 at 6:17 PM, Junio C Hamano wrote: > SZEDER Gábor writes: > >>> -test 2 = $(git ls-files -s | wc -l) && >>> -test 2 = $(git ls-files -u | wc -l) && >>> -test 2 = $(git ls-files -o | wc -l) &

Re: [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l

2018-05-25 Thread Elijah Newren
On Thu, May 24, 2018 at 6:17 PM, Junio C Hamano wrote: > SZEDER Gábor writes: > >>> -test 2 = $(git ls-files -s | wc -l) && >>> -test 2 = $(git ls-files -u | wc -l) && >>> -test 2 = $(git ls-files -o | wc -l) &

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Jeff King
On Fri, May 25, 2018 at 06:14:16PM +0900, Junio C Hamano wrote: > Junio C Hamano writes: > > >> - warning("the '-l' alias for '--create-reflog' is deprecated;"); > >> - warning("it will be rem

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Junio C Hamano writes: >> -warning("the '-l' alias for '--create-reflog' is deprecated;"); >> -warning("it will be removed in a future version of Git"); >> + if (list) { >> +wa

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-25 Thread Junio C Hamano
Jeff King writes: > People mistakenly use "git branch -l", thinking that it > triggers list mode. It doesn't, but the lack of non-option > arguments in that command does (and the "-l" becomes a > silent noop). > > Since afc968e579 (branch: deprecate &

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-24 Thread Jeff King
On Fri, May 25, 2018 at 10:55:45AM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Hmm, actually, I suppose the true value of the warning is to help people > > doing "git branch -l foo", and it would still work there. The "more > > extreme"

Re: [PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-24 Thread Junio C Hamano
Jeff King writes: > Hmm, actually, I suppose the true value of the warning is to help people > doing "git branch -l foo", and it would still work there. The "more > extreme" from your suggested patch would only affect "branch -l". > Still, I think I

Re: [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l

2018-05-24 Thread Junio C Hamano
SZEDER Gábor writes: >> -test 2 = $(git ls-files -s | wc -l) && >> -test 2 = $(git ls-files -u | wc -l) && >> - test 2 = $(git ls-files -o | wc -l) && > > Here 'git ls-files -o' should have listed two

[PATCH] branch: issue "-l" deprecation warning after pager starts

2018-05-24 Thread Jeff King
On Thu, May 24, 2018 at 03:22:14PM -0400, Jeff King wrote: > On Thu, May 24, 2018 at 08:40:18PM +0530, Kaartic Sivaraam wrote: > > > > On the other hand, I'm not sure this is that big a deal. The point of > > > the deprecation warning is to catch people who are act

Re: jk/branch-l-0-deprecation (was Re: What's cooking in git.git (May 2018, #02; Thu, 17))

2018-05-24 Thread Jeff King
On Thu, May 24, 2018 at 08:40:18PM +0530, Kaartic Sivaraam wrote: > > On the other hand, I'm not sure this is that big a deal. The point of > > the deprecation warning is to catch people who are actually trying to > > use "-l" as "--create-reflog&quo

Re: [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l

2018-05-24 Thread Elijah Newren
>> test_must_fail git merge -s recursive R2^0 && >> >> - test 2 = $(git ls-files -s | wc -l) && >> - test 2 = $(git ls-files -u | wc -l) && >> - test 2 = $(git ls-files -o | wc -l) && &g

jk/branch-l-0-deprecation (was Re: What's cooking in git.git (May 2018, #02; Thu, 17))

2018-05-24 Thread Kaartic Sivaraam
rst, the error is emitted and then the pager kicks in to list the branches. > On the other hand, I'm not sure this is that big a deal. The point of > the deprecation warning is to catch people who are actually trying to > use "-l" as "--create-reflog", and that case do

Re: [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l

2018-05-24 Thread SZEDER Gábor
gt; @@ -65,9 +65,12 @@ test_expect_success 'merge simple rename+criss-cross with >> no modifications' ' >> >> test_must_fail git merge -s recursive R2^0 && >> >> - test 2 = $(git ls-files -s | wc -l) && >>

Re: [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l

2018-05-24 Thread SZEDER Gábor
ns' ' > > test_must_fail git merge -s recursive R2^0 && > > - test 2 = $(git ls-files -s | wc -l) && > - test 2 = $(git ls-files -u | wc -l) && > - test 2 = $(git ls-files -o | wc -l) &&

[PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l

2018-05-24 Thread Elijah Newren
recursive R2^0 && - test 2 = $(git ls-files -s | wc -l) && - test 2 = $(git ls-files -u | wc -l) && - test 2 = $(git ls-files -o | wc -l) && + git ls-files -s >out && + test_

Re: jk/branch-l-0-deprecation (was Re: What's cooking in git.git (May 2018, #02; Thu, 17))

2018-05-17 Thread Jeff King
atic int deprecated_reflog_option_cb(const struct option *opt, const char *arg, int unset) { - warning("the '-l' alias for '--create-reflog' is deprecated;"); - warning("it will be removed in a future version of

Re: jk/branch-l-0-deprecation (was Re: What's cooking in git.git (May 2018, #02; Thu, 17))

2018-05-17 Thread Ævar Arnfjörð Bjarmason
t; >> PAGER=less LESS="--no-init --quit-if-one-screen" git branch -l >> >> ... >> >> So I think this is probably OK for most users, if the have very few >> branches they'll see it, and then if they use default pager settings >> they'll

Re: jk/branch-l-0-deprecation (was Re: What's cooking in git.git (May 2018, #02; Thu, 17))

2018-05-17 Thread Kaartic Sivaraam
Hi Ævar, On Thursday 17 May 2018 03:18 PM, Ævar Arnfjörð Bjarmason wrote: > I've ended up with that $LESS setting via hackery over the years, so > maybe I'm doing something retarded, minimal test case: > > PAGER=less LESS="--no-init --quit-if-one-screen"

Re: jk/branch-l-0-deprecation (was Re: What's cooking in git.git (May 2018, #02; Thu, 17))

2018-05-17 Thread Ævar Arnfjörð Bjarmason
On Thu, May 17 2018, Kaartic Sivaraam wrote: > On Thursday 17 May 2018 11:31 AM, Junio C Hamano wrote: >> * jk/branch-l-0-deprecation (2018-03-26) 3 commits >> >> ... >> >> The "-l" option in "git branch -l" is an unfortunate short-hand fo

jk/branch-l-0-deprecation (was Re: What's cooking in git.git (May 2018, #02; Thu, 17))

2018-05-16 Thread Kaartic Sivaraam
On Thursday 17 May 2018 11:31 AM, Junio C Hamano wrote: > * jk/branch-l-0-deprecation (2018-03-26) 3 commits > > ... > > The "-l" option in "git branch -l" is an unfortunate short-hand for > "--create-reflog", but many users, both old and new, so

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-26 Thread Jacob Keller
; >> [1/5]: t3200: unset core.logallrefupdates when testing reflog creation >> [2/5]: t: switch "branch -l" to "branch --create-reflog" >> [3/5]: branch: deprecate "-l" option >> [4/5]: branch: drop deprecated "-l" option >> [5/5]: bra

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-26 Thread Eric Sunshine
; [2/5]: t: switch "branch -l" to "branch --create-reflog" > [3/5]: branch: deprecate "-l" option > [4/5]: branch: drop deprecated "-l" option > [5/5]: branch: make "-l" a synonym for "--list" The entire series looks good to me. FWIW, Reviewed-by: Eric Sunshine

[PATCH 5/5] branch: make "-l" a synonym for "--list"

2018-03-26 Thread Jeff King
The other "mode" options of git-branch have short-option aliases that are easy to type (e.g., "-d" and "-m"). Let's give "--list" the same treatment. This also makes it consistent with the similar "git tag -l" option. We didn't do th

[PATCH 4/5] branch: drop deprecated "-l" option

2018-03-26 Thread Jeff King
We marked the "-l" option as deprecated back in . Now that sufficient time has passed, let's follow through and get rid of it. Signed-off-by: Jeff King --- I'll need some help from the maintainer on the commit message. :) builtin/branch.c | 15 --- 1 file c

[PATCH 3/5] branch: deprecate "-l" option

2018-03-26 Thread Jeff King
The "-l" option is short for "--create-reflog". This has caused much confusion over the years. Most people expect it to work as "--list", because that would match the other "mode" options like -d/--delete and -m/--move, as well as the similar -l/--list opt

[PATCH 2/5] t: switch "branch -l" to "branch --create-reflog"

2018-03-26 Thread Jeff King
In preparation for deprecating "-l", let's make sure we're using the recommended option ourselves. This patch just mechanically converts "branch -l" to "branch --create-reflog". Note that with the exception of the actual "--create-reflog" test, w

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-26 Thread Jeff King
On Sun, Mar 25, 2018 at 12:15:42AM -0700, Jacob Keller wrote: > > 3. Drop "-l" (probably with a deprecation period); it seems unlikely > > to me that anybody uses it for branch creation, and this would at > > least reduce the confusion (then it wo

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-25 Thread Junio C Hamano
Jeff King writes: > IMHO we should do one of: > > 1. Nothing. ;) > > 2. Complain about "-l" in list mode to help educate users about the > current craziness. Nah. We've seen this, perhaps not often but enough times over long period of time. The ab

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-25 Thread Kaartic Sivaraam
On Sunday 25 March 2018 11:18 AM, Eric Sunshine wrote: > On Sun, Mar 25, 2018 at 09:11:34AM +0530, Kaartic Sivaraam wrote: >> On Sunday 25 March 2018 07:04 AM, Eric Sunshine wrote: >>> Can we have a couple new tests: one checking "git branch --list" for >>> the typical case (when rebasing off a nam

  1   2   3   4   >