File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -1402,9 +1402,13 @@ async fn serve_query(
14021402 . unwrap ( ) ,
14031403 ) ?;
14041404
1405- let commit_id = transaction_mirror
1406- . repo ( )
1407- . refname_to_id ( & transaction_mirror. refname ( & head_ref) ) ?;
1405+ let commit_id = if let Ok ( oid) = git2:: Oid :: from_str ( & head_ref) {
1406+ oid
1407+ } else {
1408+ transaction_mirror
1409+ . repo ( )
1410+ . refname_to_id ( & transaction_mirror. refname ( & head_ref) ) ?
1411+ } ;
14081412 let commit_id =
14091413 josh:: filter_commit ( & transaction, filter, commit_id, josh:: filter:: empty ( ) ) ?;
14101414
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ Now render still works (used to fail if filtered previously)
6969 param: 12345
7070 sha: 890148 bbaa6a797bac8aef672a437f2b08635f15
7171 filter_sha: ffe8d082c1034053534ea8068f4205ac72a1098e
72+
7273 $ curl -s -i http: // localhost: 8002 / real_repo. git? render= tmpl_file\& param_val = 12345 | grep -v date:
7374 HTTP/ 1.1 200 OK\r (esc)
7475 content-type: text/ plain\r (esc)
@@ -78,6 +79,16 @@ Now render still works (used to fail if filtered previously)
7879 sha: 890148 bbaa6a797bac8aef672a437f2b08635f15
7980 filter_sha: ffe8d082c1034053534ea8068f4205ac72a1098e
8081
82+ $ curl -s http: // localhost: 8002 / real_repo. git@ refs / heads/ master? render= tmpl_file\& param_val = 12345 | grep -v date:
83+ param: 12345
84+ sha: 890148 bbaa6a797bac8aef672a437f2b08635f15
85+ filter_sha: ffe8d082c1034053534ea8068f4205ac72a1098e
86+
87+ $ curl -s http: // localhost: 8002 / real_repo. git@890148bbaa6a797bac8aef672a437f2b08635f15? render= tmpl_file\& param_val = 12345 | grep -v date:
88+ param: 12345
89+ sha: 890148 bbaa6a797bac8aef672a437f2b08635f15
90+ filter_sha: ffe8d082c1034053534ea8068f4205ac72a1098e
91+
8192Graphql works
8293 $ curl -s http: // localhost: 8002 / real_repo. git? graphql= x . graphql
8394 {
You can’t perform that action at this time.
0 commit comments