Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behavior of isClean check #21

Open
lwolf opened this issue Jul 2, 2020 · 3 comments
Open

Inconsistent behavior of isClean check #21

lwolf opened this issue Jul 2, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@lwolf
Copy link

lwolf commented Jul 2, 2020

For some reason !isClean() introduced in the #3 doesn't always work as expected.

Here is the output from git status and cob:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

$ cob
2020/07/02 15:30:59 the repository is dirty: commit all changes before running 'cob'

This fails both locally and in the CI for some repos, but doesn't fail for others.

Could this check be optional, so it could be force disabled in the CI where one doesn't care about loosing state.

@szuecs
Copy link

szuecs commented Jul 20, 2021

@lwolf would be great if this could be fixed. Do you have a patched fork? (yes: lwolf@3e1328e)
I can't use it because of the same issue.
I have some additional temp files locally, that are not part of the git tree and the tool fails, even when I specify a clean path like:

% cob --bench-args "test -run '^$' -bench . -benchmem ./routing"
2021/07/20 10:29:23 the repository is dirty: commit all changes before running 'cob'
zsh: exit 1     cob --bench-args "test -run '^$' -bench . -benchmem ./routing"

szuecs added a commit to szuecs/cob that referenced this issue Jul 20, 2021
treussart pushed a commit to Olfeo/cob that referenced this issue Dec 6, 2023
@treussart
Copy link
Contributor

I have the same problem, it makes this code unusable.

treussart pushed a commit to Olfeo/cob that referenced this issue Dec 6, 2023
@knqyf263 knqyf263 added the help wanted Extra attention is needed label Dec 6, 2023
@treussart
Copy link
Contributor

treussart commented Dec 6, 2023

I fix this problem by remove the check, 145be31

I suggest changing libraries to https://github.com/go-git/go-git but It seems that there is a problem with this function :

go-git/go-git#167
go-git/go-git#387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants