Skip to content

fast export/import: handle nested tags, improve incremental exports

Elijah Newren git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 5 repliesIn review
  2. v18 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Fixed an issue integrating with next/pu (in particular, with jk/fast-import-history-bugfix)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8fast-export: fix exporting a tag and nothing elsebuiltin/fast-export.c t/t9350-fast-export.sh+19 -10 replies
2/8fast-import: fix handling of deleted tagsfast-import.c t/t9300-fast-import.sh+42 -01 reply
3/8fast-import: allow tags to be identified by mark labelsDocumentation/git-fast-import.txt fast-import.c t/t9300-fast-import.sh+22 -10 replies
4/8fast-import: add support for new 'alias' commandDocumentation/git-fast-import.txt fast-import.c t/t9300-fast-import.sh+79 -100 replies
5/8fast-export: add support for --import-marks-if-existsbuiltin/fast-export.c t/t9350-fast-export.sh+23 -100 replies
6/8fast-export: allow user to request tags be marked with --mark-tagsDocumentation/git-fast-export.txt builtin/fast-export.c t/t9350-fast-export.sh+34 -40 replies
7/8t9350: add tests for tags of things other than a committ/t9350-fast-export.sh+31 -00 replies
8/8fast-export: handle nested tagsbuiltin/fast-export.c t/t9350-fast-export.sh+19 -130 replies

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by.

PatchRené Scharfe
SeriesHelped-by
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/8] fast export/import: handle nested tags, improve incremental exports

This series improves the incremental export story for fast-export and fast-import (--export-marks and --import-marks fell a bit short), fixes a couple small export/import bugs, and enables handling nested tags. In particular, the nested tags handling makes it so that fast-export and fast-import can finally handle the git.git repo.

Changes since v1 (full range-diff below):
- Fixed an issue integrating with next/pu (in particular, with jk/fast-import-history-bugfix)

Elijah Newren (8):
fast-export: fix exporting a tag and nothing else
fast-import: fix handling of deleted tags
fast-import: allow tags to be identified by mark labels
fast-import: add support for new 'alias' command
fast-export: add support for --import-marks-if-exists
fast-export: allow user to request tags be marked with --mark-tags
t9350: add tests for tags of things other than a commit
fast-export: handle nested tags

 Documentation/git-fast-export.txt | 17 ++++--
 Documentation/git-fast-import.txt | 23 ++++++++
 builtin/fast-export.c             | 67 ++++++++++++++++------
 fast-import.c                     | 94 +++++++++++++++++++++++++++----
 t/t9300-fast-import.sh            | 37 ++++++++++++
 t/t9350-fast-export.sh            | 68 ++++++++++++++++++++--
 6 files changed, 268 insertions(+), 38 deletions(-)

Range-diff:
1: b751d6c2d6 ! 1: 1d19498bc6 fast-import: fix handling of deleted tags

    @@ fast-import.c: static void parse_reset_branch(const char *arg)
      		b = new_branch(arg);
      	read_next_command();
      	parse_from(b);
    -+	if (b->delete && !strncmp(arg, "refs/tags/", 10)) {
    ++	if (b->delete && !strncmp(b->name, "refs/tags/", 10)) {
     +		/*
     +		 * Elsewhere, we call dump_branches() before dump_tags(),
     +		 * and dump_branches() will handle ref deletions first, so
    @@ fast-import.c: static void parse_reset_branch(const char *arg)
     +		for (t = first_tag; t; t = t->next_tag) {
     +			strbuf_reset(&tag_name);
     +			strbuf_addf(&tag_name, "refs/tags/%s", t->name);
    -+			if (!strcmp(arg, tag_name.buf))
    ++			if (!strcmp(b->name, tag_name.buf))
     +				break;
     +			prev = t;
     +		}
2:  26b77dde15 = 2:  e1fd888e4a fast-import: allow tags to be identified by mark labels
3:  e0d1a1d7aa = 3:  93175f28d9 fast-import: add support for new 'alias' command
4:  edea892661 = 4:  8c8743395c fast-export: add support for --import-marks-if-exists
5:  6af7e1fdd0 = 5:  eebc40df33 fast-export: allow user to request tags be marked with --mark-tags
6:  631ae9a63e = 6:  de39f703c6 t9350: add tests for tags of things other than a commit
7:  c0e932e4da = 7:  ac739dbb79 fast-export: handle nested tags
Signature · 1 line
2.23.0.264.gac739dbb79