Skip to main content

All Questions

Tagged with
2 votes
0 answers
377 views

How can I calculate exact total changed LOC of pull requests in a project which uses Azure DevOps (with GitPython)

I have a project which uses Azure DevOps as version control system. I want to get total changed line of code count for every pull request in the project. To do this, I send a request to Azure DevOps ...
Sergen's user avatar
  • 21
4 votes
2 answers
1k views

git diff between current date and some times ago in GitPython

I am using GitPython to find the changed file for a certain period of time (for example now and 1 week ago): repo = Repo(self.repo_directory) for item in repo.head.commit.diff('develop@{1 weeks ago}...
Alan's user avatar
  • 469
1 vote
0 answers
1k views

Find the number of unique changes in a file, with gitpython

I want to determine how much a file has changed, since some date. What I have so far: def find_changes(repo:git.Repo, file_to_check:str, since=None): ''' finds all commits in which the file with ...
dasWesen's user avatar
  • 617
1 vote
1 answer
643 views

How to diff a commit with its parent in GitPython

I'm working on a tool to find commits that only contain whitespaces changes using GitPython. In order to do so I need to see what a commit has changed from its parent. The second answer to the ...
Marti's user avatar
  • 21
31 votes
8 answers
60k views

gitpython and git diff

I am looking to get only the diff of a file changed from a git repo. Right now, I am using gitpython to actually get the commit objects and the files of git changes, but I want to do a dependency ...
user1816561's user avatar