dharple / detox

Tames problematic filenames
BSD 3-Clause "New" or "Revised" License
332 stars 19 forks source link

add --git option to issue git mv instead of mv #110

Closed aberezin-fti closed 7 months ago

aberezin-fti commented 9 months ago

When renaming under a git repo, it would be cleaner to issue a git mv instead of a /bin/mv . Adding a --git option would achieve this. A work around now is to issue a detox -n and then use that output to construct a set of git mv commands.

dharple commented 7 months ago

Thank you for your feedback, but I won't be doing this. The code doesn't use the system command mv; instead it uses the system function rename().

That said, you might be able to work around this by running detox and then running git add -A. git is decent about finding moved files.

aubertc commented 6 days ago

git add -A can get really messy, and I would have loved to see this solution implemented as well. I didn't find a better solution yet but will post here if I do.