git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Does git-apply --recount search a extra line?
@ 2020-08-11  6:16 Kyohei Kadota
  2020-08-12 15:35 ` Phillip Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Kyohei Kadota @ 2020-08-11  6:16 UTC (permalink / raw)
  To: Git List

I just found a strange error in git-apply --recount.

======= output ========
% git --git-dir= apply --check --recount -p1 -v <patch.diff
Checking patch main...
error: while searching for:
    mountfs\
    configdist\
    confignet\
    mountdist\
    fmtventi\
    download\
    copydist\
    bootsetup finish stop\
    stopether stopppp\
-- /n/sources/plan9/sys/lib/dist/pc/plan9.ini.cd    Wed Apr 13 21:19:21 2011

error: patch failed: main:8
error: main: patch does not apply

======== patch.diff ========
diff -Nru /n/sources/plan9/sys/lib/dist/pc/inst/main /sys/lib/dist/pc/inst/main
--- /n/sources/plan9/sys/lib/dist/pc/inst/main    Fri Apr  1 15:10:39 2005
+++ /main    Sun Sep 18 00:00:00 2011
@@ -8,9 +8,9 @@
     mountfs\
     configdist\
     confignet\
+    download\
     mountdist\
     fmtventi\
-    download\
     copydist\
     bootsetup finish stop\
     stopether stopppp\
--- /n/sources/plan9/sys/lib/dist/pc/plan9.ini.cd    Wed Apr 13 21:19:21 2011
+++ /plan9.ini.cd    Tue Nov  1 00:00:00 2011
@@ -5,6 +5,7 @@
 dmamode=ask
 adisk=/dev/sdD0/cdboot
 cdboot=yes
+installurl=http://148.251.6.120/plan9/download
 # console=0
 # baud=9600

======== main ========
#!/bin/rc

# must be topologically sorted (by prereq)
tasks=(\
    configfs\
    partdisk prepdisk\
    fmtfossil\
    mountfs\
    configdist\
    confignet\
    mountdist\
    fmtventi\
    download\
    copydist\
    bootsetup finish stop\
    stopether stopppp\
)
#    startether startppp stopether stopppp download\

======== plan9.ini.cd ========
partition=new
mouseport=ask
monitor=ask
vgasize=ask
dmamode=ask
adisk=/dev/sdD0/cdboot
cdboot=yes
# console=0
# baud=9600

[install]
nobootprompt=local!/boot/bzroot
bootfile=sdD0!cdboot!9pcflop.gz

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

* Re: Does git-apply --recount search a extra line?
  2020-08-11  6:16 Does git-apply --recount search a extra line? Kyohei Kadota
@ 2020-08-12 15:35 ` Phillip Wood
  2020-08-14 17:28   ` Kyohei Kadota
  0 siblings, 1 reply; 3+ messages in thread
From: Phillip Wood @ 2020-08-12 15:35 UTC (permalink / raw)
  To: Kyohei Kadota, Git List

Hi Kyohei

On 11/08/2020 07:16, Kyohei Kadota wrote:
> I just found a strange error in git-apply --recount.
> 
> ======= output ========
> % git --git-dir= apply --check --recount -p1 -v <patch.diff
> Checking patch main...
> error: while searching for:
>      mountfs\
>      configdist\
>      confignet\
>      mountdist\
>      fmtventi\
>      download\
>      copydist\
>      bootsetup finish stop\
>      stopether stopppp\
> -- /n/sources/plan9/sys/lib/dist/pc/plan9.ini.cd    Wed Apr 13 21:19:21 2011

There's no "diff ..." header which git inserts before every file between 
the two files in the patch so when it is recounting it treats the "--- 
/n/sources..." as a continuation of the current hunk

Best Wishes

Phillip

> error: patch failed: main:8
> error: main: patch does not apply
> 
> ======== patch.diff ========
> diff -Nru /n/sources/plan9/sys/lib/dist/pc/inst/main /sys/lib/dist/pc/inst/main
> --- /n/sources/plan9/sys/lib/dist/pc/inst/main    Fri Apr  1 15:10:39 2005
> +++ /main    Sun Sep 18 00:00:00 2011
> @@ -8,9 +8,9 @@
>       mountfs\
>       configdist\
>       confignet\
> +    download\
>       mountdist\
>       fmtventi\
> -    download\
>       copydist\
>       bootsetup finish stop\
>       stopether stopppp\
> --- /n/sources/plan9/sys/lib/dist/pc/plan9.ini.cd    Wed Apr 13 21:19:21 2011
> +++ /plan9.ini.cd    Tue Nov  1 00:00:00 2011
> @@ -5,6 +5,7 @@
>   dmamode=ask
>   adisk=/dev/sdD0/cdboot
>   cdboot=yes
> +installurl=http://148.251.6.120/plan9/download
>   # console=0
>   # baud=9600
> 
> ======== main ========
> #!/bin/rc
> 
> # must be topologically sorted (by prereq)
> tasks=(\
>      configfs\
>      partdisk prepdisk\
>      fmtfossil\
>      mountfs\
>      configdist\
>      confignet\
>      mountdist\
>      fmtventi\
>      download\
>      copydist\
>      bootsetup finish stop\
>      stopether stopppp\
> )
> #    startether startppp stopether stopppp download\
> 
> ======== plan9.ini.cd ========
> partition=new
> mouseport=ask
> monitor=ask
> vgasize=ask
> dmamode=ask
> adisk=/dev/sdD0/cdboot
> cdboot=yes
> # console=0
> # baud=9600
> 
> [install]
> nobootprompt=local!/boot/bzroot
> bootfile=sdD0!cdboot!9pcflop.gz
> 

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

* Re: Does git-apply --recount search a extra line?
  2020-08-12 15:35 ` Phillip Wood
