diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2019-06-18 11:14:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-19 20:46:27 -0700 |
commit | 16110c9348fc2022e78f2581968cf428c056dc5b (patch) | |
tree | 0bf8c25303b5893adc12a8ed3deb23ca3d94ee81 /Documentation/RelNotes/1.5.3.3.txt | |
parent | commit-graph: test --split across alternate without --split (diff) | |
download | tgif-16110c9348fc2022e78f2581968cf428c056dc5b.tar.xz |
commit-graph: normalize commit-graph filenames
When writing commit-graph files, we append path data to an
object directory, which may be specified by the user via the
'--object-dir' option. If the user supplies a trailing slash,
or some other alternative path format, the resulting path may
be usable for writing to the correct location. However, when
expiring graph files from the <obj-dir>/info/commit-graphs
directory during a write, we need to compare paths with exact
string matches.
Normalize the commit-graph filenames to avoid ambiguity. This
creates extra allocations, but this is a constant multiple of
the number of commit-graph files, which should be a number in
the single digits.
Further normalize the object directory in the context. Due to
a comparison between g->obj_dir and ctx->obj_dir in
split_graph_merge_strategy(), a trailing slash would prevent
any merging of layers within the same object directory. The
check is there to ensure we do not merge across alternates.
Update the tests to include a case with this trailing slash
problem.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes/1.5.3.3.txt')
0 files changed, 0 insertions, 0 deletions