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

Re: [PATCH] config.txt: move closing "----" to cover entire listing

From
Jeff King <peff@peff.net>
Date
Apr 9, 2020, 15:51 UTC
Message-ID
<20200409155159.GA4129050@coredump.intra.peff.net>
In-Reply-To
<CAN0heSp3=8fTGb5Ciuvr8+EevNSrAfskvrrS_PN=VPhKJyB5jA@mail.gmail.com>
On Thu, Apr 09, 2020 at 05:00:34PM +0200, Martin Ågren wrote:
Show 12 quoted lines
> > That explains why I didn't see the issue when running doc-diff on the
> > original bug. I wonder if we could teach doc-diff to look at the HTML,
> > too. I'm not sure how, though. Certainly html2text or similar would get
> > us something diff-able, but without the visual elements (like the grey
> > box), I don't know that it's much more valuable than the manpages.
> 
> At one point I considered trying out diffoscope for this. It should
> allegedly be good at comparing "everything". But being good at
> everything, it wanted to pull in a discouragingly large number of
> dependencies, so I never actually tried it out. It doesn't explicitly
> claim to know html or manpages (but does mention xml and pdf), so I
> dunno.

I tried it just now, and it's not that clever. A regular "diff -r" of the before and after HTML yields what you'd expect:

--- old/git-config.html 2020-04-09 11:38:19.312436125 -0400 +++ new/git-config.html 2020-04-09 11:38:40.028385850 -0400

@@ -1678,11 +1678,9 @@
 ; file (if the condition is true); their location is not
 ; affected by the condition
 [includeIf "gitdir:/path/to/group/"]
-        path = foo.inc</code></pre>
-</div></div>
-<div class="literalblock">
-<div class="content">
-<pre><code>; include only if we are in a worktree where foo-branch is
+        path = foo.inc
+
+; include only if we are in a worktree where foo-branch is
 ; currently checked out
 [includeIf "onbranch:foo-branch"]
         path = foo.inc</code></pre>

A diffoscope diff yields the same, plus it complains about differing
timestamps on all of the files. I don't think it's doing anything clever
with respect to HTML formatting.

-Peff
Previous: Martin ÅgrenNext: Martin Ågren
Message 4 of 5 in “config.txt: move closing "----" to cover entire listing”
  1. config.txt: move closing "----" to cover entire listingMartin Ågren, Apr 9, 2020
  2. Jeff KingApr 9, 2020
  3. Martin ÅgrenApr 9, 2020
  4. Jeff KingApr 9, 2020
  5. Martin ÅgrenApr 10, 2020

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.