init: Fix bugs in submodule .git symlink fixup, that occurred when initializing in a subdirectory of a submodule and a submodule of a submodule.
This commit is contained in:
parent
085ec7d693
commit
17c97434f2
4 changed files with 15 additions and 1 deletions
|
@ -90,8 +90,9 @@ fixupSubmodule r@(Repo { location = l@(Local { worktree = Just w, gitdir = d })
|
|||
where
|
||||
dotgit = w </> ".git"
|
||||
replacedotgit = whenM (doesFileExist dotgit) $ do
|
||||
linktarget <- relPathDirToFile w d
|
||||
nukeFile dotgit
|
||||
createSymbolicLink (w </> d) dotgit
|
||||
createSymbolicLink linktarget dotgit
|
||||
maybe (error "unset core.worktree failed") (\_ -> return ())
|
||||
=<< Git.Config.unset "core.worktree" r
|
||||
fixupSubmodule r _ = return r
|
||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -19,6 +19,9 @@ git-annex (6.20160127) UNRELEASED; urgency=medium
|
|||
expression.
|
||||
* Brought back the dbus and xmpp build flags, so build from source can be
|
||||
done without C libraries that may be hard to install.
|
||||
* init: Fix bugs in submodule .git symlink fixup, that occurred when
|
||||
initializing in a subdirectory of a submodule and a submodule of a
|
||||
submodule.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Thu, 28 Jan 2016 13:53:09 -0400
|
||||
|
||||
|
|
|
@ -45,3 +45,5 @@ upgrade supported from repository versions: 0 1 2 4 5
|
|||
"""]]
|
||||
|
||||
[[!meta author=yoh]]
|
||||
|
||||
> [[fixed|done]]
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 3"""
|
||||
date="2016-02-08T18:27:32Z"
|
||||
content="""
|
||||
Yeah, it was running git annex init in the subdir of the submodule that
|
||||
triggered the bug. Easy fix, also fixes init in submodules of submodules.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue