File: show_git.c

package info (click to toggle)
cmip5-cmor-tables 1.3.13-2
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 6,052 kB
  • ctags: 140
  • sloc: sh: 1,344; python: 930; makefile: 15; ansic: 11
file content (11 lines) | stat: -rw-r--r-- 210 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
#include <stdio.h>
#include <string.h>
#define R_OK 4
int main() {
  FILE *fp;
  char s1[50];
  fp = popen("git log -n 1 --pretty=\"format:%H\"  ","r");
  fscanf(fp,"%s",s1);
  printf("%s\n",s1);
  return 0;
}