diff specific file

This commit is contained in:
daveberrys committed 2026-07-19 03:06:58 +08:00
1 parent 5c7575a889
commit 49d1efe4c9
1 file changed
+3 -2
+3 -2
View File
@@ -8,10 +8,11 @@ import (
func init() { rootCmd.AddCommand(diffCmd) }
var diffCmd = &cobra.Command{
Use: "diff",
Use: "diff [file:optional]",
Short: "Show working tree changes",
Args: cobra.NoArgs,
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 1 { return utils.RunGitSequence(false, []string{"diff", args[0]}) }
return utils.RunGitSequence(false, []string{"diff"})
},
}