https://bugs.kde.org/show_bug.cgi?id=451644

            Bug ID: 451644
           Summary: [wish] Special settings for git on module level
           Product: kdesrc-build
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: mp...@kde.org
          Reporter: loh....@googlemail.com
  Target Milestone: ---

Short version: I miss the possibility to give "--depth 1" as clone option

Longer version: It seems to me that you always promote to clone the full
repository, even if you didn't intend to start hacking but to compile your own
bleeding edge KDE stuff. I know, nowadays they always say hard disk space is
cheap. but some still care. How much can be saved certainly varies from module
to module. As example kauth: 25MB vs 0.5MB

Background: I like to start hacking on Kate and followed so far this guide
https://kate-editor.org/build-it/. That will end up in a 70GB tree, as
Christoph told me. Way too much for my taste. Most of the space is probably
wasted by unnecessary debug configuration of the dependencies-only modules. But
that could probably be fixed with a configuration file where every thing is
build in release mode and only kate and ktexteditor in debug mode.

I'm afraid that would still be too much trouble for me, but others would
benefit. Fetch and compile more than 70 modules just to hack on two parts? :-(

Some years ago, I coded already on Kate. The trick back there was to tweak
CMakeLists.txt to use an older KF5 version. But shortly we had a situation
where that didn't work due to modified include header.

Would be best when not always the latest KF5 version is required. But Christoph
 explained to me that this would complicate the development even more. Crap!

However, here a patch for those who like to compare the size of the resulting
source tree. I only fetched the mentioned kauth, for more I'm right now not in
the mood.


    Clone all repositories as shallow with depth 1

    diff --git a/modules/ksb/Updater/Git.pm b/modules/ksb/Updater/Git.pm
    index 06891e3..a8db0e3 100644
    --- a/modules/ksb/Updater/Git.pm
    +++ b/modules/ksb/Updater/Git.pm
    @@ -94,7 +94,7 @@ sub _clone
        my $git_repo = shift;
        my $module = $self->module();
        my $srcdir = $module->fullpath('source');
    -    my @args = ('--', $git_repo, $srcdir);
    +    my @args = ('--depth', '1', '--', $git_repo, $srcdir);

        my $ipc = $self->{ipc} // croak_internal ('Missing IPC object');

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to