comparison lisp/vc-git.el @ 105593:1987d1800365

(vc-git-dir-extra-headers): Set the branch name correctly in the detached head case. (vc-git-print-log): Remove unused binding.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 14 Oct 2009 06:28:00 +0000
parents 5fc493595567
children 6f463ea7a91a
comparison
equal deleted inserted replaced
105592:7460402f0b1a 105593:1987d1800365
419 (with-output-to-string 419 (with-output-to-string
420 (with-current-buffer standard-output 420 (with-current-buffer standard-output
421 (vc-git--out-ok "config" (concat "remote." remote ".url")))))) 421 (vc-git--out-ok "config" (concat "remote." remote ".url"))))))
422 (when (string-match "\\([^\n]+\\)" remote-url) 422 (when (string-match "\\([^\n]+\\)" remote-url)
423 (setq remote-url (match-string 1 remote-url)))) 423 (setq remote-url (match-string 1 remote-url))))
424 "not (detached HEAD)") 424 (setq branch "not (detached HEAD)"))
425 ;; FIXME: maybe use a different face when nothing is stashed. 425 ;; FIXME: maybe use a different face when nothing is stashed.
426 (concat 426 (concat
427 (propertize "Branch : " 'face 'font-lock-type-face) 427 (propertize "Branch : " 'face 'font-lock-type-face)
428 (propertize branch 428 (propertize branch
429 'face 'font-lock-variable-name-face) 429 'face 'font-lock-variable-name-face)
501 501
502 ;;; HISTORY FUNCTIONS 502 ;;; HISTORY FUNCTIONS
503 503
504 (defun vc-git-print-log (files &optional buffer shortlog) 504 (defun vc-git-print-log (files &optional buffer shortlog)
505 "Get change log associated with FILES." 505 "Get change log associated with FILES."
506 (let ((coding-system-for-read git-commits-coding-system) 506 (let ((coding-system-for-read git-commits-coding-system))
507 ;; Support both the old print-log interface that passes a
508 ;; single file, and the new one that passes a file list.
509 (flist (if (listp files) files (list files))))
510 ;; `vc-do-command' creates the buffer, but we need it before running 507 ;; `vc-do-command' creates the buffer, but we need it before running
511 ;; the command. 508 ;; the command.
512 (vc-setup-buffer buffer) 509 (vc-setup-buffer buffer)
513 ;; If the buffer exists from a previous invocation it might be 510 ;; If the buffer exists from a previous invocation it might be
514 ;; read-only. 511 ;; read-only.