Explorar el Código

make status one msg instead of two

tags/v0.1
Ben Kurtovic hace 13 años
padre
commit
406bd73a44
Se han modificado 1 ficheros con 3 adiciones y 4 borrados
  1. +3
    -4
      irc/commands/git.py

+ 3
- 4
irc/commands/git.py Ver fichero

@@ -153,9 +153,8 @@ class Git(BaseCommand):
def do_status(self): def do_status(self):
"""check whether we have anything to pull""" """check whether we have anything to pull"""
last = self.exec_shell("git log -n 1 --pretty=\"%ar\"") last = self.exec_shell("git log -n 1 --pretty=\"%ar\"")
self.connection.reply(self.data, "last commit was %s. Checking remote for updates..." % last)
result = self.exec_shell("git fetch --dry-run") result = self.exec_shell("git fetch --dry-run")
if not result:
self.connection.reply(self.data, "local copy is up-to-date with remote.")
if not result: # nothing was fetched, so remote and local are equal
self.connection.reply(self.data, "last commit was %s. Local copy is \x02up-to-date\x0F with remote." % last)
else: else:
self.connection.reply(self.data, "remote is ahead of local copy.")
self.connection.reply(self.data, "last local commit was %s. Remote is \x02ahead\x0F of local copy." % last)

Cargando…
Cancelar
Guardar