@ 2020-08-14 17:28   ` Kyohei Kadota
  0 siblings, 0 replies; 3+ messages in thread
From: Kyohei Kadota @ 2020-08-14 17:28 UTC (permalink / raw)
  To: phillip.wood; +Cc: Git List

> On 11/08/2020 07:16, Kyohei Kadota wrote:
> > I just found a strange error in git-apply --recount.
> >
> > ======= output ========
> > % git --git-dir= apply --check --recount -p1 -v <patch.diff
> > Checking patch main...
> > error: while searching for:
> >      mountfs\
> >      configdist\
> >      confignet\
> >      mountdist\
> >      fmtventi\
> >      download\
> >      copydist\
> >      bootsetup finish stop\
> >      stopether stopppp\
> > -- /n/sources/plan9/sys/lib/dist/pc/plan9.ini.cd    Wed Apr 13 21:19:21 2011
>
> There's no "diff ..." header which git inserts before every file between
> the two files in the patch so when it is recounting it treats the "---
> /n/sources..." as a continuation of the current hunk

Oh I'm sorry, I've missed its specification.
Thanks.

>
> Best Wishes
>
> Phillip
>
> > error: patch failed: main:8
> > error: main: patch does not apply
> >
> > ======== patch.diff ========
> > diff -Nru /n/sources/plan9/sys/lib/dist/pc/inst/main /sys/lib/dist/pc/inst/main
> > --- /n/sources/plan9/sys/lib/dist/pc/inst/main    Fri Apr  1 15:10:39 2005
> > +++ /main    Sun Sep 18 00:00:00 2011
> > @@ -8,9 +8,9 @@
> >       mountfs\
> >       configdist\
> >       confignet\
> > +    download\
> >       mountdist\
> >       fmtventi\
> > -    download\
> >       copydist\
> >       bootsetup finish stop\
> >       stopether stopppp\
> > --- /n/sources/plan9/sys/lib/dist/pc/plan9.ini.cd    Wed Apr 13 21:19:21 2011
> > +++ /plan9.ini.cd    Tue Nov  1 00:00:00 2011
> > @@ -5,6 +5,7 @@
> >   dmamode=ask
> >   adisk=/dev/sdD0/cdboot
> >   cdboot=yes
> > +installurl=http://148.251.6.120/plan9/download
> >   # console=0
> >   # baud=9600
> >
> > ======== main ========
> > #!/bin/rc
> >
> > # must be topologically sorted (by prereq)
> > tasks=(\
> >      configfs\
> >      partdisk prepdisk\
> >      fmtfossil\
> >      mountfs\
> >      configdist\
> >      confignet\
> >      mountdist\
> >      fmtventi\
> >      download\
> >      copydist\
> >      bootsetup finish stop\
> >      stopether stopppp\
> > )
> > #    startether startppp stopether stopppp download\
> >
> > ======== plan9.ini.cd ========
> > partition=new
> > mouseport=ask
> > monitor=ask
> > vgasize=ask
> > dmamode=ask
> > adisk=/dev/sdD0/cdboot
> > cdboot=yes
> > # console=0
> > # baud=9600
> >
> > [install]
> > nobootprompt=local!/boot/bzroot
> > bootfile=sdD0!cdboot!9pcflop.gz
> >

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

end of thread, other threads:[~2020-08-14 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11  6:16 Does git-apply --recount search a extra line? Kyohei Kadota
2020-08-12 15:35 ` Phillip Wood
2020-08-14 17:28   ` Kyohei Kadota

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