From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: [PATCH 0/2] Teach org-version to include git version information Date: Wed, 19 Aug 2009 08:30:35 -0400 Message-ID: <87iqgkyoic.fsf@gollum.intra.norang.ca> References: <1250616163-11733-1-git-send-email-bernt@norang.ca> <668A7B70-E1E0-485E-9537-64C5A039DEF4@gmail.com> <87bpmdaqff.fsf@gollum.intra.norang.ca> <4D2E35AC-DBAB-499C-946A-2BB86D6C2AA3@gmail.com> <87tz04yrk0.fsf@gollum.intra.norang.ca> <87prasypiv.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdkJQ-0001bb-2K for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 08:30:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdkJL-0001U2-T3 for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 08:30:43 -0400 Received: from [199.232.76.173] (port=60203 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdkJL-0001Tr-Jc for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 08:30:39 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:64435) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MdkJK-0002Fu-UW for emacs-orgmode@gnu.org; Wed, 19 Aug 2009 08:30:39 -0400 In-Reply-To: (Manish's message of "Wed\, 19 Aug 2009 17\:49\:02 +0530") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Manish Cc: emacs-orgmode@gnu.org Manish, Could you try this patch - does it work? -Bernt ------------------------------------------------------------------------ >From 1b26a9ef0a9105d3e855c242fce3a44d1b8cd9c7 Mon Sep 17 00:00:00 2001 From: Bernt Hansen 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