Prevent to track file outside git repository#294
Prevent to track file outside git repository#294aorjoa wants to merge 5 commits intogit-lfs:masterfrom
Conversation
|
Thanks for the PR! One piece of feedback I have is, we have some existing code that determines the local git directory and sets /cc #200 |
|
👍 |
|
I was change code for check lfs.LocalGitDir == "" |
|
I think it's better to inline the function if lfs.LocalGitDir == "" {
Print("Git LFS cannot perform outside git repository.")
return
}Small helper functions are considered good style in go, but in this case it's just a bunch of negations (equal → false → negation) which makes it harder to understand what happens on a low level (maintainability). The message in And last, but not least, I'm voting in favor of squashing the commits together. :) |
|
Thank you very much for your advice. 👍 I would like to change the message to "Not in a Git LFS repository". Do you think it's clear enough? @michael-k :) |
|
git itself says: or with
|
|
I redid this PR as #323. Normally I wouldn't do something like that, but I wanted to test this on the new test suite. The actual command change is pretty minimal. My PR takes @michael-k's suggestion into account. It also doesn't change the import formatting in |
according #293 my report issue, now i already hack code for fixed.
if anybody run
$ git lfs trackoutside git repository it's show message "Git LFS cannot perform outside git repository."