Skip to content

Commit

Permalink
[version] using git-ls-files instead of git-status
Browse files Browse the repository at this point in the history
  • Loading branch information
hugsy committed Jan 23, 2021
1 parent aac82ac commit 60fd341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -4096,7 +4096,7 @@ def do_invoke(self, argv):

if os.access("{}/.git".format(gef_dir), os.X_OK):
ver = subprocess.check_output('git log --format="%H" -n 1 HEAD', cwd=gef_dir, shell=True).decode("utf8").strip()
extra = "dirty" if len(subprocess.check_output('git status -s', cwd=gef_dir, shell=True).decode("utf8").strip()) else "clean"
extra = "dirty" if len(subprocess.check_output('git ls-files -m', cwd=gef_dir, shell=True).decode("utf8").strip()) else "clean"
gef_print("GEF: rev:{} (Git - {})".format(ver, extra))
else:
gef_print("GEF: (Standalone)")
Expand Down

0 comments on commit 60fd341

Please sign in to comment.