summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-02-15 21:05:36 -0200
committershennetsind <ind@henn.et>2013-02-15 21:05:36 -0200
commit2a83c9fb013e93fb16c34319f329be183da38d47 (patch)
tree0dc6611647e7b5f135be3adaf612d78f45377a57 /src/common
parent126225b561859c8bdd3c2ae319ddeec15bbaca47 (diff)
downloadhercules-2a83c9fb013e93fb16c34319f329be183da38d47.tar.gz
hercules-2a83c9fb013e93fb16c34319f329be183da38d47.tar.bz2
hercules-2a83c9fb013e93fb16c34319f329be183da38d47.tar.xz
hercules-2a83c9fb013e93fb16c34319f329be183da38d47.zip
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 <ind@henn.et>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/core.c4
1 files changed, 2 insertions, 2 deletions
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);