Skip to content

Commit

Permalink
Merge branch 'mh/ref-map-header'
Browse files Browse the repository at this point in the history
Signed-off-by: Elijah Newren <[email protected]>
  • Loading branch information
newren committed Sep 24, 2022
2 parents 585891f + 3fe2b5c commit 6e52d99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/git-filter-repo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions git-filter-repo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e52d99

Please sign in to comment.