git-annex/Annex
Joey Hess d7021d420f
reuse hashes of dotfiles/dirs/submodules when entering view
This fixes a crash when a git submodule has a name starting with a dot.
Such a submodule might contain dotfiles that are intended to be used when
inside the view (since a dot-directory that's not a submodule was already
preserved when entering a view). So, rather than eliminating the submodule
from the view, its git ls-files --stage hash is copied over into the view.

dotfiles/dirs have their git ls-files --stage hashes similarly copied over
to the view. This is more efficient and simpler than the old method,
and also won't break if git ever adds a new type of tree item, like was
done with submodules.

Since the content of dotfiles in the working tree is no longer hashed
when entering a view, when there are unstaged modifications, they are
not included in the view branch. Entering the view branch still works,
but git checkout shows "M .dotfile", and git diff will show the unstaged
changes. This seems like an improvement over the old behavior.

Also made Command.View not delete empty directories that are submodules
when entering a view, while still deleting other empty directories.

This commit was supported by the NSF-funded DataLad project.
2018-05-14 15:35:20 -04:00
..
Branch Unneded constraint 2016-01-28 12:34:07 -04:00
Content Improve startup time for commands that do not operate on remotes 2018-01-09 16:22:07 -04:00
LockPool enable LambdaCase and convert around 10% of places that could use it 2017-11-15 16:59:32 -04:00
MetaData fix thinko for the second time 2018-04-09 13:10:44 -04:00
View remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Action.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
AdjustedBranch.hs rename BlobType and add submodule to it 2018-05-14 14:45:41 -04:00
AutoMerge.hs rename BlobType and add submodule to it 2018-05-14 14:45:41 -04:00
BloomFilter.hs Another redundant constraint 2016-01-28 12:34:07 -04:00
Branch.hs rename BlobType and add submodule to it 2018-05-14 14:45:41 -04:00
BranchState.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
CatFile.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
ChangedRefs.hs enable LambdaCase and convert around 10% of places that could use it 2017-11-15 16:59:32 -04:00
CheckAttr.hs annex.largefiles can be configured in .gitattributes too 2016-02-02 15:18:17 -04:00
CheckIgnore.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Common.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Concurrent.hs fix process and FD leak 2017-09-29 22:36:08 -04:00
Content.hs Use http-conduit for url downloads by default, annex.web-options enables curl 2018-04-06 17:36:20 -04:00
Difference.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Direct.hs enable LambdaCase and convert around 10% of places that could use it 2017-11-15 16:59:32 -04:00
DirHashes.hs stop using MissingH for MD5 2017-05-15 21:36:03 -04:00
Drop.hs AssociatedFile newtype 2017-03-10 13:35:31 -04:00
Environment.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Export.hs Fix exporting of non-annexed files to external special remotes. 2017-10-30 12:47:13 -04:00
FileMatcher.hs enable LambdaCase and convert around 10% of places that could use it 2017-11-15 16:59:32 -04:00
Fixup.hs Improve startup time for commands that do not operate on remotes 2018-01-09 16:22:07 -04:00
GitOverlay.hs Optimisations to git-annex branch query and setting, avoiding repeated copies of the environment. 2016-09-29 13:36:48 -04:00
HashObject.hs Sped up git-annex add in direct mode and v6 by using git hash-object --batch. 2016-03-14 15:58:46 -04:00
Hook.hs post-recive hook to make updateInstead work in direct mode and adjusted branches 2017-02-17 14:04:43 -04:00
Ingest.hs enable LambdaCase and convert around 10% of places that could use it 2017-11-15 16:59:32 -04:00
Init.hs .noannex file 2017-12-13 14:34:32 -04:00
InodeSentinal.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Journal.hs back out incorrect IO interleaving change 2018-05-08 13:54:42 -04:00
Link.hs rename BlobType and add submodule to it 2018-05-14 14:45:41 -04:00
Locations.hs youtube-dl working 2017-11-29 16:40:32 -04:00
LockFile.hs Ssh password prompting improved when using -J 2017-05-11 17:36:03 -04:00
LockPool.hs pid locking configuration and abstraction layer for git-annex 2015-11-12 17:50:34 -04:00
MakeRepo.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
MetaData.hs don't copy old date metadata when adding new version of a file 2018-04-04 13:58:16 -04:00
Multicast.hs fix build with old ghc 2017-05-10 14:39:15 -04:00
Notification.hs reorg 2017-12-14 11:26:59 -04:00
NumCopies.hs move: --safe/--unsafe and potential drop race fix 2018-04-09 16:20:10 -04:00
Path.hs remove ifdef for older base than git-annex.cabal allows 2017-12-14 13:45:50 -04:00
Perms.hs avoid compiler warning 2018-03-15 13:21:32 -04:00
Queue.hs withAltRepo needs a separate queue of changes 2016-06-03 13:57:00 -04:00
ReplaceFile.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
SpecialRemote.hs finish fixing inverted Ord for TrustLevel 2018-04-13 15:17:54 -04:00
Ssh.hs fix ssh warmup hang 2018-03-15 15:04:15 -04:00
TaggedPush.hs sync: Added --cleanup, which removes local and remote synced/ branches. 2017-09-28 14:58:48 -04:00
Transfer.hs Display error message when http download fails. 2018-05-08 16:11:45 -04:00
UpdateInstead.hs sync hack to make updateInstead work on eg FAT 2017-02-17 15:21:52 -04:00
Url.hs Use http-conduit for url downloads by default, annex.web-options enables curl 2018-04-06 17:36:20 -04:00
UUID.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
VariantFile.hs stop using MissingH for MD5 2017-05-15 21:36:03 -04:00
VectorClock.hs avoid accidental Show of VectorClock 2017-08-14 14:51:54 -04:00
Version.hs Support using v3 repositories without upgrading them to v5. 2016-10-05 16:53:09 -04:00
View.hs reuse hashes of dotfiles/dirs/submodules when entering view 2018-05-14 15:35:20 -04:00
Wanted.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
WorkTree.hs rename BlobType and add submodule to it 2018-05-14 14:45:41 -04:00
YoutubeDl.hs Avoid running annex.http-headers-command more than once. 2018-04-04 15:15:08 -04:00