Changeset 2307 in ProjectBuilder for devel


Ignore:
Timestamp:
Sep 6, 2017, 7:36:30 PM (7 years ago)
Author:
Bruno Cornec
Message:

git add needs to be done in the subtree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/VCS.pm

    r2306 r2307  
    530530if ($scheme =~ /^((hg)|(git)|(svn)|(svk)|(cvs))/o) {
    531531    $vcscmd =~ s/ svn// if (($scheme =~ /git/) && ($scheme =~ /svn/));
    532     pb_system("$vcscmd add ".join(' ',@f),"Adding ".join(' ',@f)." to VCS ");
     532    if ($scheme =~ /git/) {
     533        # Here we need to be in the right place to add
     534        for my $f (@f) {
     535            my $dir = dirname($f);
     536            pb_system("cd $dir ; $vcscmd add ".basename($f),"Adding $f to VCS ");
     537        }
     538    } else {
     539        pb_system("$vcscmd add ".join(' ',@f),"Adding ".join(' ',@f)." to VCS ");
     540    }
    533541} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(https)|(file)\b/o) {
    534542    # Nothing to do.
Note: See TracChangeset for help on using the changeset viewer.