emacs-devel
[Top][All Lists]
Advanced

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

Re: Enhancing (?) `emacs-version'


From: Óscar Fuentes
Subject: Re: Enhancing (?) `emacs-version'
Date: Wed, 10 Feb 2016 23:37:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Kaushal Modi <address@hidden> writes:

> AFAIK there is no definitive way to get the branch name because
> branches are ephemeral. But the below hack works for me.

I use this:

(defun get-git-branch-en-directorio (dir)
  (with-temp-buffer
    (cd dir)
    (vc-file-clearprops ".")
    (let ((branch-name (vc-git--symbolic-ref ".")))
      (when (string= branch-name "")
        (error "get-git-branch-en-directorio: no hay git info en %s" dir))
      branch-name)))




reply via email to

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