mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
feat: Convert commit_before_message to a list and append head before each message
This commit is contained in:
parent
43587304a6
commit
a75ed2728c
1 changed files with 3 additions and 5 deletions
|
@ -72,7 +72,7 @@ class Coder:
|
||||||
test_outcome = None
|
test_outcome = None
|
||||||
multi_response_content = ""
|
multi_response_content = ""
|
||||||
partial_response_content = ""
|
partial_response_content = ""
|
||||||
commit_before_message = None
|
commit_before_message = []
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(
|
def create(
|
||||||
|
@ -670,9 +670,7 @@ class Coder:
|
||||||
self.test_outcome = None
|
self.test_outcome = None
|
||||||
self.edit_outcome = None
|
self.edit_outcome = None
|
||||||
if self.repo:
|
if self.repo:
|
||||||
self.commit_before_message = self.repo.get_head()
|
self.commit_before_message.append(self.repo.get_head())
|
||||||
else:
|
|
||||||
self.commit_before_message = None
|
|
||||||
|
|
||||||
def run(self, with_message=None):
|
def run(self, with_message=None):
|
||||||
try:
|
try:
|
||||||
|
@ -1661,7 +1659,7 @@ class Coder:
|
||||||
def show_undo_hint(self):
|
def show_undo_hint(self):
|
||||||
if not self.commit_before_message:
|
if not self.commit_before_message:
|
||||||
return
|
return
|
||||||
if self.commit_before_message != self.repo.get_head():
|
if self.commit_before_message[-1] != self.repo.get_head():
|
||||||
self.io.tool_output("You can use /undo to undo and discard each aider commit.")
|
self.io.tool_output("You can use /undo to undo and discard each aider commit.")
|
||||||
|
|
||||||
def dirty_commit(self):
|
def dirty_commit(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue