summaryrefslogtreecommitdiff
path: root/git-gui
diff options
context:
space:
mode:
authorWill Palmer <wmpalmer@gmail.com>2010-05-02 12:00:42 +0100
committerJunio C Hamano <gitster@pobox.com>2010-05-03 09:40:27 -0700
commit409578912cb21bdad4a75f34af7c0a815ac9d06b (patch)
tree90371a60fd23e2bd2b7c5bfe39bfebcac8141772 /git-gui
parentd599e0484f8ebac8cc50e9557a4c3d246826843d (diff)
downloadgit-409578912cb21bdad4a75f34af7c0a815ac9d06b.tar.gz
pretty: make it easier to add new formats
As the first step towards creating aliases, we make it easier to add new formats to the list of builtin formats. To do this, we move the initialization of the formats array into a new function, setup_commit_formats(), which we can easily extend later. Then, rather than looping through only the list of known formats, we make a more generic find_commit_format function, which will return the commit format whose name is the shortest which is prefixed with the passed-in sought format, the same rules which were more-or-less hard-coded in before. Signed-off-by: Will Palmer <wmpalmer@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui')
0 files changed, 0 insertions, 0 deletions