summaryrefslogtreecommitdiff
path: root/compat/nedmalloc/nedmalloc.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2015-09-24 17:08:16 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-10-05 11:08:05 -0700
commit4c9ac3bfaad9e32a7a98178d1f01779a3698144f (patch)
tree6f72f8b58692c859eacbba4b52bf78e7fd26e6a3 /compat/nedmalloc/nedmalloc.c
parentreceive-pack: simplify keep_arg computation (diff)
downloadtgif-4c9ac3bfaad9e32a7a98178d1f01779a3698144f.tar.xz
help: clean up kfmclient munging
When we are going to launch "/path/to/konqueror", we instead rewrite this into "/path/to/kfmclient" by duplicating the original string and writing over the ending bits. This can be done more obviously with strip_suffix and xstrfmt. Note that we also fix a subtle bug with the "filename" parameter, which is passed as argv[0] to the child. If the user has configured a program name with no directory component, we always pass the string "kfmclient", even if your program is called something else. But if you give a full path, we give the basename of that path. But more bizarrely, if we rewrite "konqueror" to "kfmclient", we still pass "konqueror". The history of this function doesn't reveal anything interesting, so it looks like just an oversight from combining the suffix-munging with the basename-finding. Let's just call basename on the munged path, which produces consistent results (if you gave a program, whether a full path or not, we pass its basename). Probably this doesn't matter at all in practice, but it makes the code slightly less confusing to read. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/nedmalloc/nedmalloc.c')
0 files changed, 0 insertions, 0 deletions