remotes/* for "foreign" archives (was Re: tracking many cvs/svn/git remote archives)
- From
Randal L. Schwartz <merlyn@stonehenge.com>
- Date
- Nov 21, 2006, 14:57 UTC
- Message-ID
- <86r6vwkfti.fsf@blue.stonehenge.com>
- In-Reply-To
- <86y7q6m3zm.fsf@blue.stonehenge.com>
>>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:
Randal> *-GIT*) Randal> ## first, update "origin": Randal> case $i in Randal> *-GIT) Randal> git-fetch Randal> ;; Randal> *-GITCVS) Randal> git-cvsimport -k -i $(git-repo-config getcvs.gitcvsargs) Randal> ;; Randal> *-GITSVN) Randal> ## be sure to have origin "ref: refs/remotes/git-svn" Randal> git-svn multi-fetch Randal> ;; Randal> esac
It occurred to me after posting this, and while still thinking about the presentation I'm writing, that it'd be interesting if "get-fetch" could hide this from me.
If the file in remotes/origin looked something like:
Pull: !git-svn multi-fetch trunk
Push: !git-svn committhen git-fetch and git-push could treat "origin" as a "foreign" branch and indirect through these commands.
Then I could just use "git-pull" naively, and it would git-fetch origin, invoking git-svn multi-fetch trunk to update it, and later I could git-push and it would use git-svn commit.
This idea is half baked, but it could definitely hide the various foreign adaptors from the invocation line, allowing layered tools to use them transparently.
-- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.