diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-03-19 15:03:12 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-03-19 15:03:12 -0700 |
| commit | 95de3763498a5a092a454bb548d40e918c2870c1 (patch) | |
| tree | ed82119d97b88465de12360cc27db9933b04df4e /t/helper/test-parse-pathspec-file.c | |
| parent | 12201fd756bad12c137343d5fd65200f4d0f192d (diff) | |
| parent | 0bbe10313e0b61812082d47431e8648f9df48f15 (diff) | |
Merge branch 'jk/bundle-use-dash-for-stdfiles'
"git bundle" learned that "-" is a common way to say that the input
comes from the standard input and/or the output goes to the
standard output. It used to work only for output and only from the
root level of the working tree.
* jk/bundle-use-dash-for-stdfiles:
parse-options: use prefix_filename_except_for_dash() helper
parse-options: consistently allocate memory in fix_filename()
bundle: don't blindly apply prefix_filename() to "-"
bundle: document handling of "-" as stdin
bundle: let "-" mean stdin for reading operations
Diffstat (limited to 't/helper/test-parse-pathspec-file.c')
| -rw-r--r-- | t/helper/test-parse-pathspec-file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/helper/test-parse-pathspec-file.c b/t/helper/test-parse-pathspec-file.c index b3e08cef4b..71d2131fba 100644 --- a/t/helper/test-parse-pathspec-file.c +++ b/t/helper/test-parse-pathspec-file.c @@ -6,7 +6,7 @@ int cmd__parse_pathspec_file(int argc, const char **argv) { struct pathspec pathspec; - const char *pathspec_from_file = NULL; + char *pathspec_from_file = NULL; int pathspec_file_nul = 0, i; static const char *const usage[] = { @@ -29,5 +29,6 @@ int cmd__parse_pathspec_file(int argc, const char **argv) printf("%s\n", pathspec.items[i].original); clear_pathspec(&pathspec); + free(pathspec_from_file); return 0; } |
