Commit log

d0afaa0 fix: respect gitattributes (#342)

Click to expand commit body
* fix: respect gitattributes

Check gitattributes for file attrs before displaying files.

Fixes: https://github.com/charmbracelet/soft-serve/issues/238

* chore: add tests

Ayman Bagabas created

0e9abaf feat(deps): bump go.uber.org/automaxprocs from 1.5.2 to 1.5.3 (#343)

dependabot[bot] created

e4a47c5 feat: support git push options (#341)

Click to expand commit body
Add support to git push options.

Reference: https://git-scm.com/docs/git-push#Documentation/git-push.txt--oltoptiongt
Fixes: https://github.com/charmbracelet/soft-serve/issues/327

Ayman Bagabas created

02fd650 fix: disable codecov on push

Ayman Bagabas created

050a0d1 fix: initial default branch name (#340)

Click to expand commit body
Use git plumbing to set the initial default branch name.

Fixes: https://github.com/charmbracelet/soft-serve/issues/147
Fixes: https://github.com/charmbracelet/soft-serve/issues/260

Ayman Bagabas created

e0882cc feat: store repo meta data in repo directory (#338)

Click to expand commit body
* feat: store repo meta data in repo directory

- Store auth'd user in context.
- Write description, owner, and git-daemon-export-ok files.

Fixes: https://github.com/charmbracelet/soft-serve/issues/255
Fixes: https://github.com/charmbracelet/soft-serve/issues/256

* fix: add tests

Ayman Bagabas created

f0eb762 feat(deps): bump github.com/lib/pq from 1.2.0 to 1.10.9 (#339)

Click to expand commit body
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.2.0 to 1.10.9.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.2.0...v1.10.9)

---
updated-dependencies:
- dependency-name: github.com/lib/pq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

dependabot[bot] and dependabot[bot] created

e398b4d refactor: implement database module and abstract backend (#337)

Click to expand commit body
* refactor(server): abstract database from backend

Prepare for multi database driver support

* feat(server): add db models

* feat(db): add database migrations

* feat(db): add support to postgres

* feat: implement database store logic

* refactor: use db module and abstract backend logic

* fix(db): postgres migrate sql

* feat(db): add database query tracing

* refactor: move internal packages to server

* fix(config): normalize sqlite database path

* fix,feat: support custom log path and fix logging leak in hooks

* fix(test): race condition

* refactor: tidy up files and use middlewares

* chore: add test for repo commit command

Reference: https://github.com/charmbracelet/soft-serve/pull/331

* fix: lint errors

* fix: use utc time and fix git packp error format

* fix: lint errors

* fix: testscript on windows

* chore: format sql files

* fix: lint issues

re-enable revive linter

* refactor: clean up server/config

* feat: add admin command to manage server

* fix(db): use migration versions

* chore: add deprecation warning.

* refactor: move shared interfaces and errors to proto

* fix: increase golangci lint timeout

* feat: add move tests

Ayman Bagabas created

7cd0583 fix(ci): golangci linter

Click to expand commit body
Add soft lint

Ayman Bagabas created

ad4231b feat(deps): bump modernc.org/sqlite from 1.23.1 to 1.24.0 (#336)

Click to expand commit body
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.23.1 to 1.24.0.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.23.1...v1.24.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

dependabot[bot] and dependabot[bot] created

75172cf feat(deps): bump golang.org/x/crypto from 0.10.0 to 0.11.0 (#335)

Click to expand commit body
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/crypto/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

dependabot[bot] and dependabot[bot] created

e78725f Smart HTTP Git transport & partial clones (#291) (#332)

Click to expand commit body
* refactor: tidy up server git

use git services to implement handling git server commands
pass config to git as environment variables

* feat(git): enable partial clones

* feat(server): use smart http git backend

This implements the smart http git protocol which also supports
git-receive-pack service.

Ayman Bagabas created

b60a7f2 Add commit command (#331)

Click to expand commit body
* Add commit command

* fix bad refactor

* fix: actually support the color flag

* Squashed commit of the following:

commit 814ee9f8fa7014dd4fafab12974e2edd4b8f7d73
Author: Andy Lu <luandy64@gmail.com>
Date:   Fri Jun 30 23:07:49 2023 -0400

    Run gofmt

commit 3db029502c74461b57e776a0ebc9d27c944acc5d
Author: Andy Lu <luandy64@gmail.com>
Date:   Fri Jun 30 23:06:31 2023 -0400

    Pull out statsLine and diffLine, add a commit body line

commit eb1da4296e0181bae842622e0dc98ca8ca845049
Author: Andy Lu <luandy64@gmail.com>
Date:   Fri Jun 30 23:05:36 2023 -0400

    Add flag for printing the patch only

commit e76702e92b085f02427aae1c7052f235454242fd
Author: Andy Lu <luandy64@gmail.com>
Date:   Fri Jun 30 22:50:55 2023 -0400

    Add commit, author, date, and stats

commit 0359b1dc49417d11f8f8b8529f8b942417d79128
Author: Andy Lu <luandy64@gmail.com>
Date:   Fri Jun 30 21:43:35 2023 -0400

    Add commit, author, date, and stats

    Missing color on stats

* Whitespace cleanup

Andy Lu created

d7fcf9d feat(deps): bump github.com/rogpeppe/go-internal

Click to expand commit body
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.10.1-0.20230524175051-ec119421bb97 to 1.11.0.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/commits/v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

191b832 feat(deps): bump github.com/charmbracelet/keygen from 0.4.2 to 0.4.3

Click to expand commit body
Bumps [github.com/charmbracelet/keygen](https://github.com/charmbracelet/keygen) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/charmbracelet/keygen/releases)
- [Commits](https://github.com/charmbracelet/keygen/compare/v0.4.2...v0.4.3)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/keygen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

f147ff5 feat(deps): bump github.com/muesli/termenv from 0.15.1 to 0.15.2

Click to expand commit body
Bumps [github.com/muesli/termenv](https://github.com/muesli/termenv) from 0.15.1 to 0.15.2.
- [Release notes](https://github.com/muesli/termenv/releases)
- [Commits](https://github.com/muesli/termenv/compare/v0.15.1...v0.15.2)

---
updated-dependencies:
- dependency-name: github.com/muesli/termenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

fa6deb4 feat(deps): bump github.com/hashicorp/golang-lru/v2 from 2.0.3 to 2.0.4

Click to expand commit body
Bumps [github.com/hashicorp/golang-lru/v2](https://github.com/hashicorp/golang-lru) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](https://github.com/hashicorp/golang-lru/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/golang-lru/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

7b3f2c2 feat(deps): bump github.com/prometheus/client_golang (#325)

dependabot[bot] created

a72790a feat(deps): bump golang.org/x/sync from 0.2.0 to 0.3.0

Click to expand commit body
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.2.0 to 0.3.0.
- [Commits](https://github.com/golang/sync/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

691f681 feat(deps): bump golang.org/x/crypto from 0.9.0 to 0.10.0 (#323)

Click to expand commit body
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/crypto/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

dependabot[bot] and dependabot[bot] created

65de5ba feat(deps): bump modernc.org/sqlite from 1.23.0 to 1.23.1

Click to expand commit body
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.23.0 to 1.23.1.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.23.0...v1.23.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

c2a9b29 feat(deps): bump github.com/hashicorp/golang-lru/v2 from 2.0.2 to 2.0.3

Click to expand commit body
Bumps [github.com/hashicorp/golang-lru/v2](https://github.com/hashicorp/golang-lru) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](https://github.com/hashicorp/golang-lru/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/golang-lru/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

bf6b47f feat(deps): bump github.com/charmbracelet/bubbletea

Click to expand commit body
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.24.1...v0.24.2)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

6ce418b feat(deps): bump modernc.org/sqlite from 1.22.1 to 1.23.0

Click to expand commit body
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.22.1 to 1.23.0.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.22.1...v1.23.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

ddb3bd6 feat(deps): bump github.com/charmbracelet/bubbles from 0.15.0 to 0.16.1

Click to expand commit body
Bumps [github.com/charmbracelet/bubbles](https://github.com/charmbracelet/bubbles) from 0.15.0 to 0.16.1.
- [Release notes](https://github.com/charmbracelet/bubbles/releases)
- [Commits](https://github.com/charmbracelet/bubbles/compare/v0.15.0...v0.16.1)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbles
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

969cf76 fix: metric cardinality et al (#315)

Carlos Alexandro Becker created

29aec70 test: collab tests (#314)

Click to expand commit body
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Carlos Alexandro Becker created

f89ee59 test: more cmd tests (#313)

Click to expand commit body
* test: more cmd tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: repo delete

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Carlos Alexandro Becker created

1660e64 test: repo tree tests (#312)

Click to expand commit body
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Carlos Alexandro Becker created

6d6e112 test: smoke tests with testscript (#305)

Click to expand commit body
* test: playing with testscript

* fix: multiple servers

* fix: -update flag

* test: user management tests

* test: fix config

* fix: ensure perms after clone

* fix: race condition

* fix: shutdown

* test: set-username

* test: repo collab

* test: repo mirror and other ops

* test: import repo

* test: repo create

* test: disable hooks on testscript

* test: random port: prevent port reuse

* test: wait for server

* fix: git with no user info

* test: no idea whats going on on windows

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: create keys on runtime

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: organizing repo

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: remove if for windows

* Revert "fix: remove if for windows"

This reverts commit 5776fde194d675d25336967e5f89c8fd9a5e7b4f.

* chore: trying something out

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* refactor: use crypto/ssh instead of ssh binary

* fix: neg only the actual cmd

* fix: unix2dos on windows tests

* fix: unix2dos

* fix: skip hooks on tests

* fix: trainling whitespace

* chore: editorconfig and gitattributes

* test: maybe its not really needed?

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* Revert "test: maybe its not really needed?"

This reverts commit a704c5fbf17dad7bd34646950074b125a093ae31.

* fix: improve \r\n handling

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: crlf

* chore: trigger

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: disable unix2docs

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* test: validate repo

* chore: debug

* fix(test): convert dos crlf to lf (#311)

* fix(test): convert dos crlf to lf

* use temp files

* chore: log

* fix: ssh config

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: config

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix(ci): use build workflow from main

* fix: editorconfig

* fix: editorconfig

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* feat(test): add SanitizeRepo tests

* fix(test): sanitizerepo test

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>

Carlos Alexandro Becker and Ayman Bagabas created

1c781fe fix: ignore case README filenames

bashbunni created

940bde7 feat(deps): bump github.com/charmbracelet/bubbletea

Click to expand commit body
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.24.0...v0.24.1)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

1491acb feat(deps): bump github.com/go-git/go-git/v5 from 5.6.1 to 5.7.0

Click to expand commit body
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.6.1 to 5.7.0.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.6.1...v5.7.0)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

277bbc1 feat(deps): bump github.com/charmbracelet/log from 0.2.1 to 0.2.2

Click to expand commit body
Bumps [github.com/charmbracelet/log](https://github.com/charmbracelet/log) from 0.2.1 to 0.2.2.
- [Release notes](https://github.com/charmbracelet/log/releases)
- [Commits](https://github.com/charmbracelet/log/compare/v0.2.1...v0.2.2)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

dependabot[bot] created

db3bc9b fix(cmd): user info reporting false admin status

Click to expand commit body
Fixes: https://github.com/charmbracelet/soft-serve/issues/298

Ayman Bagabas created

9b8e183 feat: bump minimum go version to go1.20

Click to expand commit body
Soft Serve already uses symbols introduced in go1.20

Fixes: https://github.com/charmbracelet/soft-serve/issues/293

Ayman Bagabas created

4bb9abb docs: recommend never using --tty in docker

Carlos Alexandro Becker created

f851adb fix(ssh): restrict publickey auth

Click to expand commit body
only accept readwrite access using pubkey auth. Keyboard-interactive
auth will be used after all keys authentication has failed

Ayman Bagabas created

a9e4824 fix(server): possible panic using maps

Click to expand commit body
use a sync.Map to avoid possible panic on concurrent map iteration and
map write

Fixes: b07de747b54a ("fix(log): respect log config (#280)")

Ayman Bagabas created

cc951e3 feat: switch to env/v8

Ayman Bagabas created

fbe09a9 fix(ci): remove soft-serve workflow

Ayman Bagabas created

b07de74 fix(log): respect log config (#280)

Click to expand commit body
* fix(log): respect log config

Parse log config

fix(git): ensure os envs are present

feat: set the default time format to dateTime

fix(log): change update mirror log message into debug

fix(config): rename log config struct

fix(config): always return cfg

* perf: update mirrors in a workpool (#285)

* perf: update mirrors in a workqueue

Implement a simple chunked workqueue to queue updating mirrors. We use
the number of cpus to calculate the number of workers to distribute the
work to.

* fix: use automaxprocs

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: set maxprocs in main

* feat(wp): use a workpool impl

Use semaphores to implement a workpool of n workers
and use that to run the mirroring job

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Ayman Bagabas and Carlos Alexandro Becker created

8d13e32 docs: add systemd instructions (#276)

Click to expand commit body
Add how to run soft-serve using systemd instructions

Ayman Bagabas created

3ef6d86 fix(ui): UI regressions (#279)

Click to expand commit body
* fix(backend): wrap i/o operations in transactions

when i/o errors, transaction rolls back

* fix(lint): inefficient assignment

* fix(ui): respect log settings

* fix(ui): truncate command string after yanking

* fix(git): make sure to use system git config in diff

* fix(ui): move support goto top/bottom in viewport

Ayman Bagabas created

1420502 fix(backend): wrap i/o operations in transactions (#278)

Click to expand commit body
* fix(backend): wrap i/o operations in transactions

when i/o errors, transaction rolls back

* fix(lint): inefficient assignment

Ayman Bagabas created

c1d62b5 fix: set CI=1 in Dockerfile as a workaround (#284)

Carlos Alexandro Becker created

5580b5b fix(backend): cache repos in memory (#274)

Click to expand commit body
* fix(backend): cache repos in memory using lru

Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>

* fix(backend): use mutex instead of rwmutex

---------

Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>

Ayman Bagabas created

2a97f93 fix: improve dockerfile caching

Carlos Alexandro Becker created

882abd5 docs: update license

Click to expand commit body
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

Carlos Alexandro Becker created

4433e02 fix(backend): remove clone timeout

Ayman Bagabas created