-
-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Labels
Description
What about adding a $debug
parameter to Repository constructor that would affect the following behaviors:
- add a public method
Repository::isDebug
to know in subclasses the policy to have (for parsing and sub-tasks) - when an error happens on
git
commands, return null if debug is disabled. Throws an exception if return code is not zero
In development, that would help you seeing edge cases. Recently, on Commit object, @lyrixx added a method getIncludingBranches
. In it, if requested with a wrong object hash, execution fails. Debug mode would help here to see edge cases, why it's called with a wrong hash.
In production, it would silently crash, in a deathful logic pain.