Skip to content

Commit

Permalink
Fixing doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyHuynh1 committed Nov 13, 2023
1 parent f279e92 commit 68f9967
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/reference/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ For `git` integrations, Broker considers the following to be a "reference":
- Any tag
- Any branch `HEAD` commit

Broker enumerates the list of references
Broker first enumerates all references in the git repository.

_Note that tags cannot be modified; once a tag has been created to "modify" it in `git` requires that the tag is_
_deleted and then created with the same name. Such modifications are actually creation of the tag,_
_and as such any tag that was "modified" is also scanned by Broker._
_and as such any tag that was "modified" since the last scan is re-canned by Broker._

After enumerating the list of references, Broker then uses its local database to filter any reference that it has already scanned.
Note that this means that a modified tag would then be filtered at this step,
Expand Down
2 changes: 1 addition & 1 deletion src/api/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ pub trait RemoteProvider {
reference: &Self::Reference,
) -> Result<TempDir, Report<RemoteProviderError>>;

/// List references that have been updated
/// List all references
async fn references(&self) -> Result<Vec<Self::Reference>, Report<RemoteProviderError>>;
}

Expand Down
2 changes: 1 addition & 1 deletion src/api/remote/git/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl Error {
}
}

/// List references that have been updated
/// List all references
#[tracing::instrument]
pub async fn list_references(transport: &Transport) -> Result<Vec<Reference>, Report<Error>> {
get_all_references(transport).await
Expand Down
12 changes: 6 additions & 6 deletions src/ext/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,9 @@ impl CommandDescriber for tokio::process::Command {
}

// Desugared, `&self` on `&T` means `&&T`.
// We want to dereference using *self as opposed to self.deref()
// This is because self.deref() will cause warnings about double references (&&T)
// Whereas *self will not cause warnings as it is more explicit
// Dereference using `*self` as opposed to `self.deref()`.
// This is because `self.deref()` causes warnings about double references (`&&T`),
// whereas `*self` does not since it is more explicit.
//
// Normally derefs are handled automatically, so we'd just write e.g. `self.stdout()`,
// but in this case we want to be careful to access the `stdout()` method from the _underlying_ `&T`,
Expand Down Expand Up @@ -797,9 +797,9 @@ impl OutputProvider for std::process::Output {
}

// Desugared, `&self` on `&T` means `&&T`.
// We want to dereference using *self as opposed to self.deref()
// This is because self.deref() will cause warnings about double references (&&T)
// Whereas *self will not cause warnings as it is more explicit
// Dereference using `*self` as opposed to `self.deref()`.
// This is because `self.deref()` causes warnings about double references (`&&T`),
// whereas `*self` does not since it is more explicit.
//
// Normally derefs are handled automatically, so we'd just write e.g. `self.stdout()`,
// but in this case we want to be careful to access the `stdout()` method from the _underlying_ `&T`,
Expand Down

0 comments on commit 68f9967

Please sign in to comment.