Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 17 additions & 3 deletions .github/ci/install-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,28 @@ set -euo pipefail
version="$1"
prefix="$HOME/gits/$version"

# fetch saves a download to a file, so a retry starts the file afresh
# instead of feeding a second copy into a pipe that already holds part
# of the first. github.com answers 503 and 504 now and then, and one such
# answer used to fail the whole job.
fetch() {
curl -sSfL --connect-timeout 30 --retry 5 --retry-delay 10 --retry-all-errors \
-o "$2" "$1"
}

install_linux() {
if [ ! -x "$prefix/bin/git" ]; then
{
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libcurl4-openssl-dev zlib1g-dev libexpat1-dev libssl-dev
work=$(mktemp -d)
curl -sSfL "https://github.com/git/git/archive/refs/tags/v$version.tar.gz" | tar xz -C "$work"
archive="$work/git-$version.tar.gz"
# kernel.org carries the release tarballs too, and they unpack to the
# same git-$version directory, so it stands in when github.com is down.
fetch "https://github.com/git/git/archive/refs/tags/v$version.tar.gz" "$archive" ||
fetch "https://mirrors.edge.kernel.org/pub/software/scm/git/git-$version.tar.gz" "$archive"
tar xzf "$archive" -C "$work"
make -C "$work/git-$version" -j"$(nproc)" prefix="$prefix" NO_TCLTK=1 NO_GETTEXT=1 install
rm -rf "$work"
} >&2
Expand All @@ -27,8 +41,8 @@ install_windows() {
if [ ! -x "$prefix/cmd/git.exe" ]; then
{
mkdir -p "$prefix"
curl -sSfL -o "$HOME/portable-git.exe" \
"https://github.com/git-for-windows/git/releases/download/v$version.windows.1/PortableGit-$version-64-bit.7z.exe"
fetch "https://github.com/git-for-windows/git/releases/download/v$version.windows.1/PortableGit-$version-64-bit.7z.exe" \
"$HOME/portable-git.exe"
"$HOME/portable-git.exe" -y "-o$(cygpath -w "$prefix")"
rm -f "$HOME/portable-git.exe"
} >&2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gitmatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-24.04, windows-latest]
git: ["2.30.2", "2.39.2", "2.47.1"]
suite: [oracle-ops-git, oracle-rest]
defaults:
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# Изменения

## 1.7.2 — 2026-11-11

Новый движок, текст как в Windows, окна сравнения и разрешения конфликтов
сворачиваются по сторонам и запоминают вид, ветки main и develop стоят первыми.

### Текст

- Движок headless-gui обновлён до v4.5.0 (с v3.43.0). Текст рисуется так, как
настроен в системе: при включённом ClearType — субпиксельным сглаживанием (по
цифрам — как у самой Windows на том же шрифте) с порядком подпикселей монитора,
в удалённом сеансе (RDP) и при сером сглаживании — серым. Переключение
ClearType или вход по RDP меняют вид сразу, без перезапуска.
- Шрифт интерфейса на Windows — Verdana: на мелком кегле она читается чётче
прежнего Go Regular. На Linux шрифт прежний.
- Диалоги и плавающие панели в собственных окнах рисуют текст тем же шрифтом и
тем же сглаживанием, что главное окно.
- На Windows 11 у окна и диалогов на скруглённых углах больше нет второй дуги
рамки: рамку рисует сама система, цвет акцента — тоже она.

### Сравнение и конфликты

- В окне сравнения можно свернуть левую или правую сторону и двигать границу
между ними; у окна есть кнопки «развернуть» и «свернуть».
- В окне разрешения конфликтов сворачиваются «Наша», «База» и «Их», итог или
исходные панели разворачиваются на всю высоту, границу между верхом и итогом
можно двигать. Появились «Повторить», меню «Все конфликты» (взять нашу или их
во всех нерешённых, снова отметить все нерешёнными) и раздельная прокрутка.
- Оба окна открываются такими, какими их закрыли: размер, свёрнутые стороны,
граница, база и совместная прокрутка хранятся в `config.toml`.

### Ветки

- develop и master git-flow, ветка по умолчанию каждого сервера и обычные main,
master и develop стоят первыми в группе «Основные» со своим значком, и на
каждом сервере тоже первыми. Группу можно выключить в меню панели, выбор
устаревших веток основные не трогает. Ветка по умолчанию сервера вроде
`release/current` больше не повторяется в разделе релизов.

### Исправления

- Установщик снова показывает текст лицензии: с 1.6.1 окно лицензии было пустым.
- Ошибка в виджете или обработчике больше не роняет приложение: движок её
перехватывает, Go.Git пишет в журнал один раз на место, без секретов.
- Раскладка окна, закрытого дважды (из окна и из движка), сохраняется один раз.

## 1.7.1 — 2026-10-25

Мелкий текст стал чётче, статус больших рабочих папок считается вдвое быстрее, а
Expand Down
4 changes: 2 additions & 2 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ interface. An alternative to the paid SmartGit.

- Its own implementation of git in pure Go: no installed git is required.
- `CGO_ENABLED=0`, a single executable with all resources built in.
- Graphics engine [headless-gui/v3](https://github.com/oops1/headless-gui):
- Graphics engine [headless-gui/v4](https://github.com/oops1/headless-gui):
the interface is described in XAML, the logic in Go, Windows 11 themes (dark and light, matching the system by default).
- Dock panels: repositories, branches, files, diff, commit log — any of them
can be hidden, dragged to another edge, or torn off into a separate system
window; the layout is remembered.
- Localization: Russian and English out of the box, any other language is a single JSON file.

## What 1.7.1 can already do
## What 1.7.2 can already do

**Interface.** The menu and toolbar mirror SmartGit; the toolbar is configured
in a separate window and stored in `config.toml`. Dock panels:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

- Собственная реализация git на чистом Go: установленный git не нужен.
- `CGO_ENABLED=0`, один исполняемый файл со всеми ресурсами внутри.
- Графический движок [headless-gui/v3](https://github.com/oops1/headless-gui):
- Графический движок [headless-gui/v4](https://github.com/oops1/headless-gui):
интерфейс описан в XAML, логика на Go, темы Windows 11 (тёмная и светлая, по умолчанию как в системе).
- Док-панели: репозитории, ветки, файлы, diff, журнал коммитов — любую можно
скрыть, перетащить к другой стенке или оторвать в отдельное окно системы;
раскладка запоминается.
- Локализация: русский и английский из коробки, любой другой язык — один JSON-файл.

## Что уже умеет 1.7.1
## Что уже умеет 1.7.2

**Интерфейс.** Меню и панель инструментов повторяют SmartGit; панель
настраивается в отдельном окне и хранится в `config.toml`. Док-панели:
Expand Down
85 changes: 44 additions & 41 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,47 @@
# Go.Git 1.7.1 — Sharper text, faster big working trees

Small text is sharper, the status of a big working tree takes half the time, and
opening a repository no longer holds up the interface.

All numbers below were measured on Windows with a 20-thread processor.

## Sharper text

- Small text is drawn with vertical hinting and a contrast boost for thin strokes:
the heights of lowercase and capital letters land on whole pixels, and dark text
on a light background looks denser. Line widths and layout do not change.
Subpixel smoothing stays off because it is useless in a remote session. The
headless-gui engine is updated to v3.43.0 for this.

## Big working trees

- Status of a working tree with 50 thousand files, unchanged files included (the
way the Files pane asks for it), takes 53 ms instead of 103 ms and 41 MB instead
of 122 MB. File attributes come from the cache without rebuilding the rule stack,
and for every file only the question of whether it needs an external filter is
asked.
- A directory with tracked files is read once per scan: the search for untracked
files reuses the listing that was already read. Status of 50 thousand files takes
30 ms instead of 44 ms.
- Opening a repository with 80 thousand files holds up the interface for 19 ms
instead of 250–440 ms. The working tree watcher takes its first snapshot in the
background, and the status scan waits for it so that no change made right after
opening is lost. A new set of ignored directories reaches the running watcher
instead of restarting it with a full walk of the tree.
# Go.Git 1.7.2 — Text as in Windows, collapsible compare and conflict windows

A new engine, text drawn the way Windows is set up, compare and conflict-resolution
windows that collapse their sides and remember how they were left, and main
branches first in the Branches pane.

## Text

- The headless-gui engine is updated to v4.5.0 (from v3.43.0). Text follows the
system setting: with ClearType on it uses subpixel smoothing (measured the same as
Windows itself on the same font) with the monitor's subpixel order; in a remote
session (RDP) and with greyscale smoothing it is grey. Turning ClearType on or off
or connecting over RDP changes it at once, without a restart.
- The interface font on Windows is Verdana: at small sizes it reads more clearly
than the former Go Regular. Linux keeps the old font.
- Dialogs and floating panes in their own windows draw text with the same font and
smoothing as the main window.
- On Windows 11 the window and the dialogs no longer show a second frame arc at the
rounded corners: the system draws the frame, accent color included.

## Compare and conflicts

- The compare window collapses its left or right side, the border between them can
be dragged, and the window has maximize and minimize buttons.
- The conflict-resolution window collapses Ours, Base and Theirs, shows the result
or the sources at full height, and the border between the top and the result can
be dragged. New: Redo, the All conflicts menu (take ours or theirs in every
unresolved conflict, mark every conflict unresolved again) and separate scrolling.
- Both windows reopen the way they were closed: size, collapsed sides, border, base
pane and joint scrolling are kept in `config.toml`.

## Branches

- git-flow develop and master, every server's default branch and the usual main,
master and develop come first in a Main group with their own icon, and first on
every server. The pane menu turns the group off, and selecting obsolete branches
leaves main branches alone. A server default branch such as `release/current` no
longer appears again under Releases.

## Fixes

- Loading the next page of the journal no longer drops the selected commit or
rebuilds the whole table.
- In Blame a commit opens with a single click on its link, and the cursor turns
into a hand over it.
- A secure connection over a slow network waits a minute instead of 15 seconds, and
the server response timer starts only after the request is sent. When the
connection never comes up, Go.Git says so instead of "context deadline exceeded".
- On Windows a commit made right after git or a virus scanner let go of
`packed-refs.lock` no longer fails with "Access is denied": while the system is
still closing the old file, Go.Git waits up to a second, as it does for a busy
lock.
- The installer shows the license text again: since 1.6.1 the license dialog was
empty.
- A failure in a widget or a handler no longer brings the app down: the engine
catches it, and Go.Git logs it once per place, with secrets redacted.
- The layout of a window closed twice (by the window and by the engine) is saved
once.
17 changes: 14 additions & 3 deletions USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@
обратным порядком чисел, по времени коммита), группировкой веток по пути
(`foo/bar`, с вариантами «После последнего слэша» и «Кроме одиночных»),
показом внешних веток в разделах Git-Flow и выбором устаревших локальных
веток (тех, чей upstream исчез на сервере).
веток (тех, чей upstream исчез на сервере). Основные ветки — develop и master
git-flow, ветка по умолчанию сервера, main, master, develop — стоят первыми в
группе «Основные»; её можно выключить в том же меню, а выбор устаревших веток
основные не трогает.

### Файлы

Expand Down Expand Up @@ -197,8 +200,16 @@ Shift; правый щелчок по выделению открывает «П
(**Разрешить конфликт...**). Окно показывает три панели только для чтения —
«Наша», «База» (можно скрыть) и «Их» — и снизу редактируемый итог. Кнопки
«Взять нашу», «Взять их», «Взять обе», переходы между конфликтами и счётчик
нерешённых. «Сохранить» пишет итог в рабочую копию и, если конфликтов не
осталось, отмечает файл решённым и закрывает окно.
нерешённых, «Отменить» и «Повторить», меню «Все конфликты» — взять нашу или их
во всех нерешённых сразу либо снова отметить все нерешёнными. «Наша», «База» и
«Их» сворачиваются шевронами в заголовках, итог или исходные панели
разворачиваются на всю высоту кнопками справа в заголовке итога, границу между
верхом и итогом можно тянуть (двойной щелчок возвращает её на место).
«Сохранить» пишет итог в рабочую копию и, если конфликтов не осталось, отмечает
файл решённым и закрывает окно. Окно сравнения так же сворачивает левую или
правую сторону. Оба окна открываются такими, какими их закрыли: размер,
свёрнутые стороны, граница, база и совместная прокрутка хранятся в
`config.toml`.

### Stash

Expand Down
73 changes: 73 additions & 0 deletions cmd/gogit/installerlicense_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package main

import (
"fmt"
"os"
"path/filepath"
"strings"
"testing"
)

const installerLicenseHeader = `{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Segoe UI;}}\fs18`

func readRepositoryFile(t *testing.T, rel string) string {
t.Helper()
data, err := os.ReadFile(filepath.Join("..", "..", filepath.FromSlash(rel)))
if err != nil {
t.Fatal(err)
}
return string(data)
}

func TestTheInstallerLicenseIsAWellFormedRTFHeader(t *testing.T) {
rtf := readRepositoryFile(t, "packaging/windows/license.rtf")

if !strings.HasPrefix(rtf, installerLicenseHeader+"\n") {
t.Fatalf("license.rtf starts with %q, want the RTF header %q", rtf[:min(len(rtf), 80)], installerLicenseHeader)
}
for at, b := range []byte(rtf) {
if b < 0x20 && b != '\n' {
t.Fatalf("license.rtf holds control byte %#02x at offset %d: a backslash sequence was turned into a control character", b, at)
}
}
if !strings.HasSuffix(rtf, "}\n") {
t.Fatal("license.rtf does not close its RTF group")
}
}

func TestTheInstallerLicenseShowsTheTextOfLICENSE(t *testing.T) {
rtf := readRepositoryFile(t, "packaging/windows/license.rtf")
license := readRepositoryFile(t, "LICENSE")

body := strings.TrimSuffix(strings.TrimPrefix(rtf, installerLicenseHeader+"\n"), "}\n")
unescape := strings.NewReplacer(`\\`, `\`, `\{`, `{`, `\}`, `}`)
var shown []string
for line := range strings.Lines(body) {
text, ok := strings.CutSuffix(strings.TrimSuffix(line, "\n"), `\par`)
if !ok {
t.Fatalf("line %q of license.rtf does not end a paragraph", line)
}
shown = append(shown, unescape.Replace(text))
}

if got, want := strings.Join(shown, "\n"), strings.TrimRight(license, "\n"); got != want {
t.Fatalf("the installer license differs from LICENSE:\n%s", firstDifference(got, want))
}
}

func firstDifference(got, want string) string {
gotLines, wantLines := strings.Split(got, "\n"), strings.Split(want, "\n")
for i := range max(len(gotLines), len(wantLines)) {
var g, w string
if i < len(gotLines) {
g = gotLines[i]
}
if i < len(wantLines) {
w = wantLines[i]
}
if g != w {
return fmt.Sprintf("line %d: got %q, want %q", i+1, g, w)
}
}
return "no differing line"
}
2 changes: 1 addition & 1 deletion cmd/gogit/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"github.com/oops1/headless-gui/v3/widget"
"github.com/oops1/headless-gui/v4/widget"

"github.com/oops1/gogit/internal/config"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/gogit/winres/winres.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"0409": {
"identity": {
"name": "Go.Git",
"version": "1.7.1.0"
"version": "1.7.2.0"
},
"description": "Go.Git git client",
"minimum-os": "win7",
Expand All @@ -35,8 +35,8 @@
"#1": {
"0000": {
"fixed": {
"file_version": "1.7.1.0",
"product_version": "1.7.1.0"
"file_version": "1.7.2.0",
"product_version": "1.7.2.0"
},
"info": {
"0409": {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/BurntSushi/toml v1.6.0
github.com/godbus/dbus/v5 v5.2.2
github.com/jcmturner/gokrb5/v8 v8.4.4
github.com/oops1/headless-gui/v3 v3.43.0
github.com/oops1/headless-gui/v4 v4.5.0
golang.org/x/crypto v0.56.0
golang.org/x/sys v0.47.0
golang.org/x/text v0.41.0
Expand Down
Loading
Loading