{"thread":{"id":"41534","subject":"[GSoC] Microproject :- Teaching git pull --rebase the --no-autostash flag","startedAt":"2016-02-26T11:23:44Z","lastAt":"2016-02-26T18:47:50Z","messageCount":8,"participants":["Mehul Jain","Paul Tan","Matthieu Moy","Philip Oakley"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"279514","messageId":"1456485825-21309-1-git-send-email-mehul.jain2029@gmail.com","threadId":"41534","inReplyTo":null,"subject":"[GSoC] Microproject :- Teaching git pull --rebase the --no-autostash flag","fromName":"Mehul Jain","fromEmail":"mehul.jain2029@gmail.com","sentAt":"2016-02-26T11:23:44Z","receivedAt":"2016-02-26T11:23:44Z","isPatch":false,"sender":{"key":"mehul.jain2029@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14936539?v=4"},"body":"With this patch, git pull --rebase will understand --no-autostash command line flag.\nThis flag will override \"rebase.autostash\" configuration(if set) and leads to a\nfailure if current working directory is dirty. If \"rebase.autostash\" is not configured\nand no flag is passed then by default command will die if directory is to be dirty, before\neven calling rebase.\n\nI am also thinking of adding a \"--autostash\" flag for git pull --rebase, which will\noverride \"rebase.autostash\" configuration(if set false) and will pass --autostash to\ngit rebase. I would like to know your opinion on this option. \n\nThanks! \n\nMehul Jain (1):\n  Add --no-autostash flag to git pull --rebase\n\n builtin/pull.c          | 12 ++++++++----\n t/t5520-pull.sh         |  8 ++++++++\n t/t5521-pull-options.sh | 24 ++++++++++++++++++++++++\n 3 files changed, 40 insertions(+), 4 deletions(-)\n\n-- \n2.7.1.340.g69eb491.dirty\n"},{"id":"279515","messageId":"1456485825-21309-2-git-send-email-mehul.jain2029@gmail.com","threadId":"41534","inReplyTo":"1456485825-21309-1-git-send-email-mehul.jain2029@gmail.com","subject":"[PATCH] Add --no-autostash flag to git pull --rebase","fromName":"Mehul Jain","fromEmail":"mehul.jain2029@gmail.com","sentAt":"2016-02-26T11:23:45Z","receivedAt":"2016-02-26T11:23:45Z","isPatch":true,"sender":{"key":"mehul.jain2029@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14936539?v=4"},"body":"git pull --rebase now understand --no-autostash flag. If directory is found\nto be dirty then command will die. This flag override \"rebase.autostash\" \nconfiguration(if set). If this flag is not passed in command line then\ndefault behaviour is choosen, given by \"rebase.autostash\"(if \"rebase.autostash\"\nis not set then git pull --rebase will die if directory is dirty).\n\nSigned-off-by: Mehul Jain <mehul.jain2029@gmail.com>\n---\n builtin/pull.c          | 12 ++++++++----\n t/t5520-pull.sh         |  8 ++++++++\n t/t5521-pull-options.sh | 24 ++++++++++++++++++++++++\n 3 files changed, 40 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/pull.c b/builtin/pull.c\nindex 10eff03..9d1a3d0 100644\n--- a/builtin/pull.c\n+++ b/builtin/pull.c\n@@ -85,6 +85,7 @@ static char *opt_squash;\n static char *opt_commit;\n static char *opt_edit;\n static char *opt_ff;\n+static int opt_autostash = -1;\n static char *opt_verify_signatures;\n static struct argv_array opt_strategies = ARGV_ARRAY_INIT;\n static struct argv_array opt_strategy_opts = ARGV_ARRAY_INIT;\n@@ -146,6 +147,8 @@ static struct option pull_options[] = {\n \tOPT_PASSTHRU(0, \"ff-only\", &opt_ff, NULL,\n \t\tN_(\"abort if fast-forward is not possible\"),\n \t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG),\n+\tOPT_COLOR_FLAG(0,\"autostash\",&opt_autostash,\n+\t\tN_(\"abort if tree is dirty\")),\n \tOPT_PASSTHRU(0, \"verify-signatures\", &opt_verify_signatures, NULL,\n \t\tN_(\"verify that the named commit has a valid GPG signature\"),\n \t\tPARSE_OPT_NOARG),\n@@ -835,13 +838,14 @@ int cmd_pull(int argc, const char **argv, const char *prefix)\n \t\thashclr(orig_head);\n \n \tif (opt_rebase) {\n-\t\tint autostash = 0;\n-\n \t\tif (is_null_sha1(orig_head) && !is_cache_unborn())\n \t\t\tdie(_(\"Updating an unborn branch with changes added to the index.\"));\n \n-\t\tgit_config_get_bool(\"rebase.autostash\", &autostash);\n-\t\tif (!autostash)\n+\t\tif(opt_autostash < 0)\n+\t\t\tif(git_config_get_bool(\"rebase.autostash\",&opt_autostash))\n+\t\t\t\topt_autostash = 0;\n+\n+\t\tif (!opt_autostash)\n \t\t\tdie_on_unclean_work_tree(prefix);\n \n \t\tif (get_rebase_fork_point(rebase_fork_point, repo, *refspecs))\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex c952d5e..512d3bf 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -245,6 +245,14 @@ test_expect_success '--rebase fails with multiple branches' '\n \ttest modified = \"$(git show HEAD:file)\"\n '\n \n+test_expect_success '--rebase --no-autostash fails with dirty working directory' '\n+\ttest_config rebase.autostash true &&\n+\tgit reset --hard before-rebase &&\n+\techo dirty >new_file &&\n+\tgit add new_file &&\n+\ttest_must_fail git pull --rebase --no-autostash . copy\n+'\n+\n test_expect_success 'pull --rebase succeeds with dirty working directory and rebase.autostash set' '\n \ttest_config rebase.autostash true &&\n \tgit reset --hard before-rebase &&\ndiff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh\nindex 18372ca..22ff5d7 100755\n--- a/t/t5521-pull-options.sh\n+++ b/t/t5521-pull-options.sh\n@@ -62,6 +62,30 @@ test_expect_success 'git pull -v --rebase' '\n \ttest_must_be_empty out)\n '\n \n+test_expect_success 'git pull --rebase --no-autostash' '\n+\tmkdir clonedrbnas &&\n+\t(cd clonedrbnas  && git init &&\n+\tgit pull --rebase --no-autostash \"../parent\" >out 2>err &&\n+\ttest -s err &&\n+\ttest_must_be_empty out)\n+'\n+\n+test_expect_success 'git pull -q --rebase --no-autostash' '\n+\tmkdir clonedqrbnas &&\n+\t(cd clonedqrbnas  && git init &&\n+\tgit pull -q --rebase --no-autostash \"../parent\" >out 2>err &&\n+\ttest_must_be_empty err &&\n+\ttest_must_be_empty out)\n+'\n+\n+test_expect_success 'git pull -v --rebase --no-autostash' '\n+\tmkdir clonedvrbnas &&\n+\t(cd clonedvrbnas && git init &&\n+\tgit pull -v --rebase --no-autostash \"../parent\" >out 2>err &&\n+\ttest -s err &&\n+\ttest_must_be_empty out)\n+'\n+\n test_expect_success 'git pull -v -q' '\n \tmkdir clonedvq &&\n \t(cd clonedvq && git init &&\n-- \n2.7.1.340.g69eb491.dirty\n"},{"id":"279517","messageId":"CACRoPnSoJvyvm4npw40AsgvPaviwb07akpiWtYWX3wTEME6wRA@mail.gmail.com","threadId":"41534","inReplyTo":"1456485825-21309-1-git-send-email-mehul.jain2029@gmail.com","subject":"Re: [GSoC] Microproject :- Teaching git pull --rebase the --no-autostash flag","fromName":"Paul Tan","fromEmail":"pyokagan@gmail.com","sentAt":"2016-02-26T11:51:42Z","receivedAt":"2016-02-26T11:51:42Z","isPatch":false,"sender":{"key":"pyokagan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/109479?v=4"},"body":"On Fri, Feb 26, 2016 at 7:23 PM, Mehul Jain <mehul.jain2029@gmail.com> wrote:\n> With this patch, git pull --rebase will understand --no-autostash command line flag.\n> This flag will override \"rebase.autostash\" configuration(if set) and leads to a\n> failure if current working directory is dirty. If \"rebase.autostash\" is not configured\n> and no flag is passed then by default command will die if directory is to be dirty, before\n> even calling rebase.\n>\n> I am also thinking of adding a \"--autostash\" flag for git pull --rebase, which will\n> override \"rebase.autostash\" configuration(if set false) and will pass --autostash to\n> git rebase. I would like to know your opinion on this option.\n\nThat was the point of the microproject ;-). --[no-]autostash means\nboth --autostash and --no-autostash.\n\nThanks,\nPaul\n"},{"id":"279518","messageId":"CA+DCAeSOfq22FyhPSdeYmWEL+_Bgx0et=jm786mdj-0b7R5OSg@mail.gmail.com","threadId":"41534","inReplyTo":"CACRoPnSoJvyvm4npw40AsgvPaviwb07akpiWtYWX3wTEME6wRA@mail.gmail.com","subject":"Re: [GSoC] Microproject :- Teaching git pull --rebase the --no-autostash flag","fromName":"Mehul Jain","fromEmail":"mehul.jain2029@gmail.com","sentAt":"2016-02-26T12:05:54Z","receivedAt":"2016-02-26T12:05:54Z","isPatch":false,"sender":{"key":"mehul.jain2029@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14936539?v=4"},"body":"On Fri, Feb 26, 2016 at 5:21 PM, Paul Tan <pyokagan@gmail.com> wrote:\n> That was the point of the microproject ;-). --[no-]autostash means\n> both --autostash and --no-autostash.\n\nOops, my bad. I will add the necessary changes :-).\n\nThanks,\nMehul\n"},{"id":"279521","messageId":"CACRoPnTKRwGmhQOrJsA2ys66RwRVcY1nu+hs_5_YMqgiSUbNiw@mail.gmail.com","threadId":"41534","inReplyTo":"1456485825-21309-2-git-send-email-mehul.jain2029@gmail.com","subject":"Re: [PATCH] Add --no-autostash flag to git pull --rebase","fromName":"Paul Tan","fromEmail":"pyokagan@gmail.com","sentAt":"2016-02-26T12:47:54Z","receivedAt":"2016-02-26T12:47:54Z","isPatch":true,"sender":{"key":"pyokagan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/109479?v=4"},"body":"On Fri, Feb 26, 2016 at 7:23 PM, Mehul Jain <mehul.jain2029@gmail.com> wrote:\n> Subject: [PATCH] Add --no-autostash flag to git pull --rebase\n\nWe usually don't capitalize the first word of the commit title. We\nalso usually prefix the commit title with the relevant subsystem, file\nor command. So something like:\n\npull --rebase: add --[no-]autostash flag\n\nSome grammatical/spelling nits below:\n\n> git pull --rebase now understand --no-autostash flag.\n\ns/understand/understands the/\n\n> If directory is found to be dirty then command will die.\n\nIf the worktree is found to be dirty then the command will die.\n\n(Perhaps state more clearly that the dirty worktree check is only\nperformed on --no-autostash or rebase.autostash=false.)\n\n> This flag override \"rebase.autostash\" configuration(if set).\n\ns/override/overrides the/\n\n> If this flag is not passed in command line then default behaviour is choosen,\n\ns/choosen/chosen/\n\n> given by \"rebase.autostash\"(if \"rebase.autostash\"\n> is not set then git pull --rebase will die if directory is dirty).\n\nIf \"rebase.autostash\" is not set or is false. Or you could shorten it\nby saying that \"(default is false)\".\n\n> Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>\n> ---\n>  builtin/pull.c          | 12 ++++++++----\n>  t/t5520-pull.sh         |  8 ++++++++\n>  t/t5521-pull-options.sh | 24 ++++++++++++++++++++++++\n>  3 files changed, 40 insertions(+), 4 deletions(-)\n\nI think git-pull's documentation should be updated as well to talk\nabout this new command-line switch.\n\n> diff --git a/builtin/pull.c b/builtin/pull.c\n> index 10eff03..9d1a3d0 100644\n> --- a/builtin/pull.c\n> +++ b/builtin/pull.c\n> @@ -85,6 +85,7 @@ static char *opt_squash;\n>  static char *opt_commit;\n>  static char *opt_edit;\n>  static char *opt_ff;\n> +static int opt_autostash = -1;\n>  static char *opt_verify_signatures;\n>  static struct argv_array opt_strategies = ARGV_ARRAY_INIT;\n>  static struct argv_array opt_strategy_opts = ARGV_ARRAY_INIT;\n> @@ -146,6 +147,8 @@ static struct option pull_options[] = {\n>         OPT_PASSTHRU(0, \"ff-only\", &opt_ff, NULL,\n>                 N_(\"abort if fast-forward is not possible\"),\n>                 PARSE_OPT_NOARG | PARSE_OPT_NONEG),\n> +       OPT_COLOR_FLAG(0,\"autostash\",&opt_autostash,\n> +               N_(\"abort if tree is dirty\")),\n\nWhy OPT_COLOR_FLAG()? And --autostash is not just about aborting if\nthe working tree is dirty. Why not just copy the help message from\ngit-rebase? Something like:\n\n\"automatically stash/stash pop before and after rebase\"\n\n>         OPT_PASSTHRU(0, \"verify-signatures\", &opt_verify_signatures, NULL,\n>                 N_(\"verify that the named commit has a valid GPG signature\"),\n>                 PARSE_OPT_NOARG),\n> @@ -835,13 +838,14 @@ int cmd_pull(int argc, const char **argv, const char *prefix)\n>                 hashclr(orig_head);\n>\n>         if (opt_rebase) {\n> -               int autostash = 0;\n> -\n>                 if (is_null_sha1(orig_head) && !is_cache_unborn())\n>                         die(_(\"Updating an unborn branch with changes added to the index.\"));\n>\n> -               git_config_get_bool(\"rebase.autostash\", &autostash);\n> -               if (!autostash)\n> +               if(opt_autostash < 0)\n> +                       if(git_config_get_bool(\"rebase.autostash\",&opt_autostash))\n> +                               opt_autostash = 0;\n\nI wonder if this code could be shortened if we simply just called\ngit_config_get_bool() just before parse_options(). That way, we don't\nneed to check for the \"-1\" special value.\n\n> +\n> +               if (!opt_autostash)\n>                         die_on_unclean_work_tree(prefix);\n\nOK.\n\n>\n>                 if (get_rebase_fork_point(rebase_fork_point, repo, *refspecs))\n> diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\n> index c952d5e..512d3bf 100755\n> --- a/t/t5520-pull.sh\n> +++ b/t/t5520-pull.sh\n> @@ -245,6 +245,14 @@ test_expect_success '--rebase fails with multiple branches' '\n>         test modified = \"$(git show HEAD:file)\"\n>  '\n>\n> +test_expect_success '--rebase --no-autostash fails with dirty working directory' '\n\nMaybe add ...\"and rebase.autostash set\" to the test name? Describes\nthe test better, and is consistent with the name of the test below.\n\n> +       test_config rebase.autostash true &&\n> +       git reset --hard before-rebase &&\n> +       echo dirty >new_file &&\n> +       git add new_file &&\n> +       test_must_fail git pull --rebase --no-autostash . copy\n> +'\n> +\n>  test_expect_success 'pull --rebase succeeds with dirty working directory and rebase.autostash set' '\n>         test_config rebase.autostash true &&\n>         git reset --hard before-rebase &&\n> diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh\n> index 18372ca..22ff5d7 100755\n> --- a/t/t5521-pull-options.sh\n> +++ b/t/t5521-pull-options.sh\n> @@ -62,6 +62,30 @@ test_expect_success 'git pull -v --rebase' '\n>         test_must_be_empty out)\n>  '\n>\n> +test_expect_success 'git pull --rebase --no-autostash' '\n> +       mkdir clonedrbnas &&\n\nTook me some time to realize this directory name is actually \"cloned\"\n+ \"rb\" (from --rebase) and \"nas\" (--no-autostash) ;-)\n\n> +       (cd clonedrbnas  && git init &&\n> +       git pull --rebase --no-autostash \"../parent\" >out 2>err &&\n> +       test -s err &&\n> +       test_must_be_empty out)\n> +'\n> +\n> +test_expect_success 'git pull -q --rebase --no-autostash' '\n> +       mkdir clonedqrbnas &&\n> +       (cd clonedqrbnas  && git init &&\n> +       git pull -q --rebase --no-autostash \"../parent\" >out 2>err &&\n> +       test_must_be_empty err &&\n> +       test_must_be_empty out)\n> +'\n> +\n> +test_expect_success 'git pull -v --rebase --no-autostash' '\n> +       mkdir clonedvrbnas &&\n> +       (cd clonedvrbnas && git init &&\n> +       git pull -v --rebase --no-autostash \"../parent\" >out 2>err &&\n> +       test -s err &&\n> +       test_must_be_empty out)\n> +'\n\nWhile more tests are always good, I don't think we need to test for\n\"-q\" and \"-v\" with --no-autostash, because it's already covered by the\ntest for \"git pull -q --rebase\". Perhaps with --autostash, but even\nthen I don't think we need a test for \"-v\".\n\n> +\n>  test_expect_success 'git pull -v -q' '\n>         mkdir clonedvq &&\n>         (cd clonedvq && git init &&\n> --\n> 2.7.1.340.g69eb491.dirty\n\nThanks,\nPaul\n"},{"id":"279522","messageId":"vpqy4a7y5l9.fsf@anie.imag.fr","threadId":"41534","inReplyTo":"1456485825-21309-1-git-send-email-mehul.jain2029@gmail.com","subject":"Re: [GSoC] Microproject :- Teaching git pull --rebase the --no-autostash flag","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2016-02-26T13:16:34Z","receivedAt":"2016-02-26T13:16:34Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Hi,\n\nSome minor nits in addition to Paul's comments:\n\n> Subject: Re: [GSoC] Microproject :- Teaching git pull --rebase the --no-autostash flag\n\nThe \":-\" is typically Indian. Just use \":\" here (without a space\nbefore).\n\nMehul Jain <mehul.jain2029@gmail.com> writes:\n\n> With this patch, git pull --rebase will understand --no-autostash command line flag.\n> This flag will override \"rebase.autostash\" configuration(if set)\n\nHere and elsewhere: space before \"(\".\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"279538","messageId":"CA+DCAeTAAn-xA=3kHBcURzv_1eJRKd7uMZRwaPNbCZbGS2eFLw@mail.gmail.com","threadId":"41534","inReplyTo":"CACRoPnTKRwGmhQOrJsA2ys66RwRVcY1nu+hs_5_YMqgiSUbNiw@mail.gmail.com","subject":"Re: [PATCH] Add --no-autostash flag to git pull --rebase","fromName":"Mehul Jain","fromEmail":"mehul.jain2029@gmail.com","sentAt":"2016-02-26T17:09:55Z","receivedAt":"2016-02-26T17:09:55Z","isPatch":true,"sender":{"key":"mehul.jain2029@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14936539?v=4"},"body":"Hi,\n\nThank you for the suggestions.\nOn Fri, Feb 26, 2016 at 6:17 PM, Paul Tan <pyokagan@gmail.com> wrote:\n> Some grammatical/spelling nits below:\n\nMany apologies for my English.\n\n> I think git-pull's documentation should be updated as well to talk\n> about this new command-line switch.\n\nOK.\n\n>> diff --git a/builtin/pull.c b/builtin/pull.c\n>> index 10eff03..9d1a3d0 100644\n>> --- a/builtin/pull.c\n>> +++ b/builtin/pull.c\n>> @@ -85,6 +85,7 @@ static char *opt_squash;\n>>  static char *opt_commit;\n>>  static char *opt_edit;\n>>  static char *opt_ff;\n>> +static int opt_autostash = -1;\n>>  static char *opt_verify_signatures;\n>>  static struct argv_array opt_strategies = ARGV_ARRAY_INIT;\n>>  static struct argv_array opt_strategy_opts = ARGV_ARRAY_INIT;\n>> @@ -146,6 +147,8 @@ static struct option pull_options[] = {\n>>         OPT_PASSTHRU(0, \"ff-only\", &opt_ff, NULL,\n>>                 N_(\"abort if fast-forward is not possible\"),\n>>                 PARSE_OPT_NOARG | PARSE_OPT_NONEG),\n>> +       OPT_COLOR_FLAG(0,\"autostash\",&opt_autostash,\n>> +               N_(\"abort if tree is dirty\")),\n>\n> Why OPT_COLOR_FLAG()? And --autostash is not just about aborting if\n> the working tree is dirty. Why not just copy the help message from\n> git-rebase? Something like:\n> \"automatically stash/stash pop before and after rebase\"\n\nUsing OPT_COLOR_FLAG() is wrong, I agree. OPT_BOOL will be a better option.\nN_(\"automatically stash/stash pop before and after rebase\") is better.\n\n>>         OPT_PASSTHRU(0, \"verify-signatures\", &opt_verify_signatures, NULL,\n>>                 N_(\"verify that the named commit has a valid GPG signature\"),\n>>                 PARSE_OPT_NOARG),\n>> @@ -835,13 +838,14 @@ int cmd_pull(int argc, const char **argv, const char *prefix)\n>>                 hashclr(orig_head);\n>>\n>>         if (opt_rebase) {\n>> -               int autostash = 0;\n>> -\n>>                 if (is_null_sha1(orig_head) && !is_cache_unborn())\n>>                         die(_(\"Updating an unborn branch with changes added to the index.\"));\n>>\n>> -               git_config_get_bool(\"rebase.autostash\", &autostash);\n>> -               if (!autostash)\n>> +               if(opt_autostash < 0)\n>> +                       if(git_config_get_bool(\"rebase.autostash\",&opt_autostash))\n>> +                               opt_autostash = 0;\n>\n> I wonder if this code could be shortened if we simply just called\n> git_config_get_bool() just before parse_options(). That way, we don't\n> need to check for the \"-1\" special value.\n\nDefinitely. This way opt_autostash can be initialized with 0, thus default\nwill be false.\n\n>>\n>> +               if (!opt_autostash)\n>>                         die_on_unclean_work_tree(prefix);\n>\n> OK.\n>\n>>\n>>                 if (get_rebase_fork_point(rebase_fork_point, repo, *refspecs))\n>> diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\n>> index c952d5e..512d3bf 100755\n>> --- a/t/t5520-pull.sh\n>> +++ b/t/t5520-pull.sh\n>> @@ -245,6 +245,14 @@ test_expect_success '--rebase fails with multiple branches' '\n>>         test modified = \"$(git show HEAD:file)\"\n>>  '\n>>\n>> +test_expect_success '--rebase --no-autostash fails with dirty working directory' '\n>\n> Maybe add ...\"and rebase.autostash set\" to the test name? Describes\n> the test better, and is consistent with the name of the test below.\n\nCan be done. But which one of these will be more appropriate:\n \"rebase.autostash set\" or \"rebase.autostash set true\".\nI prefer latter, as it will maintain consistence with the test name of\n\"--rebase --autostash\", which will be\n'--rebase --autostash succeeds with dirty working directory and\nrebase.autostash set false.'\n\n\n>> +test_expect_success 'git pull -q --rebase --no-autostash' '\n>> +       mkdir clonedqrbnas &&\n>> +       (cd clonedqrbnas  && git init &&\n>> +       git pull -q --rebase --no-autostash \"../parent\" >out 2>err &&\n>> +       test_must_be_empty err &&\n>> +       test_must_be_empty out)\n>> +'\n>> +\n>> +test_expect_success 'git pull -v --rebase --no-autostash' '\n>> +       mkdir clonedvrbnas &&\n>> +       (cd clonedvrbnas && git init &&\n>> +       git pull -v --rebase --no-autostash \"../parent\" >out 2>err &&\n>> +       test -s err &&\n>> +       test_must_be_empty out)\n>> +'\n>\n> While more tests are always good, I don't think we need to test for\n> \"-q\" and \"-v\" with --no-autostash, because it's already covered by the\n> test for \"git pull -q --rebase\". Perhaps with --autostash, but even\n> then I don't think we need a test for \"-v\".\n\nOK then. I will only add tests for \"git pull --rebase --no-autostash\",\n\"git pull --rebase --autostash\" and\n\"git pull -q --rebase --autostash\" in t5521-pull-options.sh\n\nThanks,\nMehul Jain\n"},{"id":"279549","messageId":"80982D980AF046D88353950D975DA2F5@PhilipOakley","threadId":"41534","inReplyTo":"vpqy4a7y5l9.fsf@anie.imag.fr","subject":"Re: [GSoC] Microproject :- Teaching git pull --rebase the --no-autostash flag","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2016-02-26T18:47:50Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Matthieu Moy\" <Matthieu.Moy@grenoble-inp.fr>\n> Hi,\n>\n> Some minor nits in addition to Paul's comments:\n>\n>> Subject: Re: [GSoC] Microproject :- Teaching git pull --rebase \n>> the --no-autostash flag\n>\n> The \":-\" is typically Indian. Just use \":\" here (without a space\n> before).\n\nI think it was we Brit's who are to blame. While less frequent these days it \nwas common here in Briton. I certainly use it sometimes ;-)\n\nhttp://english.stackexchange.com/questions/31060/is-it-proper-to-use-a-colon-followed-immediately-by-a-hyphen\n\nhttps://www.quora.com/What-is-this-punctuation-called (originalism would \nalso suggest USA..)\n\n\n>\n> Mehul Jain <mehul.jain2029@gmail.com> writes:\n>\n>> With this patch, git pull --rebase will understand --no-autostash command \n>> line flag.\n>> This flag will override \"rebase.autostash\" configuration(if set)\n>\n> Here and elsewhere: space before \"(\".\n>\n> -- \n> Matthieu Moy\n> http://www-verimag.imag.fr/~moy/\n> --\n\nPhilip \n"}]}