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

Feature request: Print current ref (branch/commit), if one was not provided explicitly #36

Open
VojtechVitek opened this issue Nov 28, 2022 · 0 comments

Comments

@VojtechVitek
Copy link

Hi,

I'd find it very handy to be able to print the current ref (latest branch/commit), if one was not provided explicitly.

type HasCommitSHA interface {
    CommitSHA() string
}

fs, _ := gitfs.New(ctx, "github.com/x/y/static")

if v, ok := fs.(HasCommitSHA); ok {
    fmt.Println("current commit:",  v.CommitSHA())
}

Is this somehow possible right now? Would you be open to such functionality?

Thanks,
Vojtech


P.S.: gitfs works very well, thank you for this project! We started using it in https://github.com/webrpc/webrpc.

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

No branches or pull requests

1 participant