[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version infor
From: |
Bernt Hansen |
Subject: |
Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information |
Date: |
Wed, 19 Aug 2009 08:30:35 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Manish,
Could you try this patch - does it work?
-Bernt
------------------------------------------------------------------------
>From 1b26a9ef0a9105d3e855c242fce3a44d1b8cd9c7 Mon Sep 17 00:00:00 2001
From: Bernt Hansen <address@hidden>
Date: Wed, 19 Aug 2009 08:26:43 -0400
Subject: [PATCH] Fix org-version so the git version report works on windows too
---
lisp/org.el | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index bd32b70..de971e2 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -104,10 +104,10 @@ With prefix arg HERE, insert it at point."
(interactive "P")
(let* ((org-version org-version)
(git-version)
- (dir (concat (file-name-directory (locate-library "org")) "../" )))
+ (dir (file-truename (concat (file-name-directory (locate-library
"org")) "../" ))))
(if (file-exists-p (expand-file-name ".git" dir))
(progn
- (shell-command (concat "cd " dir " && git describe --abbrev=4 HEAD"))
+ (shell-command (concat "GITDIR=" dir " && git describe --abbrev=4
HEAD"))
(save-excursion
(set-buffer "*Shell Command Output*")
(goto-char (point-min))
@@ -115,7 +115,7 @@ With prefix arg HERE, insert it at point."
(goto-char (point-min))
(re-search-forward "[^\n]+")
(setq git-version (match-string 0))
- (shell-command (concat "cd " dir " && git diff-index --name-only
HEAD --"))
+ (shell-command (concat "GITDIR=" dir " && git diff-index --name-only
HEAD --"))
(unless (eql 1 (point-max))
(setq git-version (concat git-version ".dirty")))
(setq org-version (concat org-version " (" git-version ")")))))
--
1.6.4
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, (continued)
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Manish, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Bernt Hansen, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Manish, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Bernt Hansen, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Manish, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information,
Bernt Hansen <=
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Manish, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Bernt Hansen, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Bernt Hansen, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Manish, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Nick Dokos, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Manish, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Nick Dokos, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Bernt Hansen, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Manish, 2009/08/19
- Re: [Orgmode] [PATCH 0/2] Teach org-version to include git version information, Nick Dokos, 2009/08/19