src-d / go-git

Project has been moved to: https://github.com/go-git/go-git
https://github.com/go-git/go-git
Apache License 2.0
4.91k stars 542 forks source link

AddGlob("*") includes the .git folder into the commit #1259

Open rustyx opened 4 years ago

rustyx commented 4 years ago

AddGlob("*") includes the .git folder into the commit, completely breaking the repo.

AddGlob("*") should skip the .git folder.

rnag commented 4 years ago

also , maybe unrelated , but AddGlob(".") fails on windows most of the time. from testing it looks like whenever there's at least one previous commit, i'm getting some weird error and its unable to add any file at all

rustyx commented 4 years ago

On Windows AddGlob("*") behaves in the same way for me - it succeeds, but adds everything, including the .git folder into the commit.