{"thread":{"id":"21412","subject":"[PATCH] git-rebase -i: improve usage message","startedAt":"2009-10-29T00:02:29Z","lastAt":"2009-10-29T09:40:28Z","messageCount":3,"participants":["Brian Ewins","Junio C Hamano","Thomas Rast"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"126219","messageId":"1256774549-8191-1-git-send-email-brian.ewins@gmail.com","threadId":"21412","inReplyTo":null,"subject":"[PATCH] git-rebase -i: improve usage message","fromName":"Brian Ewins","fromEmail":"brian.ewins@gmail.com","sentAt":"2009-10-29T00:02:29Z","receivedAt":"2009-10-29T00:02:29Z","isPatch":true,"sender":{"key":"brian.ewins@gmail.com","avatar":"https://gravatar.com/avatar/9ac03d89105e50a7151e695a1b4b1228151064ec3ac380a73b74ab397796baf7?d=mp&s=160"},"body":"The usage message was confusing as it implied that interactive\nmode was optional but the default. Change the message to more\nappropriately report usage when the -i flag is supplied.\nIn addition, use the same division into 3 command formats as\nthe man page.\n\nSigned-off-by: Brian Ewins <brian.ewins@gmail.com>\n---\n git-rebase--interactive.sh |   13 +++++++------\n 1 files changed, 7 insertions(+), 6 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex a1879e3..b988c30 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -12,22 +12,23 @@\n \n OPTIONS_KEEPDASHDASH=\n OPTIONS_SPEC=\"\\\n-git-rebase [-i] [options] [--] <upstream> [<branch>]\n-git-rebase [-i] (--continue | --abort | --skip)\n+git rebase -i [options] [--onto <newbase>] [--] <upstream> [<branch>]\n+git rebase -i [options] --onto <newbase> --root [--] [<branch>]\n+git rebase (--continue | --abort | --skip)\n --\n  Available options are\n v,verbose          display a diffstat of what changed upstream\n onto=              rebase onto given branch instead of upstream\n p,preserve-merges  try to recreate merges instead of ignoring them\n s,strategy=        use the given merge strategy\n-m,merge            always used (no-op)\n-i,interactive      always used (no-op)\n+i,interactive      interactively edit commits. Implies -m.\n+m,merge            use merging strategies\n+no-verify          override pre-rebase hook from stopping the operation\n+root               rebase all reachable commmits up to the root(s)\n  Actions:\n continue           continue rebasing process\n abort              abort rebasing process and restore original branch\n skip               skip current patch and continue rebasing process\n-no-verify          override pre-rebase hook from stopping the operation\n-root               rebase all reachable commmits up to the root(s)\n \"\n \n . git-sh-setup\n-- \n1.6.5\n"},{"id":"126236","messageId":"7vtyxiafa9.fsf@alter.siamese.dyndns.org","threadId":"21412","inReplyTo":"1256774549-8191-1-git-send-email-brian.ewins@gmail.com","subject":"Re: [PATCH] git-rebase -i: improve usage message","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-29T06:24:30Z","receivedAt":"2009-10-29T06:24:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brian Ewins <brian.ewins@gmail.com> writes:\n\n> The usage message was confusing as it implied that interactive\n> mode was optional but the default. Change the message to more\n> appropriately report usage when the -i flag is supplied.\n> In addition, use the same division into 3 command formats as\n> the man page.\n\nI agree; if \"git rebase--interactive -h\" were asked, \"-i is always used\"\nmight be a correct thing to say, but nobody will get the message that way.\nInstead, \"git rebase --nonsense -i\" and \"git rebase -i --nonsense\" will be\nthe most common way for users to see the message (also \"git rebase -i -h\").\n\nThe OPTIONS_SPEC in rebase--interactive is for the interactive mode and\nfor nothing else, so it may be a good idea to clearly say so at the\nbeginning.  The user experience perhaps should look like:\n\n    $ git rebase -i -h\n    Note: this help is only about the interactive mode;\n    see 'git rebase -h' for help on non-interactive mode.\n\n    usage: git rebase -i [<options>] [--] <upstream> [<branch>]\n       or: git rebase -i (--continue|--abort|--skip)\n\n    Available options are\n    -v,--verbose          verbose output\n    --onto <commit>       rebase onto given commit instead of <upstream>\n    -p,--preserve-merges  try to recreate merges\n    -i,--interactive      (always in effect in interactive mode)\n    -m,--merge            (always in effect in interactive mode)\n\n    Actions:\n        --continue        continue the interrupted rebase session\n        ...\n\nBy the way, I think the main \"git rebase\" help should be improved first\nfor this improvement to make sense.\n\n * Its first line \"usage\" is too long;\n\n * It only mentions [-i] in the first line but does not hint that the\n   detailed help on interactive mode is available with \"rebase -i -h\".\n\nThe user experience perhaps should look like this:\n\n    $ git rebase -h\n    usage: git rebase [<options>] (<upstream>|--root) [<branch>]\n\n    -i,--interactive  go interactive (see 'git rebase -i -h')\n    -v,--verbose      verbose output\n    ...\n\nAlso see\n\n  http://thread.gmane.org/gmane.comp.version-control.git/129906/focus=130646\n\nI agree with Peff that the first-line usage should just say <options> in general\nand have a table of options and their descriptions.\n"},{"id":"126257","messageId":"200910291040.30820.trast@student.ethz.ch","threadId":"21412","inReplyTo":"7vtyxiafa9.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git-rebase -i: improve usage message","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-10-29T09:40:28Z","receivedAt":"2009-10-29T09:40:28Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Junio C Hamano wrote:\n> \n> The OPTIONS_SPEC in rebase--interactive is for the interactive mode and\n> for nothing else, so it may be a good idea to clearly say so at the\n> beginning.  The user experience perhaps should look like:\n> \n>     $ git rebase -i -h\n>     Note: this help is only about the interactive mode;\n>     see 'git rebase -h' for help on non-interactive mode.\n> \n>     usage: git rebase -i [<options>] [--] <upstream> [<branch>]\n>        or: git rebase -i (--continue|--abort|--skip)\n\nNit-pick: the last line is not correct; the user does not have to\nspecify -i for git-rebase to figure out that an interactive rebase is\nin progress.\n\n(I agree with the rest though.)\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"}]}