{"thread":{"id":"40323","subject":"Bug: \"git rebase --no-autostash\" not recognized","startedAt":"2015-09-10T20:56:07Z","lastAt":"2015-09-11T06:49:32Z","messageCount":5,"participants":["Daniel Hahler","John Keeping","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"269740","messageId":"55F1EE67.3090401@thequod.de","threadId":"40323","inReplyTo":null,"subject":"Bug: \"git rebase --no-autostash\" not recognized","fromName":"Daniel Hahler","fromEmail":"genml+git-2014@thequod.de","sentAt":"2015-09-10T20:56:07Z","receivedAt":"2015-09-10T20:56:07Z","isPatch":false,"sender":{"key":"genml+git-2014@thequod.de","avatar":null},"body":"Although the man page mentions the \"--no-autostash\" option, it is not supported:\n\n    % git rebase --no-autostash \n    error: unknown option `no-autostash'\n\n    % git --version\n    git version 2.5.1.dirty\n\n\nPlease CC me in case of replies.\n\n\nRegards,\nDaniel.\n\n-- \nhttp://daniel.hahler.de/\n\n"},{"id":"269747","messageId":"cover.1441924193.git.john@keeping.me.uk","threadId":"40323","inReplyTo":"55F1EE67.3090401@thequod.de","subject":"[PATCH 0/2] rebase: support --no-autostash","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2015-09-10T22:30:50Z","receivedAt":"2015-09-10T22:30:50Z","isPatch":true,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"The first patch is the fix so that git-rebase supports the\n--no-autostash option that it's documentation claims it does.\n\nThe second is a slight tweak to the documentation to make it consistent\nwith the remainder of the file.\n\nJohn Keeping (2):\n  rebase: support --no-autostash\n  Documentation/git-rebase: fix --no-autostash formatting\n\n Documentation/git-rebase.txt |  3 ++-\n git-rebase.sh                |  5 ++++-\n t/t3420-rebase-autostash.sh  | 10 ++++++++++\n 3 files changed, 16 insertions(+), 2 deletions(-)\n\n-- \n2.6.0.rc0.162.gb2d3693\n"},{"id":"269749","messageId":"549b3289ee263b25a241c823444a99420e5a8bfb.1441924193.git.john@keeping.me.uk","threadId":"40323","inReplyTo":"cover.1441924193.git.john@keeping.me.uk","subject":"[PATCH 1/2] rebase: support --no-autostash","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2015-09-10T22:30:51Z","receivedAt":"2015-09-10T22:30:51Z","isPatch":true,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"This is documented as an option but we don't actually accept it.\nSupport it so that it is possible to override the \"rebase.autostash\"\nconfig variable.\n\nReported-by: Daniel Hahler <genml+git-2014@thequod.de>\nSigned-off-by: John Keeping <john@keeping.me.uk>\n---\n git-rebase.sh               |  5 ++++-\n t/t3420-rebase-autostash.sh | 10 ++++++++++\n 2 files changed, 14 insertions(+), 1 deletion(-)\n\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 1757404..af7ba5f 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -14,7 +14,7 @@ git-rebase --continue | --abort | --skip | --edit-todo\n  Available options are\n v,verbose!         display a diffstat of what changed upstream\n q,quiet!           be quiet. implies --no-stat\n-autostash!         automatically stash/stash pop before and after\n+autostash          automatically stash/stash pop before and after\n fork-point         use 'merge-base --fork-point' to refine upstream\n onto=!             rebase onto given branch instead of upstream\n p,preserve-merges! try to recreate merges instead of ignoring them\n@@ -292,6 +292,9 @@ do\n \t--autostash)\n \t\tautostash=true\n \t\t;;\n+\t--no-autostash)\n+\t\tautostash=false\n+\t\t;;\n \t--verbose)\n \t\tverbose=t\n \t\tdiffstat=t\ndiff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh\nindex d783f03..944154b 100755\n--- a/t/t3420-rebase-autostash.sh\n+++ b/t/t3420-rebase-autostash.sh\n@@ -37,6 +37,16 @@ testrebase() {\n \ttype=$1\n \tdotest=$2\n \n+\ttest_expect_success \"rebase$type: dirty worktree, --no-autostash\" '\n+\t\ttest_config rebase.autostash true &&\n+\t\tgit reset --hard &&\n+\t\tgit checkout -b rebased-feature-branch feature-branch &&\n+\t\ttest_when_finished git branch -D rebased-feature-branch &&\n+\t\ttest_when_finished git checkout feature-branch &&\n+\t\techo dirty >>file3 &&\n+\t\ttest_must_fail git rebase$type --no-autostash unrelated-onto-branch\n+\t'\n+\n \ttest_expect_success \"rebase$type: dirty worktree, non-conflicting rebase\" '\n \t\ttest_config rebase.autostash true &&\n \t\tgit reset --hard &&\n-- \n2.6.0.rc0.162.gb2d3693\n"},{"id":"269748","messageId":"5c846ceeefd55e3a46ed1f3937fc74bd7720a892.1441924193.git.john@keeping.me.uk","threadId":"40323","inReplyTo":"cover.1441924193.git.john@keeping.me.uk","subject":"[PATCH 2/2] Documentation/git-rebase: fix --no-autostash formatting","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2015-09-10T22:30:52Z","receivedAt":"2015-09-10T22:30:52Z","isPatch":true,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"All of the other \"--option\" and \"--no-option\" pairs in this file are\nformatted as separate options.\n\nSigned-off-by: John Keeping <john@keeping.me.uk>\n---\n Documentation/git-rebase.txt | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex ca03954..72e69fc 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -432,7 +432,8 @@ If the '--autosquash' option is enabled by default using the\n configuration variable `rebase.autoSquash`, this option can be\n used to override and disable this setting.\n \n---[no-]autostash::\n+--autostash::\n+--no-autostash::\n \tAutomatically create a temporary stash before the operation\n \tbegins, and apply it after the operation ends.  This means\n \tthat you can run rebase on a dirty worktree.  However, use\n-- \n2.6.0.rc0.162.gb2d3693\n"},{"id":"269753","messageId":"vpqpp1pa1s3.fsf@scolette.imag.fr","threadId":"40323","inReplyTo":"cover.1441924193.git.john@keeping.me.uk","subject":"Re: [PATCH 0/2] rebase: support --no-autostash","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2015-09-11T06:49:32Z","receivedAt":"2015-09-11T06:49:32Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"John Keeping <john@keeping.me.uk> writes:\n\n> John Keeping (2):\n>   rebase: support --no-autostash\n>   Documentation/git-rebase: fix --no-autostash formatting\n\nLooks good to me, thanks.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}