aboutsummaryrefslogtreecommitdiff
path: root/Git/Construct.hs
Commit message (Collapse)AuthorAge
* Improve startup time for commands that do not operate on remotesGravatar Joey Hess2018-01-09
| | | | | | | | | | | | | | And for tab completion, by not unnessessarily statting paths to remotes, which used to cause eg, spin-up of removable drives. Got rid of the remotes member of Git.Repo. This was a bit painful. Remote.Git modifies the list of remotes as it reads their configs, so still need a persistent list of remotes. So, put it in as Annex.gitremotes. It's only populated by getGitRemotes, so commands like examinekey that don't care about remotes won't do so. This commit was sponsored by Jake Vosloo on Patreon.
* adeiu, MissingHGravatar Joey Hess2017-05-16
| | | | | | | | | | | | | | | | Removed dependency on MissingH, instead depending on the split library. After laying groundwork for this since 2015, it was mostly straightforward. Added Utility.Tuple and Utility.Split. Eyeballed System.Path.WildMatch while implementing the same thing. Since MissingH's progress meter display was being used, I re-implemented my own. Bonus: Now progress is displayed for transfers of files of unknown size. This commit was sponsored by Shane-o on Patreon.
* Some optimisations to string splitting code.Gravatar Joey Hess2017-01-31
| | | | | | | | | | | | | | | | | | | Turns out that Data.List.Utils.split is slow and makes a lot of allocations. Here's a much simpler single character splitter that behaves the same (even in wacky corner cases) while running in half the time and 75% the allocations. As well as being an optimisation, this helps move toward eliminating use of missingh. (Data.List.Split.splitOn is nearly as slow as Data.List.Utils.split and allocates even more.) I have not benchmarked the effect on git-annex, but would not be surprised to see some parsing of eg, large streams from git commands run twice as fast, and possibly in less memory. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
* avoid withWorkTreeRelated affecting annex symlink calculationGravatar Joey Hess2016-04-08
|
* Catch up with current git behavior when both repo and repo.git exist; it ↵Gravatar Joey Hess2015-10-26
| | | | seems it now prefers repo in this case, although historically it may have preferred repo.git.
* avoid unncessary IOGravatar Joey Hess2015-02-12
|
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* convert parentDir to be based on takeDirectory, but fixed for trailing /Gravatar Joey Hess2015-01-09
|
* revert parentDir changeGravatar Joey Hess2015-01-09
| | | | | | | | Reverts 2bba5bc22d049272d3328bfa6c452d3e2e50e86c Unfortunately, this caused breakage on Windows, and possibly elsewhere, because parentDir and takeDirectory do not behave the same when there is a trailing directory separator.
* Merge branch 'master' into relativepathsGravatar Joey Hess2015-01-06
|\ | | | | | | | | | | Conflicts: Locations.hs debian/changelog
| * made parentDir return a Maybe FilePath; removed most uses of itGravatar Joey Hess2015-01-06
| | | | | | | | | | | | | | | | parentDir is less safe than takeDirectory, especially when working with relative FilePaths. It's really only useful in loops that want to terminate at / This commit was sponsored by Audric SCHILTKNECHT.
* | git repo path may be relative, so don't assume absolute any moreGravatar Joey Hess2015-01-06
|/ | | | Fixes 6 test 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.
* pass -c option on to all git commands runGravatar Joey Hess2013-11-05
| | | | | | | | The -c option now not only modifies the git configuration seen by git-annex, but it is passed along to every git command git-annex runs. This was easy to plumb through because gitCommandLine is already used to construct every git command line, to add --git-dir and --work-tree
* map: Work when there are gcrypt remotes.Gravatar Joey Hess2013-11-04
|
* fix windows buildGravatar Joey Hess2013-10-02
|
* prep for enabling remotre gcrypt repos in webappGravatar Joey Hess2013-09-26
|
* Unescape characters in 'file://...' URIs.Gravatar guilhem2013-08-22
| | | | | That allows, in Git remotes, such URIs to contain spaces or UTF-8 characters. Closes http://git-annex.branchable.com/bugs/Unable_to_use_remotes_with_space_in_the_path/ .
* 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 windows buildGravatar Joey Hess2013-05-21
|
* fix warningGravatar Joey Hess2013-05-20
|
* fix the day's Windows permissions damageGravatar Joey Hess2013-05-14
|
* fill in a few windows stubsGravatar Joey Hess2013-05-14
|
* typoGravatar Joey Hess2013-05-14
|
* more leaning toothpick fixesGravatar Joey Hess2013-05-14
|
* Merge branch 'master' into windowsGravatar Joey Hess2013-05-14
|\ | | | | | | | | | | | | | | Conflicts: Annex/Environment.hs Build/Configure.hs Git/Construct.hs Utility/FileMode.hs
| * detect local urls on DOSGravatar Joey Hess2013-05-14
| |
* | fix permission damage (thanks, Windows)Gravatar Joey Hess2013-05-11
| |
* | git-annex now builds on Windows (doesn't work)Gravatar Joey Hess2013-05-11
| |
* | fixup #if 0 stubs to use #ifndef mingw32_HOST_OSGravatar Joey Hess2013-05-10
| | | | | | | | | | | | That's needed in files used to build the configure program. For the other files, I'm keeping my __WINDOWS__ define, as I find that much easier to type. I may search and replace it to use the mingw32_HOST_OS thing later.
* | stub out POSIX stuffGravatar Joey Hess2013-05-10
|/
* expose Control.Monad.joinGravatar Joey Hess2013-04-22
| | | | | I think I've been looking for that function for some time. Ie, I remember wanting to collapse Just Nothing to Nothing.
* webapp: DTRT when told to create a git repo that already exists.Gravatar Joey Hess2013-03-12
|
* Additional GIT_DIR support bugfixes. May actually work now.Gravatar Joey Hess2013-02-23
| | | | | | | | | | | | | | | | | | | Two fixes. First, and most importantly, relax the isLinkToAnnex check to only look for /annex/objects/, not [^|/].git/annex/objects. If GIT_DIR is used with a detached work tree, the git directory is not necessarily named .git. There are important caveats with doing that at all, since git-annex will make symlinks that point at GIT_DIR, which means that the relative path between GIT_DIR and GIT_WORK_TREE needs to remain stable across all clones of the repository. ---- The other fix is just fixing crazy and wrong code that, when GIT_DIR is set, expects to still find a git repository in the path below the work tree, and uses some of its configuration, and some of GIT_DIR. What was I thinking, and why can't I seem to get this code right?
* whitespace fixesGravatar Joey Hess2012-12-13
|
* finished where indentation changesGravatar Joey Hess2012-12-13
|
* don't treat foo::bar as a ssh urlGravatar Joey Hess2012-11-09
| | | | It's a git-remote-helper location, and will be stored as just an url.
* Use USER and HOME environment when set, and only fall back to getpwent, ↵Gravatar Joey Hess2012-10-25
| | | | which doesn't work with LDAP or NIS.
* ensure that gitdir is absoluteGravatar Joey Hess2012-10-16
| | | | | | | | calcGitLink turns out to need it to be absolute, and it normally is, but not if it's read from a .git file in a submodule, or perhaps from GIT_DIR. I should look into dropping this invariant.
* flip catchDefaultIOGravatar Joey Hess2012-09-17
|
* Support repositories created with --separate-git-dir. Closes: #684405Gravatar Joey Hess2012-09-15
|
* thread safe git-annex index file useGravatar Joey Hess2012-08-24
|
* Add support for core.worktree, and fix support for GIT_WORK_TREE and GIT_DIR.Gravatar Joey Hess2012-05-18
| | | | | | | The environment needs to override git-config. Changed when git config is read, and avoid rereading it once it's been read. chdir for both worktree settings.
* Clean up handling of git directory and git worktree.Gravatar Joey Hess2012-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baked into the code was an assumption that a repository's git directory could be determined by adding ".git" to its work tree (or nothing for bare repos). That fails when core.worktree, or GIT_DIR and GIT_WORK_TREE are used to separate the two. This was attacked at the type level, by storing the gitdir and worktree separately, so Nothing for the worktree means a bare repo. A complication arose because we don't learn where a repository is bare until its configuration is read. So another Location type handles repositories that have not had their config read yet. I am not entirely happy with this being a Location type, rather than representing them entirely separate from the Git type. The new code is not worse than the old, but better types could enforce more safety. Added support for core.worktree. Overriding it with -c isn't supported because it's not really clear what to do if a git repo's config is read, is not bare, and is then overridden to bare. What is the right git directory in this case? I will worry about this if/when someone has a use case for overriding core.worktree with -c. (See Git.Config.updateLocation) Also removed and renamed some functions like gitDir and workTree that misused git's terminology. One minor regression is known: git annex add in a bare repository does not print a nice error message, but runs git ls-files in a way that fails earlier with a less nice error message. This is because before --work-tree was always passed to git commands, even in a bare repo, while now it's not.
* noopGravatar Joey Hess2012-04-21
|
* removed another 10 lines via ifMGravatar Joey Hess2012-03-16
|
* export fromPathGravatar Joey Hess2012-01-25
| | | | Not used in git-annex, but I am using it in git-backup
* avoid unnecessary stats when traversing to parentGravatar Joey Hess2012-01-14
|
* optimize away 3 statsGravatar Joey Hess2012-01-14
|
* tweakGravatar Joey Hess2012-01-13
|