Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Conversation

haacked
Copy link
Contributor

@haacked haacked commented Aug 27, 2015

In GitClient.cs we checked whether repository.Head == null twice in
a row. I wanted to remove this redundancy and just ended up using the
fun null propagation operator where we could.

In `GitClient.cs` we checked whether `repository.Head == null` twice in
a row. I wanted to remove this redundancy and just ended up using the
fun null propagation operator where we could.
&& repository.Head != null
&& repository.Head.Commits != null
&& repository.Head.Commits.Any())
if (repository.Head?.Commits != null && repository.Head.Commits.Any())
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

shana added a commit that referenced this pull request Aug 28, 2015
🎨 Remove rendundant null check
@shana shana merged commit 56511e5 into master Aug 28, 2015
@shana shana deleted the haacked/minor-fixups branch August 28, 2015 07:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants