mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
feat: change worktree presentation (#978)
Present the worktree name first, then relative path to the main repo. This is more aligned with Git's own UI, and works better with UI size constrains.
This commit is contained in:
parent
c6aedf1193
commit
588879eb7f
4 changed files with 11 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace SourceGit.Commands
|
||||
{
|
||||
|
@ -26,6 +27,7 @@ namespace SourceGit.Commands
|
|||
if (line.StartsWith("worktree ", StringComparison.Ordinal))
|
||||
{
|
||||
last = new Models.Worktree() { FullPath = line.Substring(9).Trim() };
|
||||
last.RelativePath = Path.GetRelativePath(WorkingDirectory, last.FullPath);
|
||||
worktrees.Add(last);
|
||||
}
|
||||
else if (line.StartsWith("bare", StringComparison.Ordinal))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue