Joey Hess
5b74b130a3
refactored and generalized pre-command sanity checking
2011-10-27 16:31:35 -04:00
Joey Hess
6a6ea06cee
rename
2011-10-05 16:02:51 -04:00
Joey Hess
cfe21e85e7
rename
2011-10-04 00:59:08 -04:00
Joey Hess
8ef2095fa0
factor out common imports
...
no code changes
2011-10-03 23:29:48 -04:00
Joey Hess
5ff04bf2af
tweak
2011-09-15 16:59:52 -04:00
Joey Hess
35145202d2
remove command type definitions
...
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.
2011-09-15 16:50:49 -04:00
Joey Hess
9fe3c6d211
clean up params in usage display
2011-09-15 14:33:37 -04:00
Joey Hess
203148363f
split groups of related functions out of Utility
2011-08-22 16:14:12 -04:00
Joey Hess
ded2591124
unannex: Clean up use of git commit -a.
...
This was more complex than would be expected. unannex has to use git commit -a
since it's removing files from git; git commit filelist won't do.
Allow commands to be added to the Git queue that have no associated files,
and run such commands once.
2011-07-14 17:15:37 -04:00
Joey Hess
fb259033d4
Fix locking of files with staged changes.
...
Previously, lock would skip files that had staged changes, but that is
counterintuitive, I think.
2011-05-31 15:00:56 -04:00
Joey Hess
fafe60768f
Massively sped up git annex lock
by avoiding use of the uber-slow git reset
, and only running git checkout
once, even when many files are being locked.
2011-05-31 14:50:41 -04:00
Joey Hess
56bc3e95ca
refactor some boilerplate
2011-05-15 02:02:46 -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
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
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
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
dffe949963
Optimize both pre-commit and lock subcommands.
...
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.
2010-11-11 14:54:29 -04:00
Joey Hess
31101a8b27
use new git function
2010-11-10 14:08:28 -04:00
Joey Hess
2ab448276c
fix handling of staged unlocked files
2010-11-10 13:01:01 -04:00
Joey Hess
536bc97d25
lock and unlock subcommands
2010-11-09 15:59:49 -04:00