saltstack/salt — pull request #11086 by krak3n (2014-03-10 13:57:35+00:00)
Title: Fix master._clear_old_jobs for ext_pillars with root parameter

Pillars can now have a root=subdirectory parameter added to it which allows pillars to be loaded from a sub directory within a git repository, see:

http://docs.saltstack.com/topics/tutorials/gitfs.html#using-git-as-an-external-pillar-source

For example:

```
ext_pillar:
- git: master https://domain.com/pillar.git root=subdirectory
```

However when the Salt Master attempts to clear old jobs it only unpacks out the ext_pillar option in to 2 values by splitting the string at spaces. This results in a `ValueError: too many values to unpack` error when the Salt Master starts and prevents Salt from downloading externally hosted States.

Seeing as we only need the branch and location this solution breaks string and gets the first 2 elements we need of the split list and raises an exception if this fails.