git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* bad patch created when I use  --ignore-blank-lines option
@ 2019-08-02 15:39 Eugen Konkov
  2019-08-02 15:52 ` Eugen Konkov
  0 siblings, 1 reply; 2+ messages in thread
From: Eugen Konkov @ 2019-08-02 15:39 UTC (permalink / raw)
  To: Git Mailing List

Hello Git,

I add and remove only blank lines at my file:

$ git log -p t/29-cmd_l.t

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

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;
@@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bad patch created when I use  --ignore-blank-lines option
  2019-08-02 15:39 bad patch created when I use --ignore-blank-lines option Eugen Konkov
@ 2019-08-02 15:52 ` Eugen Konkov
  0 siblings, 0 replies; 2+ messages in thread
From: Eugen Konkov @ 2019-08-02 15:52 UTC (permalink / raw)
  To: Git Mailing List

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

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

> 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;
> @@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-02 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 15:39 bad patch created when I use --ignore-blank-lines option Eugen Konkov
2019-08-02 15:52 ` Eugen Konkov

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git