Skip to content

Don't load an object just to check its ID #1275

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

Merged
merged 1 commit into from
Mar 9, 2016
Merged

Conversation

carlosmn
Copy link
Member

@carlosmn carlosmn commented Mar 9, 2016

In order to check for equality we just need to compare the ID of the
object. We do not need to look up the object but can compare their
identifiers directly.

@carlosmn carlosmn force-pushed the cmn/equality-over-id branch from 47bfd33 to 8b2c987 Compare March 9, 2016 11:59
In order to check for equality we just need to compare the ID of the
object. We do not need to look up the object but can compare their
identifiers directly.

This also requires us to modify Branch's check for the current branch,
but the new code more accurately reflects the check we do want to
perform. Namely whether HEAD points to our reference name.
@carlosmn carlosmn force-pushed the cmn/equality-over-id branch from 8b2c987 to 840422d Compare March 9, 2016 12:15
ethomson pushed a commit that referenced this pull request Mar 9, 2016
Don't load an object just to check its ID
@ethomson ethomson merged commit e715299 into master Mar 9, 2016
@carlosmn carlosmn deleted the cmn/equality-over-id branch March 9, 2016 16:11
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