interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / helper / test-getcwd.c

26 lines · 452 bytes Raw Blame History
1#include "test-tool.h"
2#include "git-compat-util.h"
3#include "parse-options.h"
4
5static const char *const getcwd_usage[] = {
6 "test-tool getcwd",
7 NULL
8};
9
10int cmd__getcwd(int argc, const char **argv)
11{
12 struct option options[] = {
13 OPT_END()
14 };
15 char *cwd;
16
17 argc = parse_options(argc, argv, "test-tools", options, getcwd_usage, 0);
18 if (argc > 0)
19 usage_with_options(getcwd_usage, options);
20
21 cwd = xgetcwd();
22 puts(cwd);
23 free(cwd);
24
25 return 0;
26}