[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog vc-git.el
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog vc-git.el |
Date: |
Tue, 15 Sep 2009 00:11:54 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 09/09/15 00:11:54
Modified files:
lisp : ChangeLog vc-git.el
Log message:
(vc-git-dir-extra-headers): Show the remote location.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16168&r2=1.16169
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/vc-git.el?cvsroot=emacs&r1=1.91&r2=1.92
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16168
retrieving revision 1.16169
diff -u -b -r1.16168 -r1.16169
--- ChangeLog 14 Sep 2009 23:28:40 -0000 1.16168
+++ ChangeLog 15 Sep 2009 00:11:51 -0000 1.16169
@@ -1,3 +1,7 @@
+2009-09-15 Dan Nicolaescu <address@hidden>
+
+ * vc-git.el (vc-git-dir-extra-headers): Show the remote location.
+
2009-09-14 Dan Nicolaescu <address@hidden>
* bindings.el (mode-line-mode-menu): Add purecopy calls for :help.
Index: vc-git.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-git.el,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- vc-git.el 14 Sep 2009 04:38:55 -0000 1.91
+++ vc-git.el 15 Sep 2009 00:11:54 -0000 1.92
@@ -403,16 +403,38 @@
(let ((str (with-output-to-string
(with-current-buffer standard-output
(vc-git--out-ok "symbolic-ref" "HEAD"))))
- (stash (vc-git-stash-list)))
+ (stash (vc-git-stash-list))
+ branch remote remote-url)
+ (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str)
+ (progn
+ (setq branch (match-string 2 str))
+ (message "branch (%s)" branch)
+ (setq remote
+ (with-output-to-string
+ (with-current-buffer standard-output
+ (vc-git--out-ok "config" (concat "branch." branch
".remote")))))
+ (when (string-match "\\([^\n]+\\)" remote)
+ (setq remote (match-string 1 remote)))
+ (when remote
+ (setq remote-url
+ (with-output-to-string
+ (with-current-buffer standard-output
+ (vc-git--out-ok "config" (concat "remote." remote
".url"))))))
+ (when (string-match "\\([^\n]+\\)" remote-url)
+ (setq remote-url (match-string 1 remote-url))))
+ "not (detached HEAD)")
;; FIXME: maybe use a different face when nothing is stashed.
(when (string= stash "") (setq stash "Nothing stashed"))
(concat
(propertize "Branch : " 'face 'font-lock-type-face)
- (propertize
- (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str)
- (match-string 2 str)
- "not (detached HEAD)")
+ (propertize branch
'face 'font-lock-variable-name-face)
+ (when remote
+ (concat
+ "\n"
+ (propertize "Remote : " 'face 'font-lock-type-face)
+ (propertize remote-url
+ 'face 'font-lock-variable-name-face)))
"\n"
(propertize "Stash : " 'face 'font-lock-type-face)
(propertize
- [Emacs-diffs] emacs/lisp ChangeLog vc-git.el,
Dan Nicolaescu <=