Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork937
-
Let's say I have a new folder with three new files in it. When I use
But when I use GitPython's
Is there a way to get the same result as the |
BetaWas this translation helpful?Give feedback.
All reactions
Hello, thanks for the response.
For the time being I Implemented a workaround that calls git directly.
I am not sure if this is useful for you, but here is the code:
import subprocesscommand = ["git", "ls-files", "--others", "--directory", "--exclude-standard", "--no-empty-directory"]process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)untracked_files_and_folders = [u.decode().strip() for u in process.stdout]
Replies: 2 comments 1 reply
-
Indeed it would be nice to have additional options to make GitPython more like 'porcelain', and less like the 'plumbing' it was intended to be. The recommended action is to transform the returned set of untracked files into the form that Git provides. This algorithm could potentially be donated back to GitPython, which supports it using an additional function, maybe along the line of Thanks for understanding that GitPython is in maintenance mode and thus is hesitant to take on feature requests unless they are accompanied by a PR implementing them. Please feel free to comment on the closed issue if there are any follow-up questions. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hello, thanks for the response. For the time being I Implemented a workaround that calls git directly.
|
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
-
|
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #996 on February 26, 2021 11:18.