Why using git would be awesome for nexuiz

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators


  • I think that if nexuiz were to use git, it would be extremely awesome. Here's why:

    * First off, git handles binary files way better then SVN does. It's also easier to branch and tag the repo as well. Checkouts would be much faster, and the local checkout of the repository will be much smaller.
    * Second, if we were to use something like GitHub, it would make forking the codebase a lot easier. It would encourage people to post up their improvements, and would make it easy to pull those changes into the main repository. IMO, this is the biggest advantage of using git, since community patches are all the rage right now.


    We can migrate the current svn repository to git quite easily, I'm in the process of doing it right now for my class-based mod. Github makes this extremely easy, they have a web-based tool that lets you do it without even touching a command line.

    Thoughts?

    EDIT: Once github is finished, the code for that will be available here:
    http://github.com/psychcf/nexuiz-classbased/tree/master
    Last edited by Psychcf on Fri Jan 30, 2009 6:07 pm, edited 1 time in total.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Fri Jan 30, 2009 5:59 pm

  • icculus.org currently doesn't support git, so this is out of the question for now.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sun May 17, 2009 4:24 pm

  • Came across this while googling for a git-svn usable Nexuiz repo. For what it's worth, Icculus does support Git and has for some time (at least a few years I think): http://git.icculus.org/.
    User avatar
    parasti
    Alien
     
    Posts: 110
    Joined: Sun May 11, 2008 11:32 pm
    Location: On the walls and the ceiling

Sun May 17, 2009 5:21 pm

  • svn > git
    quit for good
    alpha
    Alien trapper
     
    Posts: 492
    Joined: Tue Jun 17, 2008 7:18 pm

Sun May 17, 2009 6:08 pm

  • Please elaborate.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Sun May 17, 2009 8:29 pm

Sun May 17, 2009 8:43 pm

  • Alien wrote:Please elaborate.


    SVN (more than) GIT

    was, is, will be
    quit for good
    alpha
    Alien trapper
     
    Posts: 492
    Joined: Tue Jun 17, 2008 7:18 pm

Sun May 17, 2009 8:46 pm

  • So ignorant. SVN is fundamentally flawed and a VCS like git, which is distributed, could be very beneficial to an open-source project. No need to branch because technically every user has their own fork, and resolving the differences when pushing to the master becomes easier in these smaller chunks. This means less wasted time.
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida

Sun May 17, 2009 9:16 pm

