git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: bad patch created when I use --ignore-blank-lines option

From
EKEugen Konkov <kes-kes@yandex.ru>
Date
Aug 2, 2019, 15:52 UTC
Message-ID
<56155941.20190802185256@yandex.ru>
In-Reply-To
<1543205721.20190802183954@yandex.ru>
Hello Eugen,

sorry, everything is OK. rafasc suggested me what is the problem. I should use --full-history

Friday, August 2, 2019, 6:39:54 PM, you wrote:
> Hello Git,
> I add and remove only blank lines at my file:
> $ git log -p t/29-cmd_l.t
Show 40 quoted lines
> --- a/t/29-cmd_l.t
> +++ b/t/29-cmd_l.t
> @@ -218,7 +218,6 @@ __DATA__
>  @@ list
>  -e:0005  1;    
>  -e:0002    2;
> -
>  -e
>      0: use Devel::DbBatch split(/,/,q{list.conf;b 2;a 2 1;s 2;l .;q});;
>      1: sub t {
> @@ -226,26 +225,26 @@ ab>>2:     2;
>      3: }
>      4:
>     x5: 1;
> +
>  @@ list from first
>  -e:0010  t2();
> -
>  -e
>      0: use Devel::DbBatch split(/,/,q{list.conf;l 0;q});;
>      1: sub t0 {
>     x2:     1;
>      3: }
> +
>  @@ list from last
>  -e:0010  t2();
> -
>  -e
>      14:
>      15:
>      16:
>      17: # Perl implicitly adds one new line after this one
>      18:
> +
>  @@ list middle
>  -e:0010  t2();
> -
>  -e
>     x5:     t0();
>      6: }
> But  when I use --ignore-blank-lines option I see broken patch. I have
> not added '-e' line, but it is displayed as it was added. Notice '+-e'
> $ git log -p --ignore-blank-lines t/29-cmd_l.t
Show 11 quoted lines
> diff --git a/t/29-cmd_l.t b/t/29-cmd_l.t
> index 4b77279..d7739d2 100755
> --- a/t/29-cmd_l.t
> +++ b/t/29-cmd_l.t
> @@ -219,6 +219,7 @@ __DATA__
>  -e:0005  1;    
>  -e:0002    2;
>  
> +-e
>      0: use Devel::DbBatch split(/,/,q{list.conf;b 2;a 2 1;s 2;l .;q});;
>      1: sub t {
 ab>>>2:     2;
Show 24 quoted lines
> @@ -228,6 +229,7 @@ ab>>2:     2;
>  @@ list from first
>  -e:0010  t2();
>  
> +-e
>      0: use Devel::DbBatch split(/,/,q{list.conf;l 0;q});;
>      1: sub t0 {
>     x2:     1;
> @@ -235,6 +237,7 @@ ab>>2:     2;
>  @@ list from last
>  -e:0010  t2();
>  
> +-e
>      14:
>      15:
>      16:
> @@ -243,6 +246,7 @@ ab>>2:     2;
>  @@ list middle
>  -e:0010  t2();
>  
> +-e
>     x5:     t0();
>      6: }
>      7: sub t2 {
> $ git --version
> git version 2.22.0
-- 
Best regards,
Eugen Konkov
Previous: Eugen Konkov
Message 2 of 2 in “bad patch created when I use --ignore-blank-lines option”
  1. Eugen KonkovAug 2, 2019
  2. Eugen KonkovAug 2, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.