MCPcopy Create free account
hub / github.com/git/git / relocate_gitdir

Function relocate_gitdir

dir.c:4151–4158  ·  view source on GitHub ↗

* Migrate the git directory of the given path from old_git_dir to new_git_dir. */

Source from the content-addressed store, hash-verified

4149 * Migrate the git directory of the given path from old_git_dir to new_git_dir.
4150 */
4151void relocate_gitdir(const char *path, const char *old_git_dir, const char *new_git_dir)
4152{
4153 if (rename(old_git_dir, new_git_dir) < 0)
4154 die_errno(_("could not migrate git directory from '%s' to '%s'"),
4155 old_git_dir, new_git_dir);
4156
4157 connect_work_tree_and_git_dir(path, new_git_dir, 0);
4158}
4159
4160int path_match_flags(const char *const str, const enum path_match_flags flags)
4161{

Calls 2

die_errnoFunction · 0.85

Tested by

no test coverage detected