Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-1001

git -C does not exist on older git clients

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.9.0
    • Component/s: None
    • Environment:
    • Template:
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Rewritten how PDK executes git so that it changes directory into the git repository before running git commands rather than using `git -C` (which automatically changes the directory, but is not present in older versions of git).
    • QA Risk Assessment:
      Needs Assessment

      Description

      When performing a pdksync, git is called with the `-C <path>` argument. Unfortunately, the git available in Enterprise Linux does not support that argument. I updated to the most recent git package available (git-1.8.3.1-13.el7.x86_64) and that flag has not been backported.

      Possible calls

      [rnelson0@build03 pdk:master]$ grep -nR -- -C *
      lib/pdk/module/templatedir.rb:295:          reset_result = PDK::Util::Git.git('-C', temp_dir, 'reset', '--hard', git_ref)
      locales/pdk.pot:12:"POT-Creation-Date: 2018-04-30 11:41-0700\n"
      spec/unit/pdk/module/template_dir_spec.rb:282:      allow(PDK::Util::Git).to receive(:git).with('-C', tmp_path, 'reset', '--hard', 'default-ref').and_return(exit_code: 0)
      spec/unit/pdk/module/template_dir_spec.rb:304:      allow(PDK::Util::Git).to receive(:git).with('-C', tmp_path, 'reset', '--hard', 'origin/master').and_return(exit_code: 0)
      

        Attachments

          Activity

            People

            Assignee:
            tim.sharpe Tim Sharpe
            Reporter:
            rnelson0@gmail.com Rob Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support