planetscale / ghcommit-action

GitHub Action to commit files to a git branch using the ghcommit utility
Apache License 2.0
30 stars 4 forks source link

fix: inverted old/new filename detection in rename handling #13

Closed joemiller closed 1 year ago

joemiller commented 1 year ago

fix: inverted old/new filename detection in rename handling

git status reverses the order of filenames when the -z option is used and I didn't notice this while writing the rename handler

$ git mv README.md README.md.new

$ g status -s --porcelain=v1 -- .
R  README.md -> README.md.new

$ g status -s --porcelain=v1 -z -- . | cat -tve
R  README.md.new^@README.md^@