Skip to content

Gitty 0.1.5

Choose a tag to compare

@baojie baojie released this 12 Aug 07:46
· 146 commits to master since this release

Added

  • Six new settings, and a third Session group in the dialog to hold the
    ones that are not about a pane:

    • Context lines — 0 to 25 lines of context around each hunk (git's -U,
      whose default is 3), so a change can be read in as much or as little of its
      surroundings as it needs.
    • Ignore whitespace — Off, Amount (-b) or All (-w). Reindented or
      rewrapped code reads as unchanged instead of as a wall of red and green.
      The file list's churn counts follow the same setting, so +12 −3 cannot
      claim lines the diff beside it then refuses to show.
    • Reopen last session — the repositories open at exit come back as tabs
      at the next launch. The repository Gitty was started with stays the active
      one; any that have since been deleted are quietly dropped.
    • Monospace font — the family the panes and the terminal are drawn in.
      Empty keeps the built-in stack, and a font the system lacks falls through
      to it.
    • Time format — Absolute or Relative (28m ago), a companion to the
      time-zone setting. Hover tips stay absolute either way.
    • Shell and Login shell — which shell a terminal starts and whether
      it sources the user's profile. Both are read when a session is created, so
      they apply to the next split rather than to running shells. A shell path
      that does not exist falls back to the system's rather than leaving a dead
      pane.
  • Time zone in Settings: the zone every date and time on screen is rendered
    in — the machine's own by default, UTC, or any zone the system knows. Git
    stores a commit with its author's own offset, so a stamp was always a choice
    of zone; now it is one that can be made. The commit log, a file's history and
    the commit header all follow it, and so does the cutoff between a row showing
    a time and one showing a date, which is a calendar day in the chosen zone.
    A row's hover tip now spells the time out with the zone it is in, in place of
    the raw ISO stamp.

  • A staged file's name is green in the work tree, the colour its index column
    already carried. Partly staged counts — the index has something either way —
    and a staged deletion keeps the line through its name as well.

  • Delete File… in the work tree's file context menu. It asks first, in a
    native dialog, and moves the file to the system trash — recoverable outside
    git as well as inside it. Where there is no trash to move it to (a mount
    without one, a system with none at all) it asks a second time and says
    plainly that the file leaves the disk. The entry belongs to the work tree
    alone: a commit's file list and a snapshot describe revisions, where there is
    nothing on disk to delete, and a file already deleted is not offered either.

  • Per-file churn in the file tree, after the line count: +12 −3, the lines
    this change added and removed in that file. Measured against HEAD in the work
    tree and against the parent for a commit or a range. A snapshot is a tree
    rather than a change and shows none, as do binary files and merge commits.

  • Ctrl+Shift+0 shows all four panes again, so a layout hidden down to
    one pane can be restored without going through the Panes menu. The menu
    entry now names the key. Zero belongs with Ctrl+1Ctrl+4
    but takes the Shift, since Ctrl+0 is reset-zoom.

  • Gource, in the commits pane, where gource is on
    PATH: an animation of the repository growing, commit by commit. It runs in
    its own window and outlives Gitty; a day of history per half second, idle
    files kept on screen and long gaps skipped, so a real history reads as
    something happening. Where gource is not installed the button is not
    rendered — nothing is downloaded, suggested or installed on your behalf.

  • Browsing history, with and at the left of the title bar
    (Alt+← / Alt+→) and a listing the places viewed,
    most recent first, with a dot on the current one. A place is the whole of what
    the top panes were showing — the view, the file selected in it and the
    document open beside the diff — so going back to src/main/git.ts @ 7bb7787
    puts that file back on screen at that revision, not merely the commit.
    Hovering a button names where it leads. Each tab keeps its own fifty most
    recent places; they are not remembered across restarts.

  • A macOS launcher. setup.sh now picks the shortcut by platform and writes a
    minimal Gitty.app to ~/Applications, with a symlink on the Desktop,
    wrapping the same run.sh. Nothing is packaged — the bundle is there to give
    Finder and the Dock a name and an icon, built from build/icon.png via sips
    and iconutil. The Dock itself is left alone, as on Linux. Because a bundle
    launched from Finder inherits launchd's minimal PATH, node and npm are
    resolved at install time and prepended, so the build-if-stale step still
    works; re-run setup.sh after switching Node versions. Requested by
    @OrangeViolin (#2).

Fixed

  • Font size and row height started at their minimums (11 and 18) on a fresh
    install rather than at their defaults (12.5 and 20): the stored value was
    read through Number(localStorage.getItem(…)), and Number(null) is 0,
    which is finite — so the fallback never ran and the clamp took over.

  • A long file name pushed its line count and churn out of the file tree. The
    name is a flex item beside fixed-width ones, and those were shrinking first:
    the indent and the status codes collapsed while the name kept its full length,
    so the row overran the pane and the numbers at its end went with it. Only the
    name gives way now, ellipsised to whatever room the rest of the row leaves.

  • setup.sh wrote a gitty.desktop entry on macOS, where nothing would ever
    read it. The shortcut now follows uname.

  • run.sh now says so when Electron's binary was never downloaded, instead of
    launching a broken install that hangs on "Downloading Electron binary…" with
    nothing to act on. The old check looked for dist/electron, the Linux
    layout, and otherwise fell back to .bin/electron — a symlink to the
    package's cli.js, which is executable whether or not a binary exists. The
    path now comes from the package's own path.txt, so macOS resolves too, and
    a missing binary reports how to reinstall it, ELECTRON_MIRROR included.
    Reported and fixed by @OrangeViolin (#1, #4).

  • package.json read 0.1.3 at the v0.1.4 tag, so the release described
    itself as the one before it. Thanks @OrangeViolin (#3).