mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
include modified and untracked files in status JSON
Ideally, an fdroid repo should be running from a clean git repo, so that all changes are tracked in git. This change is useful in seeing which changes and/or files are not in git. If there are modified files, the dirty flag will be set, so this info can help debugging that.
This commit is contained in:
parent
384922118f
commit
fb628c2cb2
2 changed files with 66 additions and 0 deletions
|
|
@ -746,6 +746,8 @@ def setup_status_output(start_timestamp):
|
|||
output['fdroiddata'] = {
|
||||
'commitId': get_head_commit_id(git_repo),
|
||||
'isDirty': git_repo.is_dirty(),
|
||||
'modifiedFiles': git_repo.git().ls_files(modified=True).split(),
|
||||
'untrackedFiles': git_repo.untracked_files,
|
||||
}
|
||||
fdroidserver_dir = os.path.dirname(sys.argv[0])
|
||||
if os.path.isdir(os.path.join(fdroidserver_dir, '.git')):
|
||||
|
|
@ -753,6 +755,8 @@ def setup_status_output(start_timestamp):
|
|||
output['fdroidserver'] = {
|
||||
'commitId': get_head_commit_id(git_repo),
|
||||
'isDirty': git_repo.is_dirty(),
|
||||
'modifiedFiles': git_repo.git().ls_files(modified=True).split(),
|
||||
'untrackedFiles': git_repo.untracked_files,
|
||||
}
|
||||
write_running_status_json(output)
|
||||
return output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue