Apache Cordova
  1. Apache Cordova
  2. CB-4622

Allow git URLs to contain tags / hashes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Plugman
    • Labels:
      None

      Description

      plugman.fetch allows you to pass in a git ref to checkout after fetching. It's not currently exposed by the command-line though (only exposed through CLI)

      Instead of having this as a separate argument to the fetch function, we should build it into the URL.

      NPM (refer to https://npmjs.org/doc/install.html): uses <protocol>://[<user>@]<hostname><separator><path><commit-ish>

      We also need to specify a sub-directory, so let's use:

      <protocol>://[<user>@]<hostname><separator><path><commit-ish>[:subdir]

      subdir does not start with a /.

      Our 3.0 instruction could then look like:
      "Install via plugman install http://.../cordova-plugin-geolocation.git#stable"

      Note that we'll also need to update <dependency> tag handling to allow this format of URIs (might just be a docs update)

        Issue Links

          Activity

          Hide
          Andrew Grieve added a comment -

          Note that there is a pull request in CB-4715 that does some of what we want here. It uses a different URL scheme though.

          Show
          Andrew Grieve added a comment - Note that there is a pull request in CB-4715 that does some of what we want here. It uses a different URL scheme though.
          Hide
          ASF subversion and git services added a comment -

          Commit 73c3aa72046dd649d4dca6660c983ff540f1d01d in branch refs/heads/master from Braden Shepherdson
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugman.git;h=73c3aa7 ]

          CB-4622: Allow git URLs with a hash specifying git ref and subdir

          Format is https://github.com/foo/bar.git#gitref:subdir. Subdir is
          optional, so #gitref is valid, and git refs can be omitted to use HEAD
          with some subdir (#:subdir).

          Show
          ASF subversion and git services added a comment - Commit 73c3aa72046dd649d4dca6660c983ff540f1d01d in branch refs/heads/master from Braden Shepherdson [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugman.git;h=73c3aa7 ] CB-4622 : Allow git URLs with a hash specifying git ref and subdir Format is https://github.com/foo/bar.git#gitref:subdir . Subdir is optional, so #gitref is valid, and git refs can be omitted to use HEAD with some subdir (#:subdir).

            People

            • Assignee:
              Braden Shepherdson
              Reporter:
              Andrew Grieve
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development