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

[PATCH] Documentation: rename gitlink macro to linkgit

From
Dan McGee <dpmcgee@gmail.com>
Date
Dec 29, 2007, 16:34 UTC
Message-ID
<47767710.7040405@gmail.com>
In-Reply-To
<449c10960712290824yd2c5783l8d0ba91bbad95789@mail.gmail.com>
On 12/29/2007 10:24 AM, Dan McGee wrote:
Show 15 quoted lines
> On Dec 29, 2007 9:57 AM, Miklos Vajna <vmiklos@frugalware.org> wrote:
>> http://code.toofishes.net/gitweb.cgi?p=pacman.git;a=commitdiff;h=b3c6bdda38f7e370e1f80f02a61f1d3f08c1b57d
>>
>> here is the commit that fixed the problem for pacman. what do you think,
>> should we rename gitlink to something else, too - or should we contact
>> upstream to notify them about they caused a breakage?
> 
> I've tried twice now to send a patch to the list...please let me know
> if it isn't working, because I am getting CCed on the send, and the
> mailing list address is set in the sendemail.to variable. I did notice
> that send-email doesn't even prompt you for confirmation of the
> default "to" address if you have this variable set, so I'm not sure if
> something weird is happening there.
> 
> -Dan
>From 68bf426e810e732ff3f9f75ffcd69f777b538685 Mon Sep 17 00:00:00 2001
From: Dan McGee <dpmcgee@gmail.com>
Date: Sat, 29 Dec 2007 00:20:38 -0600
Subject: [PATCH] Documentation: rename gitlink macro to linkgit

Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration:

@@ -149,7 +153,10 @@
 # Inline macros.
 # Backslash prefix required for escape processing.
 # (?s) re flag for line spanning.
-(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
+# Explicit so they can be nested.
+(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
 # Anchor: [[[id]]]. Bibliographic anchor.
 (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3
 # Anchor: [[id,xreflabel]]

This default regex now matches explicit values, and unfortunately in this
case gitlink was being matched by just 'link', causing the wrong inline
macro template to be applied. By renaming the macro, we can avoid being
matched by the wrong regex.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
 Documentation/asciidoc.conf              |    8 +-
 Documentation/blame-options.txt          |    2 +-
 Documentation/cmd-list.perl              |    2 +-
 Documentation/config.txt                 |  126 +++++++++++++++---------------
 Documentation/cvs-migration.txt          |   10 +-
 Documentation/diff-options.txt           |    4 +-
 Documentation/everyday.txt               |   48 ++++++------
 Documentation/fetch-options.txt          |    2 +-
 Documentation/git-add.txt                |   16 ++--
 Documentation/git-am.txt                 |   16 ++--
 Documentation/git-annotate.txt           |    4 +-
 Documentation/git-apply.txt              |   12 ++--
 Documentation/git-archimport.txt         |    2 +-
 Documentation/git-archive.txt            |    2 +-
 Documentation/git-bisect.txt             |    2 +-
 Documentation/git-blame.txt              |    8 +-
 Documentation/git-branch.txt             |   12 ++--
 Documentation/git-bundle.txt             |   10 +-
 Documentation/git-cat-file.txt           |    4 +-
 Documentation/git-check-attr.txt         |    4 +-
 Documentation/git-check-ref-format.txt   |    6 +-
 Documentation/git-checkout-index.txt     |    2 +-
 Documentation/git-checkout.txt           |    4 +-
 Documentation/git-cherry-pick.txt        |    4 +-
 Documentation/git-cherry.txt             |    2 +-
 Documentation/git-citool.txt             |    6 +-
 Documentation/git-clean.txt              |    4 +-
 Documentation/git-clone.txt              |    2 +-
 Documentation/git-commit-tree.txt        |    6 +-
 Documentation/git-commit.txt             |   30 ++++----
 Documentation/git-config.txt             |    2 +-
 Documentation/git-count-objects.txt      |    2 +-
 Documentation/git-cvsexportcommit.txt    |    2 +-
 Documentation/git-cvsimport.txt          |    4 +-
 Documentation/git-cvsserver.txt          |    4 +-
 Documentation/git-daemon.txt             |    2 +-
 Documentation/git-describe.txt           |    2 +-
 Documentation/git-diff-files.txt         |    2 +-
 Documentation/git-diff-index.txt         |    2 +-
 Documentation/git-diff-tree.txt          |    2 +-
 Documentation/git-diff.txt               |    8 +-
 Documentation/git-fast-export.txt        |   12 ++--
 Documentation/git-fast-import.txt        |   18 ++--
 Documentation/git-fetch-pack.txt         |    4 +-
 Documentation/git-fetch.txt              |    4 +-
 Documentation/git-filter-branch.txt      |   16 ++--
 Documentation/git-fmt-merge-msg.txt      |    4 +-
 Documentation/git-format-patch.txt       |    8 +-
 Documentation/git-fsck-objects.txt       |    2 +-
 Documentation/git-fsck.txt               |    2 +-
 Documentation/git-gc.txt                 |   14 ++--
 Documentation/git-get-tar-commit-id.txt  |    4 +-
 Documentation/git-grep.txt               |    2 +-
 Documentation/git-gui.txt                |    4 +-
 Documentation/git-hash-object.txt        |    2 +-
 Documentation/git-help.txt               |    6 +-
 Documentation/git-http-fetch.txt         |    2 +-
 Documentation/git-http-push.txt          |    2 +-
 Documentation/git-imap-send.txt          |    2 +-
 Documentation/git-index-pack.txt         |   10 +-
 Documentation/git-init-db.txt            |    2 +-
 Documentation/git-init.txt               |    2 +-
 Documentation/git-instaweb.txt           |    2 +-
 Documentation/git-log.txt                |   10 +-
 Documentation/git-lost-found.txt         |    4 +-
 Documentation/git-ls-files.txt           |    8 +-
 Documentation/git-ls-remote.txt          |    4 +-
 Documentation/git-ls-tree.txt            |    2 +-
 Documentation/git-mailinfo.txt           |    4 +-
 Documentation/git-mailsplit.txt          |    2 +-
 Documentation/git-merge-base.txt         |    2 +-
 Documentation/git-merge-file.txt         |    4 +-
 Documentation/git-merge-index.txt        |    2 +-
 Documentation/git-merge-one-file.txt     |    2 +-
 Documentation/git-merge-tree.txt         |    2 +-
 Documentation/git-merge.txt              |    8 +-
 Documentation/git-mergetool.txt          |    4 +-
 Documentation/git-mktag.txt              |    2 +-
 Documentation/git-mktree.txt             |    2 +-
 Documentation/git-mv.txt                 |    2 +-
 Documentation/git-name-rev.txt           |    4 +-
 Documentation/git-pack-objects.txt       |   10 +-
 Documentation/git-pack-redundant.txt     |    8 +-
 Documentation/git-pack-refs.txt          |    2 +-
 Documentation/git-parse-remote.txt       |    2 +-
 Documentation/git-patch-id.txt           |    2 +-
 Documentation/git-peek-remote.txt        |    2 +-
 Documentation/git-prune-packed.txt       |    6 +-
 Documentation/git-prune.txt              |    2 +-
 Documentation/git-pull.txt               |   10 +-
 Documentation/git-push.txt               |    4 +-
 Documentation/git-quiltimport.txt        |    2 +-
 Documentation/git-read-tree.txt          |    8 +-
 Documentation/git-rebase.txt             |   10 +-
 Documentation/git-receive-pack.txt       |    4 +-
 Documentation/git-reflog.txt             |    8 +-
 Documentation/git-relink.txt             |    2 +-
 Documentation/git-remote.txt             |   12 ++--
 Documentation/git-repack.txt             |   14 ++--
 Documentation/git-repo-config.txt        |    2 +-
 Documentation/git-request-pull.txt       |    2 +-
 Documentation/git-rerere.txt             |    4 +-
 Documentation/git-reset.txt              |    8 +-
 Documentation/git-rev-list.txt           |   20 +++---
 Documentation/git-rev-parse.txt          |    2 +-
 Documentation/git-revert.txt             |    4 +-
 Documentation/git-rm.txt                 |    4 +-
 Documentation/git-send-email.txt         |    2 +-
 Documentation/git-send-pack.txt          |    6 +-
 Documentation/git-sh-setup.txt           |    2 +-
 Documentation/git-shell.txt              |    2 +-
 Documentation/git-shortlog.txt           |    2 +-
 Documentation/git-show-branch.txt        |    2 +-
 Documentation/git-show-index.txt         |    2 +-
 Documentation/git-show-ref.txt           |    6 +-
 Documentation/git-show.txt               |    8 +-
 Documentation/git-stash.txt              |   10 +-
 Documentation/git-status.txt             |    6 +-
 Documentation/git-stripspace.txt         |    2 +-
 Documentation/git-submodule.txt          |    6 +-
 Documentation/git-svn.txt                |   12 ++--
 Documentation/git-symbolic-ref.txt       |    2 +-
 Documentation/git-tag.txt                |    2 +-
 Documentation/git-tar-tree.txt           |    2 +-
 Documentation/git-unpack-file.txt        |    2 +-
 Documentation/git-unpack-objects.txt     |    2 +-
 Documentation/git-update-index.txt       |   12 ++--
 Documentation/git-update-ref.txt         |    2 +-
 Documentation/git-update-server-info.txt |    2 +-
 Documentation/git-upload-archive.txt     |    2 +-
 Documentation/git-upload-pack.txt        |    2 +-
 Documentation/git-var.txt                |    8 +-
 Documentation/git-verify-pack.txt        |    2 +-
 Documentation/git-verify-tag.txt         |    2 +-
 Documentation/git-whatchanged.txt        |    2 +-
 Documentation/git-write-tree.txt         |    2 +-
 Documentation/git.txt                    |   20 +++---
 Documentation/gitattributes.txt          |   10 +-
 Documentation/gitcli.txt                 |    2 +-
 Documentation/gitignore.txt              |    6 +-
 Documentation/gitk.txt                   |    6 +-
 Documentation/gitmodules.txt             |    6 +-
 Documentation/glossary.txt               |   18 ++--
 143 files changed, 460 insertions(+), 460 deletions(-)

Looks like the patch was bigger than I thought. Gzipped and attached if that is acceptable.
Previous: Dan McGeeNext: Junio C Hamano
Message 5 of 9 in “generated HTML contains broken links”
  1. Eric HanchrowDec 28, 2007
  2. Dan McGeeDec 29, 2007
  3. Miklos VajnaDec 29, 2007
  4. Dan McGeeDec 29, 2007
  5. Documentation: rename gitlink macro to linkgitDan McGee, Dec 29, 2007
  6. Junio C HamanoJan 3, 2008
  7. Yannick GingrasJan 4, 2008
  8. Junio C HamanoJan 4, 2008
  9. Yannick GingrasJan 4, 2008

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.