summaryrefslogtreecommitdiff
path: root/Git/FilePath.hs
Commit message (Collapse)AuthorAge
* --branch, stage 2Gravatar Joey Hess2016-07-20
| | | | | | | | Show branch:file that is being operated on. I had to make ActionItem a type and not a type class because withKeyOptions' passed two different types of values when using the type class, and I could not get the type checker to accept that.
* improve propigation of commits from adjusted branchesGravatar Joey Hess2016-03-11
| | | | | | | | | | | Only reverse adjust the changes in the commit, which means that adjustments do not need to be generally cleanly reversable. For example, an adjustment can unlock all locked files, but does not need to worry about files that were originally unlocked when reversing, because it will only ever be run on files that have been changed. So, it's ok if it locks all files when reversed, or even leaves all files as-is when reversed.
* add adjustTree (low-level) interface that avoids buffering much in memoryGravatar Joey Hess2016-02-23
| | | | | Using getTree and recordTree in my big repo takes 594 mb ram. Using adjustTree takes 73 mb.
* clarify absPathFromGravatar Joey Hess2016-01-05
| | | | | | | | | | | | The repo path is typically relative, not absolute, so providing it to absPathFrom doesn't yield an absolute path. This is not a bug, just unclear documentation. Indeed, there seem to be no reason to simplifyPath here, which absPathFrom does, so instead just combine the repo path and the TopFilePath. Also, removed an export of the TopFilePath constructor; asTopFilePath is provided to construct one as-is.
* use TopFilePath for associated filesGravatar Joey Hess2016-01-05
| | | | | | | | | | | | | | | Fixes several bugs with updates of pointer files. When eg, running git annex drop --from localremote it was updating the pointer file in the local repository, not the remote. Also, fixes drop ../foo when run in a subdir, and probably lots of other problems. Test suite drops from ~30 to 11 failures now. TopFilePath is used to force thinking about what the filepath is relative to. The data stored in the sqlite db is still just a plain string, and TopFilePath is a newtype, so there's no overhead involved in using it in DataBase.Keys.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* Switch to using relative paths to the git repository.Gravatar Joey Hess2015-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the git repository to be moved while git-annex is running in it, with fewer problems. On Windows, this avoids some of the problems with the absurdly small MAX_PATH of 260 bytes. In particular, git-annex repositories should work in deeper/longer directory structures than before. See http://git-annex.branchable.com/bugs/__34__git-annex:_direct:_1_failed__34___on_Windows/ There are several possible ways this change could break git-annex: 1. If it changes its working directory while it's running, that would be Bad News. Good news everyone! git-annex never does so. It would also break thread safety, so all such things were stomped out long ago. 2. parentDir "." -> "" which is not a valid path. I had to fix one instace of this, and I should probably wipe all calls to parentDir out of the git-annex code base; it was never a good idea. 3. Things like relPathDirToFile require absolute input paths, and code assumes that the git repo path is absolute and passes it to it as-is. In the case of relPathDirToFile, I converted it to not make this assumption. Currently, the test suite has 16 failures.
* Windows: Fix handling of absolute unix-style git repository paths.Gravatar Joey Hess2014-02-08
| | | | | | | | | | | | | Note that on Windows a remote with a path like /home/foo/bar is interpreted by git as being some screwy relative path (relative to what exactly seems ill-defined -- it seemed relative to C:\Program Files\Git\ in my tests!) So no attempt has been made to handle such a path sanely, just not to crash when encountering it. Note that "C:\\foo" </> "/home/foo/bar" yields /home/foo/bar even though that is not absolute! I don't know what to make of all this, except that I will be very happy when this crock of **** vanishes from the face of the earth.
* remove workaroundGravatar Joey Hess2014-02-08
| | | | | This was needed when absNormPath was not being used on Windows, since path normalization includes removing ./
* work around msysgit very strange behavior on ./ or .\ at start of pathGravatar Joey Hess2013-12-04
| | | | | Seems that verify_path() rejects such a path on Windows, but I cannot see why. Git bug?
* use TopFilePath for DiffTree and LsTreeGravatar Joey Hess2013-10-17
|
* get rid of __WINDOWS__, use mingw32_HOST_OSGravatar Joey Hess2013-08-02
| | | | | The latter is harder for me to remember, but avoids build failures in code used by the configure program.
* fix the day's windows permissions damageGravatar Joey Hess2013-05-12
|
* deal with git using / internally, even on DOSGravatar Joey Hess2013-05-12
|
* add support for staging other types of blobs, like symlinks, into the indexGravatar Joey Hess2012-06-06
Also added a utility TopFilePath type, which could stand to be used more widely.