Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/helper/test-getcwd.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers 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 5 static const char *const getcwd_usage[] = { 6 "test-tool getcwd", 7 NULL 8 }; 9 10 int 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 }