suggestion? only pull cleanly applying commits

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

 



Hi!

I've a scenario where I don't really want to do a full merge but rather
to pull all commits from another repository that merge without conflicts.

I've put together the script at the bottom which seems to work ok but is
damn slow.

Is there a smarter and faster way to do this that I missed reading the
documentation?

Any help would be really appreciated! :-)

Regards,
Maximilian


#!/bin/sh

for commit in `git rev-list --reverse HEAD..other-repository/master`; do
        git diff-tree -p $commit|patch --dry-run -p1 -N -f >/dev/null
        if [ $? -eq 0 ]; then
                echo "getting $commit"
                parents=`git rev-list --parents -n1  $commit|wc -w`
                if [ $parents -eq 2 ]; then
                        git cherry-pick $commit
                else
                        git cherry-pick -m1 $commit
                fi
        fi
done

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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