* Bug: "git rebase --no-autostash" not recognized
@ 2015-09-10 20:56 Daniel Hahler
2015-09-10 22:30 ` [PATCH 0/2] rebase: support --no-autostash John Keeping
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Hahler @ 2015-09-10 20:56 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
Although the man page mentions the "--no-autostash" option, it is not supported:
% git rebase --no-autostash
error: unknown option `no-autostash'
% git --version
git version 2.5.1.dirty
Please CC me in case of replies.
Regards,
Daniel.
--
http://daniel.hahler.de/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 163 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/2] rebase: support --no-autostash
2015-09-10 20:56 Bug: "git rebase --no-autostash" not recognized Daniel Hahler
@ 2015-09-10 22:30 ` John Keeping
2015-09-10 22:30 ` [PATCH 1/2] " John Keeping
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: John Keeping @ 2015-09-10 22:30 UTC (permalink / raw)
To: git; +Cc: Daniel Hahler, John Keeping
The first patch is the fix so that git-rebase supports the
--no-autostash option that it's documentation claims it does.
The second is a slight tweak to the documentation to make it consistent
with the remainder of the file.
John Keeping (2):
rebase: support --no-autostash
Documentation/git-rebase: fix --no-autostash formatting
Documentation/git-rebase.txt | 3 ++-
git-rebase.sh | 5 ++++-
t/t3420-rebase-autostash.sh | 10 ++++++++++
3 files changed, 16 insertions(+), 2 deletions(-)
--
2.6.0.rc0.162.gb2d3693
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] rebase: support --no-autostash
2015-09-10 22:30 ` [PATCH 0/2] rebase: support --no-autostash John Keeping
@ 2015-09-10 22:30 ` John Keeping
2015-09-10 22:30 ` [PATCH 2/2] Documentation/git-rebase: fix --no-autostash formatting John Keeping
2015-09-11 6:49 ` [PATCH 0/2] rebase: support --no-autostash Matthieu Moy
2 siblings, 0 replies; 5+ messages in thread
From: John Keeping @ 2015-09-10 22:30 UTC (permalink / raw)
To: git; +Cc: Daniel Hahler, John Keeping
This is documented as an option but we don't actually accept it.
Support it so that it is possible to override the "rebase.autostash"
config variable.
Reported-by: Daniel Hahler <genml+git-2014@thequod.de>
Signed-off-by: John Keeping <john@keeping.me.uk>
---
git-rebase.sh | 5 ++++-
t/t3420-rebase-autostash.sh | 10 ++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 1757404..af7ba5f 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -14,7 +14,7 @@ git-rebase --continue | --abort | --skip | --edit-todo
Available options are
v,verbose! display a diffstat of what changed upstream
q,quiet! be quiet. implies --no-stat
-autostash! automatically stash/stash pop before and after
+autostash automatically stash/stash pop before and after
fork-point use 'merge-base --fork-point' to refine upstream
onto=! rebase onto given branch instead of upstream
p,preserve-merges! try to recreate merges instead of ignoring them
@@ -292,6 +292,9 @@ do
--autostash)
autostash=true
;;
+ --no-autostash)
+ autostash=false
+ ;;
--verbose)
verbose=t
diffstat=t
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index d783f03..944154b 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -37,6 +37,16 @@ testrebase() {
type=$1
dotest=$2
+ test_expect_success "rebase$type: dirty worktree, --no-autostash" '
+ test_config rebase.autostash true &&
+ git reset --hard &&
+ git checkout -b rebased-feature-branch feature-branch &&
+ test_when_finished git branch -D rebased-feature-branch &&
+ test_when_finished git checkout feature-branch &&
+ echo dirty >>file3 &&
+ test_must_fail git rebase$type --no-autostash unrelated-onto-branch
+ '
+
test_expect_success "rebase$type: dirty worktree, non-conflicting rebase" '
test_config rebase.autostash true &&
git reset --hard &&
--
2.6.0.rc0.162.gb2d3693
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] Documentation/git-rebase: fix --no-autostash formatting
2015-09-10 22:30 ` [PATCH 0/2] rebase: support --no-autostash John Keeping
2015-09-10 22:30 ` [PATCH 1/2] " John Keeping
@ 2015-09-10 22:30 ` John Keeping
2015-09-11 6:49 ` [PATCH 0/2] rebase: support --no-autostash Matthieu Moy
2 siblings, 0 replies; 5+ messages in thread
From: John Keeping @ 2015-09-10 22:30 UTC (permalink / raw)
To: git; +Cc: Daniel Hahler, John Keeping
All of the other "--option" and "--no-option" pairs in this file are
formatted as separate options.
Signed-off-by: John Keeping <john@keeping.me.uk>
---
Documentation/git-rebase.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index ca03954..72e69fc 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -432,7 +432,8 @@ If the '--autosquash' option is enabled by default using the
configuration variable `rebase.autoSquash`, this option can be
used to override and disable this setting.
---[no-]autostash::
+--autostash::
+--no-autostash::
Automatically create a temporary stash before the operation
begins, and apply it after the operation ends. This means
that you can run rebase on a dirty worktree. However, use
--
2.6.0.rc0.162.gb2d3693
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] rebase: support --no-autostash
2015-09-10 22:30 ` [PATCH 0/2] rebase: support --no-autostash John Keeping
2015-09-10 22:30 ` [PATCH 1/2] " John Keeping
2015-09-10 22:30 ` [PATCH 2/2] Documentation/git-rebase: fix --no-autostash formatting John Keeping
@ 2015-09-11 6:49 ` Matthieu Moy
2 siblings, 0 replies; 5+ messages in thread
From: Matthieu Moy @ 2015-09-11 6:49 UTC (permalink / raw)
To: John Keeping; +Cc: git, Daniel Hahler
John Keeping <john@keeping.me.uk> writes:
> John Keeping (2):
> rebase: support --no-autostash
> Documentation/git-rebase: fix --no-autostash formatting
Looks good to me, thanks.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-11 6:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-10 20:56 Bug: "git rebase --no-autostash" not recognized Daniel Hahler
2015-09-10 22:30 ` [PATCH 0/2] rebase: support --no-autostash John Keeping
2015-09-10 22:30 ` [PATCH 1/2] " John Keeping
2015-09-10 22:30 ` [PATCH 2/2] Documentation/git-rebase: fix --no-autostash formatting John Keeping
2015-09-11 6:49 ` [PATCH 0/2] rebase: support --no-autostash Matthieu Moy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.