[squeak-dev] Git and Squot questions
bernhard at pieber.com
Mon Apr 15 07:37:35 UTC 2019
Thanks for the detailed explanations. It makes much more sense now.
So in the image working copy you do not differentiate between changes and staged changes like in the normal Git workflow, right?
> Am 11.04.2019 um 18:28 schrieb Jakob Reschke <forums.jakob at resfarm.de>:
> Hi Bernhard,
> Yes, Squot does generally use the image as the (sole) working copy.
> The working copy in the file system is not touched. The repository can be bare (no working copy), but it doesn't have to be. The Git index is also not updated, that's why it shows you that all files were deleted in the file working copy: the index is empty, but the HEAD commit has a filled tree, so the diff is to delete everything. Don't commit that. ;-) To update the file working copy, use git reset or git checkout.
> To edit other files, you should checkout in the file working copy and add and commit them there. The "Unrecorded Files" is a placeholder for all such files (even if there are none).
> !Beware!: Squot does currently not merge these other files because it is not implemented yet at the Smalltalk-Git level! This is one of the issues why I didn't make an official announcement for the tools on the mailing list so far. If you merge in the image, it will currently take the other files from the first parent commit and *forget* those from the other branch (changes, as well as new files or deletions). But it won't lose your Smalltalk code. You'll have to fix up such merges in a file system working copy, or do the merge in the file system if there are no conflicts in the Smalltalk files.
> I got a pull request just today that should amend the problem, but I will not have time to look at it until in a few days.
> Still, the tools make working on Smalltalk code in a Git repository much easier, so these issues are usually worth the trade for the trouble in some situations.
> Squot is built to track other objects than packages as well, so you could track text files as Strings, for example. But I don't recommend it at this time because there are no proper tools for it yet and there are some bugs to be sorted out.
> Best regards,
> Bernhard Pieber <bernhard at pieber.com> schrieb am Do., 11. Apr. 2019, 14:33:
> Hi Jakob,
> Thanks for implementing Squeak support for Git. I have a few ;-) basic questions.
> As a first test I did the following:
> 1. I opened the Git Browser from the Apps menu.
> 2. In the Projects list's context menu I selected New project… > Add new project
> 3. I entered squot-test1 as the project's name.
> 4. I created a new directory in the directory containing the image named squot-test1, selected it and clicked Accept.
> 5. I created a new empty class name BpSquotTest1 in a category with the same name.
> 6. In the Projects list's context menu I selected Change tracked packages.
> 7. In the newly opened window I selected the folder squot-test1and clicked ok.
> 8. In the Git Browser I clicked the Commit Button.
> 9. In the newly opened window I entered a commit message and clicked Commit.
> 10. In the Git Browser's Objects list I now see BpSquotTest1.package and Unrecorded files.
> 11. In a terminal in the squot-test1 directory I executed git status.
> 12. I get the following result:
> MacBookPro1:squot-test1 bernhard$ git status
> On branch master
> Changes to be committed:
> (use "git reset HEAD <file>..." to unstage)
> deleted: .squot
> deleted: BpSquotTest1.package/.filetree
> deleted: BpSquotTest1.package/.squot-contents
> deleted: BpSquotTest1.package/BpSquotTest2.class/README.md
> deleted: BpSquotTest1.package/BpSquotTest2.class/methodProperties.json
> deleted: BpSquotTest1.package/BpSquotTest2.class/properties.json
> deleted: BpSquotTest1.package/monticello.meta/categories.st
> deleted: BpSquotTest1.package/monticello.meta/initializers.st
> deleted: BpSquotTest1.package/properties.json
> 13. I added a new method named one to the class BpSquotTest1.
> 14. I committed the change.
> Here are my questions:
> 1. Did I understand correctly that the Smalltalk image itself is used as the working copy?
> 2. Does that mean that there is no on-disk working tree in Squot and the on-disk repos are bare?
> 3. How do you edit other files then, e.g. a README file?
> 4. What does Unrecorded files mean in step 10?
> 5. Why is repo not clean in step 12? Did I miss a step?
> 6. How do I see that the working copy is not clean after step 13?
> Any help is appreciated.
> - Bernhard
More information about the Squeak-dev