Re: [PATCH] git-svn: Allow certain refs to be ignored

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

 



On Tue, Oct 11, 2011 at 12:58 AM, Eric Wong <normalperson@xxxxxxxx> wrote:
> Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> Asking Eric to comment when he has time to do so.
>>
>> I find these pattern matches that are not anchored on either side
>> somewhat disturbing (e.g. --ignore-refs=master would ignore master2)
>> but ignore-paths codepath seems to follow the same pattern, so perhaps it
>> is in line with what git-svn users want. I dunno.
>
> As stated last year, I remember wanting globs instead of regexps, but
> we already made the regexp mistake with ignore-paths, too :(
>
> I don't think it's horrible with regexps, and if git-svn users find it
> useful, it's fine by me.

In my case globs would be too limited. I'm using negative look-ahead
assertions to match only branches/tags for projects that are
interesting to me. With globs it's not possible AFAIK (I would have to
specify all ignored patterns by hand which would work only for known
patterns):
  ignore-paths = ^path/branches/(?!proj1|proj2)


>> Michael Olson <mwolson@xxxxxxx> writes:
>> > Re-sent by request of Piotr Krukowiecki.  This is against v1.7.4.1,
>> > and I've been using it stably for a while.
>
> Michael: can you please rebase against latest and resend?  Thanks.

I've got following error while using the patch. I don't know it also
happens without the patch...

	M	...
r216099 = 4d16d4890915f4c02ba541956957a4e4b4bed400
(refs/remotes/proj2/proj2-branch9)
Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Counting objects: 10284, done.
Compressing objects: 100% (7695/7695), done.
Writing objects: 100% (10284/10284), done.
Total 10284 (delta 5077), reused 0 (delta 0)
fatal: refs/remotes/proj1/trunk: not a valid SHA1
update-ref refs/heads/master refs/remotes/proj1/trunk: command
returned error: 128

$ git log -1
fatal: bad default revision 'HEAD'
$ git log -1 trunk
fatal: ambiguous argument 'trunk': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions
$ ls .git/refs/remotes/
proj2

The commands I've used:

git svn init --prefix=proj2/ -Rproj2 -s
--ignore-paths='^proj2/branches/(?!proj1|proj2)|^proj2/tags/(?!proj1|proj2)|^proj2/(?!trunk|branches|tags)'
--ignore-refs='^refs/remotes/proj2/(?!proj1|proj2|trunk|tag)|^refs/remotes/proj2/tags/(?!proj1|proj2)'
http://url/svn/repos/proj2
git svn init --prefix=proj1/ -Rproj1 -s
--ignore-paths='^proj1/branches/(?!proj1|proj2)|^proj1/tags/(?!proj1|proj2)|^proj2/(?!trunk|branches|tags)'
--ignore-refs='^refs/remotes/proj1/(?!proj1|proj2|trunk|tag)|^refs/remotes/proj1/tags/(?!proj1|proj2)'
http://url/svn/repos/proj1
git svn fetch proj2 && git svn fetch proj1

The error happened while fetching proj2. I wonder why it tried to set
master to proj1?
Is my command ok? I want to have both proj1 and proj2 under one git repository.


-- 
Piotr Krukowiecki
--
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]