mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-05 15:32:53 +00:00
101 lines
8.3 KiB
Go
101 lines
8.3 KiB
Go
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var range_diffCmd = &cobra.Command{
|
|
Use: "range-diff",
|
|
Short: "Compare two commit ranges (e.g. two versions of a branch)",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
range_diffCmd.Flags().String("abbrev", "", "use <n> digits to display SHA-1s")
|
|
range_diffCmd.Flags().String("anchored", "", "generate diff using the \"anchored diff\" algorithm")
|
|
range_diffCmd.Flags().BoolP("text", "a", false, "treat all files as text")
|
|
range_diffCmd.Flags().StringP("break-rewrites", "B", "", "break complete rewrite changes into pairs of delete and create")
|
|
range_diffCmd.Flags().BoolP("ignore-space-change", "b", false, "ignore changes in amount of whitespace")
|
|
range_diffCmd.Flags().Bool("binary", false, "output a binary diff that can be applied")
|
|
range_diffCmd.Flags().StringP("find-copies", "C", "", "detect copies")
|
|
range_diffCmd.Flags().Bool("check", false, "warn if changes introduce conflict markers or whitespace errors")
|
|
range_diffCmd.Flags().String("color-moved", "", "moved lines of code are colored differently")
|
|
range_diffCmd.Flags().String("color-moved-ws", "", "how white spaces are ignored in --color-moved")
|
|
range_diffCmd.Flags().String("color", "", "show colored diff")
|
|
range_diffCmd.Flags().String("color-words", "", "equivalent to --word-diff=color --word-diff-regex=<regex>")
|
|
range_diffCmd.Flags().Bool("compact-summary", false, "generate compact summary in diffstat")
|
|
range_diffCmd.Flags().String("creation-factor", "", "Percentage by which creation is weighted")
|
|
range_diffCmd.Flags().Bool("cumulative", false, "synonym for --dirstat=cumulative")
|
|
range_diffCmd.Flags().String("diff-algorithm", "", "choose a diff algorithm")
|
|
range_diffCmd.Flags().String("diff-filter", "", "select files by diff type")
|
|
range_diffCmd.Flags().BoolP("irreversible-delete", "D", false, "omit the preimage for deletes")
|
|
range_diffCmd.Flags().String("dirstat-by-file", "", "synonym for --dirstat=files,param1,param2...")
|
|
range_diffCmd.Flags().String("dst-prefix", "", "show the given destination prefix instead of \"b/\"")
|
|
range_diffCmd.Flags().Bool("exit-code", false, "exit with 1 if there were differences, 0 otherwise")
|
|
range_diffCmd.Flags().Bool("ext-diff", false, "allow an external diff helper to be executed")
|
|
range_diffCmd.Flags().Bool("find-copies-harder", false, "use unmodified files as source to find copies")
|
|
range_diffCmd.Flags().String("find-object", "", "look for differences that change the number of occurrences of the specified object")
|
|
range_diffCmd.Flags().Bool("follow", false, "continue listing the history of a file beyond renames")
|
|
range_diffCmd.Flags().Bool("full-index", false, "show full pre- and post-image object names on the \"index\" lines")
|
|
range_diffCmd.Flags().StringP("G", "G", "", "look for differences that change the number of occurrences of the specified regex")
|
|
range_diffCmd.Flags().Bool("histogram", false, "generate diff using the \"histogram diff\" algorithm")
|
|
range_diffCmd.Flags().Bool("ignore-blank-lines", false, "ignore changes whose lines are all blank")
|
|
range_diffCmd.Flags().Bool("ignore-cr-at-eol", false, "ignore carrier-return at the end of line")
|
|
range_diffCmd.Flags().Bool("ignore-space-at-eol", false, "ignore changes in whitespace at EOL")
|
|
range_diffCmd.Flags().String("ignore-submodules", "", "ignore changes to submodules in the diff generation")
|
|
range_diffCmd.Flags().Bool("indent-heuristic", false, "heuristic to shift diff hunk boundaries for easy reading")
|
|
range_diffCmd.Flags().String("inter-hunk-context", "", "show context between diff hunks up to the specified number of lines")
|
|
range_diffCmd.Flags().Bool("ita-invisible-in-index", false, "hide 'git add -N' entries from the index")
|
|
range_diffCmd.Flags().Bool("ita-visible-in-index", false, "treat 'git add -N' entries as real in the index")
|
|
range_diffCmd.Flags().String("line-prefix", "", "prepend an additional prefix to every line of output")
|
|
range_diffCmd.Flags().StringP("l", "l", "", "prevent rename/copy detection if the number of rename/copy targets exceeds given limit")
|
|
range_diffCmd.Flags().StringP("find-renames", "M", "", "detect renames")
|
|
range_diffCmd.Flags().Bool("minimal", false, "produce the smallest possible diff")
|
|
range_diffCmd.Flags().Bool("name-only", false, "show only names of changed files")
|
|
range_diffCmd.Flags().Bool("name-status", false, "show only names and status of changed files")
|
|
range_diffCmd.Flags().Bool("no-dual-color", false, "use simple diff colors")
|
|
range_diffCmd.Flags().Bool("no-prefix", false, "do not show any source or destination prefix")
|
|
range_diffCmd.Flags().Bool("no-renames", false, "disable rename detection")
|
|
range_diffCmd.Flags().String("notes", "", "passed to 'git log'")
|
|
range_diffCmd.Flags().Bool("numstat", false, "machine friendly --stat")
|
|
range_diffCmd.Flags().StringP("O", "O", "", "control the order in which files appear in the output")
|
|
range_diffCmd.Flags().String("output", "", "Output to a specific file")
|
|
range_diffCmd.Flags().String("output-indicator-context", "", "specify the character to indicate a context instead of ' '")
|
|
range_diffCmd.Flags().String("output-indicator-new", "", "specify the character to indicate a new line instead of '+'")
|
|
range_diffCmd.Flags().String("output-indicator-old", "", "specify the character to indicate an old line instead of '-'")
|
|
range_diffCmd.Flags().Bool("patch-with-raw", false, "synonym for '-p --raw'")
|
|
range_diffCmd.Flags().Bool("patch-with-stat", false, "synonym for '-p --stat'")
|
|
range_diffCmd.Flags().Bool("patience", false, "generate diff using the \"patience diff\" algorithm")
|
|
range_diffCmd.Flags().Bool("pickaxe-all", false, "show all changes in the changeset with -S or -G")
|
|
range_diffCmd.Flags().Bool("pickaxe-regex", false, "treat <string> in -S as extended POSIX regular expression")
|
|
range_diffCmd.Flags().BoolP("patch", "p", false, "generate patch")
|
|
range_diffCmd.Flags().Bool("quiet", false, "disable all output of the program")
|
|
range_diffCmd.Flags().Bool("raw", false, "generate the diff in raw format")
|
|
range_diffCmd.Flags().String("relative", "", "when run from subdir, exclude changes outside and show relative paths")
|
|
range_diffCmd.Flags().Bool("rename-empty", false, "use empty blobs as rename source")
|
|
range_diffCmd.Flags().BoolP("R", "R", false, "swap two inputs, reverse the diff")
|
|
range_diffCmd.Flags().Bool("shortstat", false, "output only the last line of --stat")
|
|
range_diffCmd.Flags().BoolP("no-patch", "s", false, "suppress diff output")
|
|
range_diffCmd.Flags().String("src-prefix", "", "show the given source prefix instead of \"a/\"")
|
|
range_diffCmd.Flags().StringP("S", "S", "", "look for differences that change the number of occurrences of the specified string")
|
|
range_diffCmd.Flags().String("stat-count", "", "generate diffstat with limited lines")
|
|
range_diffCmd.Flags().String("stat-graph-width", "", "generate diffstat with a given graph width")
|
|
range_diffCmd.Flags().String("stat-name-width", "", "generate diffstat with a given name width")
|
|
range_diffCmd.Flags().String("stat", "", "generate diffstat")
|
|
range_diffCmd.Flags().String("stat-width", "", "generate diffstat with a given width")
|
|
range_diffCmd.Flags().String("submodule", "", "specify how differences in submodules are shown")
|
|
range_diffCmd.Flags().Bool("summary", false, "condensed summary such as creations, renames and mode changes")
|
|
range_diffCmd.Flags().Bool("textconv", false, "run external text conversion filters when comparing binary files")
|
|
range_diffCmd.Flags().BoolP("u", "u", false, "generate patch")
|
|
range_diffCmd.Flags().StringP("unified", "U", "", "generate diffs with <n> lines context")
|
|
range_diffCmd.Flags().BoolP("function-context", "W", false, "generate diffs with <n> lines context")
|
|
range_diffCmd.Flags().BoolP("ignore-all-space", "w", false, "ignore whitespace when comparing lines")
|
|
range_diffCmd.Flags().String("word-diff", "", "show word diff, using <mode> to delimit changed words")
|
|
range_diffCmd.Flags().String("word-diff-regex", "", "use <regex> to decide what a word is")
|
|
range_diffCmd.Flags().String("ws-error-highlight", "", "highlight whitespace errors in the 'context', 'old' or 'new' lines in the diff")
|
|
range_diffCmd.Flags().StringP("dirstat", "X", "", "output the distribution of relative amount of changes for each sub-directory")
|
|
range_diffCmd.Flags().BoolP("z", "z", false, "do not munge pathnames and use NULs as output field terminators in --raw or --numstat")
|
|
rootCmd.AddCommand(range_diffCmd)
|
|
}
|