mirror of
https://github.com/AdaCore/git-hooks.git
synced 2026-02-12 12:43:11 -08:00
This commit is preparation work for the transition to Python 3.x, where the output obtained by running Git commands will become bytes as opposed to a string. In the vast majority of cases, we'll want to decode that output into a string. Ideally, we would want to do this in a way that is both compatible with Python 2.x and Python 3.x, but we have found that this requires a lot of work with many changes spread all over the code. So, instead, what this commit does is introduce the concept of decoding the output, but with the decoding only occurring when running under Python 3.x. That way, we can make progress towards Python 3.x while preserving the behavior under Python 2.x intact. Change-Id: I189577798ee96cba1fa55c7356babf102575642f TN: U530-006