Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git.el: Clarify documentation of git-commit-tree
author
David Kågedal
<davidk@lysator.liu.se>
Fri, 31 Jul 2009 07:23:09 +0000
(09:23 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 6 Aug 2009 20:30:36 +0000
(13:30 -0700)
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/emacs/git.el
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
3f55e41
)
diff --git
a/contrib/emacs/git.el
b/contrib/emacs/git.el
index eace9c18eb1d17075836694ce664a009f3e02038..8c70ad8b7f462c7f87224798485a5ea46a865622 100644
(file)
--- a/
contrib/emacs/git.el
+++ b/
contrib/emacs/git.el
@@
-429,16
+429,19
@@
Each entry is a cons of (SHORT-NAME . FULL-NAME)."
(git-get-string-sha1
(git-call-process-string-display-error "write-tree"))))
(git-get-string-sha1
(git-call-process-string-display-error "write-tree"))))
-(defun git-commit-tree (buffer tree head)
- "Call git-commit-tree with buffer as input and return the resulting commit SHA1."
+(defun git-commit-tree (buffer tree parent)
+ "Create a commit and possibly update HEAD.
+Create a commit with the message in BUFFER using the tree with hash TREE.
+Use PARENT as the parent of the new commit. If PARENT is the current \"HEAD\",
+update the \"HEAD\" reference to the new commit."
(let ((author-name (git-get-committer-name))
(author-email (git-get-committer-email))
(subject "commit (initial): ")
author-date log-start log-end args coding-system-for-write)
(let ((author-name (git-get-committer-name))
(author-email (git-get-committer-email))
(subject "commit (initial): ")
author-date log-start log-end args coding-system-for-write)
- (when
head
+ (when
parent
(setq subject "commit: ")
(push "-p" args)
(setq subject "commit: ")
(push "-p" args)
- (push
head
args))
+ (push
parent
args))
(with-current-buffer buffer
(goto-char (point-min))
(if
(with-current-buffer buffer
(goto-char (point-min))
(if
@@
-474,7
+477,7
@@
Each entry is a cons of (SHORT-NAME . FULL-NAME)."
(apply #'git-run-command-region
buffer log-start log-end env
"commit-tree" tree (nreverse args))))))
(apply #'git-run-command-region
buffer log-start log-end env
"commit-tree" tree (nreverse args))))))
- (when commit (git-update-ref "HEAD" commit
head
subject))
+ (when commit (git-update-ref "HEAD" commit
parent
subject))
commit)))
(defun git-empty-db-p ()
commit)))
(defun git-empty-db-p ()