ontodev / cogs

COGS Operates Google Sheets
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

Fix behavior on renamed sheets #125

Closed beckyjackson closed 3 years ago

beckyjackson commented 3 years ago

While making the fix in #124, I noticed some weird behavior with status on renaming sheets, both locally and remotely... this sent me down a bit of a rabbit hole. COGS wasn't properly displaying the rename and could cause exceptions when you tried to pull or merge (for remote renames) or push (for local renames).

I tested this a couple times and it seems to now behave like we expect. Running cogs status will show you what's renamed. If you have a remote rename and run cogs pull or cogs merge, the local sheet title will be updated. If you have a local rename (using cogs mv) and run cogs push, the remote sheet title will be updated.

I also ran black over the code so the following files only have formatting changes: