diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-12-01 17:33:22 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-07 14:19:32 -0800 |
commit | f07d6a1ad1485bcb3078f4601943d81f915c5af6 (patch) | |
tree | 61c239c49eb10dff748e7f95b5b3723d435a84e8 /Documentation/RelNotes/1.6.5.2.txt | |
parent | parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION (diff) | |
download | tgif-f07d6a1ad1485bcb3078f4601943d81f915c5af6.tar.xz |
setup: save prefix (original cwd relative to toplevel) in startup_info
Save the path from the original cwd to the cwd at the end of the
setup procedure in the startup_info struct introduced in e37c1329
(2010-08-05). The value cannot vary from thread to thread anyway,
since the cwd is global.
So now in your builtin command, instead of passing prefix around,
when you want to convert a user-supplied path to a cwd-relative
path, you can use startup_info->prefix directly.
Caveat: As with the return value from setup_git_directory_gently(),
startup_info->prefix would be NULL when the original cwd is not a
subdir of the toplevel.
Longer term, this would allow the prefix to be reused when several
noncooperating functions require access to the same repository (for
example, when accessing configuration before running a builtin).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes/1.6.5.2.txt')
0 files changed, 0 insertions, 0 deletions