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

view.rs: clarify some internal function docstrings #2962

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

ilyagr
Copy link
Contributor

@ilyagr ilyagr commented Feb 6, 2024

Mostly, I was a bit confused that some of these functions return a TrackingRefPair but don't seem to take into account whether the remote branch is being tracked or not.


This fell out of #2935.

Please let me know if the new version is not clearer, or especially if I misunderstood.

@ilyagr ilyagr changed the title view.rs: clarify some docstrings view.rs: clarify some internal function docstrings Feb 6, 2024
@ilyagr ilyagr marked this pull request as ready for review February 6, 2024 06:21
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

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

Thanks!

lib/src/view.rs Outdated Show resolved Hide resolved
lib/src/view.rs Show resolved Hide resolved
Mostly, I was a bit confused that some of these functions return a
`TrackingRefPair` but don't seem to take into account whether the remote
branch is being tracked or not.
@ilyagr ilyagr enabled auto-merge (rebase) February 7, 2024 01:44
ilyagr added a commit to ilyagr/jj that referenced this pull request Feb 7, 2024
As discussed in
jj-vcs#2962 (comment), the
previous name is confusing since the struct is used for pairs where the
remote branch is not tracked by the local branch.
@ilyagr ilyagr merged commit 1741ab2 into jj-vcs:main Feb 7, 2024
15 checks passed
ilyagr added a commit to ilyagr/jj that referenced this pull request Feb 7, 2024
As discussed in
jj-vcs#2962 (comment), the
previous name is confusing since the struct is used for pairs where the
remote branch is not tracked by the local branch.
@ilyagr ilyagr deleted the viewdocs branch February 7, 2024 01:54
@@ -212,8 +214,13 @@ impl View {
}
}

/// Iterates local/remote branch `(name, remote_ref)`s of the specified
/// remote in lexicographical order.
/// Iterates over `(name, {local_ref, remote_ref})`s for every branch
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: local_ref -> local_target

/// Iterates local/remote branch `(name, remote_ref)`s of the specified
/// remote, matching the given branch name pattern. Entries are sorted by
/// `name`.
/// Iterates over `(name, TrackingRefPair {local_ref, remote_ref})`s for
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

ilyagr added a commit to ilyagr/jj that referenced this pull request Feb 7, 2024
As discussed in
jj-vcs#2962 (comment), the
previous name is confusing since the struct is used for pairs where the
remote branch is not tracked by the local branch.
ilyagr added a commit that referenced this pull request Feb 8, 2024
As discussed in
#2962 (comment), the
previous name is confusing since the struct is used for pairs where the
remote branch is not tracked by the local branch.
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