User Tools

Site Tools


userdoc:git-url-shorterners

This is an old revision of the document!


Convenient URL shorteners for git.kernel.org

There is a simple framework of convenient URL shortcuts for git.kernel.org, for repositories hosted in pub/scm/linux/kernel/git (where most Linux trees are).

/c/ for commits

  /[name]/c/[sha1]        -> /cgit/linux/kernel/git/[name]/linux.git/commit/?id=[sha1]
  /[name]/[repo]/c/[sha1] -> /cgit/linux/kernel/git/[name]/[repo].git/commit/?id=[sha1]

If [repo] is omitted, "linux.git" is assumed.

Examples:

  https://git.kernel.org/torvalds/c/4f27395
  https://git.kernel.org/stable/linux-stable/c/a585d2b

The commit can be a full sha1 or at least 7 chars long; it can also be a tag name or any other tree object, e.g.:

  https://git.kernel.org/torvalds/c/v4.2-rc1

/p/ for patches

  /[name]/p/[sha1]        -> /cgit/linux/kernel/git/[name]/linux.git/patch/?id=[sha1]
  /[name]/[repo]/p/[sha1] -> /cgit/linux/kernel/git/[name]/[repo].git/patch/?id=[sha1]

If [repo] is omitted, "linux.git" is assumed.

Examples:

  https://git.kernel.org/torvalds/p/4f27395
  https://git.kernel.org/stable/linux-stable/p/a585d2b

/h/ for Heads

  /[name]/h/[head]        -> /cgit/linux/kernel/git/[name]/linux.git/?h=[head]
  /[name]/[repo]/h/[head] -> /cgit/linux/kernel/git/[name]/[repo].git/?h=[head]

If [repo] is omitted, "linux.git" is assumed.

Examples:

  https://git.kernel.org/s390/h/for-linus
  https://git.kernel.org/next/linux-next/h/stable
userdoc/git-url-shorterners.1453241183.txt.gz · Last modified: 2016-01-19 22:06 by mricon