diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-25 16:46:23 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-25 16:49:33 +0100 |
commit | 65747a216c67c3101c6ae2edaa8119d786b793cb (patch) | |
tree | 73faabae33ea14f8dcbf2fc8066a0ee5d61562ab | |
parent | d0f24c9facb5be0c98c8859a5ce3c6b0d08504ac (diff) | |
download | gitpython-65747a216c67c3101c6ae2edaa8119d786b793cb.tar.gz |
submodule.update: the actual update will now mention the revision to which it updates
to_latest_revision would now be honored if possible in dry_run mode
-rw-r--r-- | objects/submodule/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/objects/submodule/base.py b/objects/submodule/base.py index 88cc42da..fd6c9396 100644 --- a/objects/submodule/base.py +++ b/objects/submodule/base.py @@ -424,7 +424,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): is_detached = mrepo.head.is_detached #END handle dry_run - if not dry_run and to_latest_revision: + if mrepo is not None and to_latest_revision: msg_base = "Cannot update to latest revision in repository at %r as " % mrepo.working_dir if not is_detached: rref = mrepo.head.ref.tracking_branch() @@ -443,7 +443,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): # update the working tree # handles dry_run if mrepo is not None and mrepo.head.commit.binsha != binsha: - progress.update(BEGIN|UPDWKTREE, 0, 1, prefix+"Updating working tree at %s for submodule %r" % (self.path, self.name)) + progress.update(BEGIN|UPDWKTREE, 0, 1, prefix+"Updating working tree at %s for submodule %r to revision %s" % (self.path, self.name, hexsha)) if not dry_run: if is_detached: # NOTE: for now we force, the user is no supposed to change detached |