mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-06-03 10:55:20 +02:00
filter-repo: prepend the header line to the "ref-map" file
The existance of a header has already been specified in the documentation. Further adapt it to the real text implemented now. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
This commit is contained in:
parent
fff5f43a15
commit
3fe2b5c3c9
|
@ -382,7 +382,7 @@ Reference map
|
|||
The `.git/filter-repo/ref-map` file contains a mapping of which local
|
||||
references were changed.
|
||||
|
||||
* A header is the first line with the text "old" and "new"
|
||||
* A header is the first line with the text "old", "new" and "ref"
|
||||
* Reference mappings are in no particular order
|
||||
* An all-zeros hash, or null SHA, represents a non-existant object.
|
||||
When in the "new" column, this means the ref was removed entirely.
|
||||
|
|
|
@ -3811,6 +3811,7 @@ class RepoFilter(object):
|
|||
batch_check_process = None
|
||||
batch_check_output_re = re.compile(b'^([0-9a-f]{40}) ([a-z]+) ([0-9]+)$')
|
||||
with open(os.path.join(metadata_dir, b'ref-map'), 'bw') as f:
|
||||
f.write(("%-40s %-40s %s\n" % (_("old"), _("new"), _("ref"))).encode())
|
||||
for refname, old_hash in orig_refs.items():
|
||||
if refname not in exported_refs:
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue
Block a user