Browse Source

make git checkout print original branch in addition to new branch

tags/v0.1
Ben Kurtovic 13 years ago
parent
commit
7cb6fb2b43
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      irc/commands/git.py

+ 2
- 1
irc/commands/git.py View File

@@ -106,7 +106,8 @@ class Git(BaseCommand):
if "Already on" in result: if "Already on" in result:
self.connection.reply(self.data, "already on \x0302%s\x0301!" % branch) self.connection.reply(self.data, "already on \x0302%s\x0301!" % branch)
else: else:
self.connection.reply(self.data, "switched to branch \x0302%s\x0301." % branch)
current_branch = self.exec_shell("git name-rev --name-only HEAD")
self.connection.reply(self.data, "switched from branch \x0302%s\x0301 to \x0302%s\x0301." % (current_branch, branch))


except subprocess.CalledProcessError: # git couldn't switch branches except subprocess.CalledProcessError: # git couldn't switch branches
self.connection.reply(self.data, "branch \x0302%s\x0301 doesn't exist!" % branch) self.connection.reply(self.data, "branch \x0302%s\x0301 doesn't exist!" % branch)


Loading…
Cancel
Save