dir: libify and export helper functions from clone.c
These functions can be useful to other parts of Git. Let's move them to dir.c, while renaming them to be make their functionality more explicit. Signed-off-by: Atharva Raykar <raykar.ath@gmail.com> Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Shourya Shukla <periperidip@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0c61041ed6
commit
ed86301f68
11
dir.h
11
dir.h
@@ -453,6 +453,17 @@ static inline int is_dot_or_dotdot(const char *name)
|
||||
|
||||
int is_empty_dir(const char *dir);
|
||||
|
||||
/*
|
||||
* Retrieve the "humanish" basename of the given Git URL.
|
||||
*
|
||||
* For example:
|
||||
* /path/to/repo.git => "repo"
|
||||
* host.xz:foo/.git => "foo"
|
||||
* http://example.com/user/bar.baz => "bar.baz"
|
||||
*/
|
||||
char *git_url_basename(const char *repo, int is_bundle, int is_bare);
|
||||
void strip_dir_trailing_slashes(char *dir);
|
||||
|
||||
void setup_standard_excludes(struct dir_struct *dir);
|
||||
|
||||
char *get_sparse_checkout_filename(void);
|
||||
|
||||
Reference in New Issue
Block a user