{"thread":{"id":"39779","subject":"[PATCH] git-filter-branch.sh: clarify an error message","startedAt":"2015-07-04T23:39:04Z","lastAt":"2015-07-11T08:16:40Z","messageCount":5,"participants":["Chris Jones","Jeff King","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"265518","messageId":"1436053144.3463091.315316457.1BAF8BA7@webmail.messagingengine.com","threadId":"39779","inReplyTo":null,"subject":"[PATCH] git-filter-branch.sh: clarify an error message","fromName":"Chris Jones","fromEmail":"chris@christopherjones.us","sentAt":"2015-07-04T23:39:04Z","receivedAt":"2015-07-04T23:39:04Z","isPatch":true,"sender":{"key":"chris@christopherjones.us","avatar":null},"body":"Make git filter-branch output a useful error message when a single\ncommit is given instead of a range.  Currently, when given a command\nlike git filter-branch --msg-filter 'echo \"TEST\"' -- abc123, it will\ngive the message \"Which ref do you want to rewrite?\".  Instead, what\nis needed is a range of commits to rewrite.  This makes it give an\nerror message that says \"You didn't provide a valid range of\ncommits\".\n\nSigned-off-by: Chris W Jones <chris@christopherjones.us>\n---\n git-filter-branch.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-filter-branch.sh b/git-filter-branch.sh\nindex 5b3f63d..78e7499 100755\n--- a/git-filter-branch.sh\n+++ b/git-filter-branch.sh\n@@ -237,7 +237,7 @@ git rev-parse --no-flags --revs-only\n--symbolic-full-name \\\n sed -e '/^^/d' \"$tempdir\"/raw-heads >\"$tempdir\"/heads\n \n test -s \"$tempdir\"/heads ||\n-       die \"Which ref do you want to rewrite?\"\n+       die \"You didn't provide a valid range of commits.\"\n \n GIT_INDEX_FILE=\"$(pwd)/../index\"\n export GIT_INDEX_FILE\n-- \n1.9.3\n"},{"id":"265530","messageId":"20150705130706.GA5435@peff.net","threadId":"39779","inReplyTo":"1436053144.3463091.315316457.1BAF8BA7@webmail.messagingengine.com","subject":"Re: [PATCH] git-filter-branch.sh: clarify an error message","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-07-05T13:07:07Z","receivedAt":"2015-07-05T13:07:07Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Jul 04, 2015 at 07:39:04PM -0400, Chris Jones wrote:\n\n> Make git filter-branch output a useful error message when a single\n> commit is given instead of a range.  Currently, when given a command\n> like git filter-branch --msg-filter 'echo \"TEST\"' -- abc123, it will\n> give the message \"Which ref do you want to rewrite?\".  Instead, what\n> is needed is a range of commits to rewrite.  This makes it give an\n> error message that says \"You didn't provide a valid range of\n> commits\".\n\nYeah, I agree the current message is a little confusing, and I think\nyour message is an improvement. I wonder if we can even go a step\nfurther, like mentioning that at least one of the positive tips in your\nrange must be a ref.\n\n-Peff\n"},{"id":"265532","messageId":"aca69b93d8ab5f3c610d6201ed4334e1@www.dscho.org","threadId":"39779","inReplyTo":"20150705130706.GA5435@peff.net","subject":"Re: [PATCH] git-filter-branch.sh: clarify an error message","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-07-05T14:41:31Z","receivedAt":"2015-07-05T14:41:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn 2015-07-05 15:07, Jeff King wrote:\n> On Sat, Jul 04, 2015 at 07:39:04PM -0400, Chris Jones wrote:\n> \n>> Make git filter-branch output a useful error message when a single\n>> commit is given instead of a range.  Currently, when given a command\n>> like git filter-branch --msg-filter 'echo \"TEST\"' -- abc123, it will\n>> give the message \"Which ref do you want to rewrite?\".  Instead, what\n>> is needed is a range of commits to rewrite.  This makes it give an\n>> error message that says \"You didn't provide a valid range of\n>> commits\".\n> \n> Yeah, I agree the current message is a little confusing, and I think\n> your message is an improvement. I wonder if we can even go a step\n> further, like mentioning that at least one of the positive tips in your\n> range must be a ref.\n\nI agree, and would even further suggest to use the \"did not\" form instead of the abbreviated \"didn't\" one.\n\nThanks,\nDscho\n"},{"id":"266013","messageId":"1436580240.2553376.320852705.0F1D7187@webmail.messagingengine.com","threadId":"39779","inReplyTo":"aca69b93d8ab5f3c610d6201ed4334e1@www.dscho.org","subject":"Re: [PATCH] git-filter-branch.sh: clarify an error message","fromName":"Chris Jones","fromEmail":"chris@christopherjones.us","sentAt":"2015-07-11T02:04:00Z","receivedAt":"2015-07-11T02:04:00Z","isPatch":true,"sender":{"key":"chris@christopherjones.us","avatar":null},"body":"How does \"You did not provide a valid range of commits.  \nAt least one tip in your range must be a ref.\" sound?\n\n-- \nChris\nhttp://christopherjones.us/\n\nOn Sun, Jul 5, 2015, at 10:41 AM, Johannes Schindelin wrote:\n> Hi,\n> \n> On 2015-07-05 15:07, Jeff King wrote:\n> > On Sat, Jul 04, 2015 at 07:39:04PM -0400, Chris Jones wrote:\n> > \n> >> Make git filter-branch output a useful error message when a single\n> >> commit is given instead of a range.  Currently, when given a command\n> >> like git filter-branch --msg-filter 'echo \"TEST\"' -- abc123, it will\n> >> give the message \"Which ref do you want to rewrite?\".  Instead, what\n> >> is needed is a range of commits to rewrite.  This makes it give an\n> >> error message that says \"You didn't provide a valid range of\n> >> commits\".\n> > \n> > Yeah, I agree the current message is a little confusing, and I think\n> > your message is an improvement. I wonder if we can even go a step\n> > further, like mentioning that at least one of the positive tips in your\n> > range must be a ref.\n> \n> I agree, and would even further suggest to use the \"did not\" form instead\n> of the abbreviated \"didn't\" one.\n> \n> Thanks,\n> Dscho\n"},{"id":"266035","messageId":"e753df13e78f23744fce015ca58be47a@www.dscho.org","threadId":"39779","inReplyTo":"1436580240.2553376.320852705.0F1D7187@webmail.messagingengine.com","subject":"Re: [PATCH] git-filter-branch.sh: clarify an error message","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-07-11T08:16:40Z","receivedAt":"2015-07-11T08:16:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Chris,\n\nOn 2015-07-11 04:04, Chris Jones wrote:\n> How does \"You did not provide a valid range of commits.  \n> At least one tip in your range must be a ref.\" sound?\n\nMaybe a bit shorter, as well as less accusing (which \"You did not...!\" may sound):\n\n    filter-branch requires a valid commit range.\n\nCiao,\nDscho\n"}]}