Skip to content

Commit

Permalink
Merge pull request #2306 from carapace-sh/git-log-common
Browse files Browse the repository at this point in the history
git: log - use common flags
  • Loading branch information
rsteube authored Mar 23, 2024
2 parents fd48139 + 14c0200 commit 9910089
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 211 deletions.
2 changes: 2 additions & 0 deletions completers/git_completer/cmd/common/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func AddDiffFlags(cmd *cobra.Command) {
cmd.Flags().Bool("binary", false, "output a binary diff")
cmd.Flags().StringP("break-rewrites", "B", "", "Break complete rewrite changes into pairs of delete and create")
cmd.Flags().Bool("cached", false, "View the changes you staged in the index/cache")
cmd.Flags().BoolP("cc", "c", false, "Combined diff format for merge commits")
cmd.Flags().Bool("check", false, "Warn if changes introduce conflict markers or whitespace errors")
cmd.Flags().String("color", "", "Show colored diff")
cmd.Flags().String("color-moved", "", "Moved lines of code are colored differently")
Expand Down Expand Up @@ -53,6 +54,7 @@ func AddDiffFlags(cmd *cobra.Command) {
cmd.Flags().Bool("minimal", false, "Spend extra time to make sure the smallest possible diff is produced")
cmd.Flags().Bool("name-only", false, "Show only names of changed files")
cmd.Flags().Bool("name-status", false, "Show only names and status of changed files")
cmd.Flags().Bool("no-abbrev", false, "Show the full 40-byte hexadecimal commit object name")
cmd.Flags().Bool("no-color", false, "Turn off colored diff")
cmd.Flags().Bool("no-color-moved", false, "Turn off move detection")
cmd.Flags().Bool("no-color-moved-ws", false, "Do not ignore whitespace when performing move detection")
Expand Down
2 changes: 0 additions & 2 deletions completers/git_completer/cmd/diffFiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ func init() {
carapace.Gen(diffFilesCmd).Standalone()

diffFilesCmd.Flags().StringS("G", "G", "", "Look for differences whose patch text contains added/removed lines that match <regex>")
diffFilesCmd.Flags().BoolP("cc", "c", false, "This compares stage 2 (our branch), stage 3 (their branch), and the working tree file")
diffFilesCmd.Flags().Bool("default", false, "Use argument as default revision")
diffFilesCmd.Flags().Bool("default-prefix", false, "Use the default source and destination prefixes")
diffFilesCmd.Flags().Bool("early-output", false, "undocumented")
Expand All @@ -27,7 +26,6 @@ func init() {
diffFilesCmd.Flags().StringP("ignore-matching-lines", "I", "", "Ignore changes whose all lines match <regex>")
diffFilesCmd.Flags().Bool("log-size", false, "Print log message size in bytes before the message")
diffFilesCmd.Flags().Bool("mailmap", false, "Use mailmap file to map author and committer name")
diffFilesCmd.Flags().Bool("no-abbrev", false, "Show the full 40-byte hexadecimal commit object name)")
diffFilesCmd.Flags().Bool("no-relative", false, "Do not show relative pathnames")
diffFilesCmd.Flags().Bool("no-textconv", false, "Disallow external text conversion filters to be run when comparing binary files")
diffFilesCmd.Flags().BoolS("q", "q", false, "Remain silent even for nonexistent files")
Expand Down
Loading

0 comments on commit 9910089

Please sign in to comment.