Re: [PATCH v2 2/4] t3427: accelerate this test by using fast-export and fast-import

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 27, 2019 at 8:22 PM Elijah Newren <newren@xxxxxxxxx> wrote:
> fast-export and fast-import can easily handle the simple rewrite that
> was being done by filter-branch, and should be significantly faster on
> systems with a slow fork.  Timings from before and after on two laptops
> that I have access to (measured via `time ./t3427-rebase-subtree.sh`,
> i.e. including everything in this test -- not just the filter-branch or
> fast-export/fast-import pair):
> [...]
> Signed-off-by: Elijah Newren <newren@xxxxxxxxx>
> ---
> diff --git a/t/t3427-rebase-subtree.sh b/t/t3427-rebase-subtree.sh
> @@ -11,6 +11,12 @@ commit_message() {
> +extract_files_subtree() {

Style nit: add space before opening '('

(However, commit_message() function just above this doesn't follow
that style, so...)

> +       git fast-export --no-data HEAD -- files_subtree/ \
> +               | sed -e "s%\([0-9a-f]\{40\} \)files_subtree/%\1%" \
> +               | git fast-import --force --quiet

This would be a bit less noisy if you ended each line with the pipe
operator, allowing you to drop the backslashes:

    git fast-export --no-data HEAD -- files_subtree/ |
        sed -e "s%\([0-9a-f]\{40\} \)files_subtree/%\1%" |
        git fast-import --force --quiet

> +}

Not sure any of this is worth a re-roll.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux