
This allows the use of git aliases files relative to the user home, without using the full path to the file.
Signed-off-by: Otavio Salvador otavio@ossystems.com.br ---
tools/patman/gitutil.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 5e4c1128dcb..172de4aae59 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -616,8 +616,13 @@ def GetAliasFile(): """ fname = command.OutputOneLine('git', 'config', 'sendemail.aliasesfile', raise_on_error=False) + if fname: - fname = os.path.join(GetTopLevel(), fname.strip()) + fname = fname.strip() + if fname.startswith("~/"): + fname = fname.replace("~", os.path.expanduser('~'), 1) + fname = os.path.join(GetTopLevel(), fname) + return fname
def GetDefaultUserName():