assist: operate on all files in working tree by default
Consistency with sync and internal consistency is more important than consistency with the assistant, which is not itself consistent about what it does when run in a subdirectory. Note that with -C, it will still commit staged changes to files outside the directory. Like sync does. Presumably if the user is manually staging things, then running this command, they intend to build up a commit. Sponsored-by: unqueued on Patreon
This commit is contained in:
parent
c4ad9b1446
commit
9ed59dab5b
3 changed files with 33 additions and 8 deletions
|
@ -22,11 +22,13 @@ cmd = withAnnexOptions [jobsOption, backendOption] $
|
|||
|
||||
myseek :: Command.Sync.SyncOptions -> CommandSeek
|
||||
myseek o = startConcurrency transferStages $ do
|
||||
-- Run before prepMerge so it adds only files in the current
|
||||
-- directory and below, not new files elsewhere in the working
|
||||
-- tree.
|
||||
-- Changes to top of repository, so when this is run in a
|
||||
-- subdirectory, it will still default to adding files anywhere in
|
||||
-- the working tree.
|
||||
Command.Sync.prepMerge
|
||||
|
||||
Command.Add.seek Command.Add.AddOptions
|
||||
{ Command.Add.addThese = []
|
||||
{ Command.Add.addThese = Command.Sync.contentOfOption o
|
||||
, Command.Add.batchOption = NoBatch
|
||||
, Command.Add.updateOnly = False
|
||||
, Command.Add.largeFilesOverride = Nothing
|
||||
|
@ -37,5 +39,4 @@ myseek o = startConcurrency transferStages $ do
|
|||
-- Flush added files to index so they will be committed.
|
||||
Annex.Queue.flush
|
||||
|
||||
Command.Sync.prepMerge
|
||||
Command.Sync.seek' o
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue