summaryrefslogtreecommitdiff
path: root/Command/PreCommit.hs
Commit message (Collapse)AuthorAge
* added ifM and nuked 11 lines of codeGravatar Joey Hess2012-03-14
| | | | no behavior changes
* rework git check-attr interfaceGravatar Joey Hess2012-02-13
| | | | | | | | | | | | | | | Now gitattributes are looked up, efficiently, in only the places that really need them, using the same approach used for cat-file. The old CheckAttr code seemed very fragile, in the way it streamed files through git check-attr. I actually found that cad8824852aa0623dc41eac02a9e2bae47d88ec4 was still deadlocking with ghc 7.4, at the end of adding a lot of files. This should fix that problem, and avoid future ones. The best part is that this removes withAttrFilesInGit and withNumCopies, which were complicated Seek methods, as well as simplfying the types for several other Seek methods that had a Backend tupled in.
* better limiting of start actions to only run whenAnnexedGravatar Joey Hess2011-11-10
| | | | | Mostly only refactoring, but this does remove one redundant stat of the symlink by copy.
* clean up check selection codeGravatar Joey Hess2011-10-29
| | | | | | | | | This new approach allows filtering out checks from the default set that are not appropriate for a command, rather than having to list every check that is appropriate. It also reduces some boilerplate. Haskell does not define Eq for functions, so I had to go a long way around with each check having a unique id. Meh.
* Fail if --from or --to is passed to commands that do not support them.Gravatar Joey Hess2011-10-27
|
* refactored and generalized pre-command sanity checkingGravatar Joey Hess2011-10-27
|
* tweakGravatar Joey Hess2011-09-15
|
* remove command type definitionsGravatar Joey Hess2011-09-15
| | | | | | | These were a mistake, they make the type signatures harder to read and less flexible. The CommandSeek, CommandStart, CommandPerform, and CommandCleanup types were a good idea, but composing them with the parameters expected is going too far.
* clean up params in usage displayGravatar Joey Hess2011-09-15
|
* remove unnecessary importsGravatar Joey Hess2011-06-01
|
* Somewhat sped up `git commit` of modifications to unlocked files.Gravatar Joey Hess2011-05-31
| | | | | | | | | | | | Avoid git reset here too, so I no longer need to care that it's much more expensive than seems wise (but I asked the git list about that anyway). It's not necessary to reset the staged file content from the index, as the `git add` of the the symlink will replace it anyway. `git commit` of unlocked files is still slow, since git still has to shove their entire content into the index, only to have it be thrown away. So it's still better to use `git annex add`
* refactor some boilerplateGravatar Joey Hess2011-05-15
|
* Periodically flush git command queue, to avoid boating memory usage too much.Gravatar Joey Hess2011-04-07
| | | | | | | Since the queue is flushed in between subcommand actions being run, there should be no issues with actions that expect to queue up some stuff and have it run after they do other stuff. So I didn't have to audit for such assumptions.
* avoid version check before running version and upgrade commandsGravatar Joey Hess2011-03-19
| | | | | There are two types of commands; those that access the repository and those that don't. Sorted.
* symlink touching funGravatar Joey Hess2011-03-14
| | | | | | | When adding files to the annex, the symlinks pointing at the annexed content are made to have the same mtime as the original file. While git does not preserve that information, this allows a tool like metastore to be used with annexed files.
* Rethink filename encoding handling for display. Since filename encoding may ↵0.23Gravatar Joey Hess2011-03-12
| | | | or may not match locale settings, any attempt to decode filenames will fail for some files. So instead, do all output in binary mode.
* use ShellParam typeGravatar Joey Hess2011-02-28
| | | | | So, I have a type checked safe handling of filenames starting with dashes, throughout the code.
* update unicode FilePath handlingGravatar Joey Hess2011-02-11
| | | | | | | | Based on http://hackage.haskell.org/trac/ghc/ticket/3307 , whether FilePath contains decoded unicode varies by OS. So, add a configure check for it. Also, renamed showFile to filePathToString
* Fixed missing import of Messages moduleGravatar Michael Kenney2011-02-10
|
* Fix display of unicode filenames.Gravatar Joey Hess2011-02-10
| | | | | | | | | Internally, the filenames are stored as un-decoded unicode. I tried decoding them, but then haskell tries to access the wrong files. Hmm. So, I've unhappily chosen option "B", which is to decode filenames before they are displayed.
* refactor in preparation for adding a git-annex-shell commandGravatar Joey Hess2010-12-30
|
* rename some stuff and prepare to break out more into Command/*Gravatar Joey Hess2010-12-30
|
* precommit: Optimise to avoid calling git-check-attr more than once.Gravatar Joey Hess2010-11-28
|
* finished hlintingGravatar Joey Hess2010-11-22
|
* refactor param seekingGravatar Joey Hess2010-11-11
|
* rework command dispatching for add and pre-commitGravatar Joey Hess2010-11-11
| | | | | Both subcommands do two different operations on different sets of files, so allowing a subcommand to perform a list of operations cleans things up.
* Optimize both pre-commit and lock subcommands.Gravatar Joey Hess2010-11-11
| | | | | | | | isLocked was doing the expensive check before the cheap one. Let's not fork git diff twice per file when committing, especially. git diff is still run more than strictly necessary (ie, more than once) if multiple unlocked files are being committed. But much better now.
* explicity run queue to git add filesGravatar Joey Hess2010-11-10
|
* Unlocked files will now automatically be added back into the annex when ↵Gravatar Joey Hess2010-11-10
| | | | committed (and the updated symlink committed), by some magic in the pre-commit hook.
* addGravatar Joey Hess2010-11-10