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

fix(gittools): gittree wouldn't run in branchless repos #427

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

nedbat
Copy link
Contributor

@nedbat nedbat commented Aug 11, 2023

gittree used to be gittreeif @ on the theory that every git repo had @ (alias for HEAD). But a git repo with no branches at all, not even main, has no HEAD. Now that we have repos used exclusively for issues, we have to deal with zero commits, zero branches.

gittree used to be `gittreeif @` on the theory that every git repo had @
or HEAD.  But a git repo with no branches at all, not even main, has no
HEAD.  Now that we have repos used exclusively for issues, we have to
deal with zero commits, zero branches.
@nedbat nedbat force-pushed the nedbat/fix-branchless-gittree branch from 96351d3 to 2f505b0 Compare August 11, 2023 14:38
@nedbat nedbat requested a review from timmc-edx August 11, 2023 14:39
@timmc-edx
Copy link
Contributor

I would argue that every repository should have at least a README file, and therefore at least one branch. Can we fix it from that end instead?

@nedbat
Copy link
Contributor Author

nedbat commented Aug 11, 2023

That could be a thing to do, but it doesn't change the brokenness here: I didn't understand why I went looking for empty repos and couldn't find them. This is an improvement to this alias.

Copy link
Contributor

@timmc-edx timmc-edx left a comment

Choose a reason for hiding this comment

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

Got it, makes sense!

@nedbat nedbat merged commit 5e02065 into master Aug 11, 2023
2 checks passed
@nedbat nedbat deleted the nedbat/fix-branchless-gittree branch August 11, 2023 16:55
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.

2 participants