mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'mh/split-under-lock'
Further preparatory work on the refs API before the pluggable backend series can land. * mh/split-under-lock: (33 commits) lock_ref_sha1_basic(): only handle REF_NODEREF mode commit_ref_update(): remove the flags parameter lock_ref_for_update(): don't resolve symrefs lock_ref_for_update(): don't re-read non-symbolic references refs: resolve symbolic refs first ref_transaction_update(): check refname_is_safe() at a minimum unlock_ref(): move definition higher in the file lock_ref_for_update(): new function add_update(): initialize the whole ref_update verify_refname_available(): adjust constness in declaration refs: don't dereference on rename refs: allow log-only updates delete_branches(): use resolve_refdup() ref_transaction_commit(): correctly report close_ref() failure ref_transaction_create(): disallow recursive pruning refs: make error messages more consistent lock_ref_sha1_basic(): remove unneeded local variable read_raw_ref(): move docstring to header file read_raw_ref(): improve docstring read_raw_ref(): rename symref argument to referent ...
This commit is contained in:
23
dir.h
23
dir.h
@@ -262,9 +262,32 @@ extern int is_empty_dir(const char *dir);
|
||||
|
||||
extern void setup_standard_excludes(struct dir_struct *dir);
|
||||
|
||||
|
||||
/* Constants for remove_dir_recursively: */
|
||||
|
||||
/*
|
||||
* If a non-directory is found within path, stop and return an error.
|
||||
* (In this case some empty directories might already have been
|
||||
* removed.)
|
||||
*/
|
||||
#define REMOVE_DIR_EMPTY_ONLY 01
|
||||
|
||||
/*
|
||||
* If any Git work trees are found within path, skip them without
|
||||
* considering it an error.
|
||||
*/
|
||||
#define REMOVE_DIR_KEEP_NESTED_GIT 02
|
||||
|
||||
/* Remove the contents of path, but leave path itself. */
|
||||
#define REMOVE_DIR_KEEP_TOPLEVEL 04
|
||||
|
||||
/*
|
||||
* Remove path and its contents, recursively. flags is a combination
|
||||
* of the above REMOVE_DIR_* constants. Return 0 on success.
|
||||
*
|
||||
* This function uses path as temporary scratch space, but restores it
|
||||
* before returning.
|
||||
*/
|
||||
extern int remove_dir_recursively(struct strbuf *path, int flag);
|
||||
|
||||
/* tries to remove the path with empty directories along it, ignores ENOENT */
|
||||
|
||||
Reference in New Issue
Block a user