Git development
 help / color / mirror / Atom feed
* Re: [PATCH] Require JDK1.5
From: Noel Grandin @ 2007-05-14  7:21 UTC (permalink / raw)
  To: Grzegorz Kulewski; +Cc: Robin Rosenberg, spearce, git
In-Reply-To: <Pine.LNX.4.63.0705140303380.17507@alpha.polcom.net>


>> diff --git
>> a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
>> b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
>> index c397a0d..63796fd 100644
>> --- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
>> +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
>> @@ -50,9 +50,9 @@ public class ObjectIdMap implements Map {
>>
>>     public ObjectIdMap(Map sample) {
>>         try {
>> -            Method m=sample.getClass().getMethod("clone", null);
>> +            Method m=sample.getClass().getMethod("clone",
>> (Class[])null);
>>             for (int i=0; i<256; ++i) {
>> -                level0[i] = (Map)m.invoke(sample, null);
>> +                level0[i] = (Map)m.invoke(sample, (Object[])null);
>>             }
>>         } catch (IllegalAccessException e) {
>>             throw new IllegalArgumentException(e);
>
> I wonder why one would need changes like this?
>
> These casts are not needed for anything as far as I can see and your
> IDE should easily tell you what type that parameter is. No?
>
Those are varargs parameters, so when compiling under 1.5 you sometimes
have to tell the compiler the difference between passing a varargs array
and passing one parameter.


Disclaimer: http://www.peralex.com/disclaimer.html

^ permalink raw reply

* Suggestions for cgit (was: Re: suggestions for gitweb)
From: Jakub Narebski @ 2007-05-14  7:31 UTC (permalink / raw)
  To: Lars Hjemli; +Cc: git
In-Reply-To: <8c5c35580705130952r7c0e353dr9cf20aed61bdd463@mail.gmail.com>

On Sun, 13 May 2007, Lars Hjemli <hjemli@gmail.com> wrote:

> I've implemented number of files/lines changed in cgit's log view and
> pushed it to http://hjemli.net/git/
> 
> It does consume some cpu (especially on the linux-2.6 repo), but it's
> not terribly bad (and the caching helps out). But I felt like changing
> the number of commits per page to 50, so I added a knob for this in
> the config file while at it.
> 
> I'll try to get a proper diffstat on the commit page + file history
> via tree view next (filesize has always been part of cgits tree view
> btw).

What I lack in cgit is using git diff and showing extended diff headers
(and the ugly tight box around diff doesn't help either), and gitweb's
'commitdiff' view / git's git-show / git's git-format-patch.

I don't think displaying filesize slows cgit much (you need to find and
read object header for that, as this information is not present in a
tree object...

By the way, what do you think about http://git.or.cz/gitwiki/Gitweb 
page?
-- 
Jakub Narebski
Poland

^ permalink raw reply

* Re: RFH for [PATCH] Optimized cvsexportcommit: calling 'cvs status' only once instead of once per changed file.
From: Martin Langhoff @ 2007-05-14  6:40 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: Junio C Hamano, git, Steffen Prohaska
In-Reply-To: <200705132351.24867.robin.rosenberg.lists@dewire.com>

On 5/14/07, Robin Rosenberg <robin.rosenberg.lists@dewire.com> wrote:
> söndag 13 maj 2007 skrev Junio C Hamano:
> > I'd like to have feedbacks on this patch, as I think what it
> > tries to do is sensible and worth to have it in v1.5.2 if it
> > works for people.
> >
> > Ack?  Nack?  YesButNeedsmorework?
>
> Looks good, but I haven't tried it for production work yet.

Same here - got it in my dev system, but haven't had a chance to use
it in real-life.

m

^ permalink raw reply

* committing selected 'changed' or 'added' files works, but not 'removed'
From: Jim Meyering @ 2007-05-14  6:16 UTC (permalink / raw)
  To: git

Hello,

If I've just run "git-rm -f c" in a directory with a few modified
or git-added files, is there some way to commit (non-interactively)
only the removal of that selected file?  I.e., not any other changes
in the working directory?  git-commit -m. -- c fails with this:

  error: pathspec 'c' did not match any file(s) known to git

If I use "cg-commit" instead of "git-commit", it works fine.

When I asked on IRC, "cehteh" suggested to create a temporary branch,
do the removal there, and then to rebase that change back onto the
original branch -- and to remove the disposable branch.  Yes, that works,
but I want do the job with a single commit command, the same way I can
for "added" and "modified" files.  And I've been trying (until now,
successfully) to wean myself away from cogito.

Why should "removed" files be handled so differently?  If I cannot commit
a selected "file removal" (regardless of the state of the index), then
isn't that an opportunity to add a feature?

In case you're wondering, I want this functionality in order to make
a version control agnostic commit/diff/ChangeLog tool work the same way
with raw git as it did using cogito.

-------------------------------------------
In case an actual scenario helps, I'd like to be able to commit the
removal of "c", below without also committing the change to "b":

mkdir .j && cd .j && git-init > /dev/null && touch b c && git-add b c \
  && git-commit -q -m. && echo > b && git-rm --quiet -f c \
  && git-commit -m. -- c

The final commit above fails like this:

  error: pathspec 'c' did not match any file(s) known to git.
  Did you forget to 'git add'?

^ permalink raw reply

* Re: git.or.cz IPv6
From: Thomas Glanzmann @ 2007-05-14  5:42 UTC (permalink / raw)
  To: Petr Baudis; +Cc: GIT
In-Reply-To: <20070514005410.GG4489@pasky.or.cz>

Hello,

> git.or.cz's IPv6 connectivity should be fine, maybe there is a routing
> problem somewhere along the way :-( - what IPv6 ISP are you using?

_From_ University:

(faui01) [~] traceroute6 git.or.cz
traceroute to rover.or.cz (2a01:b0:0:2::) from 2001:638:a00:1e:209:3dff:fe10:85e5, 30 hops max, 16 byte packets
 1  m5.ipv6.uni-erlangen.de (2001:638:a00:1e::1)  0.434 ms  0.358 ms  0.35 ms
 2  nr-erl1.6win.dfn.de (2001:638:f:a00::a00:1)  0.332 ms  0.267 ms  0.258 ms
 3  2001:638:c:c056::2 (2001:638:c:c056::2)  0.568 ms  0.535 ms  0.389 ms
 4  2001:638:c:c049::2 (2001:638:c:c049::2)  5.911 ms  3.454 ms  3.057 ms
 5  zr-fra1-te0-7-0-4.x-win.dfn.de (2001:638:c:c002::2)  10.291 ms  7.454 ms  7.477 ms
 6  xr-fra1-te7-1.x-win.dfn.de (2001:638:c:c050::1)  5.287 ms  5.014 ms  5.04 ms
 7  nr-frankfurt1-fe0-0.x-win.dfn.de (2001:638:c:c05a::1)  4.199 ms  4.157 ms  4.167 ms
 8  dfn.rt1.fra.de.geant2.net (2001:798:14:10dd::1)  4.909 ms  4.766 ms  4.661 ms
 9  so-6-0-0.rt1.pra.cz.geant2.net (2001:798:cc:1301:1401::1)  12.713 ms  12.755 ms  12.661 ms
10  so-7-2-0.rt1.vie.at.geant2.net (2001:798:cc:1001:1301::2)  19.173 ms  19.604 ms  19.134 ms
11  2001:1900:5:2::5 (2001:1900:5:2::5)  42.501 ms  42.886 ms  42.216 ms
12  2001:1900:5:1::1 (2001:1900:5:1::1)  43.162 ms  43.222 ms  42.977 ms
13  2001:7f8:4::cb9:1 (2001:7f8:4::cb9:1)  31.844 ms  32.347 ms  31.708 ms
14  so-1-0-0.dus11.ip6.tiscali.net (2001:668:0:2::1:32)  32.051 ms  32.183 ms  32.859 ms
15  so-0-0-0.ham10.ip6.tiscali.net (2001:668:0:2::101)  37.727 ms  37.319 ms  37.488 ms
16  * * *
17  * * *
18  * * *

_From_ Home:

(thinkpad) [~] traceroute6 git.or.cz
traceroute to rover.or.cz (2a01:b0:0:2::) from 2001:a60:f027:dead:213:2ff:fe7b:d860, 30 hops max, 16 byte packets
 1  gateway.glanzmann.de (2001:a60:f027:dead::)  1.06 ms  1.124 ms  0.885 ms
 2  gw-55.muc-02.de.sixxs.net (2001:a60:f000:36::1)  9.65 ms  9.5 ms  9.417 ms
 3  rt4.muc1.m-online.net (2001:a60:0:200::1)  9.961 ms  10.232 ms  11.275 ms
 4  ge-0-1-0-302-gar1.muc.cw.net (2001:5001:100:f::1)  10.362 ms  10.068 ms  10.397 ms
 5  ge-0-1-0-302-gar1.muc.cw.net (2001:5001:100:f::1)  10.503 ms  10.331 ms  10.32 ms
 6  so-4-3-0-dcr2.fra.cw.net (2001:5000:0:cd::1)  17.473 ms  17.683 ms  17.65 ms
 7  so-4-0-0-dcr1.amd.cw.net (2001:5000:0:e::2)  31.629 ms  31.751 ms  31.321 ms
 8  gin-ad1-6bb1.teleglobe.net (2001:7f8:1::a500:6453:1)  33.194 ms  31.58 ms  31.719 ms
 9  bbcr05-fra4-5a6.six-de.net (2001:4b88:0:4:16:2::)  37.907 ms  38.499 ms  37.962 ms
10  bbcr02-fra4-decixii-a.six-de.net (2001:4b88:0:4:2:2:11:0)  37.106 ms  38.543 ms  37.857 ms
11  de-cix1v6.cr1-telhe-lon-uk.as15444.net (2001:7f8::3c54:0:1)  44.361 ms  45.622 ms *
12  ge3-0.gsr2-telhe-lon-uk.ipv6.as15444.net (2001:1a90:0:2::2)  44.894 ms  81.328 ms *
13  uk6x.ipv6.btexact.com (2001:7f8:2:1::1)  250.741 ms  51.785 ms  226.606 ms
14  2001:1900:5:2::61 (2001:1900:5:2::61)  257.189 ms  201.111 ms  214.01 ms
15  2001:7f8:4:1::cb9:1 (2001:7f8:4:1::cb9:1)  55.379 ms  55.015 ms  55.24 ms
16  so-0-1-0.lon11.ip6.tiscali.net (2001:668:0:2::640)  55.016 ms  54.419 ms  53.717 ms
17  so-7-0-0.lon11.ip6.tiscali.net (2001:668:0:2::1:332)  54.29 ms  54.24 ms  53.907 ms
18  so-1-0-0.dus11.ip6.tiscali.net (2001:668:0:2::1:32)  54.4 ms  54.082 ms  53.682 ms
19  so-0-0-0.ham10.ip6.tiscali.net (2001:668:0:2::101)  58.853 ms  60.317 ms  59.325 ms
20  * *

_From_ a friend:

(stargate) [~] traceroute6 git.or.cz
traceroute to rover.or.cz (2a01:b0:0:2::) from 2001:4b88:103a::1, 30 hops max, 16 byte packets
 1  adslgw01-fra4-5a.six-de.net (2001:4b88:0:4:0:22:11:0)  12.366 ms  12.103 ms  11.769 ms
 2  bbcr05-fra4-5a6.six-de.net (2001:4b88:0:4:5:5:11:0)  12.054 ms  11.988 ms  11.764 ms
 3  bbcr02-fra4-decixii-a.six-de.net (2001:4b88:0:4:2:2:11:0)  33.735 ms  21.547 ms  18.459 ms
 4  de-cix1v6.cr1-telhe-lon-uk.as15444.net (2001:7f8::3c54:0:1)  27.813 ms *  29.321 ms
 5  ge3-0.gsr2-telhe-lon-uk.ipv6.as15444.net (2001:1a90:0:2::2)  29.273 ms  30.316 ms *
 6  uk6x.ipv6.btexact.com (2001:7f8:2:1::1)  31.474 ms  29.765 ms  29.037 ms
 7  2001:1900:5:2::61 (2001:1900:5:2::61)  57.898 ms  87.899 ms  79.933 ms
 8  2001:7f8:4:1::cb9:1 (2001:7f8:4:1::cb9:1)  52.775 ms  32.296 ms  31.522 ms
 9  so-1-1-0.lon12.ip6.tiscali.net (2001:668:0:2::1:311)  31.504 ms  93.717 ms  32.477 ms
10  so-0-1-0.lon11.ip6.tiscali.net (2001:668:0:2::1:322)  32.502 ms  32.706 ms  32.73 ms
11  so-1-0-0.dus11.ip6.tiscali.net (2001:668:0:2::1:32)  36.458 ms  37.065 ms  35.934 ms
12  so-0-0-0.ham10.ip6.tiscali.net (2001:668:0:2::101)  41.131 ms  42.767 ms  42.101 ms

> I'd prefer to have AAAA records for IPv6-capable sites but if it
> causes problems for more people, I will remove it - new technology
> stuff is nice but the priority #1 is for the site to be reachable.

We have native ipv6 since 5 years at university. And actually our IPv6
connections still stands when our IPv4 is down. But the git.or.cz
connection is down for some time now. At least from my point of views.

        Thomas

^ permalink raw reply

* Re: git rebase chokes on directory -> symlink -> directory
From: Junio C Hamano @ 2007-05-14  4:37 UTC (permalink / raw)
  To: Git Mailing List; +Cc: H. Peter Anvin, Alex Riesen
In-Reply-To: <7vps569904.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano <junkio@cox.net> writes:

> However.
>
> I usually have "[apply] whitespace = strip" in my ~/.gitconfig,
> but during this verification run, I disabled it to keep rebase
> from falling back to 3-way merge using merge-recursive.  If I
> turn it on, rebase still fails and I strongly suspect "rebase
> -m" would fail the same way, although I haven't tried it (it
> takes too much time).
>
> I'll be somewhat busy this weekend, so I would welcome anybody
> else beating me to fixing the problem in merge-recursive.

Yuck.  merge-recursive does seem to have problem with D/F
conflict in general; I suspect this is not limited to cases that
involve symbolic links.

First, the setup.

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-newsetup.git/
$ cd linux-2.6-newsetup.git
$ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
$ git branch other b2ad90f4969226fe8cf3edc5330711ed5fc20105
$ git branch ancestor other^1
$ git reset --hard ancestor
$ echo >>Makefile ; git add Makefile ; git commit -m 'change one'
$ git branch try

To see that the underlying read-tree is working as expected (and
do not have to be debugged), we can first try the usual three-way
read tree:

$ git read-tree -m -u ancestor HEAD other
$ git ls-files -u --abbrev arch/x86-64

This would show...

    120000 ad3f146 3       arch/x86_64/boot
    100644 495f20c 1       arch/x86_64/boot/.gitignore
    100644 495f20c 2       arch/x86_64/boot/.gitignore
    100644 ee6f650 1       arch/x86_64/boot/Makefile
    100644 ee6f650 2       arch/x86_64/boot/Makefile
    ...

The current HEAD (the one that we tagged as 'try') has the
directory arch/x86_64/boot/, but all of its files are unchanged
from the "common ancestor", so they all have identical stages 1
and 2, with stage 3 missing.  The other tree has boot/ as a
symlink.  These "One-side removes other side does not touch" and
"one-side adds" cases are left unmerged by "read-tree -m -u", as
that is how merge-recursive can find renames to begin with.

Now we've seen what the read-tree (which is the same machinery
used as git_merge_trees() in mege-recursive) does with these
three trees, let's see how merge-recursive finishes this off:

    $ git reset --hard try
    $ git merge-recursive ancestor -- HEAD other
    CONFLICT (directory/file): There is a directory with name arch/x86_64/boot in HEAD. Added arch/x86_64/boot as arch/x86_64/boot~other
    Removed arch/x86_64/boot/.gitignore
    Removed arch/x86_64/boot/Makefile
    Removed arch/x86_64/boot/bootsect.S
    Removed arch/x86_64/boot/compressed/Makefile
    Removed arch/x86_64/boot/compressed/head.S
    Removed arch/x86_64/boot/compressed/misc.c
    Removed arch/x86_64/boot/compressed/vmlinux.lds
    Removed arch/x86_64/boot/compressed/vmlinux.scr
    Removed arch/x86_64/boot/install.sh
    Removed arch/x86_64/boot/mtools.conf.in
    Removed arch/x86_64/boot/setup.S
    Removed arch/x86_64/boot/tools/.gitignore
    Removed arch/x86_64/boot/tools/build.c

There is no rename, so rename detection does not interfere, but
the D/F conflict detection code in merge-recursive thinks that
arch/x86_64/boot is a directory in one tree (yes, it is true in
the original tree, but it goes away as all files under it), and
a non-directory in another.  And instead of replacing the boot/
directory that becomes empty with a new symlink boot/, it
creates the boot~funny-name symlink and fails the operation.

When it actually is checking out arch/x86_64/boot out of the
resolved index, it should notice that (1) arch/x86_64/boot
directory is unnecessary to house anything in the resulting
index anymore, and that (2) there is no locally created
untracked file that is 'precious' [*1*].  Then it can rmdir()
and create the boot/ symlink in its place.  To fix this, it may
be necessary to update its checkout code to perform the "remove
first then create" two-pass process git-apply does.

It is unfortunate that for merge-recursive it is probably too
cumbersome to always do the right thing, but I think it should
at least notice that arch/x86_64/boot whose files all disappear
does not conflict with creation of the new symlink.

^ permalink raw reply

* Re: What's cooking in git.git (topics)
From: Daniel Barkalow @ 2007-05-14  3:21 UTC (permalink / raw)
  To: Julian Phillips; +Cc: Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.64.0705140121030.5520@beast.quantumfyre.co.uk>

On Mon, 14 May 2007, Julian Phillips wrote:

> On Sun, 13 May 2007, Junio C Hamano wrote:
> 
> > Thanks for the status updates.  Although I do not recall Daniel
> > saying it explicitly, I have been assuming that his series was
> > aiming for the same all along.  It might be a good idea for you
> > two to compare notes sometime between now and v1.5.2?
> 
> Well, it can't be a bad idea, can it? ;)
> 
> Apart from the code itself (which can be found at
> http://git.q42.co.uk/w/fetch2.git), I don't have any actual notes, and since I
> haven't had a chance to work on it for a couple of weeks I'm not 100% sure of
> where I was at - due to lack of time I have tended to just spend a few hours
> adding some missing part when I found the time but I don't actually have a
> TODO list or similar (though I really should).
> 
> I'm also out of town with work for the first half of the coming week ... but
> I'm certainly willing to talk about what I have and haven't done.

I've actually been largely unsuccessful in figuring out how to do most of 
the fetch logic in C, but I was expecting that somebody would write it if 
the library were available.

I've been working on various little things that are a lot easier if the 
parsing is centralized:

 * update tracking refs on push
 * handle refspec patterns in match_refs so that send-pack/http-push can 
   take them and builtin-push doesn't need to do anything, and can also
   turn --tags into +refs/tags/*:refs/tags/*.

I've also been looking at doing something like your remote_ops, but also 
including something for push, and doing it in another library file (so 
push, fetch, and ls-remote can all share the same dispatch on type of 
url).

> (Daniel, hope you don't mind me adding you to CC ...)

Not at all; I hadn't noticed this thread yet, and it's quite related to 
what I'm working on.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply

* Re: suggestions for gitweb
From: Petr Baudis @ 2007-05-14  2:36 UTC (permalink / raw)
  To: Michael Niedermayer; +Cc: Junio C Hamano, git, Jakub Narebski
In-Reply-To: <20070514020001.GX14859@MichaelsNB>

On Mon, May 14, 2007 at 04:00:02AM CEST, Michael Niedermayer wrote:
> i agree with you that she will click on 'history' and figure out what it is
> but if she wants to see the contents of one of the files then i think
> she will be confused and not know where to click,

I think she will just click on the filename - straightforward enough...?

> and a 'help' link which
> would lead to a page which explains what 'blob' is at the top of the page
> would solve that with less frustration than random clicking around
> (renaming blob to file_content would work too but i guess i would be
>  lynched for mere suggesting ...)

:-)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett

^ permalink raw reply

* Re: suggestions for gitweb
From: Michael Niedermayer @ 2007-05-14  2:00 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Junio C Hamano, git, Jakub Narebski
In-Reply-To: <20070514010831.GH4489@pasky.or.cz>

[-- Attachment #1: Type: text/plain, Size: 3050 bytes --]

Hi

On Mon, May 14, 2007 at 03:08:31AM +0200, Petr Baudis wrote:
>   Hi,
> 
> On Sun, May 13, 2007 at 02:01:52AM CEST, Michael Niedermayer wrote:
> > On Sat, May 12, 2007 at 03:39:25PM -0700, Junio C Hamano wrote:
> > > Michael Niedermayer <michaelni@gmx.at> writes:
> > > 
> > > > * gitweb uses many terms which are new to a non git user, and while
> > > >   devlopers who work on ffmpeg will very likely very quickly have
> > > >   figured out the meaning of all of them. i think simple users who just
> > > >   want to browse the ffmpeg code will have their problems, so i belive 
> > > >   a small help text linked to from all pages which contains a short
> > > >   definition of all the git(web) specific terms would be very helpfull
> > > >   something like
> > > >     blob        - file      at a specific revission/date
> > > >     tree        - directory at a specific revission/date
> > > >     (short) log - project wide commit log
> > > >     history     - short log equivalent for a file or directory
> > > 
> > > Coming fron non-CVS camp, I think changing this to non-git terms
> > > is very harmful than educating users who are migrating from
> > > other systems.
> > 
> > you must missunderstand me :(
> > i want to educate them, but i cannot as iam not speaking about ffmpeg
> > developers/contributors but rather random people who are curious and 
> > want to take a look at the ffmpeg source
> > 
> > for them a simple help link similar to "ViewVC Help" which viewvc has
> > on the bottom right of its pages would be great IMHO
> > also the text above is a pure random suggestion by a svn user and was
> > not intended to redefine any git terms
> 
>   I seriously doubt the usefulness of this. Meaning of all the links except
> maybe blob seems immediately obvious for me, even if I try to imagine
> that I know nothing about Git; maybe I'm wrong here, I might try to do
> an experiment. :-)
> 
>   But, even if that's the case, when a new user meets gitweb and looks
> at the 'history' link, what do you think she will do? Start hunting the
> page for some link to a glossary? I yet have to see a user like that :-)
> - I will bet that she just clicks at the link and figures out what it is
> about based on what happenned.

i agree with you that she will click on 'history' and figure out what it is
but if she wants to see the contents of one of the files then i think
she will be confused and not know where to click, and a 'help' link which
would lead to a page which explains what 'blob' is at the top of the page
would solve that with less frustration than random clicking around
(renaming blob to file_content would work too but i guess i would be
 lynched for mere suggesting ...)

this of course is not really a problem for ffmpeg, we could easily change
"our" gitweb to contain a help link

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH] Documentation: Split description of pretty formats of commit log
From: Junio C Hamano @ 2007-05-14  1:48 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git
In-Reply-To: <200705140125.45711.jnareb@gmail.com>

Jakub Narebski <jnareb@gmail.com> writes:

> Split description of pretty formats into list of pretty options
> (--pretty and --encoding) in new file Documentation/pretty-options.txt
> and description of formats itself as a separate "PRETTY FORMATS"
> section in pretty-formats.txt

Very good -- thanks.

^ permalink raw reply

* Re: [PATCH] git-add: allow path limiting with -u
From: Junio C Hamano @ 2007-05-14  1:29 UTC (permalink / raw)
  To: Jeff King; +Cc: Jakub Narebski, git, cworth
In-Reply-To: <20070514004224.GB6689@coredump.intra.peff.net>

Jeff King <peff@peff.net> writes:

> On Sun, May 13, 2007 at 12:35:24PM +0200, Jakub Narebski wrote:
>
>> The fact that "add --interactive does not take any parameters" is
>> separate issue (which, accidentally, was adressed in the same patch).
>
> I don't generally use add --interactive, but I imagine that
> path-limiting would also make sense there. I think it would be a bit
> harder to implement (and test!), since there are many calls to commands
> which would need the limits. So I will leave that unless somebody really
> cares about it.

I do not use -i myself that much, but due to its "interactive"
nature, I would imagine that limiting path upfront is actually
counter-productive.  During the interactive refining process you
might notice that you wanted to handle some other paths you
excluded from the command line, but you won't be able to access
them if you limit upfront.  In other words, command line limiter
would only interfere with what the interactive user would really
want to do.

^ permalink raw reply

* Re: [PATCH] git-add: allow path limiting with -u
From: Junio C Hamano @ 2007-05-14  1:26 UTC (permalink / raw)
  To: Jeff King; +Cc: Jakub Narebski, git
In-Reply-To: <20070514004903.GC6689@coredump.intra.peff.net>

Jeff King <peff@peff.net> writes:

> On Mon, May 14, 2007 at 02:50:22AM +0200, Jakub Narebski wrote:
>
>> -'git-add' [-n] [-v] [-f] [--interactive | -i] [-u] [--] <file>...
>> +'git-add' [-n] [-v] [-f] [--] <file>...
>> +'git-add' [-n] [-v] [-f] -u [[--] <file>...]
>> +'git-add' (--interactive | -i)
>
> I don't see the point in splitting -u out as its own separate "mode" of
> operation. To me it's conceptually a flag that says "don't add untracked
> files, and remove deleted files". But I don't have a strong opinion (and
> certainly splitting out -i makes sense).

Concurred, and I agree with Jakub that your update to the
description of -u makes it much better.

Thanks, both.

^ permalink raw reply

* Re: suggestions for gitweb
From: Petr Baudis @ 2007-05-14  1:08 UTC (permalink / raw)
  To: Michael Niedermayer; +Cc: Junio C Hamano, git, Jakub Narebski
In-Reply-To: <20070513000151.GT14859@MichaelsNB>

  Hi,

On Sun, May 13, 2007 at 02:01:52AM CEST, Michael Niedermayer wrote:
> On Sat, May 12, 2007 at 03:39:25PM -0700, Junio C Hamano wrote:
> > Michael Niedermayer <michaelni@gmx.at> writes:
> > 
> > > * gitweb uses many terms which are new to a non git user, and while
> > >   devlopers who work on ffmpeg will very likely very quickly have
> > >   figured out the meaning of all of them. i think simple users who just
> > >   want to browse the ffmpeg code will have their problems, so i belive 
> > >   a small help text linked to from all pages which contains a short
> > >   definition of all the git(web) specific terms would be very helpfull
> > >   something like
> > >     blob        - file      at a specific revission/date
> > >     tree        - directory at a specific revission/date
> > >     (short) log - project wide commit log
> > >     history     - short log equivalent for a file or directory
> > 
> > Coming fron non-CVS camp, I think changing this to non-git terms
> > is very harmful than educating users who are migrating from
> > other systems.
> 
> you must missunderstand me :(
> i want to educate them, but i cannot as iam not speaking about ffmpeg
> developers/contributors but rather random people who are curious and 
> want to take a look at the ffmpeg source
> 
> for them a simple help link similar to "ViewVC Help" which viewvc has
> on the bottom right of its pages would be great IMHO
> also the text above is a pure random suggestion by a svn user and was
> not intended to redefine any git terms

  I seriously doubt the usefulness of this. Meaning of all the links except
maybe blob seems immediately obvious for me, even if I try to imagine
that I know nothing about Git; maybe I'm wrong here, I might try to do
an experiment. :-)

  But, even if that's the case, when a new user meets gitweb and looks
at the 'history' link, what do you think she will do? Start hunting the
page for some link to a glossary? I yet have to see a user like that :-)
- I will bet that she just clicks at the link and figures out what it is
about based on what happenned.

> > > * The blame page shows the SHA1 for each hunk and IMHO thats the last thing
> > >   i would want to see first, id be much more interrested in by whom and
> > >   when a given change was done, iam wondering in which case the SHA1 would
> > >   be usefull? copy-paste onto your command line git tools but then why
> > >   use gitweb at all, 'git blame' would make more sense IMHO and a simple
> > >   click would reveal the sha1 with more info anyway ...
> > 
> > They serve no purpose other than showing something to click on,
> > and allow you to hover over (some people argued in the past
> > that they recognize certain commit object names, but honestly I
> > would not believe them).  However, I do not think there are much
> > better alternatives.  Try coming up with a different "label"
> > string that is of uniform length across commits, and does not
> > chew up too much screen real estate.
> 
> trivial
> the first N chars of the username + YYMMDD
> 
> so for example:
> michaeln070612
> 
> or with space:
> michaeln 070612

This idea occurred to me, but so if a file is born from 20 commits in a
single day, you have no distinction between them. And if you throw time
in the mix too, it already becomes way too long; I'd argue that even
username-date already feels too long.

> [...]
> > > * on the history page there are "blob", "commitdiff" and "diff to current"
> > >   the obvious missing one is "diff to previous" which would be the diff to
> > >   the previous blob of this file
> > 
> > Isn't that commitdiff, or commitdiff on that page does not limit
> > the diff to the blob?
> 
> commitdiff doesnt limit it to the blob ...

I don't know if it's better to limit commitdiff or not; a compromise
approach would be not to limit it but to jump to the fragment concerning
the given blob.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett

^ permalink raw reply

* Re: [PATCH] Require JDK1.5
From: Grzegorz Kulewski @ 2007-05-14  1:07 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: spearce, git
In-Reply-To: <11791001343234-git-send-email-robin.rosenberg@dewire.com>

On Mon, 14 May 2007, Robin Rosenberg wrote:
> This changes project settings to requre Java 5 and
> also tightens some compiler settings.
>
> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
> ---
> .../.settings/org.eclipse.jdt.core.prefs           |   22 ++++++++++---------
> .../.settings/org.eclipse.jdt.ui.prefs             |    5 +--
> .../.settings/org.eclipse.jdt.core.prefs           |   22 ++++++++++---------
> .../.settings/org.eclipse.jdt.ui.prefs             |    5 +--
> .../.settings/org.eclipse.jdt.core.prefs           |   22 ++++++++++---------
> .../.settings/org.eclipse.jdt.ui.prefs             |    5 +--
> .../.settings/org.eclipse.jdt.core.prefs           |   22 ++++++++++---------
> .../.settings/org.eclipse.jdt.ui.prefs             |    3 +-
> .../src/org/spearce/jgit/lib/ObjectIdMap.java      |    4 +-
> 9 files changed, 57 insertions(+), 53 deletions(-)
[snip]
> diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
> index c397a0d..63796fd 100644
> --- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
> +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
> @@ -50,9 +50,9 @@ public class ObjectIdMap implements Map {
>
> 	public ObjectIdMap(Map sample) {
> 		try {
> -			Method m=sample.getClass().getMethod("clone", null);
> +			Method m=sample.getClass().getMethod("clone", (Class[])null);
> 			for (int i=0; i<256; ++i) {
> -				level0[i] = (Map)m.invoke(sample, null);
> +				level0[i] = (Map)m.invoke(sample, (Object[])null);
> 			}
> 		} catch (IllegalAccessException e) {
> 			throw new IllegalArgumentException(e);

I wonder why one would need changes like this?

These casts are not needed for anything as far as I can see and your IDE 
should easily tell you what type that parameter is. No?


Thanks,

Grzegorz Kulewski

^ permalink raw reply

* Re: git.or.cz IPv6
From: Petr Baudis @ 2007-05-14  0:54 UTC (permalink / raw)
  To: Thomas Glanzmann; +Cc: GIT
In-Reply-To: <20070513094054.GB18546@cip.informatik.uni-erlangen.de>

  Hi,

On Sun, May 13, 2007 at 11:40:54AM CEST, Thomas Glanzmann wrote:
> git.or.cz has an AAAA record but is not reachable via IPv6 which drives
> me crazy because my IPv6 is working and my browser tries to connect
> git.or.cz via IPv6 and falls back after a considerable amount of time.
> So could someone please get IPv6 working at git.or.cz or delete the AAAA
> record.

  git.or.cz's IPv6 connectivity should be fine, maybe there is a routing
problem somewhere along the way :-( - what IPv6 ISP are you using?

  I'd prefer to have AAAA records for IPv6-capable sites but if it
causes problems for more people, I will remove it - new technology stuff
is nice but the priority #1 is for the site to be reachable.

> Oh and the download link to
> "http://git.kernel.org/pub/software/scm/git/" is broken.

  Thanks, fixed.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett

^ permalink raw reply

* Re: [PATCH] git-add: allow path limiting with -u
From: Jeff King @ 2007-05-14  0:49 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Junio C Hamano, git
In-Reply-To: <200705140250.22478.jnareb@gmail.com>

On Mon, May 14, 2007 at 02:50:22AM +0200, Jakub Narebski wrote:

> -'git-add' [-n] [-v] [-f] [--interactive | -i] [-u] [--] <file>...
> +'git-add' [-n] [-v] [-f] [--] <file>...
> +'git-add' [-n] [-v] [-f] -u [[--] <file>...]
> +'git-add' (--interactive | -i)

I don't see the point in splitting -u out as its own separate "mode" of
operation. To me it's conceptually a flag that says "don't add untracked
files, and remove deleted files". But I don't have a strong opinion (and
certainly splitting out -i makes sense).

-Peff

^ permalink raw reply

* Re: [PATCH] git-add: allow path limiting with -u
From: Jakub Narebski @ 2007-05-14  0:50 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, git
In-Reply-To: <20070514003910.GA6689@coredump.intra.peff.net>

Jeff King wrote:

> If you are concerned about the latter, do you mean something like this:
> 
> -- >8 --
> Documentation/git-add: clarify -u with path limiting
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
> index ea27018..27b9c0f 100644
> --- a/Documentation/git-add.txt
> +++ b/Documentation/git-add.txt
> @@ -57,8 +57,11 @@ OPTIONS
>  	the index.
>  
>  -u::
> -	Update all files that git already knows about. This is what
> -	"git commit -a" does in preparation for making a commit.
> +	Update only files that git already knows about. This is similar
> +	to what "git commit -a" does in preparation for making a commit,
> +	except that the update is limited to paths specified on the
> +	command line. If no paths are specified, all tracked files are
> +	updated.
>  
>  \--::
>  	This option can be used to separate command-line options from
> 

That is very nice and needed, but I actually thought about correcting
SYNOPSIS to read:

@@ -7,7 +7,9 @@ git-add - Add file contents to the changeset to be committed next
 
 SYNOPSIS
 --------
-'git-add' [-n] [-v] [-f] [--interactive | -i] [-u] [--] <file>...
+'git-add' [-n] [-v] [-f] [--] <file>...
+'git-add' [-n] [-v] [-f] -u [[--] <file>...]
+'git-add' (--interactive | -i)
 
 DESCRIPTION
 -----------

This ensures that while git-add without -u needs explicit paths
(even if it is '.'), git-add with -u can have explicit paths but
doesn't need them.
-- 
Jakub Narebski
Poland

^ permalink raw reply

* Re: [PATCH] git-add: allow path limiting with -u
From: Jeff King @ 2007-05-14  0:42 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Junio C Hamano, git, cworth
In-Reply-To: <200705131235.25281.jnareb@gmail.com>

On Sun, May 13, 2007 at 12:35:24PM +0200, Jakub Narebski wrote:

> The fact that "add --interactive does not take any parameters" is
> separate issue (which, accidentally, was adressed in the same patch).

I don't generally use add --interactive, but I imagine that
path-limiting would also make sense there. I think it would be a bit
harder to implement (and test!), since there are many calls to commands
which would need the limits. So I will leave that unless somebody really
cares about it.

-Peff

^ permalink raw reply

* Re: [BUG] git-svn dcommit fails (connection closed unexpectedly)
From: Eric Wong @ 2007-05-14  0:39 UTC (permalink / raw)
  To: Karl Hasselström; +Cc: Martin Eisenhardt, git, Matthieu.Moy
In-Reply-To: <20070513210128.GA13428@muzzle>

Eric Wong <normalperson@yhbt.net> wrote:
> Karl Hasselström <kha@treskal.com> wrote:
> > On 2007-05-13 19:49:34 +0200, Martin Eisenhardt wrote:
> > 
> > > Another case where I stumbled upon said error message was when I
> > > added an empty (sub)directory to a project in subversion and then
> > > used git to track that project. Since git cannot track an empty
> > > directory, it did not appear in my git working copy. When I mkdir'd
> > > the directory locally (in my git wc) and then tried to add files
> > > within that repository, I got exactly the same error as Matthieu.
> 
> Interesting.  I don't think git-svn currently checks for that case.

Ok, it already *does* check for this case and works for me(TM).

From 8222388080c05157e2926faffcd853bae500c521 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Sun, 13 May 2007 17:38:21 -0700
Subject: [PATCH] git-svn: test for creating new files in empty previously directories

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 t/t9112-git-svn-dcommit-new-file.sh |   40 +++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100755 t/t9112-git-svn-dcommit-new-file.sh

diff --git a/t/t9112-git-svn-dcommit-new-file.sh b/t/t9112-git-svn-dcommit-new-file.sh
new file mode 100755
index 0000000..e643c13
--- /dev/null
+++ b/t/t9112-git-svn-dcommit-new-file.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Eric Wong
+#
+
+test_description='git-svn dcommit new files over svn:// test'
+
+. ./lib-git-svn.sh
+
+# standard svnserve runs on 3690, so lets not conflict with that
+SVNSERVE_PORT=${SVNSERVE_PORT-'3691'}
+
+start_svnserve () {
+	svnserve --listen-port $SVNSERVE_PORT \
+	         --root $rawsvnrepo \
+	         --listen-once \
+	         --listen-host 127.0.0.1 &
+}
+
+test_expect_success 'start tracking an empty repo' "
+	svn mkdir -m 'empty dir' $svnrepo/empty-dir &&
+	echo anon-access = write >> $rawsvnrepo/conf/svnserve.conf &&
+	start_svnserve &&
+	git svn init svn://127.0.0.1:$SVNSERVE_PORT &&
+	git svn fetch
+	"
+
+test_expect_success 'create two files in empty-directory with dcommit' "
+	mkdir empty-dir &&
+	echo hello > empty-dir/a &&
+	echo hello > empty-dir/b &&
+	echo hello > empty-dir/c &&
+	git update-index --add empty-dir/a empty-dir/b empty-dir/c &&
+	git commit -m hello &&
+	start_svnserve &&
+	git svn dcommit
+	"
+
+test_done
+
-- 
Eric Wong

^ permalink raw reply related

* Re: [PATCH] git-add: allow path limiting with -u
From: Jeff King @ 2007-05-14  0:39 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Junio C Hamano, git
In-Reply-To: <200705131235.25281.jnareb@gmail.com>

On Sun, May 13, 2007 at 12:35:24PM +0200, Jakub Narebski wrote:

> Do git-add *needs* path specifier (even if it is '.') also for `-u'?
> The changes in documentation were to reflect that `-u' is incompatibile
> with explicit paths, or that `-u' does not require explicit paths
> contrary to git-add without `-u'.

Sorry, I don't understand if you are asking that question, or if you are
asking if the documentation needs to clarify that point.

The answer to the first is "no", the path limiting works exactly as it
does for every other command: no path specifier indicates the whole
tree.

If you are concerned about the latter, do you mean something like this:

-- >8 --
Documentation/git-add: clarify -u with path limiting

Signed-off-by: Jeff King <peff@peff.net>
---
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index ea27018..27b9c0f 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -57,8 +57,11 @@ OPTIONS
 	the index.
 
 -u::
-	Update all files that git already knows about. This is what
-	"git commit -a" does in preparation for making a commit.
+	Update only files that git already knows about. This is similar
+	to what "git commit -a" does in preparation for making a commit,
+	except that the update is limited to paths specified on the
+	command line. If no paths are specified, all tracked files are
+	updated.
 
 \--::
 	This option can be used to separate command-line options from

^ permalink raw reply related

* Re: What's cooking in git.git (topics)
From: Julian Phillips @ 2007-05-14  0:38 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Daniel Barkalow
In-Reply-To: <7vzm48pacj.fsf@assigned-by-dhcp.cox.net>

On Sun, 13 May 2007, Junio C Hamano wrote:

> Julian Phillips <julian@quantumfyre.co.uk> writes:
>
>> On Sun, 13 May 2007, Junio C Hamano wrote:
>>
>>> * db/remote (Sat May 12 11:46:03 2007 -0400) 3 commits
>>> - Add handlers for fetch-side configuration of remotes.
>>> - Move refspec parser from connect.c and cache.h to remote.{c,h}
>>> - Move remote parsing into a library file out of builtin-push.
>>>
>>> Hopefully be in 'next' after v1.5.2; I haven't really played
>>> with it.  The next step would probably be to add some stuff that
>>> use this series in fetch--tool, to further rewrite git-fetch
>>> itself in C, or maybe wholesale rewrite of git-fetch in C.
>>
>> FWIW, I've got a largely functional C version of git-fetch ... the
>> main functionality is there - but it's not complete yet.  In addition
>> to some of the non-core functionality being missing (e.g. --tags or
>> --no-tags in tagopt), I haven't been keeping up with recent updates to
>> fetch/fetch-tool.  I was hoping to have it ready for post-1.5.2 -
>> unfortunately I've been rather busy the last couple of weeks, and
>> haven't managed to get as far as I'd hoped.
>
> Thanks for the status updates.  Although I do not recall Daniel
> saying it explicitly, I have been assuming that his series was
> aiming for the same all along.  It might be a good idea for you
> two to compare notes sometime between now and v1.5.2?

Well, it can't be a bad idea, can it? ;)

Apart from the code itself (which can be found at 
http://git.q42.co.uk/w/fetch2.git), I don't have any actual notes, and 
since I haven't had a chance to work on it for a couple of weeks I'm 
not 100% sure of where I was at - due to lack of time I have tended to 
just spend a few hours adding some missing part when I found the time but 
I don't actually have a TODO list or similar (though I really should).

I'm also out of town with work for the first half of the coming week ... 
but I'm certainly willing to talk about what I have and haven't done.

(Daniel, hope you don't mind me adding you to CC ...)

-- 
Julian

  ---
The cable TV sex channels don't expand our horizons, don't make us better
people, and don't come in clearly enough.
 		-- Bill Maher

^ permalink raw reply

* Re: suggestions for gitweb
From: Junio C Hamano @ 2007-05-14  0:28 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Michael Niedermayer, git, Petr Baudis
In-Reply-To: <200705131318.39723.jnareb@gmail.com>

Jakub Narebski <jnareb@gmail.com> writes:

> Adding some gitweb-help.html page, linked somewhere from within gitweb
> pages (I think it shouldn't be embedded in gitweb, like help for search
> options is), certainly is possible. And perhaps we should do that, now
> that gitweb is more widely deployed, and used by "accidental" users
> (developers) with no knowledge of git, and perhaps even without
> knowledge of SCM [terms].

Yeah, that is definitely an improvement.

> It should be fairly easy to add "diff to prev" link, but is it really
> needed? It would be yet another link. Diff to previous version of blob
> is contained in "commitdiff" and is easy to find and go to... well,
> unless you are used to make large commits...

It would not be "yet another".  It feels kind of odd to get the
whole commitdiff from that page to begin with, when the user
already expressed that his attention is focused on that
particular path --- that is why he is in the History page to
begin with.

^ permalink raw reply

* [PATCH] Require JDK1.5
From: Robin Rosenberg @ 2007-05-13 23:48 UTC (permalink / raw)
  To: spearce; +Cc: git, Robin Rosenberg
In-Reply-To: <1179100134893-git-send-email-robin.rosenberg@dewire.com>

This changes project settings to requre Java 5 and
also tightens some compiler settings.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../.settings/org.eclipse.jdt.core.prefs           |   22 ++++++++++---------
 .../.settings/org.eclipse.jdt.ui.prefs             |    5 +--
 .../.settings/org.eclipse.jdt.core.prefs           |   22 ++++++++++---------
 .../.settings/org.eclipse.jdt.ui.prefs             |    5 +--
 .../.settings/org.eclipse.jdt.core.prefs           |   22 ++++++++++---------
 .../.settings/org.eclipse.jdt.ui.prefs             |    5 +--
 .../.settings/org.eclipse.jdt.core.prefs           |   22 ++++++++++---------
 .../.settings/org.eclipse.jdt.ui.prefs             |    3 +-
 .../src/org/spearce/jgit/lib/ObjectIdMap.java      |    4 +-
 9 files changed, 57 insertions(+), 53 deletions(-)

diff --git a/org.spearce.egit.core.test/.settings/org.eclipse.jdt.core.prefs b/org.spearce.egit.core.test/.settings/org.eclipse.jdt.core.prefs
index 16fbddc..261f937 100644
--- a/org.spearce.egit.core.test/.settings/org.eclipse.jdt.core.prefs
+++ b/org.spearce.egit.core.test/.settings/org.eclipse.jdt.core.prefs
@@ -1,16 +1,16 @@
-#Mon Jan 29 20:50:25 EST 2007
+#Wed May 09 00:26:39 CEST 2007
 eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
@@ -24,7 +24,7 @@ org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
 org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
@@ -45,11 +45,13 @@ org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
@@ -60,7 +62,7 @@ org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
@@ -71,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.4
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/org.spearce.egit.core.test/.settings/org.eclipse.jdt.ui.prefs b/org.spearce.egit.core.test/.settings/org.eclipse.jdt.ui.prefs
index 273e64b..709a440 100644
--- a/org.spearce.egit.core.test/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.spearce.egit.core.test/.settings/org.eclipse.jdt.ui.prefs
@@ -1,8 +1,7 @@
-#Mon Jan 29 20:38:19 EST 2007
+#Wed May 09 00:20:24 CEST 2007
 eclipse.preferences.version=1
-formatter_profile=_EGit
+formatter_profile=_JGit
 formatter_settings_version=10
-internal.default.compliance=user
 org.eclipse.jdt.ui.ignorelowercasenames=true
 org.eclipse.jdt.ui.importorder=java;javax;org;com;
 org.eclipse.jdt.ui.ondemandthreshold=99
diff --git a/org.spearce.egit.core/.settings/org.eclipse.jdt.core.prefs b/org.spearce.egit.core/.settings/org.eclipse.jdt.core.prefs
index 16fbddc..261f937 100644
--- a/org.spearce.egit.core/.settings/org.eclipse.jdt.core.prefs
+++ b/org.spearce.egit.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,16 +1,16 @@
-#Mon Jan 29 20:50:25 EST 2007
+#Wed May 09 00:26:39 CEST 2007
 eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
@@ -24,7 +24,7 @@ org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
 org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
@@ -45,11 +45,13 @@ org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
@@ -60,7 +62,7 @@ org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
@@ -71,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.4
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/org.spearce.egit.core/.settings/org.eclipse.jdt.ui.prefs b/org.spearce.egit.core/.settings/org.eclipse.jdt.ui.prefs
index 273e64b..709a440 100644
--- a/org.spearce.egit.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.spearce.egit.core/.settings/org.eclipse.jdt.ui.prefs
@@ -1,8 +1,7 @@
-#Mon Jan 29 20:38:19 EST 2007
+#Wed May 09 00:20:24 CEST 2007
 eclipse.preferences.version=1
-formatter_profile=_EGit
+formatter_profile=_JGit
 formatter_settings_version=10
-internal.default.compliance=user
 org.eclipse.jdt.ui.ignorelowercasenames=true
 org.eclipse.jdt.ui.importorder=java;javax;org;com;
 org.eclipse.jdt.ui.ondemandthreshold=99
diff --git a/org.spearce.egit.ui/.settings/org.eclipse.jdt.core.prefs b/org.spearce.egit.ui/.settings/org.eclipse.jdt.core.prefs
index 71b6be1..261f937 100644
--- a/org.spearce.egit.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/org.spearce.egit.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,16 +1,16 @@
-#Mon Jan 29 20:50:36 EST 2007
+#Wed May 09 00:26:39 CEST 2007
 eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
@@ -24,7 +24,7 @@ org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
 org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
@@ -45,11 +45,13 @@ org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
@@ -60,7 +62,7 @@ org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
@@ -71,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.4
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/org.spearce.egit.ui/.settings/org.eclipse.jdt.ui.prefs b/org.spearce.egit.ui/.settings/org.eclipse.jdt.ui.prefs
index e6430e9..709a440 100644
--- a/org.spearce.egit.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.spearce.egit.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -1,8 +1,7 @@
-#Mon Jan 29 20:38:13 EST 2007
+#Wed May 09 00:20:24 CEST 2007
 eclipse.preferences.version=1
-formatter_profile=_EGit
+formatter_profile=_JGit
 formatter_settings_version=10
-internal.default.compliance=user
 org.eclipse.jdt.ui.ignorelowercasenames=true
 org.eclipse.jdt.ui.importorder=java;javax;org;com;
 org.eclipse.jdt.ui.ondemandthreshold=99
diff --git a/org.spearce.jgit/.settings/org.eclipse.jdt.core.prefs b/org.spearce.jgit/.settings/org.eclipse.jdt.core.prefs
index bfbc85d..261f937 100644
--- a/org.spearce.jgit/.settings/org.eclipse.jdt.core.prefs
+++ b/org.spearce.jgit/.settings/org.eclipse.jdt.core.prefs
@@ -1,16 +1,16 @@
-#Mon Jan 29 20:50:45 EST 2007
+#Wed May 09 00:26:39 CEST 2007
 eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
@@ -24,7 +24,7 @@ org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
 org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
@@ -45,11 +45,13 @@ org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
@@ -60,7 +62,7 @@ org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
@@ -71,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.4
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/org.spearce.jgit/.settings/org.eclipse.jdt.ui.prefs b/org.spearce.jgit/.settings/org.eclipse.jdt.ui.prefs
index 126418a..709a440 100644
--- a/org.spearce.jgit/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.spearce.jgit/.settings/org.eclipse.jdt.ui.prefs
@@ -1,8 +1,7 @@
-#Mon Jan 29 20:38:06 EST 2007
+#Wed May 09 00:20:24 CEST 2007
 eclipse.preferences.version=1
 formatter_profile=_JGit
 formatter_settings_version=10
-internal.default.compliance=user
 org.eclipse.jdt.ui.ignorelowercasenames=true
 org.eclipse.jdt.ui.importorder=java;javax;org;com;
 org.eclipse.jdt.ui.ondemandthreshold=99
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
index c397a0d..63796fd 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectIdMap.java
@@ -50,9 +50,9 @@ public class ObjectIdMap implements Map {
 
 	public ObjectIdMap(Map sample) {
 		try {
-			Method m=sample.getClass().getMethod("clone", null);
+			Method m=sample.getClass().getMethod("clone", (Class[])null);
 			for (int i=0; i<256; ++i) {
-				level0[i] = (Map)m.invoke(sample, null);
+				level0[i] = (Map)m.invoke(sample, (Object[])null);
 			}
 		} catch (IllegalAccessException e) {
 			throw new IllegalArgumentException(e);
-- 
1.5.1.1

^ permalink raw reply related

* The first patch in the series
From: Robin Rosenberg @ 2007-05-13 23:48 UTC (permalink / raw)
  To: spearce; +Cc: git
In-Reply-To: <11790995571082-git-send-email-robin.rosenberg@dewire.com>

Apply this one befor the others. 

^ permalink raw reply

* [PATCH] Implement packed refs
From: Robin Rosenberg @ 2007-05-13 23:39 UTC (permalink / raw)
  To: spearce; +Cc: git, Robin Rosenberg
In-Reply-To: <11790995573817-git-send-email-robin.rosenberg@dewire.com>

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../src/org/spearce/jgit/lib/Repository.java       |   48 +++++++++++++++++++-
 .../tst/org/spearce/jgit/lib/T0003_Basic.java      |   44 ++++++++++++++++++
 2 files changed, 91 insertions(+), 1 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java b/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java
index 76191be..3b2a82c 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java
@@ -399,6 +399,7 @@ public class Repository {
 
 	private Ref readRef(final String revstr, final boolean missingOk)
 			throws IOException {
+		refreshPackredRefsCache();
 		for (int k = 0; k < refSearchPaths.length; k++) {
 			final Ref r = readRefBasic(refSearchPaths[k] + revstr);
 			if (missingOk || r.getObjectId() != null) {
@@ -411,6 +412,10 @@ public class Repository {
 	private Ref readRefBasic(String name) throws IOException {
 		int depth = 0;
 		REF_READING: do {
+			ObjectId id = packedRefs.get(name);
+			if (id != null)
+				return new Ref(null, id);
+
 			final File f = new File(getDirectory(), name);
 			if (!f.isFile()) {
 				return new Ref(f, null);
@@ -470,7 +475,43 @@ public class Repository {
 	}
 
 	public Collection<String> getTags() {
-		return listFilesRecursively(new File(refsDir, "tags"), null);
+		Collection<String> tags = listFilesRecursively(new File(refsDir, "tags"), null);
+		refreshPackredRefsCache();
+		tags.addAll(packedRefs.keySet());
+		return tags;
+	}
+
+	private Map<String,ObjectId> packedRefs = new HashMap<String,ObjectId>();
+	private long packedrefstime = 0;
+
+	private void refreshPackredRefsCache() {
+		File file = new File(gitDir, "packed-refs");
+		if (!file.exists()) {
+			if (packedRefs.size() > 0)
+				packedRefs = new HashMap();
+			return;
+		}
+		if (file.lastModified() == packedrefstime)
+			return;
+		Map newPackedRefs = new HashMap();
+		try {
+			BufferedReader b=new BufferedReader(new FileReader(file));
+			String p;
+			while ((p = b.readLine()) != null) {
+				if (p.charAt(0) == '#')
+					continue;
+				if (p.charAt(0) == '^') {
+					continue;
+				}
+				int spos = p.indexOf(' ');
+				ObjectId id = new ObjectId(p.substring(0,spos));
+				String name = p.substring(spos+1);
+				newPackedRefs.put(name, id);
+			}
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		packedRefs = newPackedRefs;
 	}
 
 	/**
@@ -551,4 +592,9 @@ public class Repository {
 		}
 		return ret;
 	}
+	
+	/** Clean up stale caches */
+	public void refreshFromDisk() {
+		packedRefs = null;
+	}
 }
diff --git a/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java b/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java
index 2f76907..02ecabf 100644
--- a/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java
+++ b/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java
@@ -21,6 +21,7 @@ import java.io.FileInputStream;
 import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.io.PrintWriter;
 
 public class T0003_Basic extends RepositoryTestCase {
 	public void test001_Initalize() {
@@ -428,4 +429,47 @@ public class T0003_Basic extends RepositoryTestCase {
 		ObjectId cid = new ObjectWriter(db).writeCommit(commit);
 		assertEquals("2979b39d385014b33287054b87f77bcb3ecb5ebf", cid.toString());
 	}
+	
+	public void test025_packedRefs() throws IOException {
+		test020_createBlobTag();
+		test021_createTreeTag();
+		test022_createCommitTag();
+
+		if (!new File(db.getDirectory(),"refs/tags/test020").delete()) throw new Error("Cannot delete unpacked tag");
+		if (!new File(db.getDirectory(),"refs/tags/test021").delete()) throw new Error("Cannot delete unpacked tag");
+		if (!new File(db.getDirectory(),"refs/tags/test022").delete()) throw new Error("Cannot delete unpacked tag");
+
+		// We cannot resolve it now, since we have no ref
+		Tag mapTag20missing = db.mapTag("test020");
+		assertNull(mapTag20missing);
+
+		// Construct packed refs file
+		PrintWriter w = new PrintWriter(new FileWriter(new File(db.getDirectory(), "packed-refs")));
+		w.println("# packed-refs with: peeled");
+		w.println("6759556b09fbb4fd8ae5e315134481cc25d46954 refs/tags/test020");
+		w.println("^e69de29bb2d1d6434b8b29ae775ad8c2e48c5391");
+		w.println("b0517bc8dbe2096b419d42424cd7030733f4abe5 refs/tags/test021");
+		w.println("^417c01c8795a35b8e835113a85a5c0c1c77f67fb");
+		w.println("0ce2ebdb36076ef0b38adbe077a07d43b43e3807 refs/tags/test022");
+		w.println("^b5d3b45a96b340441f5abb9080411705c51cc86c");
+		w.close();
+
+		Tag mapTag20 = db.mapTag("test020");
+		assertEquals("blob", mapTag20.getType());
+		assertEquals("test020 tagged\n", mapTag20.getMessage());
+		assertEquals(new PersonIdent(jauthor, 1154236443000L, -4 * 60), mapTag20.getAuthor());
+		assertEquals("e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", mapTag20.getObjId().toString());
+
+		Tag mapTag21 = db.mapTag("test021");
+		assertEquals("tree", mapTag21.getType());
+		assertEquals("test021 tagged\n", mapTag21.getMessage());
+		assertEquals(new PersonIdent(jauthor, 1154236443000L, -4 * 60), mapTag21.getAuthor());
+		assertEquals("417c01c8795a35b8e835113a85a5c0c1c77f67fb", mapTag21.getObjId().toString());
+
+		Tag mapTag22 = db.mapTag("test022");
+		assertEquals("commit", mapTag22.getType());
+		assertEquals("test022 tagged\n", mapTag22.getMessage());
+		assertEquals(new PersonIdent(jauthor, 1154236443000L, -4 * 60), mapTag22.getAuthor());
+		assertEquals("b5d3b45a96b340441f5abb9080411705c51cc86c", mapTag22.getObjId().toString());
+	}
 }
-- 
1.5.1.1

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox