Skip to content
\n

The result of actual git diff command, which considers the aforementioned diff as 'M' type:

\n
# git diff 86064ef5ee28e0d0d12911f46fd603d15246fdd5 42e58c22aefd036b6fdd2095ed0d391f5238c6c4 --diff-filter 'M' -- agent-bootstrapper/src/com/thoughtworks/go/agent/bootstrapper/osx/MacAboutBox.java\n\ndiff --git a/agent-bootstrapper/src/com/thoughtworks/go/agent/bootstrapper/osx/MacAboutBox.java b/agent-bootstrapper/src/com/thoughtworks/go/agent/bootstrapper/osx/MacAboutBox.java\nindex 0103494d4a..90d876badb 100644\n--- a/agent-bootstrapper/src/com/thoughtworks/go/agent/bootstrapper/osx/MacAboutBox.java\n+++ b/agent-bootstrapper/src/com/thoughtworks/go/agent/bootstrapper/osx/MacAboutBox.java\n@@ -55,7 +55,7 @@ public class MacAboutBox extends JFrame implements ActionListener {\n         aboutLabels.add(bodyLabel(\"Bootstrapper Version \" + getBootstrapperVersion()));\n         aboutLabels.add(emptyLabel());\n         aboutLabels.add(bodyLabel(\"Java Version \" + System.getProperty(\"java.version\")));\n-        aboutLabels.add(bodyLabel(\"Copyright (C) 2013 ThoughtWorks Inc.\"));\n+        aboutLabels.add(bodyLabel(\"Copyright (C) 2015 ThoughtWorks Inc.\"));\n         aboutLabels.add(emptyLabel());\n\n         Panel textPanel2 = new Panel(new GridLayout(aboutLabels.size(), 1));
\n

Thank you for any help you can offer.

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

I looks like change_type is known to possibly be None as per the bolted on type-system. Ideally the editor would know and warn about it, but apparently this didn't happen here.

\n

The actual problem seems to be though that a modified file isn't classified as such - instead, no classification is provided.

\n

Since I don't know why that is, a contributor could probably create a test with reproduction and fix it that way, or at least, understand what's going on.

\n
\n

Instead of trying to fix this, I recommend using gitoxide - it will probably be multiple times faster and doesn't have these typing problems either.

","upvoteCount":1,"url":"https://github.com/gitpython-developers/GitPython/discussions/1696#discussioncomment-7198854"}}}

Is None possible for the attribute change_type of git.diff.Diff object? #1696

Answered by Byron
jiseongg asked this question in Q&A
Discussion options

You must be logged in to vote

I looks like change_type is known to possibly be None as per the bolted on type-system. Ideally the editor would know and warn about it, but apparently this didn't happen here.

The actual problem seems to be though that a modified file isn't classified as such - instead, no classification is provided.

Since I don't know why that is, a contributor could probably create a test with reproduction and fix it that way, or at least, understand what's going on.


Instead of trying to fix this, I recommend using gitoxide - it will probably be multiple times faster and doesn't have these typing problems either.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jiseongg
Comment options

Answer selected by Byron
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