summaryrefslogtreecommitdiff
path: root/Documentation/git-mv.txt
diff options
context:
space:
mode:
authorLibravatar Jens Lehmann <Jens.Lehmann@web.de>2013-07-30 21:50:03 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-07-30 13:52:53 -0700
commita88c915de9886fe17005a5daff4900ced0ea76ad (patch)
tree3a969c58914c856210aa9e4770c66d2e7959a316 /Documentation/git-mv.txt
parentmv: move submodules together with their work trees (diff)
downloadtgif-a88c915de9886fe17005a5daff4900ced0ea76ad.tar.xz
mv: move submodules using a gitfile
When moving a submodule which uses a gitfile to point to the git directory stored in .git/modules/<name> of the superproject two changes must be made to make the submodule work: the .git file and the core.worktree setting must be adjusted to point from work tree to git directory and back. Achieve that by remembering which submodule uses a gitfile by storing the result of read_gitfile() of each submodule. If that is not NULL the new function connect_work_tree_and_git_dir() is called after renaming the submodule's work tree which updates the two settings to the new values. Extend the man page to inform the user about that feature (and while at it change the description to not talk about a script anymore, as mv is a builtin for quite some time now). Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-mv.txt')
-rw-r--r--Documentation/git-mv.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index e93fcb49fd..1f6fce083e 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -13,7 +13,7 @@ SYNOPSIS
DESCRIPTION
-----------
-This script is used to move or rename a file, directory or symlink.
+Move or rename a file, directory or symlink.
git mv [-v] [-f] [-n] [-k] <source> <destination>
git mv [-v] [-f] [-n] [-k] <source> ... <destination directory>
@@ -44,6 +44,12 @@ OPTIONS
--verbose::
Report the names of files as they are moved.
+SUBMODULES
+----------
+Moving a submodule using a gitfile (which means they were cloned
+with a Git version 1.7.8 or newer) will update the gitfile and
+core.worktree setting to make the submodule work in the new location.
+
GIT
---
Part of the linkgit:git[1] suite