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

Apply from local branches #4342

Closed
wants to merge 10 commits into from
Closed

Conversation

Caleb-T-Owens
Copy link
Contributor

☕️ Reasoning

🧢 Changes

@github-actions github-actions bot added rust Pull requests that update Rust code app labels Jul 12, 2024
Copy link
Collaborator

@Byron Byron left a comment

Choose a reason for hiding this comment

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

I think I got quite stuck on the function that deals with local tracking branches, apologies for all the comments and ideas that sparked.

crates/gitbutler-command-context/src/repository.rs Outdated Show resolved Hide resolved
crates/gitbutler-command-context/src/repository.rs Outdated Show resolved Hide resolved
crates/gitbutler-command-context/src/repository.rs Outdated Show resolved Hide resolved
.transpose(),
Err(_) => Ok(None),
}
let Ok(name) = name else { return Ok(None) };
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could be less repetitive/more concise.

Suggested change
let Ok(name) = name else { return Ok(None) };
let (Ok(name), Some(sha)) = (name, branch.get().target()) else { return Ok(None) };

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've seen that sort of pattern elsewhere and I'm not sure if I like it. To me it looks quite cluttered having it all on one line.

If it is the preferred way of doing it though I guess I should get used it it

Copy link
Collaborator

Choose a reason for hiding this comment

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

The line isn't formatted, so I think it will look better after formatting.
But even then, if you don't like it, that should be enough to keep things as is.

@github-actions github-actions bot added the UI Any broken visuals like layouts, colors etc. label Jul 15, 2024
@Caleb-T-Owens
Copy link
Contributor Author

The majority of the work here has already been superseded by other PRs, or merged in separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app rust Pull requests that update Rust code UI Any broken visuals like layouts, colors etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants