From 2a83c9fb013e93fb16c34319f329be183da38d47 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 15 Feb 2013 21:05:36 -0200 Subject: Modified GIT_ORIGIN macro Made it possible to modify the whole path, making it flexible to users with customised repositories -- special thanks to Trojal Signed-off-by: shennetsind --- src/common/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/core.c b/src/common/core.c index d1a374b29..73416497d 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -259,7 +259,7 @@ const char* get_svn_revision(void) } #endif /* whats our origin */ -#define GIT_ORIGIN "master" +#define GIT_ORIGIN "refs/remotes/origin/master" /* Grabs the hash from the last time the user updated his working copy (last pull) */ const char *get_git_hash (void) { static char HerculesGitHash[41] = "";//Sha(40) + 1 @@ -268,7 +268,7 @@ const char *get_git_hash (void) { if( HerculesGitHash[0] != '\0' ) return HerculesGitHash; - if ( (fp = fopen (".git/refs/remotes/origin/"GIT_ORIGIN, "r")) != NULL) { + if ( (fp = fopen (".git/"GIT_ORIGIN, "r")) != NULL) { char line[64]; char *rev = malloc (sizeof (char) * 50); -- cgit v1.2.3-70-g09d2