summaryrefslogtreecommitdiff
path: root/submodule.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-10-29 04:12:07 -0400
committerJeff King <peff@peff.net>2012-10-29 04:12:07 -0400
commitd21240fafafdea4fb4cab27c0e9b58ebad7d6172 (patch)
tree834ae033a8df4979709fd58a72f08d9ab7a21e8d /submodule.h
parent2cfceefaca16d64baecf0ba9bcd4e05229d9c31b (diff)
parent293ab15eea341ffe8705bac99136f2e3a286db5f (diff)
downloadgit-d21240fafafdea4fb4cab27c0e9b58ebad7d6172.tar.gz
Merge branch 'jl/submodule-rm'
"git rm submodule" cannot blindly remove a submodule directory as its working tree may have local changes, and worse yet, it may even have its repository embedded in it. Teach it some special cases where it is safe to remove a submodule, specifically, when there is no local changes in the submodule working tree, and its repository is not embedded in its working tree but is elsewhere and uses the gitfile mechanism to point at it. * jl/submodule-rm: submodule: teach rm to remove submodules unless they contain a git directory
Diffstat (limited to 'submodule.h')
-rw-r--r--submodule.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/submodule.h b/submodule.h
index 594b50d510..f2e8271fc6 100644
--- a/submodule.h
+++ b/submodule.h
@@ -28,6 +28,8 @@ int fetch_populated_submodules(const struct argv_array *options,
const char *prefix, int command_line_option,
int quiet);
unsigned is_submodule_modified(const char *path, int ignore_untracked);
+int submodule_uses_gitfile(const char *path);
+int ok_to_remove_submodule(const char *path);
int merge_submodule(unsigned char result[20], const char *path, const unsigned char base[20],
const unsigned char a[20], const unsigned char b[20], int search);
int find_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name,