Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git blob hash to version cmd #683

Merged
merged 2 commits into from
Jul 28, 2021
Merged

Add git blob hash to version cmd #683

merged 2 commits into from
Jul 28, 2021

Conversation

theguy147
Copy link
Collaborator

Add git blob hash to version command

Description/Motivation/Screenshots

see #682

gef.py inside git dir

image

standalone

2021-07-27_18-06

Checklist

  • My PR was done against the dev branch, not master.
  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • My change adds tests as appropriate.
  • I have read and agree to the CONTRIBUTING document.

gef.py Outdated
@@ -4323,7 +4323,9 @@ def do_invoke(self, argv):
extra = "dirty" if len(subprocess.check_output('git ls-files -m', cwd=gef_dir, shell=True).decode("utf8").strip()) else "clean"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can you fix this line and previous to use double quotes? I believe in fixing nearby lines :)

gef_print("GEF: (Standalone)")
gef_print("Blob Hash({}): {}".format(gef_fpath, gef_blob_hash))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add to our issue template how to use this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usage hasn't changed in my opinion. The Blob Hash is only printed in standalone mode and should be included when somebody opens an issue.

Or do you mean a little documentation on how the commit can be found using this blob hash from a developers point of view?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I mean even a comment for the issue writer to maybe find the commit using this.

It's not really on them, but I am afraid that I myself will forget how to use this information. Maybe a blurb somewhere on a debugging doc, even.

Or maybe I should just remember how. 👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i'll just add the version command to the documentation then

@Grazfather Grazfather changed the title added git blob hash to version cmd Add git blob hash to version cmd Jul 28, 2021
@Grazfather
Copy link
Collaborator

Looks great. Thanks a lot.

@Grazfather Grazfather merged commit 8cb298b into hugsy:dev Jul 28, 2021
@theguy147
Copy link
Collaborator Author

theguy147 commented Jul 28, 2021

oh, no! I made a "typo" in the documentation.

I created PR #688 for it 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants