summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorBrian Lyles <brianmlyles@gmail.com>2024-03-25 23:16:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2024-03-25 23:45:40 (GMT)
commitc282eba2d561b726e4a60c8837e4eaa2ac6537fa (patch)
treed7ea3d0101013d6a8c3f8571790111923daeda73 /Documentation
parent64a443efe4846d9cf09c7ff50cb9a6660fb49b50 (diff)
downloadgit-c282eba2d561b726e4a60c8837e4eaa2ac6537fa.zip
git-c282eba2d561b726e4a60c8837e4eaa2ac6537fa.tar.gz
git-c282eba2d561b726e4a60c8837e4eaa2ac6537fa.tar.bz2
rebase: update `--empty=ask` to `--empty=stop`
When git-am(1) got its own `--empty` option in 7c096b8d61 (am: support --empty=<option> to handle empty patches, 2021-12-09), `stop` was used instead of `ask`. `stop` is a more accurate term for describing what really happens, and consistency is good. Update git-rebase(1) to also use `stop`, while keeping `ask` as a deprecated synonym. Update the tests to primarily use `stop`, but also ensure that `ask` is still allowed. In a future commit, we'll be adding a new `--empty` option for git-cherry-pick(1) as well, making the consistency even more relevant. Reported-by: Elijah Newren <newren@gmail.com> Signed-off-by: Brian Lyles <brianmlyles@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-rebase.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 17133bf..00a9453 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -289,23 +289,24 @@ See also INCOMPATIBLE OPTIONS below.
+
See also INCOMPATIBLE OPTIONS below.
---empty=(ask|drop|keep)::
+--empty=(drop|keep|stop)::
How to handle commits that are not empty to start and are not
clean cherry-picks of any upstream commit, but which become
empty after rebasing (because they contain a subset of already
upstream changes):
+
--
-`ask`;;
- The rebase will halt when the commit is applied, allowing you to
- choose whether to drop it, edit files more, or just commit the empty
- changes. This option is implied when `-i`/`--interactive` is
- specified.
`drop`;;
The commit will be dropped. This is the default behavior.
`keep`;;
The commit will be kept. This option is implied when `--exec` is
specified unless `-i`/`--interactive` is also specified.
+`stop`;;
+`ask`;;
+ The rebase will halt when the commit is applied, allowing you to
+ choose whether to drop it, edit files more, or just commit the empty
+ changes. This option is implied when `-i`/`--interactive` is
+ specified. `ask` is a deprecated synonym of `stop`.
--
+
Note that commits which start empty are kept (unless `--no-keep-empty`
@@ -711,7 +712,7 @@ be dropped automatically with `--no-keep-empty`).
Similar to the apply backend, by default the merge backend drops
commits that become empty unless `-i`/`--interactive` is specified (in
which case it stops and asks the user what to do). The merge backend
-also has an `--empty=(ask|drop|keep)` option for changing the behavior
+also has an `--empty=(drop|keep|stop)` option for changing the behavior
of handling commits that become empty.
Directory rename detection