✨ Find duplicates across directories.
The new CLI flag --across now lets users list duplicates only if they are found in multiple of the given directories. Closes gh-5. This also removes support for arbitrary arguments to `git annex find`, as we need to know which of the CLI arguments are directories to search in. This might be re-introduced later. Closes gh-4.
This commit is contained in:
parent
77589ebda4
commit
7e80e38918
2 changed files with 61 additions and 17 deletions
20
README.md
20
README.md
|
|
@ -57,19 +57,21 @@ Exclude one or more path patterns with `--exclude`:
|
|||
git-annex-duplicates --exclude '*.iso' --exclude 'archive/**'
|
||||
```
|
||||
|
||||
Additional arguments are passed to `git annex find`. Place `--` before options
|
||||
that belong to `git annex find`, so they are not interpreted as options to
|
||||
`git-annex-duplicates`:
|
||||
Find duplicates in the given directories:
|
||||
|
||||
```sh
|
||||
# Only report duplicates whose content is present in this repository
|
||||
git-annex-duplicates -- --in=here
|
||||
|
||||
# Combine a local exclusion with a git-annex find option
|
||||
git-annex-duplicates --exclude 'archive/**' -- --in=here
|
||||
git-annex-duplicates dir_a/ dir_b/
|
||||
```
|
||||
|
||||
See `git annex find --help` for the available filters.
|
||||
### Finding duplicates across directories
|
||||
|
||||
To find duplicates that are duplicated across directories, use the `--across` flag:
|
||||
|
||||
```sh
|
||||
git-annex-duplicates --across data/ new_data/
|
||||
```
|
||||
|
||||
This will only list duplicate files that are found in more than one of the given directories.
|
||||
|
||||
|
||||
## How it works
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue