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

"No commits yet" reported as "Uncommitted changes" #46

Open
OlivierJaquemet opened this issue Apr 26, 2021 · 3 comments
Open

"No commits yet" reported as "Uncommitted changes" #46

OlivierJaquemet opened this issue Apr 26, 2021 · 3 comments

Comments

@OlivierJaquemet
Copy link

OlivierJaquemet commented Apr 26, 2021

To reproduce :

  • Create an empty git repository (git init myemptyrepo)
  • Run mgitstatus on repository
  • Bug : "Uncommitted changes" reported

$ git status

On branch master

No commits yet

nothing to commit (create/copy files and use "git add" to track)

$ mgitstatus myemptyrepo/

myemptyrepo/: Uncommitted changes

@fboender
Copy link
Owner

Thanks for the bug report, Oliver!

There are many edge cases in which multi-git-status shows a status that is not quite accurate. Unfortunately, git is a complex beast and adding logic for these edge cases usually just complicates matters even more.

The goal of multi-git-status is not to account for each edge case, but rather to inform the user that a repo might require some attention. I think in this case the "Uncommitted changes" communicates that well enough.

So I'm going to close this issue. If you disagree with my reasoning, feel free to reopen the issue and let me know!

@OlivierJaquemet
Copy link
Author

thank you @fboender for your answer

Honestly, I think this specific case should be handled differently as "uncommitted changes". Because for my use case, the goal of obtaining multiple projects statuses is to quikcly know what should be done with each project. Reporting "uncommitted changes" incorrectly give the impression that something needs to be done on the repo, but this is not the case.

I saw another user had made a pullrequest with this change (#43, commits 0c83c2c, 81dd899, ...), too bad it also includes many others modification and it cannot be merged anymore.

Unfortunately I have no time for now to help you to change this. So I let you decide on this, as you are the maintainer and I completely understand your position.

@fboender fboender reopened this Apr 29, 2021
@fboender
Copy link
Owner

@OlivierJaquemet okay, that sounds like a reasonable use-case. I've reopened this issue. I think it should be fairly simple to detect such a repo and show a different message, or perhaps don't show a message at all unless -w is specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants