From aa87a6b4075187fde8659f92b651240f9bdd4379 Mon Sep 17 00:00:00 2001 From: derex Date: Sun, 9 Nov 2008 17:32:23 +0200 Subject: [PATCH] [6814] git_id on *nix. --- contrib/git_id/git_id.cpp | 11 ++++++----- src/shared/revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/contrib/git_id/git_id.cpp b/contrib/git_id/git_id.cpp index d6c98f2fe..2db3ab40b 100644 --- a/contrib/git_id/git_id.cpp +++ b/contrib/git_id/git_id.cpp @@ -70,7 +70,7 @@ bool find_path() bool find_origin() { - if( (cmd_pipe = popen( "git remote -v", "rt" )) == NULL ) + if( (cmd_pipe = popen( "git remote -v", "r" )) == NULL ) return false; bool ret = false; @@ -110,7 +110,7 @@ bool find_rev() char cmd[512]; if(local) sprintf(cmd, "git log HEAD --pretty=\"format:%%s\""); else sprintf(cmd, "git log %s/master --pretty=\"format:%%s\"", origins[i]); - if( (cmd_pipe = popen( cmd, "rt" )) == NULL ) + if( (cmd_pipe = popen( cmd, "r" )) == NULL ) continue; int nr; @@ -154,7 +154,7 @@ bool write_rev() bool find_head_msg() { - if( (cmd_pipe = popen( "git log -n 1 --pretty=\"format:%s%n%n%b\"", "rt" )) == NULL ) + if( (cmd_pipe = popen( "git log -n 1 --pretty=\"format:%s%n%n%b\"", "r" )) == NULL ) return false; int poz = 0; @@ -182,7 +182,7 @@ bool amend_commit() { char cmd[512]; sprintf(cmd, "git commit --amend -F- %s", write_file); - if( (cmd_pipe = popen( cmd, "wt" )) == NULL ) + if( (cmd_pipe = popen( cmd, "w" )) == NULL ) return false; fprintf(cmd_pipe, "[%d] %s", rev, head_message); @@ -216,4 +216,5 @@ int main(int argc, char *argv[]) printf("Generated rev %d\n", rev); return 0; -} \ No newline at end of file +} + diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index bfa2ec36d..d4707ab3a 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "6813" + #define REVISION_NR "6814" #endif // __REVISION_NR_H__ -- 2.11.4.GIT