-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added `--skip-emptied` flag to `jj rebase` - Renamed `jj backout --revision` to `jj backout --revisions` - Added new revset functions * tracked_remote_branches * untracked_remote_branches * diff_contains * author_date * committer_date - Changed description of file revset function - Added `jj operation show` command - Added `jj operation diff` command
- Loading branch information
Showing
5 changed files
with
93 additions
and
4 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
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,46 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/carapace-sh/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var operation_diffCmd = &cobra.Command{ | ||
Use: "diff [OPTIONS]", | ||
Short: "Compare changes to the repository between two operations", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(operation_diffCmd).Standalone() | ||
|
||
// Options | ||
operation_diffCmd.Flags().String("from", "", "Show repository changes from this operation") | ||
operation_diffCmd.Flags().Bool("no-graph", false, "Don't show the graph, show a flat list of operations") | ||
operation_diffCmd.Flags().String("operation", "", "Show repository changes in this operation, compared to its parent") | ||
operation_diffCmd.Flags().String("to", "", "Show repository changes to this operation") | ||
|
||
// Diff formatting options | ||
operation_diffCmd.Flags().Int("context", 3, "Number of lines of context to show") | ||
operation_diffCmd.Flags().Bool("color-words", false, "Show a word-level diff with changes indicated only by color") | ||
operation_diffCmd.Flags().Bool("git", false, "Show a Git-format diff") | ||
operation_diffCmd.Flags().Bool("name-only", false, "For each path, show only its path") | ||
operation_diffCmd.Flags().StringP("revision", "r", "", "Show changes in this revision, compared to its parent(s)") | ||
operation_diffCmd.Flags().Bool("stat", false, "Show a histogram of the changes") | ||
operation_diffCmd.Flags().BoolP("summary", "s", false, "For each path, show only whether it was modified, added, or removed") | ||
operation_diffCmd.Flags().String("tool", "", "Generate diff by external command") | ||
operation_diffCmd.Flags().Bool("types", false, "For each path, show only its type before and after") | ||
|
||
operationCmd.AddCommand(operation_diffCmd) | ||
|
||
operation_diffCmd.MarkFlagsMutuallyExclusive("from", "to") | ||
|
||
carapace.Gen(operation_diffCmd).FlagCompletion(carapace.ActionMap{ | ||
"from": jj.ActionRevs(jj.RevOption{}.Default()), | ||
"operation": jj.ActionOperations(100), | ||
"to": jj.ActionRevs(jj.RevOption{}.Default()), | ||
"tool": bridge.ActionCarapaceBin().Split(), | ||
}) | ||
} |
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,38 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var operation_showCmd = &cobra.Command{ | ||
Use: "show [OPTIONS] [OPERATION]", | ||
Short: "Show changes to the repository in an operation", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(operation_showCmd).Standalone() | ||
|
||
// Options | ||
operation_showCmd.Flags().Bool("no-graph", false, "Don't show the graph, show a flat list of operations") | ||
operation_showCmd.Flags().BoolP("patch", "p", false, "Show patch of modifications to changes") | ||
|
||
// Diff formatting options | ||
operation_showCmd.Flags().Int("context", 3, "Number of lines of context to show") | ||
operation_showCmd.Flags().Bool("color-words", false, "Show a word-level diff with changes indicated only by color") | ||
operation_showCmd.Flags().Bool("git", false, "Show a Git-format diff") | ||
operation_showCmd.Flags().Bool("name-only", false, "For each path, show only its path") | ||
operation_showCmd.Flags().StringP("revision", "r", "", "Show changes in this revision, compared to its parent(s)") | ||
operation_showCmd.Flags().Bool("stat", false, "Show a histogram of the changes") | ||
operation_showCmd.Flags().BoolP("summary", "s", false, "For each path, show only whether it was modified, added, or removed") | ||
operation_showCmd.Flags().String("tool", "", "Generate diff by external command") | ||
operation_showCmd.Flags().Bool("types", false, "For each path, show only its type before and after") | ||
|
||
operationCmd.AddCommand(operation_showCmd) | ||
|
||
carapace.Gen(operation_showCmd).PositionalCompletion( | ||
jj.ActionOperations(100), | ||
) | ||
} |
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
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