Thanks to visit codestin.com
Credit goes to github.com

Skip to content

from_commit filter working incorrectly #266

@IP1102

Description

@IP1102

Describe the bug
I was analyzing the Apache Maver Core repository (https://github.com/apache/maven). I wanted to only analyze from_commit = "388e659a17d23cba75afd93336181f768248efa3" till the latest commit. This from commit hash was made on 2010-09-26 But when I add this filter value to the Repository class, instead of starting from 388e659a17d23cba75afd93336181f768248efa3 it starts from f9dca87cad2671becaac63df47077bf8660b9d33 which was made on 2005-12-12. There are an extra 1286 commits between actual start and intended start.

To Reproduce
To reproduce this, the following steps can be followed -

  1. Clone the Apache Maven repository (https://github.com/apache/maven)
  2. Write a small script like below:
    for idx,commit in enumerate(Repository(<path_to_cloned_repo>, 
                                           include_refs=False,include_remotes=True,
                                           from_commit="388e659a17d23cba75afd93336181f768248efa3", 
                                           ).traverse_commits()):

        if commit.hash=="388e659a17d23cba75afd93336181f768248efa3":
            print("ID",idx)
            print(commit.committer_date)

        if idx==0:
            print("Oldest-",commit.hash)
            print("Oldest-",commit.committer_date)

OS Version:
Windows/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions