Custom Action: Multiple parameters get quoted together incorrectly

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 1.5.4
    • Affects Version/s: None
    • Component/s: None
    • None

      From : http://blog.sourcetreeapp.com/2012/02/08/custom-actions-more-power-to-you/#comment-613408965

      I want to do this:

      git diff --name-only SHA1 SHA2
      

      So that when I select two commits, I want to see a list of files that have changed between them. And it seems this sort of works since it contains both SHAs:

      git diff --name-only $SHA
      

      But Source Tree seems to output this: (because of the space character?)

      git diff --name-only "1d150e8485003d1e32703a45b3698ef09a32fae4 9f033ee4f42138dcaff9feaa183e8702b5424e64" So git complains:
      
      fatal: ambiguous argument '1d150e8485003d1e32703a45b3698ef09a32fae4 9f033ee4f42138dcaff9feaa183e8702b5424e64': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions
      

      It appears that this is unintentional quoting done by NSTask that we need to avoid, probably by passing them as separate arguments rather than as a space-concatenated string.

            Assignee:
            Unassigned
            Reporter:
            Steve Streeting (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: