+1
-1
appview/state/pull.go
+1
-1
appview/state/pull.go
···
779
return
780
}
781
782
-
hiddenRef := url.QueryEscape(fmt.Sprintf("hidden/%s/%s", sourceBranch, targetBranch))
783
// We're now comparing the sourceBranch (on the fork) against the hiddenRef which is tracking
784
// the targetBranch on the target repository. This code is a bit confusing, but here's an example:
785
// hiddenRef: hidden/feature-1/main (on repo-fork)
···
779
return
780
}
781
782
+
hiddenRef := fmt.Sprintf("hidden/%s/%s", sourceBranch, targetBranch)
783
// We're now comparing the sourceBranch (on the fork) against the hiddenRef which is tracking
784
// the targetBranch on the target repository. This code is a bit confusing, but here's an example:
785
// hiddenRef: hidden/feature-1/main (on repo-fork)
+1
-1
appview/state/signer.go
+1
-1
appview/state/signer.go
+6
knotserver/routes.go
+6
knotserver/routes.go
···
461
func (h *Handle) Branch(w http.ResponseWriter, r *http.Request) {
462
path, _ := securejoin.SecureJoin(h.c.Repo.ScanPath, didPath(r))
463
branchName := chi.URLParam(r, "branch")
464
l := h.l.With("handler", "Branch")
465
466
gr, err := git.PlainOpen(path)
···
829
l := h.l.With("handler", "NewHiddenRef")
830
831
forkRef := chi.URLParam(r, "forkRef")
832
remoteRef := chi.URLParam(r, "remoteRef")
833
path, _ := securejoin.SecureJoin(h.c.Repo.ScanPath, didPath(r))
834
gr, err := git.PlainOpen(path)
835
if err != nil {
···
461
func (h *Handle) Branch(w http.ResponseWriter, r *http.Request) {
462
path, _ := securejoin.SecureJoin(h.c.Repo.ScanPath, didPath(r))
463
branchName := chi.URLParam(r, "branch")
464
+
branchName, _ = url.PathUnescape(branchName)
465
+
466
l := h.l.With("handler", "Branch")
467
468
gr, err := git.PlainOpen(path)
···
831
l := h.l.With("handler", "NewHiddenRef")
832
833
forkRef := chi.URLParam(r, "forkRef")
834
+
forkRef, _ = url.PathUnescape(forkRef)
835
+
836
remoteRef := chi.URLParam(r, "remoteRef")
837
+
remoteRef, _ = url.PathUnescape(remoteRef)
838
+
839
path, _ := securejoin.SecureJoin(h.c.Repo.ScanPath, didPath(r))
840
gr, err := git.PlainOpen(path)
841
if err != nil {