git-annex/Git
Joey Hess 442e607b0a
Don't allow entering a view with staged or unstaged changes.
In some cases, unstaged changes are safe, eg dotfiles in the top which
are not affected by a view. Or non-annexed files in general which would
prevent view branch checkout from proceeding. But in other cases,
particularly unstaged changes to annexed files, entering a view would wipe
out those changes! And so don't allow entering a view with any unstaged
changes.

Staged changes are not safe when entering a view, because the changes get
committed to the view branch, and so the user is unlikely to remember them
when they exit the view, and so will effectively lose them, even if they're
still present in the view branch.

Also, improved the git status parser, although the improvement turned out
to not really be needed.

This commit was sponsored by Eric Drechsel on Patreon.
2018-05-14 16:51:06 -04:00
..
Command
Remote
AutoCorrect.hs Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors. 2016-11-15 21:29:54 -04:00
Branch.hs Pass -S to git commit-tree when commit.gpgsign is set and when making a non-automatic commit, in order to preserve current behavior when used with git 1.9, which has stopped doing this itself. 2016-06-02 15:07:20 -04:00
BuildVersion.hs fold Build/SysConfig.hs into BuildInfo via include 2017-12-14 12:46:57 -04:00
CatFile.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
CheckAttr.hs restart coprocess in raw mode 2016-11-01 14:03:59 -04:00
CheckIgnore.hs restart coprocess in raw mode 2016-11-01 14:03:59 -04:00
Command.hs Some optimisations to string splitting code. 2017-01-31 19:06:22 -04:00
Config.hs Improve startup time for commands that do not operate on remotes 2018-01-09 16:22:07 -04:00
ConfigTypes.hs post-recive hook to make updateInstead work in direct mode and adjusted branches 2017-02-17 14:04:43 -04:00
Construct.hs Improve startup time for commands that do not operate on remotes 2018-01-09 16:22:07 -04:00
CurrentRepo.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
DiffTree.hs unused: Improved memory use significantly when there are a lot of differences between branches. 2017-01-31 19:42:00 -04:00
DiffTreeItem.hs
Env.hs Optimisations to git-annex branch query and setting, avoiding repeated copies of the environment. 2016-09-29 13:36:48 -04:00
FileMode.hs
Filename.hs fix failing quickcheck properties 2017-06-17 16:48:00 -04:00
FilePath.hs --branch, stage 2 2016-07-20 15:23:43 -04:00
Fsck.hs Assistant, repair: Fix ignoring of git fsck errors due to duplicate file entries in tree objects. 2016-10-31 14:00:37 -04:00
GCrypt.hs Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors. 2016-11-15 21:29:54 -04:00
HashObject.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
Hook.hs Windows: Handle shebang in external special remote program. 2016-09-05 12:09:23 -04:00
Index.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
LockFile.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
LsFiles.hs reuse hashes of dotfiles/dirs/submodules when entering view 2018-05-14 15:35:20 -04:00
LsTree.hs adjust: Fix behavior when used in a repository that contains submodules. 2017-02-20 13:44:55 -04:00
Merge.hs --allow-unrelated-histories will be in git 2.9.0, not 2.8.2 2016-04-27 13:54:46 -04:00
Objects.hs
Queue.hs avoid insertWith' depreaction warning 2018-04-22 13:28:31 -04:00
Ref.hs typo fix 2017-10-30 12:28:44 -04:00
RefLog.hs
Remote.hs Improve startup time for commands that do not operate on remotes 2018-01-09 16:22:07 -04:00
Repair.hs rename BlobType and add submodule to it 2018-05-14 14:45:41 -04:00
Sha.hs
Ssh.hs avoid the dashed ssh hostname class of security holes 2017-08-17 22:11:31 -04:00
Status.hs Don't allow entering a view with staged or unstaged changes. 2018-05-14 16:51:06 -04:00
Tree.hs graft exported tree into git-annex branch 2017-08-31 18:06:49 -04:00
Types.hs rename BlobType and add submodule to it 2018-05-14 14:45:41 -04:00
UnionMerge.hs rename BlobType and add submodule to it 2018-05-14 14:45:41 -04:00
UpdateIndex.hs rename BlobType and add submodule to it 2018-05-14 14:45:41 -04:00
Url.hs
Version.hs