Re: Lastest busybox git prints lines before and after diff lines. (Not in recent change.

"Michael D. Setzer II via busybox" <[email protected]>
Newsgroups gmane.linux.busybox
Message-ID <[email protected]>
On 24 Aug 2026 at 22:52, mjmouse9999 wrote:

Date sent:      	Mon, 24 Aug 2026 22:52:36 +1000
Subject:        	Re: Lastest busybox git prints lines before and 
after diff lines.
	(Not in recent change.
To:             	[email protected]
From:           	mjmouse9999 <[email protected]>

> The formatting is a unified diff.
> 
> Looking at 8f7d38970046c0ea53de911084561b79ffb2d6b9
> when diff was originally added to busybox it also only
> did unified diffs.

Thanks for the reply. Don't think I had used the busybox diff in 
past. Mostly do work with Fedora machines, but was doing testing 
booted into my G4L kernel image, and was comparing a test script 
in which blocksize was changed from 1M to 4M. Did the diff linked 
to busybox and it gave 151 lines? Switched to a Fedora machine 
and did same diff and it came back with 108 lines. 

These options produce 81 and 83 lines,  so close, but not identicle.

diff g4l30o14 g4l30o14b | grep -v "\---" >/tmp/difff
busybox diff -U 0 g4l30o14 g4l30o14b >/tmp/diffb

But now know the commands are different.
Thanks for the quick reply. Even installed the Fedora repo 1.37 
version, and it does the same. 


> 
> There is a -U flag to change how much context:
> 
>      busybox diff -U1 <(echo $'a\nb\nc\nd\nex\nf\ng') \
>        <(echo $'a\nb\nc\nd\ne\nf\ng')
> 
>      --- /dev/fd/63
>      +++ /dev/fd/62
>      @@ -4,3 +4,3 @@
>       d
>      -ex
>      +e
>       f
> 
> On 24/8/26 22:21, Michael D. Setzer II via busybox wrote:
> > Checked a machine with previous busybox and it did same, so some
> > earlier change?
> >
> > On 24 Aug 2026 at 22:02, Michael D. Setzer II via busy wrote:
> >
> > To:             	[email protected]
> > Date sent:      	Mon, 24 Aug 2026 22:02:04 +1000
> > Subject:        	Lastest busybox git prints lines before and after
> > diff lines.
> > Priority:       	normal
> > From:           	"Michael D. Setzer II via busybox"
> > <[email protected]>
> > Send reply to:  	[email protected]
> >
> >> Noticed a difference in diff between Fedora and busybox??
> >> Was comparing to files where lines with 1M changed to 4M
> >> But busybox outputting different lines.
> >> Fedora diff shows 108 lines while busybox diff is 151 lines?
> >> [...]


+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor (Retired)     
 mailto:[email protected]                            
 mailto:[email protected]
 mailto:[email protected]
 Guam - Where America's Day Begins                        
 G4L Disk Imaging Project maintainer 
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+



_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.