sourcegraph / src-cli

Sourcegraph CLI
https://sourcegraph.com
Apache License 2.0
267 stars 57 forks source link

Support Perforce changelists in `src code-intel upload` #1035

Open varungandhi-src opened 10 months ago

varungandhi-src commented 10 months ago

Right now, there is a -commit flag, but if you try to pass a Perforce changelist, but the backend validates that the value is a Git hash.

unexpected status code: 400 (failed to enqueue payload: commit must be a 40-character revhash)

We should perhaps keep using the same flag, but have it allow passing a changelist instead.

In terms of design, perhaps we should require a cl:<blah> format (or similar) instead of accepting a bare identifier and then just assume that it is a changelist if it is not a 40-character hash. That way, we can add support for other formats later without having to have complicated inference logic.

mike-r-mclaughlin commented 9 months ago

Requested by https://github.com/sourcegraph/accounts/issues/6938