Skip to content

Commit

Permalink
check for git & have branch be a no-op if it doesn't exist on this sy…
Browse files Browse the repository at this point in the history
…stem
  • Loading branch information
Orc committed Feb 27, 2018
1 parent 6fd1631 commit 5abb66a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions configure.sh
Expand Up @@ -70,6 +70,7 @@ AC_DEFINE THEME_CF "$THEME_CF"
test "$DEBIAN_GLITCH" && AC_DEFINE 'DEBIAN_GLITCH' 1

AC_PROG_CC
AC_QUIET AC_PROG git && AC_DEFINE 'HAS_GIT' '1'
AC_CHECK_NORETURN

test "$TRY_SHARED" && AC_COMPILER_PIC && AC_CC_SHLIBS
Expand Down
2 changes: 2 additions & 0 deletions tools/branch.c
Expand Up @@ -8,6 +8,7 @@ main(argc, argv)
int argc;
char **argv;
{
#if HAS_GIT
FILE * pipe;

char line[1024];
Expand All @@ -23,5 +24,6 @@ char **argv;
printf("\"(%s)\"", line);
}
pclose(pipe);
#endif
return 0;
}

0 comments on commit 5abb66a

Please sign in to comment.