From 1348559fd38f34f2723e33200c247f6b1d4f6f81 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 4 Aug 2020 02:25:48 +0200 Subject: Add man page for `git-sugpatch` --- Makefile | 9 ++++ doc/git-sugpatch.1 | 128 +++++++++++++++++++++++++++++++++++++++++++++++++ doc/git-sugpatch.1.txt | 70 +++++++++++++++++++++++++++ 3 files changed, 207 insertions(+) create mode 100644 Makefile create mode 100644 doc/git-sugpatch.1 create mode 100644 doc/git-sugpatch.1.txt diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9d90c2a --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +MAN_PAGES := $(patsubst doc/%.1.txt,doc/%.1,$(wildcard doc/*.1.txt)) + +.PHONY: doc +doc: $(MAN_PAGES) + +doc/%.1: doc/%.1.txt + sed 's/`/*/g' $< > $@.transformed + a2x --no-xmllint --format manpage $@.transformed + rm $@.transformed diff --git a/doc/git-sugpatch.1 b/doc/git-sugpatch.1 new file mode 100644 index 0000000..f8a34b2 --- /dev/null +++ b/doc/git-sugpatch.1 @@ -0,0 +1,128 @@ +'\" t +.\" Title: git-sugpatch +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 08/04/2020 +.\" Manual: \ \& +.\" Source: \ \& +.\" Language: English +.\" +.TH "GIT\-SUGPATCH" "1" "08/04/2020" "\ \&" "\ \&" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +git-sugpatch \- Show diffs for GitHub suggestions +.SH "SYNOPSIS" +.sp +\fIgit sugpatch\fR [options] \&... +.SH "DESCRIPTION" +.sp +Show the diffs of the given GitHub suggestion references\&. +.sp +A suggestion reference is either a URL to the comment, or its ID\&. +.SH "OPTIONS" +.PP +\-\-github\-token +.RS 4 +A GitHub API token with the \(lqrepo\(rq permission\&. This can also be set with +\fBgithubSuggestion\&.githubToken\fR +or the +\fBGITHUB_TOKEN\fR +environment variable\&. +.RE +.PP +\-h, \-\-help +.RS 4 +Print usage help\&. +.RE +.PP +\-\-remote +.RS 4 +The remote to use to fetch the suggestion from when passing a suggestion ID\&. This can also be set with +\fBgithubSuggestion\&.remote\fR\&. Defaults to +\fBorigin\fR\&. +.RE +.PP +\-V, \-\-version +.RS 4 +Print the program version\&. +.RE +.SH "CONFIGURATION" +.sp +Configuration options can be specified either as command line options, or in the Git config\&. +.PP +githubSuggestion\&.githubToken +.RS 4 +A GitHub API token with the \(lqrepo\(rq permission\&. This can also be set with the +\fBGITHUB_TOKEN\fR +environment variable\&. +.RE +.PP +githubSuggestion\&.remote +.RS 4 +The remote to use to fetch the suggestion from when passing a suggestion ID\&. Defaults to +\fBorigin\fR\&. +.RE +.SH "ENVIRONMENT VARIABLES" +.PP +GITHUB_TOKEN +.RS 4 +A GitHub API token with the \(lqrepo\(rq permission\&. +.RE +.SH "EXAMPLES" +.sp +Suggestion references can be specified either as URLs: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ git sugpatch https://github\&.com/teddywing/github\-suggestion/pull/1#discussion_r459691747 +.fi +.if n \{\ +.RE +.\} +.sp +or as comment IDs: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ git sugpatch 459692838 +.fi +.if n \{\ +.RE +.\} +.sp +They can also be mixed: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$ git sugpatch 459692838 https://github\&.com/teddywing/github\-suggestion/pull/1#discussion_r459691747 +.fi +.if n \{\ +.RE +.\} +.SH "SEE ALSO" +.sp +git\-sugapply(1) diff --git a/doc/git-sugpatch.1.txt b/doc/git-sugpatch.1.txt new file mode 100644 index 0000000..d303559 --- /dev/null +++ b/doc/git-sugpatch.1.txt @@ -0,0 +1,70 @@ +git-sugpatch(1) +=============== + +NAME +---- +git-sugpatch - Show diffs for GitHub suggestions + +SYNOPSIS +-------- +'git sugpatch' [options] ... + +DESCRIPTION +----------- +Show the diffs of the given GitHub suggestion references. + +A suggestion reference is either a URL to the comment, or its ID. + +OPTIONS +------- +--github-token:: + A GitHub API token with the “repo” permission. This can also be set + with `githubSuggestion.githubToken` or the `GITHUB_TOKEN` + environment variable. + +-h, --help:: + Print usage help. + +--remote:: + The remote to use to fetch the suggestion from when passing a + suggestion ID. This can also be set with `githubSuggestion.remote`. + Defaults to `origin`. + +-V, --version:: + Print the program version. + +CONFIGURATION +------------- +Configuration options can be specified either as command line options, +or in the Git config. + +githubSuggestion.githubToken:: + A GitHub API token with the “repo” permission. This can also be set + with the `GITHUB_TOKEN` environment variable. + +githubSuggestion.remote:: + The remote to use to fetch the suggestion from when passing a + suggestion ID. Defaults to `origin`. + +ENVIRONMENT VARIABLES +--------------------- +GITHUB_TOKEN:: + A GitHub API token with the “repo” permission. + +EXAMPLES +-------- +Suggestion references can be specified either as URLs: + + $ git sugpatch https://github.com/teddywing/github-suggestion/pull/1#discussion_r459691747 + +or as comment IDs: + + $ git sugpatch 459692838 + +They can also be mixed: + + $ git sugpatch 459692838 https://github.com/teddywing/github-suggestion/pull/1#discussion_r459691747 + +SEE ALSO +-------- +git-sugapply(1) -- cgit v1.2.3