GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — How to change parameters order in iter_commits · gitpython-developers/GitPython · Discussion #1980

How to change parameters order in iter_commits #1980

Answered by Byron
ixSci asked this question in Q&A
How to change parameters order in iter_commits #1980
@ixSci ixSci
Dec 4, 2024 · 1 comment
Answered by Byron Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

ixSci
Dec 4, 2024

Hello, I have the following simple line: commits = repo.iter_commits(reference, **{'not': True}, all=True) which generates the following: git.cmd:Popen(['git', 'rev-list', '--not', '--all', 'REF'.... Unfortunately this order is wrong and produces no commits as the command should look like this: git rev-list REF --not --all.

Is there a way I can achieve this with GitPython?

You must be logged in to vote
All reactions
Answered by Byron Dec 4, 2024

I think this section on using Git directly would have the answers and what's theoretically possible.

Here, however, I since he method only provides kvargs, the order is probably not defined anymore. The only way to control it is to use Git directly, i.e. repo.git.rev_list('--not', '--all'), and to parse the result by hand.

View full answer

Replies: 1 comment

Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

Byron
Dec 4, 2024
Maintainer

I think this section on using Git directly would have the answers and what's theoretically possible.

Here, however, I since he method only provides kvargs, the order is probably not defined anymore. The only way to control it is to use Git directly, i.e. repo.git.rev_list('--not', '--all'), and to parse the result by hand.

You must be logged in to vote
All reactions
0 replies
Answer selected by ixSci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
@ixSci @Byron
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.