Skip to content

Commit

Permalink
Allow semicolons to be used in commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
creature committed Sep 2, 2015
1 parent f91f58a commit 3fe0b25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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

0 comments on commit 3fe0b25

Please sign in to comment.