Commit graph

19 commits

Author SHA1 Message Date
Stefan Haller bc9fafff02 Make the conflict marker size a parameter of our marker matching
Git doesn't always write conflict markers of seven characters: the
conflict-marker-size gitattribute overrides that per file, and it is set
for good reasons — for file types whose regular content tends to contain
marker-looking lines, such as documentation about merging, or test
scripts. We hard-code seven characters everywhere we look for markers,
so none of that works.

Prepare for honoring the attribute by threading the marker size through
everything that recognizes a marker, carried on the file model. Nothing
fills it in yet, so we still use git's default size of seven everywhere,
and matching is unchanged: a marker consists of exactly that many marker
characters, and all but the "=======" one are followed by a space and a
label.
2026-08-08 12:43:42 +02:00
Stefan Haller 2e1be45957 Better main view display for conflicing files
For the less common conflict types DD, AU, UA, DU, and UD, we would previously
only show "* Unmerged path" in the main view, which isn't helpful. Also, for
some of these we would split the main view and show this text both in the
unstaged changes and staged changes views, which is a bit embarrassing.

Improve this by offering more explanation about what's going on, and what the
most likely way to resolve the situation is for each case.
2025-04-09 10:27:57 +02:00
Stefan Haller 2dfc3491bd Rename Name to Path in File and CommitFile
Name was very confusing and misleading.
2025-03-20 12:31:34 +01:00
johannaschwarz f455f99705 Add user config gui.showNumstatInFilesView
When enabled, it adds "+n -m" after each file in the Files panel to show how
many lines were added and deleted, as with `git diff --numstat` on the command
line.
2024-12-08 12:09:47 +01:00
Jesse Duffield 7b05dacb98 Properly render worktrees in files panel 2023-07-30 18:35:22 +10:00
Jesse Duffield e8b97c9fe2 fix could-not-access error 2022-11-11 12:30:14 +11:00
Abirdcfly d78d694959
chore: remove duplicate word in comments
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-30 13:23:37 +08:00
Jesse Duffield a905165046 remove double negatives 2022-07-31 16:11:39 +10:00
Jesse Duffield 7077ea428f add optimistic rendering for staging and unstaging files 2022-07-31 14:34:57 +10:00
Ryooooooga 53257db99d fix: fix diff of renamed files 2022-04-06 08:26:13 +10:00
Mark Kopenga 2eeff1257b
Merge pull request #1432 from black-desk/moved-submodule
fix moved submodule
2021-08-17 10:10:22 +02:00
Ryooooooga a2f7fcd730
Remove unused constant 2021-08-16 23:21:46 +09:00
black_desk bb4fe2653b fix moved submodule 2021-08-13 17:03:37 +08:00
Jesse Duffield 9e85d37fb9 refactor to no longer call these things file changes 2021-04-02 11:00:15 +11:00
Jesse Duffield d5639e6e95 refactor 2021-03-30 21:57:00 +11:00
Jesse Duffield da6fe01eca allow toggling on/off file tree mode 2021-03-30 21:57:00 +11:00
Jesse Duffield 77a7619690 showing changes for directories 2021-03-30 21:57:00 +11:00
Jesse Duffield ad1468f66f better handling of discarding files 2021-03-20 12:46:27 +11:00
Jesse Duffield ce6f8ed1bc move models folder into commands folder 2020-09-29 20:48:49 +10:00
Renamed from pkg/models/file.go (Browse further)