Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add paths arguments from Git rev-list #11

Merged
merged 1 commit into from Apr 21, 2012

Conversation

Projects
None yet
4 participants
Contributor

chEbba commented May 3, 2011

This patch adds the ability to specify paths for rev-list (last arguments).
Example:

<?php
$git = new VersionControl_Git('/path/to/repository');
$result = $git->getRevListFetcher()
    ->target('master')
    ->paths(array('/path/to/repository/and/some/file/or/dir')) // optional an array of paths
    ->setOption('max-count', 10)
    ->setOption('grep', 'initial')
    ->setOption('date', '3 hours ago')
    ->fetch();
// Result will contain only commits which had affect for specified paths 
Member

co3k commented May 6, 2011

Good. I'll merge it within a week. Thanks for your contribute!

BTW, do you have unit test for it?

Contributor

chEbba commented May 18, 2011

Sorry for the late answer, i was on vacation :)
I was going to write a test, but there was no testcase for VersionControl_Git_Util_RevListFetcher at all. But i can create a full unit test for this class. Will try to do it on the weekend.

Owner

cweiske commented Apr 16, 2012

any update?

@ghost ghost assigned co3k Apr 21, 2012

CloCkWeRX added a commit that referenced this pull request Apr 21, 2012

Merge pull request #11 from chEbba/master
Add paths arguments from Git rev-list

@CloCkWeRX CloCkWeRX merged commit 3ad2b5b into pear:master Apr 21, 2012

Owner

CloCkWeRX commented Apr 21, 2012

Added because "Good. I'll merge it within a week" was unfortunately a year ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment