Commit graph

54 commits

Author SHA1 Message Date
Joey Hess
06ce574136 tweak 2011-08-21 13:17:12 -04:00
Joey Hess
354c5f349b add withTempFile
This is essentially the same as withSystemTempFile from System.IO.Temp,
but that library is not packaged for Debian, and may not be widely used.
I see various other withTempFile implementations here and there, none canonical.
Sigh.
2011-08-16 20:45:58 -04:00
Joey Hess
6a58f61d28 typo 2011-07-16 15:09:57 -04:00
Joey Hess
e784757376 hlint tweaks
Did all sources except Remotes/* and Command/*
2011-07-15 03:12:05 -04:00
Joey Hess
e5ee6508dd use a more specific type for executeFile
Apparently the generic -> IO a type fails with some version of GHC.
Possibly due to System.Posix.Process.executeFile having a more specific
type.
2011-07-04 19:54:46 -04:00
Joey Hess
2cda9d0a0f generalized safeWriteFile to viaTmp 2011-06-30 00:46:39 -04:00
Joey Hess
93a4f3d4e6 Add --debug option. Closes: #627499
This takes advantage of the debug logging done by missingh, and I added
my own debug messages for executeFile calls. There are still some other
low-level ways git-annex runs stuff that are not shown by debugging,
but this gets most of it easily.
2011-05-21 11:52:13 -04:00
Joey Hess
21d9c84e72 more standard names for whenM and unlessM operators
These are defined in ifelse, but it's not currently available and I don't
want to pull in a library for 6 lines of code anyhow.

Also, ifelse sets the fixity to 1, which does not allow >>? error $ ...
2011-05-17 11:45:24 -04:00
Joey Hess
c91929f693 add whenM and unlessM
Just more golfing.. I am pretty sure something in a library somewhere can
do this, but I have been unable to find it.
2011-05-17 03:13:11 -04:00
Joey Hess
760cde28b6 more pointless monadic golfing 2011-05-16 14:49:28 -04:00
Joey Hess
cad0e1c8b7 simplified a bunch of Maybe handling 2011-05-15 03:38:08 -04:00
Joey Hess
b5072b7b4c add boolSystemEnv 2011-04-28 16:08:18 -04:00
Joey Hess
e68f128a9b rsync special remote
Fully tested and working, including resuming and encryption. (Though not
resuming when sending *with* encryption; gpg doesn't produce identical
output each time.)

Uses same layout as the directory special remote and the .git/annex/objects/
directory.
2011-04-27 20:23:09 -04:00
Joey Hess
e433c6f0bb generalized relPathDirTo functions 2011-04-25 13:36:39 -04:00
Joey Hess
89fab6c7b8 refactor 2011-04-17 00:57:29 -04:00
Joey Hess
141e55ff11 store annex.uuid in bup repos 2011-04-09 12:34:49 -04:00
Joey Hess
f005a84e56 add loggedKeys 2011-04-02 15:50:51 -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
4cd96ad2db rename 2011-02-28 16:25:31 -04:00
Joey Hess
fcdc4797a9 use ShellParam type
So, I have a type checked safe handling of filenames starting with dashes,
throughout the code.
2011-02-28 16:18:55 -04:00
Joey Hess
7e5678bcf7 add ShellParam type, for type-checked shell params 2011-02-28 16:10:09 -04:00
Joey Hess
836e71297b Support filenames that start with a dash; when such a file is passed to a utility it will be escaped to avoid it being interpreted as an option. 2011-02-25 01:13:01 -04:00
Joey Hess
dd0f662849 hello, liftM 2011-02-19 17:00:40 -04:00
Joey Hess
27056daccd cleanup last change 2011-01-31 20:15:23 -04:00
Joey Hess
a323463726 add more tests 2011-01-04 21:27:08 -04:00
Joey Hess
5c29bb3b7c git-annex-shell can now be used as a login shell 2010-12-31 20:33:43 -04:00
Joey Hess
aa4f91b2d6 Add trust and untrust subcommands, to allow configuring remotes that are trusted to retain files without explicit checking. 2010-12-28 17:17:02 -04:00
Joey Hess
57305570eb Add uninit subcommand. Closes: #605749 2010-12-03 00:33:41 -04:00
Joey Hess
abf084f628 Bugfix: Always correctly handle gitattributes when in a subdirectory of the repository. 2010-11-28 17:17:18 -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
eeae910242 finished hlinting 2010-11-22 17:51:55 -04:00
Joey Hess
ab55689164 simplifiy 2010-11-17 13:46:50 -04:00
Joey Hess
40a815d873 add unsetFileMode 2010-11-08 17:44:08 -04:00
Joey Hess
c6206c4560 tweak 2010-10-31 22:22:01 -04:00
Joey Hess
d04bfceaad more accurate type 2010-10-31 22:20:07 -04:00
Joey Hess
cf4c926f2e more Wall cleaning 2010-10-31 16:00:32 -04:00
Joey Hess
6a9a9bd5a3 another memory optimisation
This time memory leaked if lots of UUIDs needed to be pretty-printed, as in
a get or drop of many files. Essentially the same strict read buffering
problem that affected the LocationLog underneath though.

uuidMap really could stand to be cached, as the uuid log is read many times
in this case. But it is a fairly edge case.
2010-10-31 01:51:50 -04:00
Joey Hess
e3030196b6 really fix SIGINT handling
Have to completly avoid SIGINT being trapped, which means going very
low-level.
2010-10-29 13:57:22 -04:00
Joey Hess
fde01e52f3 Fix SIGINT handling. 2010-10-29 12:38:41 -04:00
Joey Hess
833d4b342e copyright statements 2010-10-27 16:53:54 -04:00
Joey Hess
f4e2dde8a8 fix perl refugee code 2010-10-22 20:47:14 -04:00
Joey Hess
91e6625eb5 add shellEscape
ugly, but sometimes necessary

There is a haskell shell-escape module, but it is not packaged in Debian
2010-10-22 14:57:02 -04:00
Joey Hess
7afac11344 add boolSystem 2010-10-19 01:45:45 -04:00
Joey Hess
e80160380a now finds files in git or not depending on what command wants 2010-10-16 14:58:35 -04:00
Joey Hess
1260adbd77 basic recursion done; skipping git stuff still todo 2010-10-16 13:38:59 -04:00
Joey Hess
23f95ac6df use some library functions
retry with a bugfix
2010-10-15 19:01:20 -04:00
Joey Hess
0989dd2694 Revert "use some library functions"
This reverts commit 8e742bd89e.

meh?
2010-10-15 18:58:26 -04:00
Joey Hess
8e742bd89e use some library functions 2010-10-15 18:24:31 -04:00
Joey Hess
e577656fea relative link fix 2010-10-15 16:09:30 -04:00
Joey Hess
77d052af3c fix parentDir to work for relative too 2010-10-13 01:49:21 -04:00