{"thread":{"id":"5798","subject":"[PATCH] git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase.","startedAt":"2006-10-03T16:29:31Z","lastAt":"2006-10-04T07:13:57Z","messageCount":4,"participants":["Robert Shearman","Junio C Hamano","Martin Waitz"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"28159","messageId":"45228FEB.10602@codeweavers.com","threadId":"5798","inReplyTo":null,"subject":"[PATCH] git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase.","fromName":"Robert Shearman","fromEmail":"rob@codeweavers.com","sentAt":"2006-10-03T16:29:31Z","receivedAt":"2006-10-03T16:29:31Z","isPatch":true,"sender":{"key":"robertshearman@gmail.com","avatar":null},"body":"\nSigned-off-by: Robert Shearman <rob@codeweavers.com>\n---\n  Documentation/git-rebase.txt |    5 ++++-\n  git-rebase.sh                |   12 +++++++++++-\n  2 files changed, 15 insertions(+), 2 deletions(-)\n\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 9d7bcaa..10f2924 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -7,7 +7,7 @@ git-rebase - Rebase local commits to a n\n \n SYNOPSIS\n --------\n-'git-rebase' [--merge] [--onto <newbase>] <upstream> [<branch>]\n+'git-rebase' [-v] [--merge] [--onto <newbase>] <upstream> [<branch>]\n \n 'git-rebase' --continue | --skip | --abort\n \n@@ -121,6 +121,9 @@ OPTIONS\n \tis used instead (`git-merge-recursive` when merging a single\n \thead, `git-merge-octopus` otherwise).  This implies --merge.\n \n+-v, \\--verbose::\n+\tDisplay a diffstat of what changed upstream since the last rebase.\n+\n include::merge-strategies.txt[]\n \n NOTES\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex 413636e..546fa44 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -3,7 +3,7 @@ #\n # Copyright (c) 2005 Junio C Hamano.\n #\n \n-USAGE='[--onto <newbase>] <upstream> [<branch>]'\n+USAGE='[-v] [--onto <newbase>] <upstream> [<branch>]'\n LONG_USAGE='git-rebase replaces <branch> with a new branch of the\n same name.  When the --onto option is provided the new branch starts\n out with a HEAD equal to <newbase>, otherwise it is equal to <upstream>\n@@ -39,6 +39,7 @@ strategy=recursive\n do_merge=\n dotest=$GIT_DIR/.dotest-merge\n prec=4\n+verbose=\n \n continue_merge () {\n \ttest -n \"$prev_head\" || die \"prev_head must be defined\"\n@@ -190,6 +191,9 @@ do\n \t\tesac\n \t\tdo_merge=t\n \t\t;;\n+\t-v|--verbose)\n+\t\tverbose=t\n+\t\t;;\n \t-*)\n \t\tusage\n \t\t;;\n@@ -273,6 +277,12 @@ then\n \texit 0\n fi\n \n+if test -n \"$verbose\"\n+then\n+\techo \"Changes from $mb to $onto:\"\n+\tgit-diff-tree --stat --summary \"$mb\" \"$onto\"\n+fi\n+\n # Rewind the head to \"$onto\"; this saves our current head in ORIG_HEAD.\n git-reset --hard \"$onto\"\n \n\n"},{"id":"28193","messageId":"7v4pulm3j6.fsf@assigned-by-dhcp.cox.net","threadId":"5798","inReplyTo":"45228FEB.10602@codeweavers.com","subject":"Re: [PATCH] git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-03T22:35:09Z","receivedAt":"2006-10-03T22:35:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Robert Shearman <rob@codeweavers.com> writes:\n\n> Signed-off-by: Robert Shearman <rob@codeweavers.com>\n> @@ -121,6 +121,9 @@ OPTIONS\n>  \tis used instead (`git-merge-recursive` when merging a single\n>  \thead, `git-merge-octopus` otherwise).  This implies --merge.\n>  \n> +-v, \\--verbose::\n> +\tDisplay a diffstat of what changed upstream since the last rebase.\n> +\n>  include::merge-strategies.txt[]\n>  \n>  NOTES\n\nI initially was a bit surprised that you did not show diff\nbetween onto and our HEAD (i.e. show the damages contained in\nthe topic you are rebasing that will be inflicted on upstream),\nbut I think your way of showing the upstream changes makes more\nsense.  From the workflow point of view, this is for people who\nrebase instead of pull, and when pulling we show what the\nupstream did while we were looking the other way, so this\nnaturally matches that behaviour for rebase.  I would say it is\na good thinking.\n"},{"id":"28199","messageId":"20061004065943.GT2871@admingilde.org","threadId":"5798","inReplyTo":"7v4pulm3j6.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase.","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-10-04T06:59:43Z","receivedAt":"2006-10-04T06:59:43Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Tue, Oct 03, 2006 at 03:35:09PM -0700, Junio C Hamano wrote:\n> Robert Shearman <rob@codeweavers.com> writes:\n> > +-v, \\--verbose::\n> > +\tDisplay a diffstat of what changed upstream since the last rebase.\n> > +\n> \n> I initially was a bit surprised that you did not show diff\n> between onto and our HEAD (i.e. show the damages contained in\n> the topic you are rebasing that will be inflicted on upstream),\n> but I think your way of showing the upstream changes makes more\n> sense.  From the workflow point of view, this is for people who\n> rebase instead of pull, and when pulling we show what the\n> upstream did while we were looking the other way, so this\n> naturally matches that behaviour for rebase.  I would say it is\n> a good thinking.\n\nbut perhaps we should use the same command line options as pull:\ndefault to show the diffstat and use -n to suppress it?\n\n-- \nMartin Waitz\n"},{"id":"28203","messageId":"7v8xjwlfii.fsf@assigned-by-dhcp.cox.net","threadId":"5798","inReplyTo":"20061004065943.GT2871@admingilde.org","subject":"Re: [PATCH] git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-04T07:13:57Z","receivedAt":"2006-10-04T07:13:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Waitz <tali@admingilde.org> writes:\n\n> but perhaps we should use the same command line options as pull:\n> default to show the diffstat and use -n to suppress it?\n\nI suspect that if your workflow is based on rebase, you usually\nfetch and rebase often enough to know what you are rebasing onto\n(the fact that this patch did not appear for a long time in\nrebase's existence is what makes me think so).  So I think not\nshowing diffstat is probably a sane default.\n\nOpinions?\n"}]}