diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-03-20 01:03:12 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-20 01:03:12 +0300 |
commit | 95de3763498a5a092a454bb548d40e918c2870c1 (patch) | |
tree | ed82119d97b88465de12360cc27db9933b04df4e /cache.h | |
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 'cache.h')
-rw-r--r-- | cache.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -610,6 +610,9 @@ char *prefix_path_gently(const char *prefix, int len, int *remaining, const char */ char *prefix_filename(const char *prefix, const char *path); +/* Likewise, but path=="-" always yields "-" */ +char *prefix_filename_except_for_dash(const char *prefix, const char *path); + int check_filename(const char *prefix, const char *name); void verify_filename(const char *prefix, const char *name, |