* git bundle unbundle and "check-outable" refs
@ 2011-09-29 15:51 Todd A. Jacobs
2011-09-29 16:49 ` Junio C Hamano
2011-09-29 17:20 ` Jakub Narebski
0 siblings, 2 replies; 3+ messages in thread
From: Todd A. Jacobs @ 2011-09-29 15:51 UTC (permalink / raw)
To: git
Never having needed git bundle before, I've recently been using it as
a sneakernet. In particular, I'm using bundles to work around
limitations of filesystem semantics on vfat and hpfs+ drives when
shared between Linux and OS X systems. The systems are air-gapped, so
sneakernet is essential.
At any rate, the issue I'm dealing with is that "git bundle unbundle"
is sort of non-intuitive to deal with. It seems to add the commits
directly to the local repository, but doesn't give me any of the
branch refs that I'm expecting from such an operation. In other words,
if I bundle branch foo on machine A, then unbundle on machine B, I
expect to be able to "git checkout foo" and get on with life.
Instead, it seems that I have to figure out what commits were
unbundled, and create a new branch ref pointing to the head that I
want. I assume this is to prevent namespace collisions, but it seems
really, really cumbersome. Wouldn't it make more sense to include
branch names in the bundle, and simply prompt the user to rename refs
that conflict?
I'm certainly open to other ideas of how to accomplish this workflow,
and if there's an invocation to simplify this that I'm unaware of,
please advise. Otherwise, I really think the default behavior of the
unbundle sub-command ought to be more intuitive.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git bundle unbundle and "check-outable" refs
2011-09-29 15:51 git bundle unbundle and "check-outable" refs Todd A. Jacobs
@ 2011-09-29 16:49 ` Junio C Hamano
2011-09-29 17:20 ` Jakub Narebski
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2011-09-29 16:49 UTC (permalink / raw)
To: Todd A. Jacobs; +Cc: git
"Todd A. Jacobs" <nospam+listmail@codegnome.org> writes:
> directly to the local repository, but doesn't give me any of the
> branch refs that I'm expecting from such an operation. In other words,
> if I bundle branch foo on machine A, then unbundle on machine B, I
> expect to be able to "git checkout foo" and get on with life.
$ git bundle -h
usage: git bundle create <file> <git-rev-list args>
or: git bundle verify <file>
or: git bundle list-heads <file> [<refname>...]
or: git bundle unbundle <file> [<refname>...]
$ git bundle list-heads /var/tmp/junk/foo.bundle
632052641517de1a965c1f045b97d2eaa541b2e9 refs/heads/maint
$ git fetch /var/tmp/junk/foo.bundle maint
From /var/tmp/junk/foo.bundle
* branch maint -> FETCH_HEAD
or
$ git fetch /var/tmp/junk/foo.bundle maint:bundle_head
$ git log bundle_head
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git bundle unbundle and "check-outable" refs
2011-09-29 15:51 git bundle unbundle and "check-outable" refs Todd A. Jacobs
2011-09-29 16:49 ` Junio C Hamano
@ 2011-09-29 17:20 ` Jakub Narebski
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Narebski @ 2011-09-29 17:20 UTC (permalink / raw)
To: Todd A. Jacobs; +Cc: git
"Todd A. Jacobs" <nospam+listmail@codegnome.org> writes:
> Never having needed git bundle before, I've recently been using it as
> a sneakernet. In particular, I'm using bundles to work around
> limitations of filesystem semantics on vfat and hpfs+ drives when
> shared between Linux and OS X systems. The systems are air-gapped, so
> sneakernet is essential.
>
> At any rate, the issue I'm dealing with is that "git bundle unbundle"
> is sort of non-intuitive to deal with. [...]
I guess the fault is with "git bundle" documentation.
The "Example" section of git-bundle(1) manpage shows that you can use
path to bundle in place of URL to repository in "git clone". Actually
you can use path to bundle anywhere where URL or nickname of
repository is/can be used, i.e.:
git remote add <name> <bundle>
git fetch <bundle> [<refspec>...]
git pull <bundle> [<refspec>...]
git ls-remote <bundle>
HTH
--
Jakub Narębski
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-29 17:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-29 15:51 git bundle unbundle and "check-outable" refs Todd A. Jacobs
2011-09-29 16:49 ` Junio C Hamano
2011-09-29 17:20 ` Jakub Narebski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.