C.22 GitLogTask

Show commit logs. See official documentation.

Table C.23: Attributes

NameTypeDescriptionDefaultRequired
gitPathStringPath to Git binary/usr/bin/gitNo
repositoryStringPath to Git repositoryn/aYes
pathsString<paentry> arguments to git-log. Accepts one or more paths delimited by PATH_SEPARATORn/aNo
outputPropertyStringProperty name to set with output value from git-logn/aNo
formatStringCommit format. See --format of git-log. Can be one of oneline, short, medium, full, fuller, email, raw and format:<string>mediumNo
dateStringDate format. See --date of git-log.n/aNo
sinceString<since> argument to git-log.n/aNo
untilString<until> argument to git-log.n/aNo
statStringGenerate a diffstat. See --stat of git-logn/aNo
nameStatusBooleanNames + status of changed files. See --name-status of git-log.falseNo
maxCountIntegerNumber of commits to show. See -<n>|-n|--max-count of git-log.n/aNo
noMergesBooleanDon't show commits with more than one parent. See --no-merges of git-log.falseNo

C.22.1 Example

<property name="repo.dir" value="./relative/path/to/repo" />
                <resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />

                <!-- clone repository -->
                <gitclone
                repository="git://github.com/path/to/repo/repo.git"
                targetPath="${repo.dir.resolved}" />
                
                <gitlog
                paths="${repo.dir.resolved}"
                format="oneline"
                maxCount="2"
                stat="true"
                noMerges="false"
                since="Sun Jan 23 23:55:42 2011 +0300"
                until="Mon Jan 24 09:59:33 2011 +0300"
                outputProperty="logs"
                repository="${repo.dir.resolved}" />