summaryrefslogtreecommitdiff
path: root/objects
diff options
context:
space:
mode:
Diffstat (limited to 'objects')
-rw-r--r--objects/commit.py2
-rw-r--r--objects/submodule/base.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/objects/commit.py b/objects/commit.py
index 883d6a6c..69a3adc4 100644
--- a/objects/commit.py
+++ b/objects/commit.py
@@ -356,7 +356,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable):
# Happens on first commit
import git.refs
master = git.refs.Head.create(repo, repo.head.ref, commit=new_commit, logmsg="commit (initial): %s" % message)
- repo.head.reference = master
+ repo.head.set_reference(master, logmsg='commit: Switching to %s' % master)
# END handle empty repositories
# END advance head handling
diff --git a/objects/submodule/base.py b/objects/submodule/base.py
index 5d32d600..36b48d78 100644
--- a/objects/submodule/base.py
+++ b/objects/submodule/base.py
@@ -344,7 +344,7 @@ class Submodule(util.IndexObject, Iterable, Traversable):
# END initial checkout + branch creation
# make sure HEAD is not detached
- mrepo.head.ref = local_branch
+ mrepo.head.set_reference(local_branch, logmsg="submodule: attaching head to %s" % local_branch)
mrepo.head.ref.set_tracking_branch(remote_branch)
except IndexError:
print >> sys.stderr, "Warning: Failed to checkout tracking branch %s" % self.branch_path