Re: Malformed branch name in fast-export when specifying non-HEAD/branch revision

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

 



Heya,

On Mon, Aug 22, 2011 at 09:19, Jeff King <peff@xxxxxxxx> wrote:
> Hmm. Maybe I am misremembering the problem, but I thought that worked
> already. If you say:
>
>  git fast-export refs/heads/foo
>
> you should get only reset/commit lines in the output for refs/heads/foo,
> no?
>
> Now I can't seem to replicate the case where refs/heads/master is
> mentioned, but you didn't want it to be. I may have to go back and
> re-read the thread from a month or two ago when we discussed these
> issues.

Do you agree that this is expected behavior?

$ git init test
Initialized empty Git repository in /home/sverre/code/test/.git/
$ cd test/
$ echo content >> foo
sverre@laptop-sverre:~/code/test
$ git add foo
$ git commit -m first
[master (root-commit) 821176f] first
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 foo
$ echo content >> foo
$ git commit -am second
[master 1934282] second
 1 files changed, 1 insertions(+), 0 deletions(-)
$ git branch other
$ git fast-export ^master other
reset refs/heads/other
from 1934282469e3a83a5ef827fd31e074cfb4f3eadf

Because in current git.git, this doesn't work (the above is generated
using a git that has the patch series Dscho and I sent out). Current
git will instead do the following:

$ git fast-export ^master other
reset refs/heads/other
from :0

The 'from :0' here is obviously a bug (which is fixed by our patch series).

You might wonder, 'why would anyone do that', well, for example, they
might be using marks:

$ git fast-export --export-marks=marksfile  master > /dev/null
$ git fast-export --import-marks=marksfile  other
reset refs/heads/other
from :4

Again, the above is generated with my patched git, current git.git
simply outputs nothing.

$ git fast-export --import-marks=marksfile other

-- 
Cheers,

Sverre Rabbelier
--
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]