diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-09-20 15:20:43 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-09-20 15:20:43 -0700 |
| commit | bbeca063cfeecda2f68fd2cb4ce4dbe797be8981 (patch) | |
| tree | 5fc8401bc3b21d20d23f3d1b4728686f4c75e37c /dir.h | |
| parent | Merge branch 'ar/submodule-add-config' (diff) | |
| parent | submodule--helper: rename compute_submodule_clone_url() (diff) | |
| download | git-bbeca063cfeecda2f68fd2cb4ce4dbe797be8981.tar.gz git-bbeca063cfeecda2f68fd2cb4ce4dbe797be8981.zip | |
Merge branch 'ar/submodule-add-more'
More parts of "git submodule add" has been rewritten in C.
* ar/submodule-add-more:
submodule--helper: rename compute_submodule_clone_url()
submodule--helper: remove resolve-relative-url subcommand
submodule--helper: remove add-config subcommand
submodule--helper: remove add-clone subcommand
submodule--helper: convert the bulk of cmd_add() to C
dir: libify and export helper functions from clone.c
submodule--helper: remove repeated code in sync_submodule()
submodule--helper: refactor resolve_relative_url() helper
submodule--helper: add options for compute_submodule_clone_url()
Diffstat (limited to 'dir.h')
| -rw-r--r-- | dir.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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); |
