summaryrefslogtreecommitdiff
path: root/Init.hs
Commit message (Collapse)AuthorAge
* 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.
* uninit: Clear annex.uuid from .git/config. Closes: #670639Gravatar Joey Hess2012-04-27
|
* removed another 10 lines via ifMGravatar Joey Hess2012-03-16
|
* added ifM and nuked 11 lines of codeGravatar Joey Hess2012-03-14
| | | | no behavior changes
* hlintGravatar Joey Hess2012-02-16
|
* split out Git/Ref.hsGravatar Joey Hess2011-12-12
|
* reorder repo parameters lastGravatar Joey Hess2011-11-08
| | | | | | | | | | | | | Many functions took the repo as their first parameter. Changing it consistently to be the last parameter allows doing some useful things with currying, that reduce boilerplate. In particular, g <- gitRepo is almost never needed now, instead use inRepo to run an IO action in the repo, and fromRepo to get a value from the repo. This also provides more opportunities to use monadic and applicative combinators.
* refactorGravatar Joey Hess2011-11-07
|
* Record uuid when auto-initializing a remote so it shows in status.Gravatar Joey Hess2011-11-02
|
* cleanupGravatar Joey Hess2011-10-31
|
* broke up UtilityGravatar Joey Hess2011-10-16
|
* break out non-log stuff to separate moduleGravatar Joey Hess2011-10-15
|
* reorganize log modulesGravatar Joey Hess2011-10-15
| | | | no code changes
* minor syntax changesGravatar Joey Hess2011-10-11
|
* renameGravatar Joey Hess2011-10-05
|
* renameGravatar Joey Hess2011-10-04
|
* factor out common importsGravatar Joey Hess2011-10-03
| | | | no code changes
* go go gadget hlintGravatar Joey Hess2011-09-20
|
* split groups of related functions out of UtilityGravatar Joey Hess2011-08-22
|
* make gitDir absoluteGravatar Joey Hess2011-08-19
|
* tweakGravatar Joey Hess2011-08-17
|
* tweakGravatar Joey Hess2011-08-17
|
* optimise initialized checkGravatar Joey Hess2011-08-17
| | | | Avoid running external command if annex.version is set.
* when reading configs of local repos, first initializeSafeGravatar Joey Hess2011-08-17
| | | | This auto-generates a uuid if the local repo does not already have one.
* Now "git annex init" only has to be run onceGravatar Joey Hess2011-08-17
when a git repository is first being created. Clones will automatically notice that git-annex is in use and automatically perform a basic initalization. It's still recommended to run "git annex init" in any clones, to describe them.