4 * Copyright (C) Linus Torvalds, 2005
8 int main(int argc, char **argv)
10 int i, as_is = 0, revs_only = 0, no_revs = 0;
12 unsigned char sha1[20];
14 for (i = 1; i < argc; i++) {
23 if (!strcmp(arg, "--")) {
32 if (!strcmp(arg, "--default")) {
39 if (!strcmp(arg, "--revs-only")) {
43 if (!strcmp(arg, "--no-revs")) {
52 if (!get_sha1(arg, sha1)) {
56 printf("%s\n", sha1_to_hex(sha1));
59 if (*arg == '^' && !get_sha1(arg+1, sha1)) {
63 printf("^%s\n", sha1_to_hex(sha1));
66 dotdot = strstr(arg, "..");
68 unsigned char end[20];
71 if (!get_sha1(arg, sha1)) {
74 if (!get_sha1(n, end)) {
78 printf("%s\n", sha1_to_hex(end));
79 printf("^%s\n", sha1_to_hex(sha1));