summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-12-11 14:58:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-12-12 08:18:38 (GMT)
commit1c4b985965a4c424e7e5ae4756e139c98183278d (patch)
tree4dd1bd0d3244f7f040af2a1341aa16bd89124a88 /git-stash.sh
parent5acea87c3abfa5316fa27476c02e46eded8b26ae (diff)
downloadgit-1c4b985965a4c424e7e5ae4756e139c98183278d.zip
git-1c4b985965a4c424e7e5ae4756e139c98183278d.tar.gz
git-1c4b985965a4c424e7e5ae4756e139c98183278d.tar.bz2
help -a: handle aliases with long names gracefully
We take pains to determine the longest command beforehand, so that we can align the category column after printing the command names. However, then we re-use that value when printing the aliases. If any alias name is longer than the longest command name, we consequently try to add a negative number of spaces (but `mput_char()` does not expect any negative values and simply decrements until the value is 0, i.e. it tries to add close to 2**31 spaces). Let's fix this by adjusting the `longest` variable before printing the aliases. This fixes https://github.com/git-for-windows/git/issues/1975. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-stash.sh')
0 files changed, 0 insertions, 0 deletions