koog1000 / vscode-fossil

Integrated Fossil source control for Visual Studio Code
Other
68 stars 8 forks source link

Cannot commit #6

Closed jungle-boogie closed 5 years ago

jungle-boogie commented 5 years ago

Hi,

Thought I would open an issue instead of making the fossil thread longer and longer.

So I originally thought this issue https://www.fossil-scm.org/forum/forumpost/40d409a0d5 was specific to Windows. However, even on a ASCII file, I cannot commit with fossil extension 0.0.8 on Linux.

Replication steps:

  1. init a new repo
  2. Create a blank file
  3. Type some stuff in in
  4. Notice the extension notices the changes
  5. Click on the checkbox under the SCM tab
  6. Type a commit message
  7. Press enter (as explained by the text below the commit message)
  8. VS Code displays: There are no changes to commit.

Expected results: commit to happen and for fossil timeline in the terminal to show new new output.

How have you committed to the fossil repo using VS Code?

koog1000 commented 5 years ago

Ahhh, I see. So, I have implemented a 'staging' group (similar to Git). Effectively, the extension uses the ?FILE...? option to only commit specific files, and those are the files in the 'staging' group. I didn't have this functionality at first, but quickly realized that in my normal workflow I routinely make partial commits by specifying the file names on the command line. This partial commit is basically the same as the staging area in Git so I implemented that same functionality. I think it is more natural for people coming from Git and allows for more flexibility in the Fossil extension.

That being said, this does highlight another issue. There is a Fossil: Commit All command that any reasonable person would assume commits everything, but still only commits staged files. So I'll make a bugfix for that.

Additionally, I can add a setting that would make the default Fossil: Commit and Fossil: Commit Staged actually run a Fossil: Commit All. This settings would be off by default but would provide users who want that behavior to use it.

jungle-boogie commented 5 years ago

Ah, thanks for the explanation! I had seen stage and read a little about it on the forum, but didn't try it out. I was confusing it with stash - whoops!

jungle-boogie commented 5 years ago

Yes! Staging, then committing does indeed work!

koog1000 commented 5 years ago

Ok, latest release v0.0.9 [a281332854bfb22479459544559af90856cda3a9] fixes the Commit All command.

Also, if you try to commit without staged changes the extension will show a warning and ask if you want to commit the working changes. I decided I like this approach better than adding a setting to always commit all.

jungle-boogie commented 5 years ago

Awesome. Thanks for updating it and explaining the stage process to me.

warning and ask if you want to commit the working changes. I decided I like this approach better than adding a setting to always

Yes, I think that's a good approach, one less config option to enable/disable.

koog1000 commented 5 years ago

Yeah definitely. Thanks for the feedback.