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

feat: Support detached HEAD in stack tree #87

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

draftcode
Copy link
Contributor

No description provided.

@aviator-app
Copy link
Contributor

aviator-app bot commented Apr 19, 2023

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.

@draftcode draftcode requested a review from a team April 19, 2023 21:31
@@ -144,6 +144,15 @@ func (r *Repo) GitStdin(args []string, stdin io.Reader) (string, error) {
return strings.TrimSpace(string(out)), nil
}

// DetachedHead returns true if the repository is in the detached HEAD.
func (r *Repo) DetachedHead() (bool, error) {
name, err := r.RevParse(&RevParse{Rev: "HEAD", SymbolicFullName: true})
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do git symbolic-ref -q HEAD instead? Seems more explicit. https://stackoverflow.com/questions/52221558/programmatically-check-if-head-is-detached

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@draftcode draftcode force-pushed the feat-Support-detached-HEAD-in-stack-tree branch from f6a45e6 to d645846 Compare April 20, 2023 18:13
@aviator-app aviator-app bot merged commit d428aa0 into master Apr 20, 2023
@aviator-app aviator-app bot deleted the feat-Support-detached-HEAD-in-stack-tree branch April 20, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants