Question on (my) workflow migration svn -> git
david at catwhisker.org
Sat Oct 3 22:35:40 UTC 2020
On Sat, Sep 26, 2020 at 02:42:12PM +0200, Ulrich Spörlein wrote:
> Please start from this and only this:
> git clone --bare https://cgit-beta.freebsd.org/src.git
As noted earlier, that seems to have worked. However, subsequent to
your "Heads up: beta git repo hashes changing this weekend" notice, I
attempted a "git fetch" within that bare repo, and -- as I ratehr
expected, git was ... singularly unhappy about the exercise.
So I blew that old one (and its associated worktrees) away -- at this
point, I am experimenting and trying to get all the "breaking stuff" out
of my system before I actually need to use got.
Looking at the output of "git help clone", it seemed to me that
"--mirror" (which is claimed to imply "--bare") might be ... reasonable:
| Set up a mirror of the source repository. This implies --bare.
| Compared to --bare, --mirror not only maps local branches of the
| source to local branches of the target, it maps all refs (including
| remote-tracking branches, notes etc.) and sets up a refspec
| configuration such that all these refs are overwritten by a git
| remote update in the target repository.
since I want to have a mirror of the FreeBSD repo, after all.
I then re-created the "head" and "stable_12" worktrees. (This was
back on 20 September.)
I left it alone until a few minutes ago, when I did:
* cd /repo/git/freebsd/src.git/
* git show # to see what it would do; it showed a commit
# log entry from Cy Schubert
* git fetch --all
I kinda guessed on that last, but it pulled some data for a while,
spewed some status-type messages, and exited status code 0.
* git show # Now showed a commit log entry from Emmanuel
so that seems like it might be progress.
The worktress, now, if I try "git status", claim that there's a large
number of "Changes to be committed:" -- but the most recently-updated
file in the worktree has an mtime of "Sep 30 20:31:50 2020".
But "git log" shows (e.g., in the stable12 worktree):
| commit 4015a56f10fd83a4f222f5c34e63c15d7fea272f (HEAD -> stable/12)
| Author: Kyle Evans <kevans at FreeBSD.org>
| Date: Sat Oct 3 13:27:57 2020 +0000
| MFC r361254: Fix Typo in ng_hci_le_connection_complete_ep struct.
| PR: 246538
| svn path=/stable/12/; revision=366395
And it seems that "git pull" (as such) doesn't work with worktrees:
| g1-48(12.2-S) git pull
| There is no tracking information for the current branch.
| Please specify which branch you want to merge with.
| See git-pull(1) for details.
| git pull <remote> <branch>
| If you wish to set tracking information for this branch you can do so with:
| git branch --set-upstream-to=origin/<branch> stable/12
Trying to look up information about git worktrees, I find examples of
transient worktrees -- they are created, code is devloped, committed,
and pushed, and the worktree is destroyed. If a new one is wanted, it
That is not waht I'm trying to do. I am trying to have a (separate)
working copy (for each branch I use) that persists from day to day, and
which I update from the repo shortly before I rebuild FreeBSD.
> The worktree stuff is then as simple as this:
> % cd src.git
> % git show-ref|grep stable.12
> e9c4330183dcfe8a5d26843613adc0a348fd0544 refs/heads/stable/12
> % git worktree add ../stable_12 stable/12
> Preparing worktree (checking out 'stable/12')
> Updating files: 100% (81262/81262), done.
> HEAD is now at e9c4330183d MFC r360483,360484: Make nvmecontrol work
> with nda like it does with nvd, and associated bits.
> % git worktree add ../current main
Yes -- asa noted above, the "git worktree add ..." seems to have worked.
Thank you. :-)
David H. Wolfskill david at catwhisker.org
Donald Trump is just in it for the publicity (well, and the money).
See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 618 bytes
Desc: not available
More information about the freebsd-git