Skip to content

Commit

Permalink
Ignore .DS_Store and update git diff command
Browse files Browse the repository at this point in the history
- Added .DS_Store to .gitignore
- Updated git diff command to use --staged instead of HEAD
  • Loading branch information
raghavpillai committed Jul 31, 2024
1 parent e94a6b8 commit cac6898
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# System
.DS_Store
2 changes: 1 addition & 1 deletion src/gencommit.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def gencommit():
commit_description: str
if commits_exist:
diff_output: str = subprocess.check_output(
["git", "diff", "HEAD"] + unknown_args, text=True
["git", "diff", "--staged"], text=True
).strip()
formatted_diff: str = format_diff(diff_output)
commit_message, commit_description = generate_commit_message(
Expand Down

0 comments on commit cac6898

Please sign in to comment.