Re: [PATCH v2 00/11] fast export and import fixes and features
On Tue, Nov 13, 2018 at 04:25:49PM -0800, Elijah Newren wrote: > This is a series of small fixes and features for fast-export and > fast-import, mostly on the fast-export side. I looked over this, and I think you've addressed all of my questions. A few quick comments: > Changes since v1 (full range-diff below): > - used {tilde} in asciidoc documentation to avoid subscripting and > escaping problems I think just using backticks would make the source more readable, as well as make the output prettier. But that's pretty minor. > - renamed ABORT/ERROR enum values to help avoid further misusage This is an improvement, I think. It's a little funny that we still have bare names for the non-ABORT bits, though (there's less semantic overlap, but if it's a good practice to use qualified enum names, we should probably just do so consistently). > - multiple small testcase cleanups (use $ZERO_OID, remove grep -A, etc.) Looks good. > - add FIXME comment to code about string_list usage Makes sense. > - record Peff's idea for a future optimization in patch 8 commit message > (is there a better place to put that??) Seems like a reasonable place (though you are welcome to restate it if you like). > - New patch (9/11): remove the unmaintained copy of fast-import stream > format documentation at the beginning of fast-import.c Looks good. I wondered if there might be bits that need migrated, but given the length of time that comment has been there, it's unlikely. And in the worst case, if somebody finds some information missing from git-fast-import.txt, they can still consult the history. > - Rewrite commit message for 10/11 to match the wording Peff liked > better, s/originally/original-oid/, and add documentation to > git-fast-import.txt Looks good. > - Rewrite commit message for 11/11; the last one didn't make sense to > Peff. I hope this one does. Thanks for your patience in getting me to understand what you're trying to do. At this point I still think that using rev-list and diff-tree is probably the right solution for your use case. -Peff
[PATCH v2 00/11] fast export and import fixes and features
This is a series of small fixes and features for fast-export and fast-import, mostly on the fast-export side. Changes since v1 (full range-diff below): - used {tilde} in asciidoc documentation to avoid subscripting and escaping problems - renamed ABORT/ERROR enum values to help avoid further misusage - multiple small testcase cleanups (use $ZERO_OID, remove grep -A, etc.) - add FIXME comment to code about string_list usage - record Peff's idea for a future optimization in patch 8 commit message (is there a better place to put that??) - New patch (9/11): remove the unmaintained copy of fast-import stream format documentation at the beginning of fast-import.c - Rewrite commit message for 10/11 to match the wording Peff liked better, s/originally/original-oid/, and add documentation to git-fast-import.txt - Rewrite commit message for 11/11; the last one didn't make sense to Peff. I hope this one does. Elijah Newren (11): git-fast-import.txt: fix documentation for --quiet option git-fast-export.txt: clarify misleading documentation about rev-list args fast-export: use value from correct enum fast-export: avoid dying when filtering by paths and old tags exist fast-export: move commit rewriting logic into a function for reuse fast-export: when using paths, avoid corrupt stream with non-existent mark fast-export: ensure we export requested refs fast-export: add --reference-excluded-parents option fast-import: remove unmaintained duplicate documentation fast-export: add a --show-original-ids option to show original names fast-export: add --always-show-modify-after-rename Documentation/git-fast-export.txt | 34 +- Documentation/git-fast-import.txt | 23 +++- builtin/fast-export.c | 172 ++ fast-import.c | 166 +++- t/t9350-fast-export.sh| 116 +++- 5 files changed, 308 insertions(+), 203 deletions(-) 1: 0744f65b0d = 1: 8870fb1340 git-fast-import.txt: fix documentation for --quiet option 2: aba1e22fdd ! 2: 16d1c3e22d git-fast-export.txt: clarify misleading documentation about rev-list args @@ -13,7 +13,7 @@ current master reference to be exported along with all objects - added since its 10th ancestor commit. + added since its 10th ancestor commit and all files common to -+ master\~9 and master~10. ++ master{tilde}9 and master{tilde}10. EXAMPLES 3: 6983e845b2 < -: -- fast-export: use value from correct enum -: -- > 3: e19f6b36f9 fast-export: use value from correct enum 4: 761ba324d5 ! 4: 2b305561d5 fast-export: avoid dying when filtering by paths and old tags exist @@ -49,18 +49,14 @@ + ( + cd rewrite_tag_predating_pathspecs && + -+ touch ignored && -+ git add ignored && + test_commit initial && + + git tag -a -m "Some old tag" v0.0.0.0.0.0.1 && + -+ echo foo >bar && -+ git add bar && -+ test_commit add-bar && ++ test_commit bar && + -+ git fast-export --tag-of-filtered-object=rewrite --all -- bar >output && -+ grep -A 1 refs/tags/v0.0.0.0.0.0.1 output | grep -E ^from.0{40} ++ git fast-export --tag-of-filtered-object=rewrite --all -- bar.t >output && ++ grep from.$ZERO_OID output + ) +' + 5: 64e9f0d360 = 5: 607b1dc2b2 fast-export: move commit rewriting logic into a function for reuse 6: fd14d9749a ! 6: ec1862e858 fast-export: when using paths, avoid corrupt stream with non-existent mark @@ -54,22 +54,18 @@ + ( + cd avoid_non_existent_mark && + -+ touch important-path && -+ git add important-path && -+ test_commit initial && ++ test_commit important-path && + -+ touch ignored && -+ git add ignored && -+ test_commit whatever && ++ test_commit ignored && + + git branch A && + git branch B && + -+ echo foo >>important-path && -+ git add important-path && ++ echo foo >>important-path.t && ++ git add important-path.t && + test_commit more changes && + -+ git fast-export --all -- important-path | git fast-import --force ++ git fast-export --all -- important-path.t | git fast-import --force + ) +' + 7: 4e67a2bc7f ! 7: 9da26e3ccb fast-export: ensure we export requested refs @@ -21,9 +21,6 @@ were just silently omitted from being exported despite having been explicitly requested for export. -NOTE: The usage of string_list should really be replaced with the -strmap proposal, once