You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IsClean method returns false even if the working directory has no unstaged/uncommitted changes #332
bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is neededstaleIssues/PRs that are marked for closure due to inactivity
I experience the same issue. I tried the solution from #390 but IsClean returns true in some cases even if there are 0 changed files with 0 additions and 0 deletions.
I think this happens if a file is deleted but a new file is created with the exact same data. So status.Staging is unmodified but status.Worktree will be set to Deleted and thus IsClean returns true but on GitHub it will show as an empty commit as nothing has changed.
to also add deleted files as worktree.AddWithOptions(&git.AddOptions{Path: transfer.ChartLocation, All: true}) did not seem to do it. Then I also have no empty commits.
To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while.
This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed.
We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active.
To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while.
This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed.
We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active.
bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is neededstaleIssues/PRs that are marked for closure due to inactivity
Activity
thacoon commentedon Apr 14, 2022
I experience the same issue. I tried the solution from #390 but IsClean returns true in some cases even if there are 0 changed files with 0 additions and 0 deletions.
I think this happens if a file is deleted but a new file is created with the exact same data. So
status.Stagingisunmodifiedbutstatus.Worktreewill be set toDeletedand thusIsCleanreturns true but on GitHub it will show as an empty commit as nothing has changed.thacoon commentedon Apr 25, 2022
I now think that
IsClean()is working correctly but the issue was that deleted files were not staged correctly, related Issue is #223My current workaround is to run
to also add deleted files as
worktree.AddWithOptions(&git.AddOptions{Path: transfer.ChartLocation, All: true})did not seem to do it. Then I also have no empty commits.github-actions commentedon Feb 23, 2024
To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while.
This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed.
We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active.
Thanks for your understanding and cooperation!
fix: add `CheckWorkTreeIsDirtyWithGitCmd` to try fix windows error
github-actions commentedon Jun 28, 2024
To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot issues/PRs that haven't had any activity in a while.
This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled as 'stale'. If it remains inactive for the next 30 days, it'll be automatically closed.
We understand everyone's busy, but if this issue is still important to you, please feel free to add a comment or make an update to keep it active.
Thanks for your understanding and cooperation!