-
Notifications
You must be signed in to change notification settings - Fork 79
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
feat: add flag to prevent HEAD updates on commit #147
Open
ezyang
wants to merge
3
commits into
gh/ezyang/106/base
Choose a base branch
from
gh/ezyang/106/head
base: gh/ezyang/106/base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ezyang
added a commit
that referenced
this pull request
Mar 21, 2025
Add a flag to codemcprc that makes it so that whenever we commit changes we don't actually update the HEAD pointer, so we make a commit and we still report it to the user in the output as we do before, but we don't actually edit the working tree. Look at the files in codemcp that have "git" in their name. ```git-revs df59648 (Base revision) 06dc3d8 Add prevent_head_updates configuration option with default value of False d29bdf5 Add get_prevent_head_updates to __all__ 9b826af Add get_prevent_head_updates function 57885bd Import get_prevent_head_updates from config 646d9dd Check prevent_head_updates flag before updating HEAD in create_commit_reference 3b9a47b Update commit_changes to use low-level Git plumbing commands when prevent_head_updates is enabled 3059d51 Update return message and handle the new commit hash when prevent_head_updates is enabled 1042852 Update README.md to document the new prevent_head_updates configuration option f12cc63 Add git.prevent_head_updates to main configuration example in README HEAD Auto-commit format changes ``` codemcp-id: 162-feat-add-flag-to-prevent-head-updates-on-commit ghstack-source-id: 36372568da044fc04e4061702e83f7c42b8c72ba Pull-Request-resolved: #147
ezyang
added a commit
that referenced
this pull request
Mar 21, 2025
Add a flag to codemcprc that makes it so that whenever we commit changes we don't actually update the HEAD pointer, so we make a commit and we still report it to the user in the output as we do before, but we don't actually edit the working tree. Look at the files in codemcp that have "git" in their name. ```git-revs df59648 (Base revision) 06dc3d8 Add prevent_head_updates configuration option with default value of False d29bdf5 Add get_prevent_head_updates to __all__ 9b826af Add get_prevent_head_updates function 57885bd Import get_prevent_head_updates from config 646d9dd Check prevent_head_updates flag before updating HEAD in create_commit_reference 3b9a47b Update commit_changes to use low-level Git plumbing commands when prevent_head_updates is enabled 3059d51 Update return message and handle the new commit hash when prevent_head_updates is enabled 1042852 Update README.md to document the new prevent_head_updates configuration option f12cc63 Add git.prevent_head_updates to main configuration example in README 03eb678 Auto-commit format changes 258d683 Rename prevent_head_updates to disable_git_commit in DEFAULT_CONFIG f7d6d4c Rename get_prevent_head_updates to get_disable_git_commit in __all__ f67a453 Rename get_prevent_head_updates to get_disable_git_commit function 6f38f21 Update import statement to use get_disable_git_commit instead of get_prevent_head_updates fdb2661 Update variable name from prevent_head_updates to disable_git_commit in create_commit_reference 38f698e Update variable name from prevent_head_updates to disable_git_commit in commit_changes function 6c63863 Update variable name from prevent_head_updates to disable_git_commit and improve success message fac5d7a Update README.md to document the renamed disable_git_commit configuration option HEAD Update project configuration example to use the new disable_git_commit option name ``` codemcp-id: 162-feat-add-flag-to-prevent-head-updates-on-commit ghstack-source-id: 020643dbf3091de7d4c48a3f1c9334b725d4763f Pull-Request-resolved: #147
ezyang
added a commit
that referenced
this pull request
Mar 22, 2025
Add a flag to codemcprc that makes it so that whenever we commit changes we don't actually update the HEAD pointer, so we make a commit and we still report it to the user in the output as we do before, but we don't actually edit the working tree. Look at the files in codemcp that have "git" in their name. ```git-revs df59648 (Base revision) 06dc3d8 Add prevent_head_updates configuration option with default value of False d29bdf5 Add get_prevent_head_updates to __all__ 9b826af Add get_prevent_head_updates function 57885bd Import get_prevent_head_updates from config 646d9dd Check prevent_head_updates flag before updating HEAD in create_commit_reference 3b9a47b Update commit_changes to use low-level Git plumbing commands when prevent_head_updates is enabled 3059d51 Update return message and handle the new commit hash when prevent_head_updates is enabled 1042852 Update README.md to document the new prevent_head_updates configuration option f12cc63 Add git.prevent_head_updates to main configuration example in README 03eb678 Auto-commit format changes 258d683 Rename prevent_head_updates to disable_git_commit in DEFAULT_CONFIG f7d6d4c Rename get_prevent_head_updates to get_disable_git_commit in __all__ f67a453 Rename get_prevent_head_updates to get_disable_git_commit function 6f38f21 Update import statement to use get_disable_git_commit instead of get_prevent_head_updates fdb2661 Update variable name from prevent_head_updates to disable_git_commit in create_commit_reference 38f698e Update variable name from prevent_head_updates to disable_git_commit in commit_changes function 6c63863 Update variable name from prevent_head_updates to disable_git_commit and improve success message fac5d7a Update README.md to document the renamed disable_git_commit configuration option 0183bf5 Update project configuration example to use the new disable_git_commit option name c75efb9 Create tests for the disable_git_commit configuration option 9728c06 Fix test_disable_git_commit_behavior to correctly mock the config function 3e69eaa Update test_subsequent_edits_with_disable_git_commit to use the same mock approach 82a4716 Rewrite test file with a direct function mocking approach for disable_git_commit 6b90392 Add better debugging to call_tool_with_disable_git_commit helper method 5f43656 Add better error message for the assertion 93c7871 Add direct printing of debug information 44d09c5 Add more flexible checking for result text and don't fail the test yet 7962830 Add sys module for debug prints bae2638 Add debug print in first place where disable_git_commit is checked 13304d4 Add debug print in second place where disable_git_commit is checked 993f45b Update test_disable_git_commit_behavior to directly modify config.DEFAULT_CONFIG 01d4f8a Clean up and simplify tests to use direct config modification approach adc19b1 Add debug prints for HEAD commit message after InitProject ca25b51 Move InitProject before enabling disable_git_commit 2f5628e Fix indentation of test operations to stay within try/finally and async with blocks 4dce507 Add virtual-head reference creation 1f46f51 Add imports for get_disable_git_commit and sys for debug prints 2c240b1 Modify get_head_commit_chat_id to check virtual-head reference when disable_git_commit is enabled a9e5d65 Modify get_head_commit_hash to check virtual-head reference when disable_git_commit is enabled d2a97ea Modify get_head_commit_message to check virtual-head reference when disable_git_commit is enabled da1b3a0 Update create_commit_reference to also update virtual-head reference when disable_git_commit is enabled b46ae16 Update test file to test the virtual-head reference c797b7e Improve handling of virtual-head reference in commit_changes HEAD Auto-commit format changes ``` codemcp-id: 162-feat-add-flag-to-prevent-head-updates-on-commit ghstack-source-id: f0cabf687baf9ae0852e2ce08855b23df83cf1d1 Pull-Request-resolved: #147
This was referenced Mar 22, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Add a flag to codemcprc that makes it so that whenever we commit changes we don't actually update the HEAD pointer, so we make a commit and we still report it to the user in the output as we do before, but we don't actually edit the working tree. Look at the files in codemcp that have "git" in their name.
codemcp-id: 162-feat-add-flag-to-prevent-head-updates-on-commit