-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Git Style Messages #70
base: master
Are you sure you want to change the base?
Conversation
Like git when a command that can take a note as an agrument does note include the note the user is prompted with their default editior to add or edit the existing note depending on the command used. If start is used the note is defaulted to blank if left blank no note is set. If stop the existing note is used to populate the editor. Changes to this note will overwrite the existing note, not append
Thanks so much for the patch! I'm busy right now but I'll get to this soon. |
@@ -14,6 +14,7 @@ task :clean do | |||
end | |||
|
|||
require 'rake/testtask' | |||
ENV['EDITOR'] = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in mind that this sets EDITOR
globally for the Rakefile, because it's executed at the top level. This is probably not what is intended.
@@ -111,9 +112,24 @@ def start *args | |||
if task.nil? | |||
fail "Unknown task alias, try one of the following: ", aliases.join(', ') | |||
end | |||
note = args.join(' ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good functionality but it repeats a lot of code. You should consider creating a helper method of some kind that does most of the heavy lifting, and then your repeated pattern is just a method call.
This is a great idea, but this patch needs some work. I've offered a few comments, but since it's been literally years I understand if you're over it. :) |
Like git when a command that can take a note as an argument does not
contain a note as an argument the user is prompted with their default editor to add
or edit the existing note depending on the command used.
If start is used the note is defaulted to blank if left blank no note is
set.
If stop the existing note is used to populate the editor. Changes to
this note will overwrite the existing note, not append.
If a note is included in either start or stop the command behave as normal appending the note
argument to the entry.