gflows 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/package.json +1 -1
- package/src/commands/help.ts +4 -1
- package/src/commands/switch.ts +4 -10
package/README.md
CHANGED
|
@@ -401,10 +401,10 @@ Switch to a workflow branch. With TTY and no branch name, shows a picker; otherw
|
|
|
401
401
|
|
|
402
402
|
| Option | Description |
|
|
403
403
|
| ------ | ----------- |
|
|
404
|
+
| **Move** | Move current changes to the target branch. |
|
|
405
|
+
| **Restore** | Save changes for this branch; restore target's saved state (if any). |
|
|
406
|
+
| **Clean** | Discard changes and switch clean at HEAD. |
|
|
404
407
|
| **Cancel** | Abort switching. |
|
|
405
|
-
| **Move changes to target** | Take current changes with you to the target branch (stash → switch → pop). |
|
|
406
|
-
| **Restore** | Save changes for the current branch; switch; restore any saved changes for the target branch (if any). |
|
|
407
|
-
| **Clean** | Discard changes and switch to the target branch clean at HEAD. |
|
|
408
408
|
|
|
409
409
|
You can skip the prompt by passing exactly one of the flags below. If the target branch has saved changes and you use **Clean**, a warning is shown (unless `-q`).
|
|
410
410
|
|
|
@@ -425,9 +425,9 @@ bun gflows -W feature/auth-refactor
|
|
|
425
425
|
| -------------- | ----- | --------------------------------------------------------------------------- |
|
|
426
426
|
| `--path <dir>` | `-C` | Run as if in `<dir>`. |
|
|
427
427
|
| `--branch <name>` | `-B` | Branch to switch to (alternative to positional). |
|
|
428
|
-
| `--move` | — |
|
|
429
|
-
| `--restore` | — |
|
|
430
|
-
| `--clean` | — | Discard changes and switch clean; no prompt.
|
|
428
|
+
| `--move` | — | Move current changes to the target branch; no prompt. |
|
|
429
|
+
| `--restore` | — | Save for this branch; restore target's saved state (if any); no prompt. |
|
|
430
|
+
| `--clean` | — | Discard changes and switch clean at HEAD; no prompt. |
|
|
431
431
|
| `--cancel` | — | Abort switching; no prompt. |
|
|
432
432
|
| `--verbose` | `-v` | Verbose output. |
|
|
433
433
|
| `--quiet` | `-q` | Minimal output (suppresses Clean warning about saved changes on target). |
|
package/package.json
CHANGED
package/src/commands/help.ts
CHANGED
|
@@ -48,7 +48,10 @@ Start: --force Allow dirty working tree
|
|
|
48
48
|
Finish: --no-ff Always create merge commit; -D/--delete, -N/--no-delete;
|
|
49
49
|
-s/--sign, -T/--no-tag, -M/--tag-message, -m/--message
|
|
50
50
|
List: -r, --include-remote Include remote-tracking branches
|
|
51
|
-
Switch: --move
|
|
51
|
+
Switch: --move Move current changes to the target branch
|
|
52
|
+
--restore Save for this branch; restore target's saved state (if any)
|
|
53
|
+
--clean Discard changes and switch clean at HEAD
|
|
54
|
+
--cancel Abort switching
|
|
52
55
|
|
|
53
56
|
Exit codes: 0 success, 1 usage/validation, 2 Git or system error.
|
|
54
57
|
|
package/src/commands/switch.ts
CHANGED
|
@@ -111,19 +111,13 @@ export async function run(args: ParsedArgs): Promise<void> {
|
|
|
111
111
|
whenUncommitted = await selectPrompt({
|
|
112
112
|
message: "Working tree has uncommitted changes. What do you want to do?",
|
|
113
113
|
choices: [
|
|
114
|
-
{ name: "
|
|
115
|
-
{
|
|
116
|
-
name: "Move changes to target — Take current changes with you to the target branch",
|
|
117
|
-
value: "move" as const,
|
|
118
|
-
},
|
|
114
|
+
{ name: "Move — Move current changes to the target branch", value: "move" as const },
|
|
119
115
|
{
|
|
120
|
-
name: "Restore — Save for this branch;
|
|
116
|
+
name: "Restore — Save changes for this branch; restore target's saved state (if any)",
|
|
121
117
|
value: "restore" as const,
|
|
122
118
|
},
|
|
123
|
-
{
|
|
124
|
-
|
|
125
|
-
value: "clean" as const,
|
|
126
|
-
},
|
|
119
|
+
{ name: "Clean — Discard changes and switch clean at HEAD", value: "clean" as const },
|
|
120
|
+
{ name: "Cancel — Abort switching", value: "cancel" as const },
|
|
127
121
|
],
|
|
128
122
|
});
|
|
129
123
|
} else if (!treeClean) {
|