Is it possible to use a variable from .gitconfig in another definition in .gitconfig?
In bash I can do:
delimiter="^"
log_res="log --graph --pretty=format:'$delimiter%cr$delimiter%cs$delimiter%h'"
what results in
log --graph --pretty=format:'^%cr^%cs^%h'
Is the same possible in .gitconfig to achieve the result alias???
[alias]
result = log --graph --pretty=format:'^%cr^%cs^%h'
delimiter = "^"
log-res = ??? log --graph --pretty=format:'DELIMITER%crDELIMITER%csDELIMITER%h' ???
How do I have to write 'log-res' that a change of the delimiter is taken over? Could this be done nicely?
I know I can do something like this what is ugly if you define a lot of log commands:
[alias]
result = log --graph --pretty=format:'^%cr^%cs^%h'
delimiter = "^"
log-res = !bash -c '"git $(echo \"log --decorate=short --graph --pretty=format:'$(git config alias.delimiter)%cr$(git config alias.delimiter)%cs$(git config alias.delimiter)%h'\")"'
where git result is the same like git log-res, but this horrible to read, isn't it?