emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc-git.el,v


From: Dan Nicolaescu
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-git.el,v
Date: Fri, 28 Mar 2008 03:50:28 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   08/03/28 03:50:28

Index: vc-git.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-git.el,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- vc-git.el   26 Mar 2008 06:35:55 -0000      1.47
+++ vc-git.el   28 Mar 2008 03:50:26 -0000      1.48
@@ -264,6 +264,18 @@
        `(vc-git-after-dir-status-stage1 (quote ,update-function) 
,status-buffer)))
     (current-buffer)))
 
+(defun vc-git-status-extra-headers (dir)
+  (let ((str (with-output-to-string
+               (with-current-buffer standard-output
+                 (vc-git--out-ok "symbolic-ref" "HEAD")))))
+    (concat
+     (propertize "Branch     : " 'face 'font-lock-type-face)
+     (propertize 
+      (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str)
+         (match-string 2 str)
+       "not (detached HEAD)")
+       'face 'font-lock-variable-name-face))))
+
 ;;; STATE-CHANGING FUNCTIONS
 
 (defun vc-git-create-repo ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]