Sun May 17, 2009 9:29 pm

  • I've watched linuses speech about GIT, yet, some things they claim (e.g. "much faster") is ... well, no surprise if git encourages you to use much smaller projects. I don't see how full nexuiz svn checkout would be much slower compared to a full git checkout of nexuiz. You need to download it from a host, there is bandwith that limits you, and no great tool won't come past that.

    Apart from that I haven't quite understood yet how you can share your own repository when you are "just a user" behind a firewall. How does that work?
    IRC quote:
    [kojn] I've been coming a bit more recently
    [kojn] she took it the dirty way
    GreEn`mArine
    Forum addon
     
    Posts: 1509
    Joined: Tue Feb 28, 2006 9:33 pm
    Location: Germany

Sun May 17, 2009 9:31 pm

  • What most of you and I think of which is better is basically irrelevant anyway... A move to Git only makes sense if the main contributors are already familiar with Git and DVCS in general. SVN users trying to duplicate an SVN workflow treating Git as "almost like SVN, but with entire repo available locally" will inevitably be disappointed, because Git is fundamentally different from SVN and encourages an entirely different way of working.
    User avatar
    parasti
    Alien
     
    Posts: 110
    Joined: Sun May 11, 2008 11:32 pm
    Location: On the walls and the ceiling

Sun May 17, 2009 9:52 pm

  • I just added the fire to the flame. I don't think one is better or the other. The same way I don't prefer vi(m) to emacs or vice versus.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Sun May 17, 2009 11:40 pm

  • Alien wrote:Actually, Mercurial is better than those two. ;)

    For comparison: http://better-scm.berlios.de/comparison/comparison.html
    http://mail.python.org/pipermail/python ... 87931.html


    Yeah, there are other version control systems like mercurial and bazaar, but git seems to be the most notable out of them.

    GreEn`mArine wrote:I've watched linuses speech about GIT, yet, some things they claim (e.g. "much faster") is ... well, no surprise if git encourages you to use much smaller projects. I don't see how full nexuiz svn checkout would be much slower compared to a full git checkout of nexuiz. You need to download it from a host, there is bandwith that limits you, and no great tool won't come past that.

    Apart from that I haven't quite understood yet how you can share your own repository when you are "just a user" behind a firewall. How does that work?


    From what I've experienced, checking out a git repo with nexuiz in it takes less time then it does on SVN. I estimate that git takes about 1.6 hours, while SVN takes 2 or 3 hours.

    As for the local repository thing, you can do something like this, and it works exactly as if you were using a remote repository (except you aren't pushing to anything):
    Code: Select all
    git init myrepo
    cd myrepo
    touch foo.txt
    vim foo.txt
    #editing
    git add foo.txt
    git commit -m "initial checkin"
    vim foo.txt
    #more editing
    git add foo.txt
    git commit -m "some random change to a file"


    in that way, you have a local repo that you can later push to a remote server, if you wanted to.

    The other cool thing about git is that you can check out an SVN repo as a git repository, and you'd be able to do local commits and such.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Mon May 18, 2009 12:28 am

  • I didn't take note of the exact time, but for me a clone of nexuiz-classbased.git took about the same time as checking out trunk with SVN, which is about 1.5 hours. Fun fact: an SVN checkout of Nexuiz trunk is actually a bit larger than a git-svn clone of the entire history of trunk since 2003 + working tree: 3.2 GB vs 3.1 GB.
    User avatar
    parasti
    Alien
     
    Posts: 110
    Joined: Sun May 11, 2008 11:32 pm
    Location: On the walls and the ceiling

Mon May 18, 2009 12:52 am

  • I've moved the thread to development,as it's a more apropiate place for discussions like this imho. :)
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Mon May 18, 2009 1:22 am

  • parasti wrote:I didn't take note of the exact time, but for me a clone of nexuiz-classbased.git took about the same time as checking out trunk with SVN, which is about 1.5 hours. Fun fact: an SVN checkout of Nexuiz trunk is actually a bit larger than a git-svn clone of the entire history of trunk since 2003 + working tree: 3.2 GB vs 3.1 GB.


    Oh, maybe I was off b/c I was comparing it to the entire nexuiz SVN repo, as opposed to just trunk. Git does a good job of compressing the history though.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Mon May 18, 2009 2:50 am

  • Git FTW!
    Some notable projects using git:
    * Linux Kernel
    * Freedesktop.org (mesa/x/libdrm)
    * Perl
    * Gnome
    * Android
    * Fedora
    * Git

    Git is imo much better than svn, you can 'easily' revert commits (git revert commitname), and also has many other advanced/rarely-used features. Branching is also much better.
    some-guy
    Member
     
    Posts: 25
    Joined: Tue May 12, 2009 1:28 am

Mon May 18, 2009 3:45 am

  • :roll:
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Mon May 18, 2009 3:49 am

Mon May 18, 2009 4:16 am

  • Alien wrote:http://whygitisbetterthanx.com/

    n1, thanks (thanx) for that.
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida

Mon May 18, 2009 8:14 am

  • [-z-] wrote:So ignorant. SVN is fundamentally flawed and a VCS like git, which is distributed, could be very beneficial to an open-source project. No need to branch because technically every user has their own fork, and resolving the differences when pushing to the master becomes easier in these smaller chunks. This means less wasted time.


    I don't see how nexuiz can benefit from lots of people having their own version of core code, with their own set of patches, because THAT'S WHAT GIT IS ALL ABOUT.

    You see [-z-], when you are working on a large software project, you dont WANT to have your own version of code. You want *EXACTLY* the same as everyone else, and you want it to stay as synced as possible.

    Git is a soap bubble.
    quit for good
    alpha
    Alien trapper
     
    Posts: 492
    Joined: Tue Jun 17, 2008 7:18 pm

Mon May 18, 2009 11:04 am

  • You do know that changing the SCM entirely changes the process of e.g. building releases, which will have to be rewritten. And you'll find no volunteers to do that, I bet.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon May 18, 2009 7:11 pm

  • divVerent wrote:You do know that changing the SCM entirely changes the process of e.g. building releases, which will have to be rewritten. And you'll find no volunteers to do that, I bet.


    I don't see how that changes anything; all you would do is change any SVN commands into git commands, which isn't very hard:

    http://git.or.cz/course/svn.html

    The only thing is that git doesn't really have an info command, but you could use "git show <file>" to get the revision hash of the last change.

    alpha wrote:
    [-z-] wrote:So ignorant. SVN is fundamentally flawed and a VCS like git, which is distributed, could be very beneficial to an open-source project. No need to branch because technically every user has their own fork, and resolving the differences when pushing to the master becomes easier in these smaller chunks. This means less wasted time.


    I don't see how nexuiz can benefit from lots of people having their own version of core code, with their own set of patches, because THAT'S WHAT GIT IS ALL ABOUT.

    You see [-z-], when you are working on a large software project, you dont WANT to have your own version of code. You want *EXACTLY* the same as everyone else, and you want it to stay as synced as possible.

    Git is a soap bubble.


    Well, with SVN, if you want to contribute back a portion of code (for example, the keyhunt gameplay mode), you need to run svn diff, and it spits out a patch. With Git, the commit history would be preserved, and you would be able to see all the changes progressively. Since you can look back at the whole commit history for a contributed work, it makes it easier to maintain later on. Because of this, you can also make these changes as if you started with a different revision, so it's even easier to merge things into the repo (that's called rebasing).

    tl;dr: having your own version of the code makes it easier to merge code and easier to maintain changes by people who don't have commit access to the repository.
    User avatar
    Psychcf
    Forum addon
     
    Posts: 1554
    Joined: Sun Dec 03, 2006 11:38 pm
    Location: NY, USA

