Răsfoiți Sursa

Don't print "Already up-to-date" during repo sync

If we are already up-to-date we just want to display no output.
This means we have to avoid calling "git merge" if there aren't
commits to be merged into the working directory.

Signed-off-by: Shawn O. Pearce <sop@google.com>
Shawn O. Pearce 17 ani în urmă
părinte
comite
23d7781c0b
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      project.py

+ 5 - 1
project.py

@@ -563,7 +563,7 @@ class Project(object):
           _info("[%s] Consider merging or rebasing the"
                 " unpublished commits.", self.name)
         return True
-      else:
+      elif upstream_gain:
         # We can fast-forward safely.
         #
         try:
@@ -572,6 +572,10 @@ class Project(object):
           return False
         self._CopyFiles()
         return True
+      else:
+        # Trivially no changes in the upstream.
+        #
+        return True
 
     if merge == rev:
       try: