Skip to content

Commit 792422f

Browse files
committed
oops, wrong bug fixed, partially supporting "misnamed" stashes now
1 parent 1f44c94 commit 792422f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/git/lib.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ def stashes_all
11351135
File.open(filename) do |f|
11361136
f.each_with_index do |line, i|
11371137
m = line.match(/^[^:]+:(.*)$/)
1138-
arr << [i, m[1].strip]
1138+
arr << [i, (m ? m[1].strip : "MISNAMED")]
11391139
end
11401140
end
11411141
end

tests/units/test_stashes.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def test_stashes_all
4242

4343
stashes = g.branch.stashes.all
4444

45-
assert(stashes[0].include?('testing-stash-all'))
45+
assert(stashes[0].include?('testing: stash-all'))
46+
47+
# TODO check MISNAMED stash message resilience
4648
end
4749
end
4850
end

0 commit comments

Comments
 (0)