feature: merge conflict detection and resolution (#6)

- pulls now correctly identify merge conflicts and enter a merge state
- user resolves each file individually
- commit resolve merge state
- allows users to keep custom changes and pull in updates
- improve commit message component
- seperated commit / add functionality
This commit is contained in:
Sam Chau
2024-11-18 08:30:42 +10:30
committed by Sam Chau
parent 6afb274e41
commit ca84a1c95b
45 changed files with 4102 additions and 1444 deletions

View File

@@ -1,10 +1,10 @@
# git/operations/commit.py
import git
import logging
logger = logging.getLogger(__name__)
def commit_changes(repo_path, files, message):
try:
repo = git.Repo(repo_path)
@@ -13,4 +13,4 @@ def commit_changes(repo_path, files, message):
return True, "Successfully committed changes."
except Exception as e:
logger.error(f"Error committing changes: {str(e)}", exc_info=True)
return False, f"Error committing changes: {str(e)}"
return False, f"Error committing changes: {str(e)}"