Next: Filesystem-related Priors, Previous: Instruction Strings, Up: Priors [Contents]
p-search comes with a number of predefined priors for working on git repositories which will be covered in this section. These will only be available to select if there is a candidate document known to be in a git root.
The time of commit prior assigns a score based on the time any commit is found from a specified target time. It can be configured as follows:
The time scale value is used for specifying the parameters for the exponential distribution used in generating scores. Possible values are :days
, :weeks
, :years
, and :months
. The distribution takes as input the absolute value of the time away from the target. A time perfectly matching the target time (i.e. difference of zero, f(0)
) is given a score of 0.7 while a time infinitely away (i.e. f(x) as x -> inf
) is 0.3. The time scale parameter determines how fast this distribution approaches the asymptote. A value of :days
will mean that after ten or so days, the function will reach 0.3, while a value of :years
means that only after 10+ years will the function reach its asymptote.
The date you are want commits to be close to. The commit coming closest to the target date is found, and the difference in time is used as the input of the exponential distribution.
The commit frequency prior takes as input the number of commits to consider and gives a score such that the most committed file recieves a score of 0.7 while the least committed to recieves 0.5. Files receiving no commits get a score of 0.3.
The number of commits to read from and count file commits. This is needed as counting all commits may take a long time and may not be necessary or desired.
The commit author prior takes as input the git author to look for, counts the amount of commits by this author per-file, and scores these files on a linear scale from 0.5 to 0.7. Files not committed to by this author are given a score of 0.3.
The author of git commits to look for. The available selections are obtained by running git log --all --format='%aN' | sort -u
for every git root of the current candidates.
Note that all of these priors will work with more than one git repository in the candidate generators.
Next: Filesystem-related Priors, Previous: Instruction Strings, Up: Priors [Contents]