git-annex/Annex
Joey Hess 5db79339a1
init: Fix a failure when used in a submodule on a crippled filesystem.
When the submodule's parent repo has an adjusted unlocked branch,
it gets cloned by git, but git checks out master. git annex init then
fails because it wants to enter the adjusted branch, but:

  adjusted branch adjusted/master(unlocked) already exists.

  Aborting because that branch may have changes that have not yet reached master

Note that init actually then exits 0, leaving master checked out.

This could also happen, absent submodules, if the parent repo has
an adjusted unlocked branch, but it is not checked out. In the more common
case where that branch is checked out, the clone uses the same branch,
so no problem.

The choices to fix this:

* Init could delete the existing adjusted branch, and re-adjust.
  But then running init inside an adjusted branch on a crippled filesystem
  would lose any changes that have not been synced back to master.
* Init could sync any changes back to master, but that would be very surprising
  behavior for it.
* Init could simply check out the existing adjusted branch. If the branch
  is diverged from master, well, sync will sort that out later.
  This mirrors the behavior of cloning a repo that has an adjusted branch
  checked out that has not yet been synced back to master.
  Picked this choice.
2019-10-21 11:41:15 -04:00
..
AdjustedBranch fix a typo that didn't matter so far 2019-09-27 14:08:16 -04:00
Branch make DropDead transition minimize remote.log for dead sameas remotes 2019-10-15 11:39:25 -04:00
Content preserve unlocked file mtime when dropping 2019-10-08 14:01:12 -04:00
LockPool
MetaData
SpecialRemote autoenable sameas remotes 2019-10-11 15:52:40 -04:00
View
Action.hs
AdjustedBranch.hs init: Fix a failure when used in a submodule on a crippled filesystem. 2019-10-21 11:41:15 -04:00
AutoMerge.hs remove unused import 2019-08-28 15:38:29 -04:00
BloomFilter.hs
Branch.hs remove empty log files in transition 2019-10-14 16:04:15 -04:00
BranchState.hs
CatFile.hs
ChangedRefs.hs
CheckAttr.hs
CheckIgnore.hs Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
Common.hs
Concurrent.hs refactor 2019-06-19 20:19:38 -04:00
Content.hs remove direct mode support from Annex.Content 2019-08-27 13:14:06 -04:00
CurrentBranch.hs
Difference.hs
DirHashes.hs correct license to AGPL 2019-08-17 14:08:07 -04:00
Drop.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Environment.hs
Export.hs
FileMatcher.hs fix annex.largefiles largerthan/smallerthan bug 2019-09-30 17:15:08 -04:00
Fixup.hs Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
GitOverlay.hs
HashObject.hs
Hook.hs update uninit to handle all the v7 stuff 2019-10-08 14:34:00 -04:00
Import.hs add RemoteStateHandle 2019-10-14 13:51:42 -04:00
Ingest.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
Init.hs update uninit to handle all the v7 stuff 2019-10-08 14:34:00 -04:00
InodeSentinal.hs
Journal.hs
Link.hs
Locations.hs init: Fix a reversion that broke initialization on systems that need to use pid locking 2019-09-10 13:37:07 -04:00
LockFile.hs
LockPool.hs
Magic.hs Added --mimetype and --mimeencoding file matching options. 2019-09-19 12:09:59 -04:00
MetaData.hs
Multicast.hs remove many old version ifdefs 2019-07-05 15:09:37 -04:00
Notification.hs
NumCopies.hs
Path.hs
Perms.hs
Queue.hs
RemoteTrackingBranch.hs
ReplaceFile.hs
SpecialRemote.hs autoenable sameas remotes 2019-10-11 15:52:40 -04:00
Ssh.hs
TaggedPush.hs
Tmp.hs init: Fix a reversion that broke initialization on systems that need to use pid locking 2019-09-10 13:37:07 -04:00
Transfer.hs use fine-grained WorkerStages when transferring and verifying 2019-06-19 13:24:20 -04:00
UpdateInstead.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
Url.hs merge from http-client-restricted 2019-07-17 16:48:50 -04:00
UUID.hs
VariantFile.hs
VectorClock.hs
Version.hs one missed thing for automatic v5 -> v7 upgrades 2019-08-30 17:35:10 -04:00
View.hs fix edge case failure in prop_view_roundtrips 2019-08-16 11:35:32 -04:00
Wanted.hs
WorkTree.hs v7 for all repositories 2019-08-30 14:09:14 -04:00
YoutubeDl.hs