MCPcopy Create free account
hub / github.com/git/git / cmd__date

Function cmd__date

t/helper/test-date.c:107–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107int cmd__date(int argc UNUSED, const char **argv)
108{
109 const char *x;
110
111 argv++;
112 if (!*argv)
113 usage(usage_msg);
114 if (!strcmp(*argv, "relative"))
115 show_relative_dates(argv+1);
116 else if (!strcmp(*argv, "human"))
117 show_human_dates(argv+1);
118 else if (skip_prefix(*argv, "show:", &x))
119 show_dates(argv+1, x);
120 else if (!strcmp(*argv, "parse"))
121 parse_dates(argv+1);
122 else if (!strcmp(*argv, "approxidate"))
123 parse_approxidate(argv+1);
124 else if (!strcmp(*argv, "timestamp"))
125 parse_approx_timestamp(argv+1);
126 else if (!strcmp(*argv, "getnanos"))
127 getnanos(argv+1);
128 else if (!strcmp(*argv, "is64bit"))
129 return sizeof(timestamp_t) == 8 ? 0 : 1;
130 else if (!strcmp(*argv, "time_t-is64bit"))
131 return sizeof(time_t) == 8 ? 0 : 1;
132 else
133 usage(usage_msg);
134 return 0;
135}

Callers

nothing calls this directly

Calls 8

show_relative_datesFunction · 0.85
show_human_datesFunction · 0.85
show_datesFunction · 0.85
parse_datesFunction · 0.85
parse_approxidateFunction · 0.85
parse_approx_timestampFunction · 0.85
getnanosFunction · 0.85
usageFunction · 0.50

Tested by

no test coverage detected