all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: emacs-devel@gnu.org
Subject: Re: Enhancing (?) `emacs-version'
Date: Wed, 10 Feb 2016 23:37:15 +0100	[thread overview]
Message-ID: <87twlgtco4.fsf@wanadoo.es> (raw)
In-Reply-To: CAFyQvY07Vd9oZyDmOfh4LKAkMby4O0thVM6tcH57BC4=1GeyPA@mail.gmail.com

Kaushal Modi <kaushal.modi@gmail.com> 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	other threads:[~2016-02-10 22:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 19:01 Enhancing (?) `emacs-version' Marcin Borkowski
2016-02-10 19:18 ` Óscar Fuentes
2016-02-10 19:24 ` Eli Zaretskii
2016-02-10 20:27   ` Marcin Borkowski
2016-02-10 20:33     ` Eli Zaretskii
2016-02-10 20:53       ` Marcin Borkowski
2016-02-10 22:30         ` Kaushal Modi
2016-02-10 22:37           ` Óscar Fuentes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twlgtco4.fsf@wanadoo.es \
    --to=ofv@wanadoo.es \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.