commits
it is set to `/home/git/repositories` everywhere else (volume mounting, keyfetch config, etc) inside the docker directory.
without this, knotserver uses the default value "/home/git" which means it is out of sync with everywhere else.
the existing diff calculation approach directly compares branches, this forces linear history for merge. this patch updates the diff logic to use the common ancestor commit to calculate diffs.
```
P Q
o---o topic
/
/
o---o---o---o master
A X Y
```
when diffing topic and master directly with difftree (Q and Y), the commits introduced in master since the creation of the branch, namely, X and Y, are considered "removed" from the generated patch. however, when diffing with the common ancestor A, only changes introduced by P and Q are included in the produced patch.
this calculation can be retired in favor of format-patch soon enough (i think).
This container embeds everything in one container:
- knotserver
- repoguard
- keyfetch
- sshd server
To supervise knot and sshd servers I decided to use well known s6-overlay. After first launch it execline script will create host keys. knotserver runs under git, sshd under root.
- proper tabindex for login page form
- overflow for handles in profile page
unless a branch is updated, resubmit will remain disabled; and when
there are changes added to the branch, a hint is supplied.
Added two additional options:
- stateDir: controls where the knotserver's state should be stored
(defaults to `/home/git` to maintain compatibility with previous configs)
- openFirewall: decides if we should open port 22 for ssh
(defaults to true to maintain compatibility with previous configs)
Made use of config options that weren't being used
Changed the `gitUser` to be a system user instead of a normal user.
This is purely cosmetic and pretty much just keeps the UID and GID
below 1000. If the user and group were already made, NixOS won't
change them so this shouldn't have the possibility of breaking any
existing setups but if the UID and GID are changing, the activation
script that creates the directories should update the owner of all the
state files.
Add short-hand for `config.services.tangled-knotserver`
Instead of typing `config.services.tangled-knotserver` we can now use
`cfg` to refer to the module's options.
Fix stdin piping to git-upload-pack. I think we were closing the pipe
too soon previously, resulting in the 'fatal: remote end hung up
unexpectedly' error. Probably went unnoticed for smaller repos.
Also fix a bunch of misc. bugs in with superfluous http header writes
and the gzip reader being shadowed.
This fixes the bug where paths wouldn't show up in non-default branches.
We were running 'git log' against the bare repository that was pointing
to the default branch, which would then return no output for that
specific path since -- understandably -- the path doesn't exist on the
default branch. This change simply passes the current g.h
(plumbing.Hash) to 'git log' which resolves the path in that ref.
seems to have been unlinked accidentally. this restores it + resolves DIDs in that page.
you might wanna vet the format - i didn't test this btw but i think it'll work lmao
comment routes are now grouped under the "round" they operate on
my hunch is that this is caused by using a GET request, which browsers tend to cache sometimes.
the existing diff calculation approach directly compares branches, this forces linear history for merge. this patch updates the diff logic to use the common ancestor commit to calculate diffs.
```
P Q
o---o topic
/
/
o---o---o---o master
A X Y
```
when diffing topic and master directly with difftree (Q and Y), the commits introduced in master since the creation of the branch, namely, X and Y, are considered "removed" from the generated patch. however, when diffing with the common ancestor A, only changes introduced by P and Q are included in the produced patch.
this calculation can be retired in favor of format-patch soon enough (i think).
Added two additional options:
- stateDir: controls where the knotserver's state should be stored
(defaults to `/home/git` to maintain compatibility with previous configs)
- openFirewall: decides if we should open port 22 for ssh
(defaults to true to maintain compatibility with previous configs)
Made use of config options that weren't being used
Changed the `gitUser` to be a system user instead of a normal user.
This is purely cosmetic and pretty much just keeps the UID and GID
below 1000. If the user and group were already made, NixOS won't
change them so this shouldn't have the possibility of breaking any
existing setups but if the UID and GID are changing, the activation
script that creates the directories should update the owner of all the
state files.
Add short-hand for `config.services.tangled-knotserver`
Instead of typing `config.services.tangled-knotserver` we can now use
`cfg` to refer to the module's options.
Fix stdin piping to git-upload-pack. I think we were closing the pipe
too soon previously, resulting in the 'fatal: remote end hung up
unexpectedly' error. Probably went unnoticed for smaller repos.
Also fix a bunch of misc. bugs in with superfluous http header writes
and the gzip reader being shadowed.
This fixes the bug where paths wouldn't show up in non-default branches.
We were running 'git log' against the bare repository that was pointing
to the default branch, which would then return no output for that
specific path since -- understandably -- the path doesn't exist on the
default branch. This change simply passes the current g.h
(plumbing.Hash) to 'git log' which resolves the path in that ref.