Files
git/builtin
Alexandr Miloslavskiy 3d7747e318 real_path: remove unsafe API
Returning a shared buffer invites very subtle bugs due to reentrancy or
multi-threading, as demonstrated by the previous patch.

There was an unfinished effort to abolish this [1].

Let's finally rid of `real_path()`, using `strbuf_realpath()` instead.

This patch uses a local `strbuf` for most places where `real_path()` was
previously called.

However, two places return the value of `real_path()` to the caller. For
them, a `static` local `strbuf` was added, effectively pushing the
problem one level higher:
    read_gitfile_gently()
    get_superproject_working_tree()

[1] https://lore.kernel.org/git/1480964316-99305-1-git-send-email-bmwill@google.com/

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-10 11:41:40 -07:00
..
2020-02-14 12:54:19 -08:00
2019-10-15 13:47:59 +09:00
2019-11-11 11:46:29 +09:00
2020-02-17 13:22:17 -08:00
2020-03-10 11:41:40 -07:00
2020-03-10 11:41:40 -07:00
2019-04-25 16:41:12 +09:00
2020-03-02 15:07:19 -08:00
2019-09-30 13:19:32 +09:00
2019-05-13 14:22:54 +09:00
2020-02-10 09:04:45 -08:00
2019-11-10 18:02:14 +09:00
2019-12-10 13:11:41 -08:00
2020-03-10 11:41:40 -07:00
2020-03-05 10:43:02 -08:00
2019-06-19 08:19:21 -07:00
2020-03-10 11:41:40 -07:00