Document why we look for "git" and "gerrit" and add the command prefix
Newer git versions will ask for "git receive-pack" while older ones will ask for "git-receive-pack". Either variant will usually invoke the right command, but at some point in the future the hypen form will stop being used and only the "git foo" form is used. Internally we want to use the hypen form, as it simplifies our command table. So we expand "git foo" into "git-foo" and then do the lookup. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -60,6 +60,9 @@ class GerritCommandFactory implements CommandFactory {
|
||||
args = "";
|
||||
}
|
||||
|
||||
// Support newer-style "git receive-pack" requests by converting
|
||||
// to the older-style "git-receive-pack".
|
||||
//
|
||||
if ("git".equals(cmd) || "gerrit".equals(cmd)) {
|
||||
cmd += "-";
|
||||
final int sp2 = args.indexOf(' ');
|
||||
|
Reference in New Issue
Block a user