Skip to content

Commit

Permalink
Modified GIT_ORIGIN macro
Browse files Browse the repository at this point in the history
Made it possible to modify the whole path, making it flexible to users with customised repositories -- special thanks to Trojal

Signed-off-by: shennetsind <[email protected]>
  • Loading branch information
shennetsind committed Feb 15, 2013
1 parent 126225b commit 2a83c9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);

Expand Down

0 comments on commit 2a83c9f

Please sign in to comment.