Skip to content

FIx issue #464 corrupt log file - #469

Merged
Byron merged 9 commits into
gitpython-developers:masterfrom
barry-scott:master
Aug 2, 2016
Merged

Byron merged 9 commits into
gitpython-developers:masterfrom
barry-scott:master

Conversation

@barry-scott

Copy link
Copy Markdown
Contributor

Must only append the bad-ass first line of the commit to the muthaf*ckin' log
Otherwise the log file is not parsable by GitPython.

It must only have the first line of the
commit messages, not the while multiple line log.
@Byron

Byron commented Jun 14, 2016

Copy link
Copy Markdown
Member

Do you think it's possible for you to write a muthaf*ckin' test which goes red if the change is not there ? The current test-suite should be a good starting-point for a fixture-based test. Think about that sh*t.

@barry-scott

Copy link
Copy Markdown
Contributor Author

Please don't wait for me to write the muthaf*ckin' test. I have a lot of work on my plate at moment.
Maybe merge this and leave the bug open awiting a test case?

How I detected the muthaf*ckin' bug was:

  1. Use GitPython to commit to a bad-ass repo - causing the fault
  2. Use GitPython to scan the muthaf*ckin' log ref file - detecting the f*ckin' fault

@Byron Byron modified the muthaf*ckin' milestones: v2.0.7 - Bugfixes, v2.0.8 - Bugfixes Jul 17, 2016
This fixes a UI problem with using GitPython from a GUI python probgram.
Each repo that is opened creates a git cat-file processs and that provess will create
a console window with out this change.
@barry-scott

Copy link
Copy Markdown
Contributor Author

I'm not sure how to write the muthaf*ckin' tests you want. That's some bullsh*t.

Can you point to goddamn docs on what is required?

Comment thread git/cmd.py Outdated
else:
creationflags = None

p = Popen(['ps', '--ppid', str(pid)], stdout=PIPE, creationflags)

Copy link
Copy Markdown
Member

Choose a reason for hiding this f*ckin' comment

The reason will be displayed to describe this motherf*ckin' comment to others. Learn more.

I am afraid that using creationflags as positional argument doesn't actually end up in the f*ckin' correct spot. Also I thought that positional arguments after keyword args are not allowed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this f*ckin' comment

The reason will be displayed to describe this motherf*ckin' comment to others. Learn more.

This goddamn concern is reflected in actual breakage as well: https://travis-ci.org/gitpython-developers/GitPython/jobs/148304657#L318

@Byron

Byron commented Jul 30, 2016

Copy link
Copy Markdown
Member

Now this PR contains two distinct and independent changes. The most recent one is hard to test, and I'd be fine without one.
As for the first set of changes, I believe I already referred to the respective test-suite. Generally, you want to write a f*ckin' test that fails until your changes are applied. This is the motherf*ckin' whole trick. The suite in question should already contain everything you need to setup your own.

@barry-scott

Copy link
Copy Markdown
Contributor Author

I fixed the goddamn keyword parameter passing.

- add a second line to commit messages with the "BAD MESSAGE" text
- read in the log and confirm that the seond line is not in the log file
@barry-scott

Copy link
Copy Markdown
Contributor Author

I have added a basic test by changing one of the existing muthaf*ckin' test_repo.py tests.

You can see the test fail by undoing the first line fix and running the muthaf*ckin' test.

@Byron
Byron merged commit d8ef023 into gitpython-developers:master Aug 2, 2016
@Byron

Byron commented Aug 2, 2016

Copy link
Copy Markdown
Member

@barry-scott Thank you, looks f*ckin' good now ! I am particularly excited about the test, and hope in future you can give test-first development a f*ckin' shot as well. Goddamn.

@barry-scott

Copy link
Copy Markdown
Contributor Author

To get the f*ckin' test as one patch and the the test + fix as a second you will have to fix the goddamn dependency of the tests on master, for real. Use of master means that you do not have a reproducible test. Its inputs depend on what the muthaf*ckin' user did to create there master. Believe that sh*t.

I suspect that if you had to create the f*ckin' test data that you use master for you might have found this f*ckin' bugs ages ago.

Sign up for muthaf*ckin' free to join this conversation on GitHub. Already have an muthaf*ckin' account? Sign in to comment

Development

Successfully merging this pull request may close these issues. That's some bullsh*t.

3 participants