]> git.dujemihanovic.xyz Git - u-boot.git/commit
patman: Support absolute and ~user-relative alias files
authorBrian Norris <briannorris@chromium.org>
Fri, 7 Jan 2022 23:15:55 +0000 (15:15 -0800)
committerSimon Glass <sjg@chromium.org>
Thu, 13 Jan 2022 16:13:41 +0000 (09:13 -0700)
commitdca7926c2cb82ff4aea665ed97e38520d39865a5
tree6d895e72d9d1b4f6bbdc7817b84d7c68fd09a955
parentd8ef446fec1d5dde5a6238f452d04cda81f8752a
patman: Support absolute and ~user-relative alias files

Python doesn't naturally support tilde (~) as a user-home marker in
paths, but git-config does. So we need to resolve it before continuing.

We also shouldn't blindly join the top-level tree with the aliasesfile
path, because it might be an absolute path.

This resolves warnings like the following:

  Warning: Cannot find alias file '/path/to/source/tree/~/.git-email'

Seen when git-config is like:

  $ git config sendemail.aliasesfile
  ~/.git-email

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
tools/patman/gitutil.py