-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2494 from carapace-sh/git-merge-file
git: merge-file
- Loading branch information
Showing
2 changed files
with
40 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/git" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var mergeFileCmd = &cobra.Command{ | ||
Use: "merge-file", | ||
Short: "Run a three-way file merge", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
GroupID: groups[group_low_level_manipulator].ID, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(mergeFileCmd).Standalone() | ||
|
||
mergeFileCmd.Flags().StringSliceS("L", "L", nil, "use labels in place of the file names in conflict reports") | ||
mergeFileCmd.Flags().String("diff-algorithm", "", "use a different diff algorithm while merging") | ||
mergeFileCmd.Flags().Bool("diff3", false, "show conflicts in \"diff3\" style") | ||
mergeFileCmd.Flags().Bool("object-id", false, "specify the contents to merge as blobs in the current repository instead of files") | ||
mergeFileCmd.Flags().Bool("ours", false, "resolve conflicts favouring our side of the lines") | ||
mergeFileCmd.Flags().BoolS("p", "p", false, "send results to standard output instead of overwriting <current>") | ||
mergeFileCmd.Flags().BoolS("q", "q", false, "do not warn about conflicts") | ||
mergeFileCmd.Flags().Bool("theirs", false, "resolve conflicts favouring their side of the lines") | ||
mergeFileCmd.Flags().Bool("union", false, "resolve conflicts favouring both side of the lines") | ||
mergeFileCmd.Flags().Bool("zdiff3", false, "show conflicts in \"zdiff3\" style") | ||
rootCmd.AddCommand(mergeFileCmd) | ||
|
||
carapace.Gen(mergeFileCmd).FlagCompletion(carapace.ActionMap{ | ||
"diff-algorithm": git.ActionDiffAlgorithms(), | ||
}) | ||
|
||
carapace.Gen(mergeFileCmd).PositionalCompletion( | ||
carapace.ActionFiles(), | ||
carapace.ActionFiles(), | ||
carapace.ActionFiles(), | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.