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

Re: [PATCH] catch asciidoc failures

From
Jonas Fonseca <jonas.fonseca@gmail.com>
Date
Jun 1, 2007, 08:55 UTC
Message-ID
<2c6b72b30706010155k4a3745b0i3ac2d22fa5a4f534@mail.gmail.com>
In-Reply-To
<20070601083621.GB3521@admingilde.org>
On 6/1/07, Martin Waitz <tali@admingilde.org> wrote:
Show 6 quoted lines
> On Thu, May 31, 2007 at 11:23:57PM -0700, Scott Lamb wrote:
> > If pipefail is available (GNU bash >= 3.00), fail when asciidoc returns
> > error rather than possibly later during XSLT.
>
> perhaps we should simply change the pipe ordering to get asciidoc
> to the end of the pipeline so that all shells respect its exit code?

For tig I also adopted the nice man page headers git has. However, I have used asciidoc attributes provided on the command line avoid having to use sed. I can make a patch later if nobody beats me. The required changes are outlined below.

Show 15 quoted lines
> > --- a/Documentation/Makefile
> > +++ b/Documentation/Makefile
> > @@ -111,6 +111,7 @@ clean:
> >
> >  %.html : %.txt
> >       rm -f $@+ $@
> > +     set -o pipefail 2>/dev/null; \
> >       $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
> >               $(ASCIIDOC_EXTRA) -o - $< | \
> >               sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
>
> something like (untested):
>         sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $< |
>                 $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
>                         $(ASCIIDOC_EXTRA) -o $@+ -
More untested stuff. Use -a to define git_version attribute:
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
                         $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@ $<
Then change the @@GIT_VERSION@@ symbol in asciidoc.conf to {git_version}.
-- 
Jonas Fonseca
Previous: Martin WaitzNext: Jeff King
Message 3 of 7 in “catch asciidoc failures”
  1. catch asciidoc failuresScott Lamb, Jun 1, 2007
  2. Martin WaitzJun 1, 2007
  3. Jonas FonsecaJun 1, 2007
  4. Jeff KingJun 1, 2007
  5. Martin WaitzJun 1, 2007
  6. Jeff KingJun 1, 2007
  7. Scott LambJun 1, 2007

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.