show individual untracked files in git changes widget (#8574)
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
This commit is contained in:
@@ -20,7 +20,10 @@ pub fn get_changed_files(path: String) -> Result<Vec<ChangedFile>, String> {
|
|||||||
return Ok(Vec::new());
|
return Ok(Vec::new());
|
||||||
}
|
}
|
||||||
|
|
||||||
let status_output = run_git_success(&repo_path, &["status", "--porcelain"])?;
|
let status_output = run_git_success(
|
||||||
|
&repo_path,
|
||||||
|
&["status", "--porcelain", "--untracked-files=all"],
|
||||||
|
)?;
|
||||||
if status_output.trim().is_empty() {
|
if status_output.trim().is_empty() {
|
||||||
return Ok(Vec::new());
|
return Ok(Vec::new());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ interface WidgetProps {
|
|||||||
export function Widget({ title, icon, action, flush, children }: WidgetProps) {
|
export function Widget({ title, icon, action, flush, children }: WidgetProps) {
|
||||||
return (
|
return (
|
||||||
<div className="overflow-hidden rounded-md border border-border">
|
<div className="overflow-hidden rounded-md border border-border">
|
||||||
<div className="flex h-8 items-center justify-between bg-background-alt px-3">
|
<div className="flex h-8 items-center justify-between gap-2 bg-background-alt px-3">
|
||||||
<div className="flex min-w-0 items-center gap-2 text-xs font-medium text-foreground">
|
<div className="flex min-w-0 items-center gap-2 text-xs font-medium text-foreground">
|
||||||
{icon}
|
{icon}
|
||||||
{title}
|
{title}
|
||||||
</div>
|
</div>
|
||||||
{action}
|
{action && <div className="shrink-0">{action}</div>}
|
||||||
</div>
|
</div>
|
||||||
{flush ? (
|
{flush ? (
|
||||||
children
|
children
|
||||||
|
|||||||
Reference in New Issue
Block a user