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

Implement git refs #79

Merged
merged 11 commits into from
Jan 13, 2021
Merged

Conversation

pete0emerson
Copy link
Contributor

@pete0emerson pete0emerson commented Nov 12, 2020

This closes #73

This implements a --ref flag which can be used instead of --tag, --branch, or --commit.

Copy link
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

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

Looks like a good start to me! I made some minor comments on the phrasing, but feel free to use or ignore those, as none are terribly important, esp given time limits.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
pete0emerson and others added 9 commits November 12, 2020 09:01
Co-authored-by: Yevgeniy Brikman <[email protected]>
```
$ go build . && ./fetch --repo=https://github.com/pete0emerson/demo --ref=banana demo
Downloading git reference "banana" of https://github.com/pete0emerson/demo ...
Extracting files from <repo>/ to demo ... 2 files extracted
Download and file extraction complete.
```

Note that this doesn't do any testing yet (booo).
It also doesn't consider the parsing of the ref for a potential tag constraint.
@pete0emerson pete0emerson changed the title Intial plan for implementing git refs Implement git refs Nov 12, 2020
@pete0emerson
Copy link
Contributor Author

This closes #73

@pete0emerson pete0emerson marked this pull request as ready for review November 12, 2020 18:42
Copy link

@bwhaley bwhaley left a comment

Choose a reason for hiding this comment

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

Overall this LGTM! The docs are clear, the tests cases seem sufficient, and the implementation looks clean. I'm not a CODEOWNER on this repo and I haven't contributed to this project before, so I'll defer the approval to one of the CODEOWNERs.

My only open question though is this: it seems like--ref supersedes --tag, --branch, and --commit, so why keep those flags around?

@pete0emerson
Copy link
Contributor Author

My only open question though is this: it seems like--ref supersedes --tag, --branch, and --commit, so why keep those flags around?

The only reason for keeping the other flags around is for backwards compatibility. Once any uses of it are moved over to --ref, those could be trashed. I'd do that in a separate PR.

@ina-stoyanova
Copy link

Looks good & easy to understand!

main.go Show resolved Hide resolved
Copy link

@ina-stoyanova ina-stoyanova left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@pete0emerson pete0emerson deleted the pete/73/git_refs branch January 13, 2021 17:21
@pete0emerson pete0emerson merged commit 37e8f10 into gruntwork-io:master Jan 13, 2021
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.

Support git refs
4 participants