i can in gitbash: $ git diff --name-only v01...head -- *.sql
which gives:
components/1/database/stored procedures/spdc1.sql components/1/database/stored procedures/spdc2.sql
i can't see how in libgit2sharp. ideas? thanks
here example 1 of projects icommitlog collection between 2 commits (current head vs. master branch):
// git log head..master --reverse public icommitlog stalkerlist { { var filter = new commitfilter { sortby = commitsortstrategies.reverse | commitsortstrategies.time, since = master, until = head.tip, }; return repo.commits.queryby (filter); } } once have icommitlog collection of commits within range need, can cycle through each commit list of files effected within commit (of course need add filtering of filename via "*.sql" requirements):
public string[] filestomerge (commit commit) { var filelist = new list<string> (); foreach (var parent in commit.parents) { foreach (treeentrychanges change in repo.diff.compare<treechanges>(parent.tree, commit.tree)) { filelist.add (change.path); } } return filelist.toarray (); }
Comments
Post a Comment