recompute closer to working properly

Proper behavior without --others implemented.

And eliminated most of the code duplication through refactoring.

Also, changed it to not stage recomputed files. This way, git diff will
show files that have differences.
This commit is contained in:
Joey Hess 2025-02-26 15:51:31 -04:00
parent 53d107ca47
commit d6a010a615
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 81 additions and 113 deletions

View file

@ -11,12 +11,12 @@ git-annex recompute [path ...]`
This updates computed files that were added with
[[git-annex-addcomputed]](1).
When the output of the computation is different, the updated computed
file is staged in the repository.
By default, this only recomputes files whose input files have changed.
The new contents of the input files are used to re-run the computation.
When the output of the computation is different, the computed file is
updated with the new content.
# OPTIONS
* `--original`
@ -26,7 +26,7 @@ The new contents of the input files are used to re-run the computation.
* `--others`
When recomputing one file also generates new versions of other files,
stage those other files in the repository too.
update those other files too.
* `--unreproducible`, `-u`