mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
Merge branch 'nd/worktree-name-sanitization'
In recent versions of Git, per-worktree refs are exposed in refs/worktrees/<wtname>/ hierarchy, which means that worktree names must be a valid refname component. The code now sanitizes the names given to worktrees, to make sure these refs are well-formed. * nd/worktree-name-sanitization: worktree add: sanitize worktree names
This commit is contained in:
6
refs.h
6
refs.h
@@ -463,6 +463,12 @@ int for_each_reflog(each_ref_fn fn, void *cb_data);
|
||||
*/
|
||||
int check_refname_format(const char *refname, int flags);
|
||||
|
||||
/*
|
||||
* Apply the rules from check_refname_format, but mutate the result until it
|
||||
* is acceptable, and place the result in "out".
|
||||
*/
|
||||
void sanitize_refname_component(const char *refname, struct strbuf *out);
|
||||
|
||||
const char *prettify_refname(const char *refname);
|
||||
|
||||
char *refs_shorten_unambiguous_ref(struct ref_store *refs,
|
||||
|
||||
Reference in New Issue
Block a user