diff options
author | Jelmer Vernooij <jelmer@jelmer.uk> | 2017-01-15 14:55:39 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@jelmer.uk> | 2017-01-15 14:56:04 +0000 |
commit | a8acf1019430f109628cf2fb2aeb2ba373a73f55 (patch) | |
tree | 1cb29a753c5c572f5d75c8f25900553ba585a4b7 | |
parent | 58c4434d09639aad68830de4cb3ef659e7076443 (diff) |
Don't print "Changes to be committed" header if there are no changes to
commit.
-rwxr-xr-x | bin/dulwich | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/dulwich b/bin/dulwich index 2d9f6ad4..7b8bb6ad 100755 --- a/bin/dulwich +++ b/bin/dulwich @@ -335,11 +335,12 @@ def cmd_status(args): else: gitdir = '.' status = porcelain.status(gitdir) - if status.staged: + if any(names for (kind, names) in status.staged.items()): sys.stdout.write("Changes to be committed:\n\n") for kind, names in status.staged.items(): for name in names: - sys.stdout.write("\t%s: %s\n" % (kind, name)) + sys.stdout.write("\t%s: %s\n" % ( + kind, name.decode(sys.getfilesystemencoding()))) sys.stdout.write("\n") if status.unstaged: sys.stdout.write("Changes not staged for commit:\n\n") |