Commit graph

108 commits

Author SHA1 Message Date
Joey Hess
b3aaf980e4 --force will cause add, etc, to operate on ignored files. 2011-06-29 11:42:00 -04:00
Joey Hess
9e37898e21 remove stateDir 2011-06-23 08:48:13 -04:00
Joey Hess
703c437bd9 rename modules for data types into Types/ directory 2011-06-01 21:56:04 -04:00
Joey Hess
a19d81a42e show error message on unexpected parameters to commands that take none
Before it would exit nonzero w/o doing anything, which was confusing.
2011-05-28 20:02:43 -04:00
Joey Hess
8a4a3be9f6 simplify 2011-05-28 16:09:11 -04:00
Joey Hess
001edb008a Fix bug in --exclude introduced in 0.20110516. 2011-05-27 20:20:20 -04:00
Joey Hess
ceff04ff3e better multiword parameter handling
This way, individual words as entered on the command line are available
to commands.
2011-05-16 12:25:54 -04:00
Joey Hess
3e15a8a791 Maybe reduction pass 2 2011-05-15 12:25:58 -04:00
Joey Hess
cad0e1c8b7 simplified a bunch of Maybe handling 2011-05-15 03:38:08 -04:00
Joey Hess
efa7f54405 cleanup 2011-05-15 02:15:24 -04:00
Joey Hess
56bc3e95ca refactor some boilerplate 2011-05-15 02:02:46 -04:00
Joey Hess
b1db436816 started on initremote 2011-03-28 23:22:31 -04:00
Joey Hess
c1dc407941 Fix space leak in fsck and drop commands.
The space leak was somehow caused by this line:

	absfiles <- mapM absPath files

I confess, I don't quite understand why this caused bad buffering,
but apparently the whole pipeline from git-ls-files backed up at that
point.

Happily, rewriting the code to only get the cwd once and use a pure
function to calculate absfiles clears it up, and should be a little more
efficient in syscalls too.
2011-03-22 20:31:22 -04:00
Joey Hess
140a351fc5 avoid version check before running version and upgrade commands
There are two types of commands; those that access the repository and those
that don't. Sorted.
2011-03-19 18:58:49 -04:00
Joey Hess
9d24cc7bdb make commands that take a key as a parameter error if it's bad 2011-03-15 22:46:47 -04:00
Joey Hess
2e1cc2f8b9 fixed dropkey, setkey, and git-annex-shell subcommands
key is now specified as the full key, no --backend needed
2011-03-15 22:42:34 -04:00
Joey Hess
da504f647f fromkey, and url backend download work now 2011-03-15 22:28:18 -04:00
Joey Hess
4594bd51c1 rename file 2011-03-15 22:04:50 -04:00
Joey Hess
9d49fe2c17 first pass at using new keys
It compiles. It sorta works. Several subcommands are FIXME marked and
broken, because things that used to accept separate --backend and --key
params need to be changed to accept just a --key that encodes all the key
info, now that there is metadata in keys.
2011-03-15 21:34:13 -04:00
Joey Hess
41d5c4acf6 shorten a help string to avoid column getting too wide 2011-03-05 17:05:19 -04:00
Joey Hess
657395b628 add describe subcommand 2011-03-03 17:21:00 -04:00
Joey Hess
b88637fff1 prevent trust commands from trying to do things in a bare repo
Since they need to stage changes, they would actually, if allowed to run,
succeed, but wipe out existing trust.log content.
2011-03-03 16:22:53 -04:00
Joey Hess
dd0f662849 hello, liftM 2011-02-19 17:00:40 -04:00
Joey Hess
0e7984a793 add check for unclean tree 2011-02-01 22:02:19 -04:00
Joey Hess
27056daccd cleanup last change 2011-01-31 20:15:23 -04:00
Joey Hess
37c62eebb7 Preserve specified file ordering when instructed to act on multiple files or directories. 2011-01-31 20:06:34 -04:00
Joey Hess
53677d7647 tweak 2011-01-30 00:08:17 -04:00
Joey Hess
6d3df8a083 more pure code refactoring 2011-01-29 23:56:40 -04:00
Joey Hess
4f9336bb60 idiom 2011-01-27 17:58:30 -04:00
Joey Hess
167523f09d better directory handling
Rename Locations functions for better consitency, and make their values
more consistent too.

Used </> rather than manually building paths. There are still more places
that manually do so, but are tricky, due to the behavior of </> when
the second FilePath is absolute. So I only changed places where
it obviously was relative.
2011-01-27 17:00:32 -04:00
Joey Hess
6be516ae3b use isPrefixOf 2011-01-27 16:31:29 -04:00
Joey Hess
6a97b10fcb rework config storage
Moved away from a map of flags to storing config directly in the AnnexState
structure. Got rid of most accessor functions in Annex.

This allowed supporting multiple --exclude flags.
2011-01-26 00:17:38 -04:00
Joey Hess
109a719b03 parameterize Backend type
This allows the Backend type to not depend on the Annex type, and
so the Annex type can later be moved out of TypeInternals.
2011-01-25 21:02:34 -04:00
Joey Hess
23686cc63d clarify default values when no path is specified
Much of the code to handle this was unnecessary, as git ls-files is used,
and defaults to returning all files of the desired type.
2011-01-13 23:36:58 -04:00
Joey Hess
c2b13a88bf use concat 2011-01-09 18:23:58 -04:00
Joey Hess
a78b0555e1 New migrate subcommand can be used to switch files to using a different backend, safely and with no duplication of content. 2011-01-08 15:54:14 -04:00
Joey Hess
a89a6f2114 refactor in preparation for adding a git-annex-shell command 2010-12-30 15:06:26 -04:00
Joey Hess
6a5be9d53c rename some stuff and prepare to break out more into Command/* 2010-12-30 14:19:16 -04:00
Joey Hess
346c7a0257 Avoid multiple calls to git ls-files when passed eg, "*". 2010-12-23 21:58:58 -04:00
Joey Hess
77e52a52dd Bugfix to git annex add of an unlocked file in a subdir. Closes: #606579 2010-12-11 17:14:54 -04:00
Joey Hess
f8851aad66 use Text.Regex.PCRE.Light.Char8 rather than Text.Regexp
Text.Regexp does not think that á matches . -- seems to be a unicode
problem.
2010-12-08 14:48:10 -04:00
Joey Hess
2099407d8a Add --exclude option to exclude files from processing.
Required some lifting so flags are evaled in the Annex monad before
file filtering.
2010-12-08 14:07:49 -04:00
Joey Hess
653ad35a9f In .gitattributes, the git-annex-numcopies attribute can be used to control the number of copies to retain of different types of files. 2010-11-28 15:28:20 -04:00
Joey Hess
92e5d28ca8 precommit: Optimise to avoid calling git-check-attr more than once. 2010-11-28 14:21:30 -04:00
Joey Hess
57adb0347b hlint tweaks
Remotes.hs next, and also Backend/* and Command/*
2010-11-22 15:46:57 -04:00
Joey Hess
748a7475bb dropunused 2010-11-15 18:04:19 -04:00
Joey Hess
27ffa0e86f comment 2010-11-14 14:58:42 -04:00
Joey Hess
a5c4dd9743 find: New subcommand. 2010-11-14 12:35:05 -04:00
Joey Hess
19ee56559a better fsck file handling 2010-11-13 16:15:45 -04:00
Joey Hess
498c8e8544 fsck: avoid global checks if files specified 2010-11-13 16:03:25 -04:00
Joey Hess
5fa25a812a fsck improvements
* fsck: Check if annex.numcopies is satisfied.
* fsck: Verify the sha1 of files when the SHA1 backend is used.
* fsck: Verify the size of files when the WORM backend is used.
* fsck: Allow specifying individual files to fsk if fscking everything
  is not desired.
* fsck: Fix bug, introduced in 0.04, in detection of unused data.
2010-11-13 14:59:27 -04:00
Joey Hess
da0de293d1 refactor param seeking 2010-11-11 18:54:52 -04:00
Joey Hess
ce62f5abf1 rework command dispatching for add and pre-commit
Both subcommands do two different operations on different sets of files, so
allowing a subcommand to perform a list of operations cleans things up.
2010-11-11 17:58:55 -04:00
Joey Hess
070e8530c1 refactoring, no code changes really 2010-11-08 15:15:21 -04:00
Joey Hess
016b6a59e7 add fsck subcommand (stub) 2010-11-06 17:06:59 -04:00
Joey Hess
cc4794ce85 support subcommands that take no params 2010-11-04 13:37:06 -04:00
Joey Hess
df4b461df1 refactor 2010-11-04 13:28:49 -04:00
Joey Hess
0eae5b806c broke subcommands out into separate modules 2010-11-02 19:04:24 -04:00