Skip to content

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

@VojtechVitek

Description

@VojtechVitek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions