Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork961
Commite4d0a3f
committed
Fix order of operators before executing the git command
Since Python 3.3, the hash value of an object is seeded randomly, making itchange between each call. As a consequence, the `dict` type relying on the hashvalue for the order of the items upon iterating on it, and the parameterspassed to `git` being passed as `kwargs` to the `execute()` method, the orderof parameters will change randomly between calls.For example, when you call `git.remote.pull()` in a code, two consecutives runwill generate:1. git pull --progress -v origin master2. git pull -v --progress origin masterBy simply adding the `sorted()` call around `args` within the `transform_kwargs()`method, it will ensure that each subsequent calls will execute the parameters inthe same order.1 parentfb577c8 commite4d0a3f
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
783 | 785 | | |
784 | 786 | | |
785 | 787 | | |
| 788 | + | |
786 | 789 | | |
787 | 790 | | |
788 | 791 | | |
| |||
0 commit comments
Comments
(0)