Cannot drop stash with unicode name #198

Closed
ghost opened this Issue Sep 12, 2013 · 0 comments

Comments

Projects
None yet
0 participants
@ghost

ghost commented Sep 12, 2013

Unicode strings from 'git stash list' are not handled properly. Unicode names in stash index are incorrect and user cannot drop such stashes.

Traceback (most recent call last):
  File "/usr/share/git-cola/lib/cola/stash/view.py", line 200, in stash_drop
    N_('Drop the "%s" stash?') % name,
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

This patch solves problem

@@ -10,7 +10,7 @@ class StashModel(observable.Observable):
         observable.Observable.__init__(self)

     def stash_list(self):
-        return git.stash('list').splitlines()
+        return core.decode(git.stash('list')).splitlines()

     def has_stashable_changes(self):
         model = cola.model()

@davvid davvid closed this in 675c2eb Sep 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment