Skip to content

Commit 2fbb702

Browse files
committed
Commit.create_from_tree used a now renamed keyword parameter - no test-case ever runs this code, which is still an issue
1 parent f8ce24a commit 2fbb702

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

git/objects/commit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False):
355355
# head is not yet set to the ref our HEAD points to
356356
# Happens on first commit
357357
import git.refs
358-
master = git.refs.Head.create(repo, repo.head.ref, commit=new_commit, logmsg="commit (initial): %s" % message)
358+
master = git.refs.Head.create(repo, repo.head.ref, new_commit, logmsg="commit (initial): %s" % message)
359359
repo.head.set_reference(master, logmsg='commit: Switching to %s' % master)
360360
# END handle empty repositories
361361
# END advance head handling

git/refs/symbolic.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ def create(cls, repo, path, reference='HEAD', force=False, logmsg=None):
478478
created at, i.e. "NEW_HEAD" or "symrefs/my_new_symref"
479479
480480
:param reference:
481-
The reference to which the new symbolic reference should point to
481+
The reference to which the new symbolic reference should point to.
482+
If it is a commit'ish, the symbolic ref will be detached.
482483
483484
:param force:
484485
if True, force creation even if a symbolic reference with that name already exists.

0 commit comments

Comments
 (0)