Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commits through Iceberg unstage changes to ‘README.md’ and other files #1691

Open
Rinzwind opened this issue Mar 24, 2023 · 1 comment
Open

Comments

@Rinzwind
Copy link
Contributor

Scenario:

  • In a Pharo 10 image, load PTerm:
    Metacello new
      repository: 'github://lxsang/PTerm';
      baseline: 'PTerm';
      load
  • Using a Terminal window, add a line to ‘README.md’ and add this to the index:
    1
  • In a System Browser window, add a method to the class PTerm:
    printString
      ^ super printString
  • Commit the changes to the PTerm repository through Iceberg
  • Using another Terminal window, check git status again:
    2

The change to ‘README.md’ has been unstaged rather than included in the commit.

I used Pharo 10 here because PTerm doesn’t work in Pharo 11 yet, but the issue applies to Pharo 11 as well.

@Rinzwind
Copy link
Contributor Author

This can be easily fixed by making IceLibgitRepository>>#addFilesToIndex: send #refresh to gitIndex before the send of #addAll:, with LGitIndex>>#refresh implemented as:

refresh

	self withReturnHandlerDo: [ 
		self
			index_read: self
			force: false ]

Then the commit done through Iceberg will include the change to ‘README.md’. It would be nice if the change would also appear in the diff that’s shown before committing. A similar request was made in another issue: #805.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant