libgit2 / libgit2/pygit2

Walker?

Open
#1,055 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.7k
Forks
408
Avg merge
2d 57m
Merged PRs (30d)
7

Description

https://www.pygit2.org/commit_log.html describes a Walker object, but does not explain how to get one or how to use it. Are we to infer that the the iterator produced by the call to Repository.walk() immediately above is an object of type Walker? When I debug that seems to be the case.

For example, if heads is a list of heads and w a Walker, will

for h in heads:
    w.push(h)
    for cmt in w:
        do_stuff(cmt)

call do_stuff exactly once (i.e., the walker remembers and ignores commits already visited on later calls) for each commit in my repository that is reachable from any head?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the commit_log documentation at https://www.pygit2.org/commit_log.html and the description of Repository.walk(). Clarify how a Walker is obtained and used, including whether iteration retains visited commits across repeated push calls. Done means the page answers the example's behavior without requiring readers to infer it.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.