Skip to content

Navigation Menu

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

Appearance settings

Note in post_clear_cache docstring may be out of date #1847

Copy link
Copy link
Closed
@EliahKagan

Description

@EliahKagan
Issue body actions

The git.index.util.post_clear_cache decorator has this note in its docstring:

:note:
This decorator will not be required once all functions are implemented
natively which in fact is possible, but probably not feasible performance wise.

This decorator is applied to the merge_tree, move, and remove methods of git.index.IndexFile (and nowhere else).

As such, that note in the decorator's docstring suggests an intended design direction for the IndexFile implementation in GitPython: that, if performance considerations permit, it should eventually make little to no use of git commands, unlike GitPython as a whole.

By now, my guess is that the intended direction is known, and my (somewhat less certain) guess is that this goal may have been abandoned, becuase:

  • GitPython is considered to be in maintenance mode (per the README).
  • In a review comment, if I understood correctly, you have expressed the hope that IndexFile is not heavily used, due to not having reached some of its original design goals.

However, there is also now a longer-term vision for GitPython, beyond maintaining the current feature set, articulated in GitoxideLabs/gitoxide#1074 under "GitPython…".

If in the future the IndexFile implementation will be rewritten to use gitoxide's (future) Python bindings, then this docstring note is actually of greater relevance than before. But then it should still be updated to no longer characterize the aspiration to implement all of IndexFile without git subprocess calls as infeasible for performance reasons. And possibly even to mention gitoxide?

Because of that, I'm unsure if this note should be removed or updated (if, if updated, then how), or simply left as-is for the time being.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.