Skip to content

Fix staged file deletion flag display in commit workflow#51

Merged
kagami-l merged 3 commits intomainfrom
hotfix/git-staged-deletion-flag-#197
Jan 25, 2024
Merged

Fix staged file deletion flag display in commit workflow#51
kagami-l merged 3 commits intomainfrom
hotfix/git-staged-deletion-flag-#197

Conversation

@yangbobo2021
Copy link
Copy Markdown
Contributor

@yangbobo2021 yangbobo2021 commented Jan 23, 2024

This PR adds a visual indicator for the modification status of each staged file, particularly to show a deletion flag (D) when files are marked for deletion, in order to align with common Git conventions as seen in VSCode Source Control.

  • Added letters to represent the modification statuses of files
  • Updated the workflow to correctly display file deletion flags in 'Staged' section
  • Resolved the issue where deletion or modification status was not correctly shown for staged files

This change should make the modification status for each file more transparent and intuitive for users during the staging phase of the commit process.

Closes devchat-ai/devchat#197

staged flags:
M: modify
A: new Add file
D: delete file
unstaged flags:
M: modify
U: new file
D: delete file
looks like:
截屏2024-01-24 22 01 31

- Added a letter before each modified file to indicate the modification status
- Updated the workflow to display file deletion flag in 'Staged' files
- Fixed the issue where staged files did not display the git status
- Fixed lint error in commit/commit.py file
- Updated unstaged_files_show assignment for lint compliance
- Updated subprocess.check_output call for lint adherence
@yangbobo2021 yangbobo2021 requested a review from kagami-l January 23, 2024 12:58
Copy link
Copy Markdown
Contributor

@kagami-l kagami-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

能感知的功能修改最好在PR描述中加上修改后的效果截图,方便review以及与issue对照

@kagami-l kagami-l merged commit 847576f into main Jan 25, 2024
@kagami-l kagami-l deleted the hotfix/git-staged-deletion-flag-#197 branch January 25, 2024 09:52
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

Successfully merging this pull request may close these issues.

/commit工作流的Staged的文件没有显示删除的标识(D)

2 participants