Jump to content

freghar

Members
  • Posts

    461
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by freghar

  1. git checkout commit-id

    example:

    git checkout 639a811b8182e39ff1f0b38157d740b7329a2489

    and then to create a new branch for that commit, do git checkout -b branchname

    That's the better approach.

    But it's possible to simulate svn in this way .. using

    git-reset --hard 639a811b8182e39ff1f0b38157d740b7329a2489 on current branch.

  2. "SVN is more simple, why use GIT?" The answer is not only in bandwidth (as you can do diffs offline, etc), but in something else. Most of you lack the knowledge of what Git is able to do over SVN. Yeah, you have no damned idea what's possible with it because you can't imagine it now (still trying to compare it with SVN, eh?).

    And I say it again - you have NO idea. I can promise you that if Mangos will take full advantage of what's Git possible to do, there would be no SVN mirror, just because you can't mirror all those constantly changing and temporary branches and tags (and several versions) effectively to SVN, not to mention octopus merges.

    And if that happen, you won't ever want SVN back, not even the most dumb users.

  3. In which case you could use
    $ git show 4bcd3f6

    to view the commit locally.

    Sure, but you can't apply them in this form without the need of specifying --author in git-commit (ie. when you apply a raw diff). git-format-patch generates "commits" which you can use with git-am ..

  4. I won't read all 10 pages of this topic because I guess what can be found there ..

    1) Git doesn't work like SVN, so don't even try to compare those two.

    Some commit from mangos/master branch generated using "git format-patch mangos/master~2..mangos/master^" : http://paste2.org/p/89531

    -- this is actually how git commits looks like in their ready-to-email form which should be called a "patch". It has no revnumber, but there's a date.

    In fact, Git uses date and time where SVN has revision numbers, when you merge someone's branch (ie. pull from it), you will pull all his commits that he has ahead of you. And following the "one-commit-per-feature" scheme, that would mean thousands commits from users over few months ... possibly even more.

    I already explained why revision numbers aren't good for distributed model elsewhere, so let me quote myself:

    Actually, you probably didn't understand why it is a hash instead of numeric revision, did you? An example -- "my r344 is Bob's 233 and Alice's 81" , "hey Bob, make a diff from the r80 to r81" "that's not from r80, that's r45!".

    Yes, it has some disadvantages, but many other advantages as well. Mangos used SVN trunk as the only stable branch. And if we're going to have something like alpha, beta, release candicates, possibly nightly builds, the problem with svn revisions would probably end.

    PS: You can refer to first 7 characters of SHA1 commit hash as the project-unique commit hash. So you can say "this patch is based on 4bcd3f6" and you can be sure that everyone who try to apply that patch on 4bcd3f6 will have no conflicts. This worked with centralized repository like SVN as well, but it doesnt work when you get distributed.

  5. Git fetch will download all remote changes, but do now merge changes in, if you have made local code modifications. Git pull will always try to merge changes. Usually fetching without merging should be sufficient.

    Well that's not correct in fact. git-fetch just downloads new object files into remotename/* and don't try to merge anything even if the merge would result in fast-forward.

    Plain git-pull is the same as git-fetch + git-merge ...

  6. What bug does the patch fix? What features does the patch add?

    It filters out trailing whitespaces.

    For which SubVersion revision was the patch created?

    6660

    Is there a thread in the bug report section? If yes, please add a link to the thread.

    I don't think so ..

    Who has been writing this patch? Please include either forum user names or email addresses.

    GNU Sed with a little help of mine

    ---------------------

    Hi,

    I noticed a lot of "trailing whitespace warning" when operating with MaNGOS sources over several editors (and, mainly, git-patch) so I'm posting this patch. It may be a minor "problem", but it's good to have a bit cleaner sources, isn't it?

    (pastebin removed trailing whitespaces from the patch itself, so filebeam of gzipped patch only)

    http://filebeam.com/720b6eac27fc9c5f64dfc890db69f113

    As always, comments (if any) and hints are welcomed.

  7. Interesting idea, but don't forget to modify and balance player stats - because (as was already said) World of Warcraft is a multiplayer game. It's based on class cooperation (why can't a priest "tank" Ragnaros?) and so on..

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use