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

Crash: Sequence contains no elements #5

Closed
Kisty opened this issue Mar 4, 2015 · 4 comments
Closed

Crash: Sequence contains no elements #5

Kisty opened this issue Mar 4, 2015 · 4 comments

Comments

@Kisty
Copy link

Kisty commented Mar 4, 2015

Any idea what could be causing this? It started doing this when I added it to the path. Tried doing a clean build again but to no avail.

Unhandled Exception: System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at LibGitUnite.GitUnite.UniteFolderCasing(UniteRepository repo, List`1 folders) in c:\Users\TimKist\Documents\GitHub\git-unite\src\LibGitUnite\GitUnite.cs:line 79
   at LibGitUnite.GitUnite.Process(String gitPath, OptionFlags options) in c:\Users\TimKist\Documents\GitHub\git-unite\src\LibGitUnite\GitUnite.cs:line 50
   at Git.Unite.Program.Main(String[] args) in c:\Users\TimKist\Documents\GitHub\git-unite\src\Git.Unite\Program.cs:line 54
@Kisty
Copy link
Author

Kisty commented Mar 4, 2015

I think this is because there's a folder with no elements.

@tawman
Copy link
Owner

tawman commented Mar 4, 2015

I will take a look at this later today. It sounds reproducible with an empty directory.

Thanks.

@Kisty
Copy link
Author

Kisty commented Mar 4, 2015

Cool. Thanks for that!

@tawman
Copy link
Owner

tawman commented Mar 5, 2015

@Kisty I have not been able to reproduce a scenario that triggers this exception on the First() call. Do you have a small git repo example that causes this exception?

To get to line 79 there must have been a list of OS folders and at least one git index entry found in the list. I will make the code less brittle by checking a folder is found but would love a working example.

Thanks.

@tawman tawman closed this as completed in 8663b43 Mar 5, 2015
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