Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-03-20 01:03:12 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-20 01:03:12 +0300
commit95de3763498a5a092a454bb548d40e918c2870c1 (patch)
treeed82119d97b88465de12360cc27db9933b04df4e /cache.h
parent12201fd756bad12c137343d5fd65200f4d0f192d (diff)
parent0bbe10313e0b61812082d47431e8648f9df48f15 (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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 0221bc6d5c..5a736a2b7e 100644
--- a/cache.h
+++ b/cache.h
@@ -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,