Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix order of operators before executing the git command
Since Python 3.3, the hash value of an object is seeded randomly, making it change between each call. As a consequence, the `dict` type relying on the hash value for the order of the items upon iterating on it, and the parameters passed to `git` being passed as `kwargs` to the `execute()` method, the order of parameters will change randomly between calls. For example, when you call `git.remote.pull()` in a code, two consecutives run will generate: 1. git pull --progress -v origin master 2. git pull -v --progress origin master Within the `transform_kwargs()` method, I'm promoting `kwargs` into an `collections.OrderedDict` being built with `kwargs` sorted on the keys. Then it will ensure that each subsequent calls will execute the parameters in the same order.
- Loading branch information