psss / did

What did you do last week, month, year?
https://did.readthedocs.io/
GNU General Public License v2.0
246 stars 104 forks source link

Git: Glob expansion does not work #178

Open lzap opened 5 years ago

lzap commented 5 years ago

Here is my config:

[commits]
type = git
foreman = /home/lzap/work/foreman*
proxy = /home/lzap/work/smart?proxy*

But it does not work somehow:

[lzap@box ~]$ did yesterday
Status report for yesterday (2018-12-19 to 2018-12-19).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 xxxx@redhat.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Bugs filed: 1
    * BZ#1660776 - Kernel 4.19.9-300.fc29.x86_64 boot hangs: switching to...
 ERROR  Unable to access git repo '/home/lzap/work/foreman*'

I have plenty of directories under that path.

[lzap@box ~]$ ls /home/lzap/work/foreman* -d1
/home/lzap/work/foreman
/home/lzap/work/foreman_abrt
/home/lzap/work/foreman_ansible
/home/lzap/work/foreman-ansible-modules
/home/lzap/work/foreman_api
/home/lzap/work/foreman-appliances
/home/lzap/work/foreman-bats
/home/lzap/work/foreman_bootdisk
/home/lzap/work/foreman-bootloaders
/home/lzap/work/foreman-client-tools
/home/lzap/work/foreman_cockpit
/home/lzap/work/foreman_colly
/home/lzap/work/foreman_content
/home/lzap/work/foreman_default_hostgroup
/home/lzap/work/foreman-dev-dbs
/home/lzap/work/foreman_dhcp_browser
/home/lzap/work/foreman_discovery
/home/lzap/work/foreman-discovery-image
/home/lzap/work/foreman-docker
/home/lzap/work/foreman_docker_attempt
/home/lzap/work/foreman-dummy-icons
/home/lzap/work/foreman-gpg
/home/lzap/work/foreman-graphics
/home/lzap/work/foreman_hooks
/home/lzap/work/foreman-infra
/home/lzap/work/foreman-installer
/home/lzap/work/foreman-installer-staypuft
/home/lzap/work/foreman-internal-certificates
/home/lzap/work/foreman-katello-engine
/home/lzap/work/foreman-live
/home/lzap/work/foreman_macon
/home/lzap/work/foreman_maintain
/home/lzap/work/foreman_memcache
/home/lzap/work/foreman_openscap
/home/lzap/work/foreman-packaging
/home/lzap/work/foreman-pcp
/home/lzap/work/foreman_plugin_template
/home/lzap/work/foreman_remote_execution
/home/lzap/work/foreman_reserve
/home/lzap/work/foreman-rpms
/home/lzap/work/foreman_salt
/home/lzap/work/foreman-satellite6
/home/lzap/work/foreman-scripts
/home/lzap/work/foreman-selinux
/home/lzap/work/foreman_setup
/home/lzap/work/foreman-stable
/home/lzap/work/foreman-stable-1.19
/home/lzap/work/foreman-system-spec
/home/lzap/work/foreman-tasks
/home/lzap/work/foreman_templates
/home/lzap/work/foreman-tracer
psss commented 5 years ago

Currently only whole directories are supported, so something like this should work fine:

[commits]
type = git
foreman = /home/lzap/work/foreman/*

But extending the glob expansion to work for your use case should be easy.