summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2010-06-03 16:26:39 -0700
committerDan Nicolaescu <dann@ics.uci.edu>2010-06-03 16:26:39 -0700
commit6941ffecb2ae33279b7d111d0073f7412a559e5d (patch)
tree05f9aeea468a40c7f66c2699e53e640fa326c34f /lisp
parent54d3626e26da1d3d094e6182c308bb2ca968d691 (diff)
downloademacs-6941ffecb2ae33279b7d111d0073f7412a559e5d.tar.gz
vc-log-incoming/vc-log-outgoing improvements for Git.
* lisp/vc-git.el (vc-git-log-outgoing): Use the same format as the short log. (vc-git-log-incoming): Likewise. Run "git fetch" before the log command.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc-git.el22
2 files changed, 19 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e037c2579b8..8af8ba4d076 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2010-06-03 Dan Nicolaescu <dann@ics.uci.edu>
+ vc-log-incoming/vc-log-outgoing improvements for Git.
+ * vc-git.el (vc-git-log-outgoing): Use the same format as the
+ short log.
+ (vc-git-log-incoming): Likewise. Run "git fetch" before the log command.
+
Add bindings for vc-log-incoming and vc-log-outgoing.
* vc-hooks.el (vc-prefix-map): Add bindings for vc-log-incoming
and vc-log-outgoing.
diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index 4f67e1b0679..145c44d9b42 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -622,23 +622,29 @@ for the --graph option."
(when (string-match "\\([^\n]+\\)" remote)
(setq remote (match-string 1 remote)))))))
-
(defun vc-git-log-outgoing (buffer remote-location)
(interactive)
(vc-git-command
buffer 0 nil
- "log" (if (string= remote-location "")
- (concat (vc-git-compute-remote) "..HEAD")
- remote-location)))
-
+ "log"
+ "--no-color" "--graph" "--decorate" "--date=short"
+ "--pretty=tformat:%d%h %ad %s" "--abbrev-commit"
+ (concat (if (string= remote-location "")
+ (vc-git-compute-remote)
+ remote-location)
+ "..HEAD")))
(defun vc-git-log-incoming (buffer remote-location)
(interactive)
+ (vc-git-command nil 0 nil "fetch")
(vc-git-command
buffer 0 nil
- "log" (if (string= remote-location "")
- (concat "HEAD.." (vc-git-compute-remote))
- remote-location)))
+ "log"
+ "--no-color" "--graph" "--decorate" "--date=short"
+ "--pretty=tformat:%d%h %ad %s" "--abbrev-commit"
+ (concat "HEAD.." (if (string= remote-location "")
+ (vc-git-compute-remote)
+ remote-location))))
(defvar log-view-message-re)
(defvar log-view-file-re)