diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-02-10 14:20:05 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-10 14:20:05 -0800 |
commit | d0a1cbccab54d828be2d83acc73f38c162962966 (patch) | |
tree | 474f89e894ad4f8d6e47f5e27d1f08e102a4cd9f /setup.c | |
parent | ff4ea6004fb48146330d663d64a71e7774f059f9 (diff) | |
parent | 618244e160cb0777bc8d41055f7de0192b10ea0f (diff) | |
download | git-d0a1cbccab54d828be2d83acc73f38c162962966.tar.gz |
Merge branch 'nd/do-not-move-worktree-manually'
"git worktree" had a broken code that attempted to auto-fix
possible inconsistency that results from end-users moving a
worktree to different places without telling Git (the original
repository needs to maintain backpointers to its worktrees, but
"mv" run by end-users who are not familiar with that fact will
obviously not adjust them), which actually made things worse
when triggered.
* nd/do-not-move-worktree-manually:
worktree: stop supporting moving worktrees manually
worktree.c: fix indentation
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -451,17 +451,6 @@ static int check_repository_format_gently(const char *gitdir, int *nongit_ok) return ret; } -static void update_linked_gitdir(const char *gitfile, const char *gitdir) -{ - struct strbuf path = STRBUF_INIT; - struct stat st; - - strbuf_addf(&path, "%s/gitdir", gitdir); - if (stat(path.buf, &st) || st.st_mtime + 24 * 3600 < time(NULL)) - write_file(path.buf, "%s", gitfile); - strbuf_release(&path); -} - /* * Try to read the location of the git directory from the .git file, * return path to git directory if found. @@ -531,7 +520,6 @@ const char *read_gitfile_gently(const char *path, int *return_error_code) error_code = READ_GITFILE_ERR_NOT_A_REPO; goto cleanup_return; } - update_linked_gitdir(path, dir); path = real_path(dir); cleanup_return: |