comparison lisp/vc-git.el @ 108885:b008fff91985

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.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 03 Jun 2010 16:26:39 -0700
parents 2ad33f941be2
children 3e41dbf56aa2
comparison
equal deleted inserted replaced
108884:ac4bf6e2c535 108885:b008fff91985
620 (vc-git--out-ok "config" 620 (vc-git--out-ok "config"
621 (concat "branch." branch ".remote"))))) 621 (concat "branch." branch ".remote")))))
622 (when (string-match "\\([^\n]+\\)" remote) 622 (when (string-match "\\([^\n]+\\)" remote)
623 (setq remote (match-string 1 remote))))))) 623 (setq remote (match-string 1 remote)))))))
624 624
625
626 (defun vc-git-log-outgoing (buffer remote-location) 625 (defun vc-git-log-outgoing (buffer remote-location)
627 (interactive) 626 (interactive)
628 (vc-git-command 627 (vc-git-command
629 buffer 0 nil 628 buffer 0 nil
630 "log" (if (string= remote-location "") 629 "log"
631 (concat (vc-git-compute-remote) "..HEAD") 630 "--no-color" "--graph" "--decorate" "--date=short"
632 remote-location))) 631 "--pretty=tformat:%d%h %ad %s" "--abbrev-commit"
633 632 (concat (if (string= remote-location "")
633 (vc-git-compute-remote)
634 remote-location)
635 "..HEAD")))
634 636
635 (defun vc-git-log-incoming (buffer remote-location) 637 (defun vc-git-log-incoming (buffer remote-location)
636 (interactive) 638 (interactive)
639 (vc-git-command nil 0 nil "fetch")
637 (vc-git-command 640 (vc-git-command
638 buffer 0 nil 641 buffer 0 nil
639 "log" (if (string= remote-location "") 642 "log"
640 (concat "HEAD.." (vc-git-compute-remote)) 643 "--no-color" "--graph" "--decorate" "--date=short"
641 remote-location))) 644 "--pretty=tformat:%d%h %ad %s" "--abbrev-commit"
645 (concat "HEAD.." (if (string= remote-location "")
646 (vc-git-compute-remote)
647 remote-location))))
642 648
643 (defvar log-view-message-re) 649 (defvar log-view-message-re)
644 (defvar log-view-file-re) 650 (defvar log-view-file-re)
645 (defvar log-view-font-lock-keywords) 651 (defvar log-view-font-lock-keywords)
646 (defvar log-view-per-file-logs) 652 (defvar log-view-per-file-logs)