author | Stephen Boyd <bebarino@gmail.com> | |
Sat, 23 May 2009 18:53:10 +0000 (11:53 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 23 May 2009 22:45:52 +0000 (15:45 -0700) | ||
commit | aae94ffbc138181777a942ef18daf52606df833d | |
tree | de0b15a5bd3ce12e4bc8523d7635601363934c33 | tree | snapshot |
parent | 213195185c8aa09d6192b85a3f78bf46f19f51a4 | commit | diff |
commit: -F overrides -t
Commit dbd0f5c7 (Files given on the command line are relative to $cwd,
2008-08-06) introduced parse_options_fix_filename() as a quick fix for
filename arguments used in the parse options API.
git-commit was still broken. This means
git commit -F log -t temp
in a subdirectory would make git think the log message should be taken
from temp instead of log.
This is because parse_options_fix_filename() calls prefix_filename()
which uses a single static char buffer to do its work. Making two calls
with two char pointers causes the pointers to alias. To prevent
aliasing, we duplicate the string returned by
parse_options_fix_filename().
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commit dbd0f5c7 (Files given on the command line are relative to $cwd,
2008-08-06) introduced parse_options_fix_filename() as a quick fix for
filename arguments used in the parse options API.
git-commit was still broken. This means
git commit -F log -t temp
in a subdirectory would make git think the log message should be taken
from temp instead of log.
This is because parse_options_fix_filename() calls prefix_filename()
which uses a single static char buffer to do its work. Making two calls
with two char pointers causes the pointers to alias. To prevent
aliasing, we duplicate the string returned by
parse_options_fix_filename().
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c | diff | blob | history | |
t/t7500-commit.sh | diff | blob | history |