File: show_git.c

package info (click to toggle)
cmor 2.9.1-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,332 kB
  • ctags: 9,614
  • sloc: f90: 22,548; ansic: 19,102; python: 7,693; sh: 3,041; makefile: 113; xml: 4
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;
}