Page MenuHomePhabricator

Short commit hashes with all numbers cannot be searched using gerrit
Closed, ResolvedPublic

Description

Having a short hash from an commit with just numbers has no result on gerrit:

https://gerrit.wikimedia.org/r/#/q/29951907,n,z

https://gerrit.wikimedia.org/r/#/c/159326/

It seems that gerrit assumed that number is a number of an change patch which does not exists.

Event Timeline

Umherirrender raised the priority of this task from to Needs Triage.
Umherirrender updated the task description. (Show Details)
Umherirrender added a project: Gerrit.
Umherirrender subscribed.

Gerrit's search is not really smart.
If the number should be interpreted as commit hash instead of a change number, you can hint gerrit by using the “commit” predicate. As in

https://gerrit.wikimedia.org/r/#/q/commit:29951907,n,z

. That's not ideal. But is it good enough for your use-case?

The link came from https://www.mediawiki.org/wiki/MediaWiki_1.25/wmf14 where all commits are listed from the last wmf branch. Than the script which generated this page must be updated (But I have no idea, where the script is located)

This looks like it is supported now.

Doing https://gerrit.wikimedia.org/r/#/q/159326 resolved correctly to https://gerrit.wikimedia.org/r/#/c/159326/

can we close this task as resolved please?

This looks like it is supported now.

Doing https://gerrit.wikimedia.org/r/#/q/159326 resolved correctly to https://gerrit.wikimedia.org/r/#/c/159326/

can we close this task as resolved please?

It is not about linking 159326 to 159326.

The long hash of 159326 is 29951907f73e59b0fcfc43b3a2554ed77f2268d8, so the short hash is 29951907 and that does not link to the patch set 159326 (see first link of description)

Not resolved in my mind

Oh I see now, doing a test on https://gerrit-review.googlesource.com/#/c/84672/ which is running gerrit 2.13 seems to work.

So looks like when we update to gerrit 2.13 will resolve this issue.

Oh I see now, doing a test on https://gerrit-review.googlesource.com/#/c/84672/ which is running gerrit 2.13 seems to work.

So looks like when we update to gerrit 2.13 will resolve this issue.

That gerrit patch set has not a number only short hash (85d04920)

@Paladox: If you're "doing a test" you must explain properly everything single step of your test, in a list, leaving no room for interpretation. Otherwise we're all just guessing what you tested (or not) and waste time.

Ok I went to https://gerrit-review.googlesource.com/#/c/84672/

I then used 85d0492080e9242cd24879bedd37f920c237ede5

and took 8 caractors from it ie 85d04920

I then typed it in the search bar on that website and it brought me to https://gerrit-review.googlesource.com/#/c/84672/

@Paladox: Your steps have nothing to do with the steps in the initial description.

@Paladox: Your steps have nothing to do with the steps in the initial description.

No I'm talking about gerrit 2.13, which looks like it is fixed there.

@Paladox: Your steps have nothing to do with the steps in the initial description.

No I'm talking about gerrit 2.13, which looks like it is fixed there.

@Paladox: How is your reply related to what I wrote? I said that your steps in T86035#2604554 have nothing to do with what this task is about.

Yes they do, this task is about short commit hashes, so what I wrote has to do with this task.

Please reopen if this is not resolved.