Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to check if a commit exists? #721

Closed
Labels
@strokirk

Description

@strokirk

Like the title says. I'd like to check if a specific commit exists.
Trying to runiter_commits over a rev that doesn't exists throws an exception, and I'd like to avoid that in order to provide nicer user output for my script.

Pseudocode:

if repo.exists(source):    return list(repo.iter_commits("%s...%s" % (source, target)))else:    print("Couldn't find %s, you need to run git fetch")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp