'save-at:1722225521.8701391'

This commit is contained in:
codeboss 2024-07-29 11:58:41 +08:00
parent 01d4a935ba
commit 03b8ad6c50
1 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import sys, os
import subprocess as xsub
import time
from typing import List
def git_save(target_dir: str):
@ -8,9 +9,14 @@ def git_save(target_dir: str):
print(retls.stdout)
outlist = str(retls.stdout).split(r'\n')
has_changed:bool = False
files_path:List[str] = []
for o in outlist:
if o.startswith(r"\tmodified:"):
modified_flag = r"\tmodified:"
if o.startswith(modified_flag):
has_changed = True
files_path.append(o[len(modified_flag):])
elif o.startswith(r"\tnew file:"):
has_changed = True