mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-24 23:18:35 +02:00
handle the ' too
This commit is contained in:
parent
e8d3bf8667
commit
0e61b0ce5f
2 changed files with 8 additions and 1 deletions
|
@ -114,6 +114,13 @@ describe('Git', function() {
|
|||
);
|
||||
});
|
||||
|
||||
it('Branches lowercase', function() {
|
||||
expectTreeAsync(
|
||||
'git branch side c0',
|
||||
'{"branches":{"master":{"target":"C1","id":"master"},"side":{"target":"C0","id":"side"}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"}},"HEAD":{"target":"master","id":"HEAD"}}'
|
||||
);
|
||||
});
|
||||
|
||||
it('Deletes branches', function() {
|
||||
expectTreeAsync(
|
||||
'git branch side; git branch -d side',
|
||||
|
|
|
@ -1664,7 +1664,7 @@ GitEngine.prototype.resolveStringRef = function(ref) {
|
|||
return this.refs[ref];
|
||||
}
|
||||
// Commit hashes like C4 are case insensitive
|
||||
if (ref.match(/^c\d+$/) && this.refs[ref.toUpperCase()]) {
|
||||
if (ref.match(/^c\d+'*/) && this.refs[ref.toUpperCase()]) {
|
||||
return this.refs[ref.toUpperCase()];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue