diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2011-11-16 02:03:36 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-17 15:06:27 -0800 |
commit | 418c9b176cbabf954b6325cca0bea7f9be251afe (patch) | |
tree | da1efd67a778b6c9b4782fa69ef53ba64dbc4c75 /Documentation | |
parent | 4d2440fe0daa9ad1556dfd220af8b3a883cf849d (diff) | |
download | git-418c9b176cbabf954b6325cca0bea7f9be251afe.tar.gz |
do not let git_path clobber errno when reporting errorsjn/git-path-errno
Because git_path() calls vsnprintf(), code like
fd = open(git_path("SQUASH_MSG"), O_WRONLY | O_CREAT, 0666);
die_errno(_("Could not write to '%s'"), git_path("SQUASH_MSG"));
can end up printing an error indicator from vsnprintf() instead of
open() by mistake. Store the path we are trying to write to in a
temporary variable and pass _that_ to die_errno(), so the messages
written by git cherry-pick/revert and git merge can avoid this source
of confusion.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions