{"thread":{"id":"58959","subject":"Commiting old version of file introduces other files to commit","startedAt":"2022-12-15T18:03:35Z","lastAt":"2022-12-15T18:03:35Z","messageCount":1,"participants":["Roger Rohrbach"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"469138","messageId":"2AA962BD-8AB4-4DEE-A56E-5C10DE7FDE3F@ecstaticsignal.com","threadId":"58959","inReplyTo":null,"subject":"Commiting old version of file introduces other files to commit","fromName":"Roger Rohrbach","fromEmail":"roger@ecstaticsignal.com","sentAt":"2022-12-15T17:55:02Z","receivedAt":"2022-12-15T18:03:35Z","isPatch":false,"sender":{"key":"roger@ecstaticsignal.com","avatar":null},"body":"My commit changed one file, and deleted another:\n \n    commit 5ad22bab408029fde463eae0354becfee702c89b\n    Author: Roger Rohrbach <rrohrbach@bepress.com>\n    Date:   Fri Dec 9 20:43:04 2022 -0800\n \n        Automatically disallow robots for ringfenced site\n \n        As a side effect of setting \"Ringfence this site\" to \"Yes,\" install a\n        Robots Exclusion Protocol file (overwriting any existing one) that\n        disallows all robots.\n \n        Also remove unused static robots.txt file with same rules, to avoid\n        confusion.\n \n    diff --git a/opt/bepress/share/robots.txt b/opt/bepress/share/robots.txt\n    deleted file mode 100644\n    index 6ffbc308f7..0000000000\n    --- a/opt/bepress/share/robots.txt\n    <diffs redacted>\n    diff --git a/perllib/Site.pm b/perllib/Site.pm\n    index b531e6dade..671d2f0a97 100644\n    --- a/perllib/Site.pm\n    +++ b/perllib/Site.pm\n    <diffs redacted>\n \nI needed to revert the change to the first file, but wished not to restore the deleted file.  So, instead of 'git revert 5ad22ba', I did this:\n \n    # Check out the version of the file immediately preceding my commit:\n    git checkout 68e2db7 perllib/Site.pm\n    # Commit it:\n    git commit -m \"Back out Site.postsave installation of robots.txt\"\n \nImagine my surprise when this introduced two additional files to the commit:\n \n    [DCIR-188-3 1daac3bdf0] Back out Site.postsave installation of robots.txt\n    3 files changed, 3 insertions(+), 20 deletions(-)\n    create mode 100644 opt/bepress/share/robots.txt\n    delete mode 100644 perllib/.htaccess\n \nNot only did this restore the file I was taking pains not to restore; it arbitrarily deleted another file I'd never touched.\n \nIs this some weird hash collision problem?\n\n\n"}]}