Wed May 20, 2009 5:22 am

  • So? You can do all this if the master repository is a svn. Just use git-svn and shut the hell up.

    There is a reason why svn is a de-facto standard, and git is a weird obscure tool almost nobody uses. It starts with the commands - it has command names that simply make no sense.

    And I have no incentive to learn weird push/scream/fsck stuff as the commit/update/annotate/diff/merge stuff works fine.

    If you give me a git frontend that accepts svn/cvs command, it'd be an entirely different story.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed May 20, 2009 5:47 am

  • Ah the wonderful "better that others move an entire mountain, than I rebuild my own house (or bother to install a door, in the case of git-svn gateway)" opinion.

    The fact of the matter is that everyone knows cvs and by extention svn.
    Few people understand git, except for linus trovalds and those that have to deal with development for the linux root-vunerability-every-month kernel.

    Rather than be tasked with moving the mountain, every non-git familiar will just walk away and not even think of starting to get earnestly involved in the development process of nexuiz: too alien.
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Wed May 20, 2009 6:31 am

  • Well, i already use git to keep track of changes in both nexuiz and darkplaces, and with a few simple commands, i can adjust things to my needs. for example, i have local changes to the darkplaces buildsystem and to some files (casts). I usually run
    Code: Select all
    git stash; git svn rebase; git stash apply; make cl-nexuiz
    git stash backs up my changes, and git stash apply re-applies them to my working tree. So i wrote a simple alias so that i just fire
    Code: Select all
    git update
    which does that.

    @div: I never had to use stuff like git fsck, not on any repo. sure. git has some more commands, but hey, its a more powerful system.

    also, the diff and merge stuff is better and more clear (to me) and using tools like qgit or gitk makes live easier.
    extremly old pics of qgit: here and here (things have improved since then)

    Hey, just found out that my .git folder is at 1.5GB space, less than the checkout (trunk only).

    By the way, using git, no one has to fiddle around with those .svn dirs everywhere, there's just one .git in the checkout root, and thats where the single .gitignore file is.
    C167
    Member
     
    Posts: 29
    Joined: Wed Oct 31, 2007 5:24 pm

Wed May 20, 2009 9:59 am

  • svn has export to get rid of .svn so it's not a big deal, so it's a matter of convenience only
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Wed May 20, 2009 11:44 am

  • When people say "just use git's svn capabilities" it just makes me giggle :D
    quit for good
    alpha
    Alien trapper
     
    Posts: 492
    Joined: Tue Jun 17, 2008 7:18 pm

Wed May 20, 2009 1:28 pm

  • divVerent wrote:If you give me a git frontend that accepts svn/cvs command, it'd be an entirely different story.


    SVN emulation wouldn't make any sense, because you don't switch VCS just to say you did. If you want SVN, use SVN.
    User avatar
    parasti
    Alien
     
    Posts: 110
    Joined: Sun May 11, 2008 11:32 pm
    Location: On the walls and the ceiling

Wed May 20, 2009 7:10 pm

  • And I want svn.

    And I do not want to switch the system because _I_ see no point in doing so. Only you guys always come with stupid demands. I'd only change for your demands if it does not cost MY time. And that includes that I refuse to relearn a whole command set because of stupid demands from some guys on the forum who never contributed anything and never will.

    What I want is simple semantics of well-known command names.

    And I am not talking about a full emulation. There's like six seven commands that actually are used frequently:

    update
    commit
    diff
    annotate
    revert
    status
    log

    Anything else can have obscure names, as they're so seldomly used that one would look them up before use anyway (apart from checkout, but checkout is only used once per repository and thus does not matter).

    If git is worth ANYTHING, there are direct equivalents to these seven commands.

    All I ask for is if git could get these as alias (the remaining syntax can sure be SCM dependent, e.g. revisions are specified differently in cvs and svn) to the existing commands doing that, to make git less obscure. This is simply about user friendliness.

    If the git guys refuse to add such aliases, one can follow that they don't care about their users. And nobody wants to use SUCH a system then.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Next


Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest