summaryrefslogtreecommitdiff
path: root/Command/Add.hs
Commit message (Collapse)AuthorAge
* annex.addunlockedGravatar Joey Hess2016-02-16
| | | | | | | * add, addurl, import, importfeed: When in a v6 repository on a crippled filesystem, add files unlocked. * annex.addunlocked: New configuration setting, makes files always be added unlocked. (v6 only)
* annex.addsmallfiles: New option controlling what is done when adding files ↵Gravatar Joey Hess2016-01-28
| | | | not matching annex.largefiles.
* remove 163 lines of code without changing anything except importsGravatar Joey Hess2016-01-20
|
* whereis --batchGravatar Joey Hess2016-01-20
|
* add --batchGravatar Joey Hess2016-01-19
|
* add, import: Support --json output.Gravatar Joey Hess2016-01-19
| | | | Include added key in output.
* avoid confusing git with a modified ctime in clean filterGravatar Joey Hess2016-01-07
| | | | | | | Linking the file to the tmp dir was not necessary in the clean filter, and it caused the ctime to change, which caused git to think the file was changed. This caused git status to get slow as it kept re-cleaning unchanged files.
* finish v6 support for assistantGravatar Joey Hess2015-12-22
| | | | Seems to basically work now!
* refactoringGravatar Joey Hess2015-12-22
| | | | no behavior changes
* fix add of file that was locked but has been replaced by a new, unlocked ↵Gravatar Joey Hess2015-12-16
| | | | file (v6)
* add: In v6 mode, acts on modified files.Gravatar Joey Hess2015-12-15
| | | | | Same as was done in direct mode, except in v6 mode add always adds files locked, so
* rename stuff for v5 unlocked files to indicate it's oldGravatar Joey Hess2015-12-15
|
* add: no need to make pass for old unlocked files in v6Gravatar Joey Hess2015-12-15
|
* move InodeSentinal from direct mode code to its own moduleGravatar Joey Hess2015-12-09
| | | | | Will be used outside of direct mode for v6 unlocked files, and is already used outside of direct mode when adding files to annex.
* addurl, importfeed: Changed to honor annex.largefiles settings, when the ↵Gravatar Joey Hess2015-12-02
| | | | | | | | | content of the url is downloaded. (Not when using --fast or --relaxed.) importfeed just calls addurl functions, so inherits this from it. Note that addurl still generates a temp file, and uses that key to download the file. It just adds it to the work tree at the end when the file is small.
* import: Changed to honor annex.largefiles settings.Gravatar Joey Hess2015-12-02
|
* add: Fix error recovery rollback to not move the injested file content out ↵Gravatar Joey Hess2015-11-06
| | | | | | of the annex back to the file, because other files may point to that same content. Instead, copy the injected file content out to recover. That was not a data loss, but it came close!
* -J for add/addurl/importGravatar Joey Hess2015-11-05
|
* finished converting all the main optionsGravatar Joey Hess2015-07-10
|
* convert all commands to work with optparse-applicativeGravatar Joey Hess2015-07-08
| | | | Still no options though.
* started converting to use optparse-applicativeGravatar Joey Hess2015-07-08
| | | | | | | | | | | | This is a work in progress. It compiles and is able to do basic command dispatch, including git autocorrection, while using optparse-applicative for the core commandline parsing. * Many commands are temporarily disabled before conversion. * Options are not wired in yet. * cmdnorepo actions don't work yet. Also, removed the [Command] list, which was only used in one place.
* add: Stage symlinks the same as git add would, even if they are not a link ↵Gravatar Joey Hess2015-07-07
| | | | to annexed content.
* Improve behavior when a git-annex command is told to operate on a file that ↵Gravatar Joey Hess2015-04-30
| | | | doesn't exist. It will now continue to other files specified after that on the command line, and only error out at the end.
* wordingGravatar Joey Hess2015-04-08
|
* add: If annex.largefiles is set and does not match a file that's being ↵Gravatar Joey Hess2015-04-08
| | | | added, the file will be checked into git rather than being added to the annex. Previously, git annex add skipped over such files; this new behavior is more useful in direct mode.
* The file matching options are now only accepted by commands that can ↵Gravatar Joey Hess2015-02-06
| | | | actually use them.
* Repository tuning parameters can now be passed when initializing a ↵Gravatar Joey Hess2015-01-27
| | | | | | | | | | repository for the first time. * init: Repository tuning parameters can now be passed when initializing a repository for the first time. For details, see http://git-annex.branchable.com/tuning/ * merge: Refuse to merge changes from a git-annex branch of a repo that has been tuned in incompatable ways.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* on second thought, InodeCache should use getFileSizeGravatar Joey Hess2015-01-20
| | | | | | | | This is necessary for interop between inode caches created on unix and windows. Which is more important than supporting inodecaches for large keys with the wrong size, which are broken anyway. There should be no slowdown from this change, except on Windows.
* doh't use "def" for command definitions, it conflicts with Data.Default.defGravatar Joey Hess2014-10-14
|
* hlintGravatar Joey Hess2014-10-09
|
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* add: In direct mode, adding an annex symlink will check it into git, as was ↵Gravatar Joey Hess2014-09-18
| | | | already done in indirect mode.
* unify exception handling into Utility.ExceptionGravatar Joey Hess2014-08-07
| | | | | | | | | | | | | | | | | | | | Removed old extensible-exceptions, only needed for very old ghc. Made webdav use Utility.Exception, to work after some changes in DAV's exception handling. Removed Annex.Exception. Mostly this was trivial, but note that tryAnnex is replaced with tryNonAsync and catchAnnex replaced with catchNonAsync. In theory that could be a behavior change, since the former caught all exceptions, and the latter don't catch async exceptions. However, in practice, nothing in the Annex monad uses async exceptions. Grepping for throwTo and killThread only find stuff in the assistant, which does not seem related. Command.Add.undo is changed to accept a SomeException, and things that use it for rollback now catch non-async exceptions, rather than only IOExceptions.
* finish fixing windows timezone madnessGravatar Joey Hess2014-06-12
| | | | | | | | | | | | | | | | | | | | | Rather than calculating the TSDelta once, and caching it, this now reads the inode sential file's InodeCache file once, and then each time a new InodeCache is generated, looks at the sentinal file to get the current delta. This way, if the time zone changes while git-annex is running, it will adapt. This adds some inneffiency, but only on Windows, and only 1 stat per new file added. The worst innefficiency is that `git annex status` and `git annex sync` will now (on Windows) stat the inode sentinal file once per file in the repo. It would be more efficient to use getCurrentTimeZone, rather than needing to stat the sentinal file. This should be easy to do, once the time package gets my bugfix patch. This commit was sponsored by Jürgen Lüters.
* fix for Windows file timestamp timezone madnessGravatar Joey Hess2014-06-12
| | | | | | | | | | | | | | | | | | | | | | On Windows, changing the time zone causes the apparent mtime of files to change. This confuses git-annex, which natually thinks this means the files have actually been modified (since THAT'S WHAT A MTIME IS FOR, BILL <sheesh>). Work around this stupidity, by using the inode sentinal file to detect if the timezone has changed, and calculate a TSDelta, which will be applied when generating InodeCaches. This should add no overhead at all on unix. Indeed, I sped up a few things slightly in the refactoring. Seems to basically work! But it has a big known problem: If the timezone changes while the assistant (or a long-running command) runs, it won't notice, since it only checks the inode cache once, and so will use the old delta for all new inode caches it generates for new files it's added. Which will result in them seeming changed the next time it runs. This commit was sponsored by Vincent Demeester.
* replace (Key, Backend) with KeyGravatar Joey Hess2014-04-17
| | | | | | | | | | Only fsck and reinject and the test suite used the Backend, and they can look it up as needed from the Key. This simplifies the code and also speeds it up. There is a small behavior change here. Before, all commands would warn when acting on an annexed file with an unknown backend. Now, only fsck and reinject show that warning.
* add --include-dotfiles: New option, perhaps useful for backups.Gravatar Joey Hess2014-03-26
|
* add: display exception when lockdown fails (for RichiH)Gravatar Joey Hess2014-03-19
|
* Put non-object tmp files in .git/annex/misctmp, leaving .git/annex/tmp for ↵Gravatar Joey Hess2014-02-26
| | | | | | | | | | | | | | | | | | | | only partially transferred objects. This allows eg, putting .git/annex/tmp on a ram disk, if the disk IO of temp object files is too annoying (and if you don't want to keep partially transferred objects across reboots). .git/annex/misctmp must be on the same filesystem as the git work tree, since files are moved to there in a way that will not work cross-device, as well as symlinked into there. I first wanted to put the tmp objects in .git/annex/objects/tmp, but that would pose transition problems on upgrade when partially transferred objects existed. git annex info does not currently show the size of .git/annex/misctemp, since it should stay small. It would also be ok to make something clean it out, periodically.
* fix all remaining -Wall warnings on WindowsGravatar Joey Hess2014-02-25
|
* Preserve metadata when staging a new version of an annexed file.Gravatar Joey Hess2014-02-24
| | | | | | | | | | | | | | | | | Performance impact: When adding a large tree of new files, this needs to do some git cat-file queries to check if any of the files already existed and might need a metadata copy. I tried a benchmark in a copy of my sound repository (so there was already a significant git tree to check against. Adding 10000 small files, with a cold cache: before: 1m48.539s after: 1m52.791s So, impact is 0.0004 seconds per file added. Which seems acceptable, so did not add some kind of configuration to enable/disable this. This commit was sponsored by Lisa Feilen.
* annex.genmetadata can be set to make git-annex automatically set metadata ↵Gravatar Joey Hess2014-02-23
| | | | (year and month) when adding files
* Windows: Avoid using unix-compat's rename, which refuses to rename directories.Gravatar Joey Hess2014-01-29
| | | | Opened a bug about this: https://github.com/jystic/unix-compat/issues/10
* fix inversion of control in CommandSeek (no behavior changes)Gravatar Joey Hess2014-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've been disliking how the command seek actions were written for some time, with their inversion of control and ugly workarounds. The last straw to fix it was sync --content, which didn't fit the Annex [CommandStart] interface well at all. I have not yet made it take advantage of the changed interface though. The crucial change, and probably why I didn't do it this way from the beginning, is to make each CommandStart action be run with exceptions caught, and if it fails, increment a failure counter in annex state. So I finally remove the very first code I wrote for git-annex, which was before I had exception handling in the Annex monad, and so ran outside that monad, passing state explicitly as it ran each CommandStart action. This was a real slog from 1 to 5 am. Test suite passes. Memory usage is lower than before, sometimes by a couple of megabytes, and remains constant, even when running in a large repo, and even when repeatedly failing and incrementing the error counter. So no accidental laziness space leaks. Wall clock speed is identical, even in large repos. This commit was sponsored by an anonymous bitcoiner.
* add: Fix rollback when disk is completely full.Gravatar Joey Hess2014-01-05
| | | | | | | | Noticed that it was possible for add to move a file to .git/annex/objects and not make the link if the disk was full. This happened because the location log update failed, and so addLink never got a chance to run. Running addLink first fixes it; on error it will unwind by moving the file back to where it was originally.
* avoid using Utility.Touch without WITH_CLIBSGravatar Joey Hess2013-11-12
|
* watcher: Avoid loop when adding a file owned by someone else fails in ↵Gravatar Joey Hess2013-11-07
| | | | | | | | indirect mode because its permissions cannot be modified. Adding the file moved it to the annex, and then tried to set the mode. Error unwind then moved the file back, and so the watcher saw the file get deleted and then added back, and so tried again..
* Revert "avoid hsc files on Windows"Gravatar Joey Hess2013-10-17
| | | | | | This reverts commit 699a90bdc195a67c5aa5fca34fcaa07fb2b530ae. My windows build environment was broken; reverted to backup.
* typoGravatar Joey Hess2013-10-17
|