Skip to content

Conversation

@t-mangoe
Copy link

The commit SHA value is displayed in the footer. The value is retrieved using the Git gem.
This pull request relates to issue #1475.

Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

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

Thanks for the attempt. But we don’t want to rely on any dependencies for this feature.


def detect_git_commit
require "git"
Git.open(Dir.pwd).object("HEAD").sha
Copy link
Contributor

@extern-c extern-c Jan 24, 2026

Choose a reason for hiding this comment

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

You could consider using Ruby's Open3.capture3 to run Git commands directly and capture the output you need, instead of relying on the git gem. This can simplify things if you only need to run a single command.

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.

3 participants