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

distinguish between empty include/exclude paths #1411

Merged
merged 6 commits into from Aug 2, 2016

Conversation

technoweenie
Copy link
Contributor

@technoweenie technoweenie commented Aug 2, 2016

This uses a pflag.Flag's Changed property to determine if the --include or --exclude flags are empty or omitted. I'm not convinced using *string is any better than setting the default flag value to some magic string like OPTIONAL. It does remove any possibility of clashing with a directory in a user's repository, I suppose.

I also ran into some failures in large test-fetch.sh tests that run git lfs fetch multiple times. Those instances were really difficult to debug, so I split a couple of them up into separate files.

Fixes #1249

if fetchAllArg {
if fetchRecentArg || len(args) > 1 {
Exit("Cannot combine --all with ref arguments or --recent")
}
if fetchIncludeArg != "" || fetchExcludeArg != "" {
if include != nil || exclude != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ttaylorr This is why I need to call getIncludeExcludeArgs() separately.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. 😄

@technoweenie technoweenie merged commit df8f440 into master Aug 2, 2016
@technoweenie technoweenie deleted the empty-include-exclude-paths branch August 2, 2016 16:58
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

Successfully merging this pull request may close these issues.

None yet

2 participants