Skip to content
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

Allow semicolons to be used in commit messages #7

Merged
merged 1 commit into from
Sep 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commands/expand/expand.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Takes a list of digits (1 4 5) or numeric ranges (1-5) or even both.`,

var expandArgDigitMatcher = regexp.MustCompile("^[0-9]{0,4}$")
var expandArgRangeMatcher = regexp.MustCompile("^([0-9]+)-([0-9]+)$")
var shellEscaper = regexp.MustCompile("([\\^()\\[\\]<>' \"])")
var shellEscaper = regexp.MustCompile("([\\^()\\[\\]<>' \";])")

// Process expands args and performs all substitution, etc.
//
Expand Down
11 changes: 11 additions & 0 deletions features/command_expand.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ Feature: command expansion at command line
| so(dumb).jpg | so\(dumb\).jpg |
| hi mom.txt | hi\ mom.txt |
| "x.txt | \"x.txt |
| wt;af.gif | wt\;af.gif |

Scenario: Semicolons in commit messages
Given a git repository named "whatever"
And I cd to "whatever"
And a 4 byte file named "a.txt"
And I successfully run the following commands:
| git add a.txt |
When I successfully run `scmpuff expand -- git commit -m "foo; bar"`
Then the stderr should not contain anything
And the output should match /git\tcommit\t-m\tfoo\\;\\ bar/

Scenario: Allow user to specify --relative paths
Given a directory named "foo"
Expand Down