Skip to content

Commit d7a7590

Browse files
author
alexandresalome
committed
fix Tag::getName
1 parent d7cac7d commit d7a7590

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Gitonomy/Git/Reference/Stash.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@
1919
*/
2020
class Stash extends Reference
2121
{
22+
public function getName()
23+
{
24+
return 'stash';
25+
}
2226
}

src/Gitonomy/Git/Reference/Tag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class Tag extends Reference
2424
{
2525
public function getName()
2626
{
27-
if (!preg_match('#^refs/tags/(.*)$#', $this->fullname, $vars)) {
28-
throw new RuntimeException(sprintf('Cannot extract tag name from "%s"', $this->fullname));
27+
if (!preg_match('#^refs/tags/(.*)$#', $this->revision, $vars)) {
28+
throw new RuntimeException(sprintf('Cannot extract tag name from "%s"', $this->revision));
2929
}
3030

3131
return $vars[1];

0 commit comments

Comments
 (0)