Skip to content

Commit 3f30970

Browse files
fix: handle untracked files in git status
1 parent 6a5df62 commit 3f30970

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ while IFS= read -r -d $'\0' line; do
6969
# handle adds (A), modifications (M), and type changes (T):
7070
[[ "$tree_status" =~ A|M|T || "$index_status" =~ A|M|T ]] && adds+=("$filename")
7171

72+
# handle untracked files (??):
73+
# https://github.com/planetscale/ghcommit-action/issues/43#issuecomment-1950986790
74+
[[ "$tree_status" == "?" && "$index_status" == "?" ]] && adds+=("$filename")
75+
7276
# handle deletes (D):
7377
[[ "$tree_status" =~ D || "$index_status" =~ D ]] && deletes+=("$filename")
7478

0 commit comments

Comments
 (0)