diff options
-rw-r--r-- | Command/Unused.hs | 24 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | doc/git-annex.mdwn | 5 | ||||
-rw-r--r-- | doc/special_remotes.mdwn | 6 |
4 files changed, 15 insertions, 24 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs index 535b9b33e..803debef8 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -112,21 +112,8 @@ staleBadMsg t = unlines $ unusedMsg :: [(Int, Key)] -> String unusedMsg u = unusedMsg' u - ["Some annexed data is no longer used by any files in the current branch:"] - [dropMsg Nothing, - "Please be cautious -- are you sure that another branch, or another", - "repository does not still use this data?"] - -remoteUnusedMsg :: Remote.Remote Annex -> [(Int, Key)] -> String -remoteUnusedMsg r u = unusedMsg' u - ["Some annexed data on " ++ name ++ - " is not used by any files in the current branch:"] - [dropMsg $ Just r, - "Please be cautious -- Are you sure that the remote repository", - "does not use this data? Or that it's not used by another branch?"] - where - name = Remote.name r - + ["Some annexed data is no longer used by any files:"] + [dropMsg Nothing] unusedMsg' :: [(Int, Key)] -> [String] -> [String] -> String unusedMsg' u header trailer = unlines $ header ++ @@ -134,6 +121,13 @@ unusedMsg' u header trailer = unlines $ ["(To see where data was previously used, try: git log --stat -S'KEY')"] ++ trailer +remoteUnusedMsg :: Remote.Remote Annex -> [(Int, Key)] -> String +remoteUnusedMsg r u = unusedMsg' u + ["Some annexed data on " ++ name ++ " is not used by any files:"] + [dropMsg $ Just r] + where + name = Remote.name r + dropMsg :: Maybe (Remote.Remote Annex) -> String dropMsg Nothing = dropMsg' "" dropMsg (Just r) = dropMsg' $ " --from " ++ Remote.name r diff --git a/debian/changelog b/debian/changelog index 4807956ad..4bc442d51 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,10 @@ git-annex (3.20110916) UNRELEASED; urgency=low * Note that this is a behavior change for git-annex find! Old behavior can be gotten by using: git-annex find --in . * status: Massively sped up; remove --fast mode. + * unused: File contents used by branches and tags are no longer + considered unused, even when not used by the current branch. This is + the final piece of the puzzle needed for git-annex to to play nicely + with branches. -- Joey Hess <joeyh@debian.org> Sun, 18 Sep 2011 18:25:51 -0400 diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index 59da9dd8c..714f23bef 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -182,12 +182,11 @@ subdirectories). * unused Checks the annex for data that does not correspond to any files present - in the currently checked out branch, and prints a numbered list of the data. + in any tar or branch, and prints a numbered list of the data. To only show unused temp and bad files, specify --fast - To check data on a remote that does not correspond to any files present - on the locally checked out branch, specify --from. + To check for annexed data on a remote, specify --from. * dropunused [number ...] diff --git a/doc/special_remotes.mdwn b/doc/special_remotes.mdwn index 55cd1f1a0..ddb2fd125 100644 --- a/doc/special_remotes.mdwn +++ b/doc/special_remotes.mdwn @@ -29,11 +29,5 @@ on special remotes, instead use `git annex unused --from`. Example: 1 WORM-s3-m1301674316--foo (To see where data was previously used, try: git log --stat -S'KEY') (To remove unwanted data: git-annex dropunused --from mys3 NUMBER) - Please be cautious -- are you sure that the remote repository - does not use this data? $ git annex dropunused --from mys3 1 dropunused 12948 (from mys3...) ok - -Do be cautious when using this; it cannot detect if content in a remote -is used by that remote, or is the last copy of data that is used by -some *other* remote. |