[FIXED] [Beta] Incorrectly amending commits

Admin note: Moved from [Beta] Do not AutoCommit changes - #11

This request seemed to be (partially?) implemented in the Beta editor for me yesterday. I noticed that (sometimes, at least) if I started editing from a previously auto-saved commit, I would find myself “editing” that commit rather than working on a new commit. So I would have a chance to name the commit when finished, and the old auto-saved name would be gone from the commit history.

However, in at least one instance, I’m pretty sure a manually-named commit was overwritten in this way, which was a little scary. The changes were not lost, but they got combined into what I had intended to be a distinct, subsequent commit.
edit: Something like this happened again just now :grimacing:, but (this time, at least) there was more to it than I previously realized. Here’s the git history I ended up with: (The requests branch and the commit tagged ‘anvil-preserved/128’ are irrelevant to my story, and you can also ignore the published branch.)


Here’s how I got there:

  1. Working on the master branch, I manually saved the “Reduce MatchForm doorbell volume” commit.
  2. Then I manually saved the “Add MobileAlert note re ping” commit.
  3. Deciding to abandon that commit, I right-clicked on the “Reduce MatchForm doorbell volume” commit and selected “Reset ‘master’ branch to here.”
  4. Then I started making a new change in the IDE. When I went to commit the changes, I found that the “Reduce MatchForm doorbell volume” change was now included in the current “editing” commit. At first I thought that commit message had been lost, squashed into the current “editing” commit. So I included note of it in my new commit message. (I then noticed the original doorbell commit message had been preserved in an abandoned branch marked ‘anvil-preserved/129’. To reiterate, I am 100% sure I did not re-make the doorbell volume change after step 3. But for some reason, the IDE decided to rearrange things in this way.)
1 Like

It seems like they are implementing this feature, but maybe struggling a bit on how to check when to amend and when not to.

I had something similar recently, when I got an empty commit, but I think it was a bug when I commit at the same time the IDE auto-commit.

1 Like

@hugetim I am consistently reproducing what happened to you right now.

  1. I made a manual commit;
  2. Edited something;
  3. The previous commit is now reopened.

I think maybe this happens when you edit something in between 15m from the last commit (guessing from the previous auto-commit every 15m withou using the editor)?

Edit: ok, new information: this only happens in the master branch, but happens always, which is really bad. I changed to a new branch, commit there, went back and edited and sure enough the commit was amended.

1 Like

This just happened to me. I made a change in a different branch and manually committed it. I then reset ‘master’ to that commit. Then two days later I starting making an edit on the master branch, and that two-day-old commit was amended to the edit.

1 Like

Yeah… I think this kind of need to be split into a bug report or something, 'cause this is way too dangerous to stay happening.

2 Likes

Hi all,

Thanks very much for letting us know about this bug. We’ve now deployed a fix - please let us know if you continue to see the issue!

3 Likes