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

Replace regex methods by string ones since faster and more readable #8096

Merged
merged 1 commit into from Jan 15, 2015

Conversation

5 participants
@cirosantilli
Contributor

cirosantilli commented Oct 19, 2014

and more readable.

@TeatroIO

This comment has been minimized.

TeatroIO commented Oct 19, 2014

I've prepared a stage. Click to open.

@cirosantilli cirosantilli changed the title from Replace regex methods by string ones since faster to [WIP] Replace regex methods by string ones since faster Oct 19, 2014

@cirosantilli cirosantilli changed the title from [WIP] Replace regex methods by string ones since faster to Replace regex methods by string ones since faster Oct 19, 2014

@cirosantilli cirosantilli force-pushed the cirosantilli:regex-to-string branch from 1d23ddb to c36959a Nov 2, 2014

@@ -160,23 +160,23 @@ def push_to_existing_branch?(ref, oldrev)
ref_parts = ref.split('/')
# Return if this is not a push to a branch (e.g. new commits)
ref_parts[1] =~ /heads/ && oldrev != "0000000000000000000000000000000000000000"
ref_parts[1].include('heads') && oldrev != "0000000000000000000000000000000000000000"

This comment has been minimized.

@houndci-bot

houndci-bot Nov 2, 2014

Line is too long. [89/80]
Prefer single-quoted strings when you don't need string interpolation or special symbols.

end
def push_to_new_branch?(ref, oldrev)
ref_parts = ref.split('/')
ref_parts[1] =~ /heads/ && oldrev == "0000000000000000000000000000000000000000"
ref_parts[1].include('heads') && oldrev == "0000000000000000000000000000000000000000"

This comment has been minimized.

@houndci-bot

houndci-bot Nov 2, 2014

Line is too long. [89/80]
Prefer single-quoted strings when you don't need string interpolation or special symbols.

end
def push_remove_branch?(ref, newrev)
ref_parts = ref.split('/')
ref_parts[1] =~ /heads/ && newrev == "0000000000000000000000000000000000000000"
ref_parts[1].include('heads') && newrev == "0000000000000000000000000000000000000000"

This comment has been minimized.

@houndci-bot

houndci-bot Nov 2, 2014

Line is too long. [89/80]
Prefer single-quoted strings when you don't need string interpolation or special symbols.

@cirosantilli cirosantilli force-pushed the cirosantilli:regex-to-string branch 2 times, most recently from 640edf3 to 53d2bd0 Nov 2, 2014

@cirosantilli cirosantilli changed the title from Replace regex methods by string ones since faster to Replace regex methods by string ones since faster and more readable Nov 15, 2014

@jvanbaarsen

This comment has been minimized.

Contributor

jvanbaarsen commented Dec 13, 2014

We can only accept a merge requests if all the tests are green, can you please make sure the tests of this merge requests are green? If the failing test has nothing do to with your merge request, you might want to rebase with master to see if that makes the tests green again.

@cirosantilli cirosantilli force-pushed the cirosantilli:regex-to-string branch from 53d2bd0 to 0ae7a8c Dec 28, 2014

@cirosantilli cirosantilli changed the title from Replace regex methods by string ones since faster and more readable to [WIP] Replace regex methods by string ones since faster and more readable Dec 28, 2014

@cirosantilli cirosantilli force-pushed the cirosantilli:regex-to-string branch from 0ae7a8c to cd688a6 Dec 28, 2014

@cirosantilli cirosantilli changed the title from [WIP] Replace regex methods by string ones since faster and more readable to Replace regex methods by string ones since faster and more readable Dec 29, 2014

@cirosantilli

This comment has been minimized.

Contributor

cirosantilli commented Dec 29, 2014

@jvanbaarsen updated. Semaphore passed after all.

@jvanbaarsen jvanbaarsen added this to the 7.7 milestone Jan 4, 2015

@dzaporozhets dzaporozhets modified the milestones: 7.7, 7.8 Jan 13, 2015

dzaporozhets added a commit that referenced this pull request Jan 15, 2015

Merge pull request #8096 from cirosantilli/regex-to-string
Replace regex methods by string ones since faster and more readable

@dzaporozhets dzaporozhets merged commit c5ba87a into gitlabhq:master Jan 15, 2015

2 checks passed

default The build passed on Semaphore.
Details
semaphoreci The build passed on Semaphore.
Details
@dzaporozhets

This comment has been minimized.

Member

dzaporozhets commented Jan 15, 2015

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment