Add staging, tags, remotes, three-way merges, fsck and expand CLI#12
Open
WorkofAditya wants to merge 1 commit into
Open
Add staging, tags, remotes, three-way merges, fsck and expand CLI#12WorkofAditya wants to merge 1 commit into
WorkofAditya wants to merge 1 commit into
Conversation
This file contains hidden or 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
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.
Motivation
add,reset,revert,tag,fetch/push/pull,clone, and merge lifecycle commands (--continue/--abort).Description
.leaf/index.jsonand.leaf/MERGE_STATE.jsonand add helper APIs inModules/storage.py(load_index,save_index,load_merge_state,save_merge_state,clear_merge_state, etc.).parentsarrays, create full snapshot for the first commit, support staged commits (apply index to base state), and write commit objects and states via_create_commit,_write_commit_files, and related helpers inModules/commands.py.leaf_merge,leaf_merge_continue, andleaf_merge_abort, plus helper merge functions andfind_merge_baseinModules/graph.py.leaf_addandleaf_reset, tagging withleaf_tag, local remotes withleaf_remote/leaf_fetch/leaf_push/leaf_pull,leaf_clone,leaf_revert, andleaf_fsckfor repository integrity checks, and wire them into the CLI entrypoint (leaf)._atomic_json_save) and robust loaders (_load_json,safe_load_log) and improve rebuild logic (first_parent_chain) and working-tree write error handling.Testing
tests/test_leaf_cli.pyexercising init/save/branch/checkout/fast-forward and three-way merges, conflict handling (--continue/--abort), staging, reset, tag, revert, fsck, and remote fetch/push/pull/clone workflows.pytest(including the newtests/test_leaf_cli.py) and all tests completed successfully.Codex Task