* diff --horizon-lines=lines @ 2020-05-28 2:27 m@d m0nk 2020-05-28 2:40 ` Eliot Moss 0 siblings, 1 reply; 4+ messages in thread From: m@d m0nk @ 2020-05-28 2:27 UTC (permalink / raw) To: cygwin Hello All, I am trying to understand the practical use of "--horizon-lines=lines" option in the diff utility. Can i get some pointers on two sample files which can demonstrate the use of --horizon-lines=lines I understood the theory / definition from the info / man file. However, I am unable to reproduce the scenario. Request some pointers. -- __| madm0nk |__ th3 sib3rian m0nk -------------------------- ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: diff --horizon-lines=lines 2020-05-28 2:27 diff --horizon-lines=lines m@d m0nk @ 2020-05-28 2:40 ` Eliot Moss 2020-05-28 2:42 ` m@d m0nk 0 siblings, 1 reply; 4+ messages in thread From: Eliot Moss @ 2020-05-28 2:40 UTC (permalink / raw) To: m@d m0nk, cygwin On 5/27/2020 10:27 PM, m@d m0nk via Cygwin wrote: > Hello All, > > I am trying to understand the practical use of "--horizon-lines=lines" > option in the diff utility. > > Can i get some pointers on two sample files which can demonstrate the > use of --horizon-lines=lines > > I understood the theory / definition from the info / man file. > However, I am unable to reproduce the scenario. > > Request some pointers. This stackexchange post may give some insight (it did for me): https://unix.stackexchange.com/questions/158097/diff-horizon-lines-lines-explained Regards - EM ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: diff --horizon-lines=lines 2020-05-28 2:40 ` Eliot Moss @ 2020-05-28 2:42 ` m@d m0nk 2020-06-04 15:11 ` Brian Inglis 0 siblings, 1 reply; 4+ messages in thread From: m@d m0nk @ 2020-05-28 2:42 UTC (permalink / raw) To: moss; +Cc: cygwin Thanks EM.I did go through the post, I understood the concept/theory, but I am unable to do a practical demo of it. Do you have a sample file set for demo or can you suggest something? On Thu, May 28, 2020 at 8:10 AM Eliot Moss <moss@cs.umass.edu> wrote: > > On 5/27/2020 10:27 PM, m@d m0nk via Cygwin wrote: > > Hello All, > > > > I am trying to understand the practical use of "--horizon-lines=lines" > > option in the diff utility. > > > > Can i get some pointers on two sample files which can demonstrate the > > use of --horizon-lines=lines > > > > I understood the theory / definition from the info / man file. > > However, I am unable to reproduce the scenario. > > > > Request some pointers. > > This stackexchange post may give some insight (it did for me): > > https://unix.stackexchange.com/questions/158097/diff-horizon-lines-lines-explained > > Regards - EM -- __| madm0nk |__ th3 sib3rian m0nk -------------------------- ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: diff --horizon-lines=lines 2020-05-28 2:42 ` m@d m0nk @ 2020-06-04 15:11 ` Brian Inglis 0 siblings, 0 replies; 4+ messages in thread From: Brian Inglis @ 2020-06-04 15:11 UTC (permalink / raw) To: cygwin; +Cc: m@d m0nk On 2020-05-27 20:42, m@d m0nk via Cygwin wrote: > On Thu, May 28, 2020 at 8:10 AM Eliot Moss wrote: >> On 5/27/2020 10:27 PM, m@d m0nk via Cygwin wrote: >>> I am trying to understand the practical use of "--horizon-lines=lines" >>> option in the diff utility. >>> Can i get some pointers on two sample files which can demonstrate the >>> use of --horizon-lines=lines >>> I understood the theory / definition from the info / man file. >>> However, I am unable to reproduce the scenario. >>> Request some pointers. >> This stackexchange post may give some insight (it did for me): >> https://unix.stackexchange.com/questions/158097/diff-horizon-lines-lines-explained > Thanks EM.I did go through the post, I understood the concept/theory, > but I am unable to do a practical demo of it. Do you have a sample > file set for demo or can you suggest something? The option --horizon-lines is intended to adjust (normally increase) the amount of context kept for matching around a hunk of differences, independent of the displayed context lines, before diff concludes that hunk is independent of any subsequent changes and emit the hunk with suppress-common-lines|--context|--unified lines of context around it. Often a few blank (or other common text) lines will match any other range of a few blank (or other common text) lines and diff will decide the hunk is complete, so you may end up with a number of small separate added/deleted hunks, rather than a larger hunk where some lines may have been changed. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in IEC units and prefixes, physical quantities in SI.] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-04 15:11 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-05-28 2:27 diff --horizon-lines=lines m@d m0nk 2020-05-28 2:40 ` Eliot Moss 2020-05-28 2:42 ` m@d m0nk 2020-06-04 15:11 ` Brian Inglis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).