Git
In Advanced and Expert mode, a file in a Git repository shows what has changed since the last commit, as you type. Git doesn't come with TriPad: it uses the one you have.
- Changed lines: a thin bar in the margin, green for an added line and amber for a changed one. A small red wedge at the top of a line means lines were removed above it.
- The last change on the current line: at the end of the line with the caret, in a dim colour, such
as
Patrick, 3 days ago - Add large-file mode, orNot committed yet. It is never printed. - Hovers: rest the mouse on the margin or on that note to see the commit's short id, author, date and summary.
Tools > Git, also in the command palette:
| Command | Key | What it does |
|---|---|---|
| Diff against Git | Shows the last commit on the left and your document on the right, in the compare view. The commit's side is read-only and closes with the comparison. F7 and Shift+F7 step through the differences. | |
| Next Change, Previous Change | Alt+F7, Alt+Shift+F7 | Go to the next or previous change, wrapping round, with Change 2 of 5 in the status bar. |
| Who Changed This Line? | Shows the commit in the status bar, where a screen reader can read it, and as a tip at the caret. | |
| Show Changed Lines, Show Last Change on the Line | Turn the marks and the note on and off. |
Preferences > Git has the same two settings and Git program, for a git.exe TriPad can't find.
Otherwise it looks on your PATH, then in Git's usual folders under Program Files and
%LOCALAPPDATA%\Programs.
There are no marks for an Untitled document, a read-only file, a binary, large-file mode, the hex view, a file over 32 MB, or a file whose last commit is a Git LFS pointer.
Typing never runs Git: an edit is compared with the committed text TriPad already has. Git runs when a file comes to the front, after saving and when a window is activated, at most every 2 seconds for a document, so a commit made in a terminal shows when you come back. In Simple mode none of this runs, and nothing runs if both settings are off.
What runs#
TriPad only reads the repository. A repository's own settings can name programs for Git to run, and a
folder someone sent you can contain such a repository, so opening a file must never start them. Plain
git status, git diff and git blame do start them. TriPad only ever runs git rev-parse,
git cat-file and git blame <commit>, with the filesystem monitor and fetching of missing objects
turned off, and it runs git.exe by its full path, so one in the file's folder is ignored. If Git
refuses a repository as having dubious ownership, there are simply no marks. Commit messages and
author names are shown as plain text, with control characters removed.
One thing this doesn't stop: a repository's files can point Git at a folder on a network share, so opening a file in it can make Windows connect to that server and offer your sign-in. No program runs. If that matters where you work, turn off both settings in Preferences > Git.