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

[Docs] Use pubspec's ref attribute maybe? #3

Closed
raveesh-me opened this issue May 21, 2019 · 3 comments · Fixed by #5
Closed

[Docs] Use pubspec's ref attribute maybe? #3

raveesh-me opened this issue May 21, 2019 · 3 comments · Fixed by #5

Comments

@raveesh-me
Copy link

raveesh-me commented May 21, 2019

Hi!
In the user's guide,

razorpay_flutter:
  git:
    url: git://github.com/razorpay/razorpay-flutter.git#f7ea14a

This is the format given to import the package to the flutter project. However, this ends up in error message:

Running "flutter packages get" in dole-flutter-app...           
Git error. Command: git fetch
fatal: not a git repository (or any of the parent directories): .git

On MacOS, with everything else to latest.

Please consider using ref: attribute as mentioned in the official pub docs.
https://dart.dev/tools/pub/dependencies#git-packages

Also, this works fine:

  razorpay_flutter:
    git:
      url: git://github.com/razorpay/razorpay-flutter.git
      ref: "f7ea14a"
umanghome pushed a commit that referenced this issue May 22, 2019
umanghome pushed a commit that referenced this issue May 22, 2019
* Fix installation doc

Closes #3

* Add quotes around commit hash
@umanghome
Copy link
Contributor

Thanks for reporting!

@SlickSlime
Copy link

The current method mentioned in the User Guide is also resulting in error!

razorpay_flutter:
  git:
    url: git://github.com/razorpay/razorpay-flutter.git
    ref: "f7ea14a"

Error

Git error. Command: git rev-list --max-count=1 f7ea14a                  
fatal: ambiguous argument 'f7ea14a': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:                   
'git <command> [<revision>...] -- [<file>...]'   

@umanghome
Copy link
Contributor

@SlickSlime It seems to work for us.

We've updated the documentation to mention the tag instead of the commit hash, and it works for both (tag and commit hash) for us.

What version of git are you using? Can you try cloning this repository and then running git rev-list --max-count=1 v1.0.0-alpha in the cloned directory?

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 a pull request may close this issue.

3 participants