|
1 | 1 | package spec |
2 | 2 |
|
3 | 3 | type ConfigSetFlags struct { |
4 | | - Name string `flagName:"name" flagDefault:"" flagDescription:"user name"` |
5 | | - Email string `flagName:"email" flagDefault:"" flagDescription:"user email"` |
6 | | - URL string `flagName:"url" flagDefault:"" flagDescription:"rewrite target url"` |
7 | | - InsteadOf string `flagName:"instead-of" flagDefault:"" flagDescription:"rewrite source prefix"` |
8 | | - Global bool `flagName:"global" flagDefault:"false" flagDescription:"write to global config"` |
| 4 | + Name string `flagName:"name" flagDefault:"" flagShortName:"n" flagDescription:"user name"` |
| 5 | + Email string `flagName:"email" flagDefault:"" flagShortName:"e" flagDescription:"user email"` |
| 6 | + URL string `flagName:"url" flagDefault:"" flagShortName:"u" flagDescription:"rewrite target url"` |
| 7 | + InsteadOf string `flagName:"instead-of" flagDefault:"" flagShortName:"i" flagDescription:"rewrite source prefix"` |
| 8 | + Global bool `flagName:"global" flagDefault:"false" flagShortName:"g" flagDescription:"write to global config"` |
9 | 9 | } |
10 | 10 |
|
11 | 11 | type RepoInitFlags struct { |
12 | | - Backend string `flagName:"backend" flagRequired:"true" flagDescription:"backend name like git or svn"` |
| 12 | + Backend string `flagName:"backend" flagRequired:"true" flagShortName:"b" flagDescription:"backend name like git or svn"` |
13 | 13 | } |
14 | 14 |
|
15 | 15 | type RepoCloneFlags struct { |
16 | | - URL string `flagName:"url" flagRequired:"true" flagDescription:"repository url"` |
17 | | - Path string `flagName:"path" flagDefault:"" flagDescription:"destination directory"` |
| 16 | + URL string `flagName:"url" flagRequired:"true" flagShortName:"u" flagDescription:"repository url"` |
| 17 | + Path string `flagName:"path" flagDefault:"" flagShortName:"p" flagDescription:"destination directory"` |
18 | 18 | } |
19 | 19 |
|
20 | 20 | type BranchListFlags struct { |
21 | | - Local bool `flagName:"local" flagDefault:"true" flagDescription:"local branches"` |
22 | | - Remote bool `flagName:"remote" flagDefault:"false" flagDescription:"remote branches"` |
| 21 | + Local bool `flagName:"local" flagDefault:"true" flagShortName:"l" flagDescription:"local branches"` |
| 22 | + Remote bool `flagName:"remote" flagDefault:"false" flagShortName:"r" flagDescription:"remote branches"` |
23 | 23 | } |
24 | 24 |
|
25 | 25 | type BranchSwitchFlags struct { |
26 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"branch name"` |
27 | | - Local bool `flagName:"local" flagDefault:"true" flagDescription:"is local"` |
28 | | - Remote bool `flagName:"remote" flagDefault:"false" flagDescription:"is remote"` |
| 26 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"branch name"` |
| 27 | + Local bool `flagName:"local" flagDefault:"true" flagShortName:"l" flagDescription:"is local"` |
| 28 | + Remote bool `flagName:"remote" flagDefault:"false" flagShortName:"r" flagDescription:"is remote"` |
29 | 29 | } |
30 | 30 |
|
31 | 31 | type BranchCreateFlags struct { |
32 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"branch name"` |
33 | | - From string `flagName:"from" flagDefault:"" flagDescription:"existing branch name"` |
| 32 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"branch name"` |
| 33 | + From string `flagName:"from" flagDefault:"" flagShortName:"f" flagDescription:"existing branch name"` |
34 | 34 | } |
35 | 35 |
|
36 | 36 | type BranchDeleteFlags struct { |
37 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"branch name"` |
38 | | - Local bool `flagName:"local" flagDefault:"true" flagDescription:"is local"` |
39 | | - Remote bool `flagName:"remote" flagDefault:"false" flagDescription:"is remote"` |
40 | | - Force bool `flagName:"force" flagDefault:"false" flagDescription:"force"` |
| 37 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"branch name"` |
| 38 | + Local bool `flagName:"local" flagDefault:"true" flagShortName:"l" flagDescription:"is local"` |
| 39 | + Remote bool `flagName:"remote" flagDefault:"false" flagShortName:"r" flagDescription:"is remote"` |
| 40 | + Force bool `flagName:"force" flagDefault:"false" flagShortName:"f" flagDescription:"force"` |
41 | 41 | } |
42 | 42 |
|
43 | 43 | type BranchMergeFlags struct { |
44 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"branch or ref name"` |
| 44 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"branch or ref name"` |
45 | 45 | } |
46 | 46 |
|
47 | 47 | type BranchRebaseFlags struct { |
48 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"branch or ref name"` |
| 48 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"branch or ref name"` |
49 | 49 | } |
50 | 50 |
|
51 | 51 | type CommitSaveFlags struct { |
52 | | - Note string `flagName:"note" flagRequired:"true" flagDescription:"change notes"` |
| 52 | + Note string `flagName:"note" flagRequired:"true" flagShortName:"n" flagDescription:"change notes"` |
53 | 53 | } |
54 | 54 |
|
55 | 55 | type ChangeFileFlags struct { |
56 | | - File string `flagName:"file" flagRequired:"true" flagDescription:"file path"` |
| 56 | + File string `flagName:"file" flagRequired:"true" flagShortName:"f" flagDescription:"file path"` |
57 | 57 | } |
58 | 58 |
|
59 | 59 | type ChangeDiffFlags struct { |
60 | | - File string `flagName:"file" flagDefault:"" flagDescription:"file path"` |
| 60 | + File string `flagName:"file" flagDefault:"" flagShortName:"f" flagDescription:"file path"` |
61 | 61 | } |
62 | 62 |
|
63 | 63 | type StashAddFlags struct { |
64 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"stash name"` |
65 | | - File string `flagName:"file" flagRequired:"true" flagDescription:"file path"` |
| 64 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"stash name"` |
| 65 | + File string `flagName:"file" flagRequired:"true" flagShortName:"f" flagDescription:"file path"` |
66 | 66 | } |
67 | 67 |
|
68 | 68 | type StashRemoveFlags struct { |
69 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"stash name"` |
70 | | - File string `flagName:"file" flagRequired:"true" flagDescription:"file path"` |
| 69 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"stash name"` |
| 70 | + File string `flagName:"file" flagRequired:"true" flagShortName:"f" flagDescription:"file path"` |
71 | 71 | } |
72 | 72 |
|
73 | 73 | type StashDeleteFlags struct { |
74 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"stash name"` |
| 74 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"stash name"` |
75 | 75 | } |
76 | 76 |
|
77 | 77 | type TagCreateFlags struct { |
78 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"tag name"` |
| 78 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"tag name"` |
79 | 79 | } |
80 | 80 |
|
81 | 81 | type TagDeleteFlags struct { |
82 | | - Name string `flagName:"name" flagRequired:"true" flagDescription:"tag name"` |
| 82 | + Name string `flagName:"name" flagRequired:"true" flagShortName:"n" flagDescription:"tag name"` |
83 | 83 | } |
0 commit comments