|
Dr. Stab posted:What do you propose as an alternative? It's called a three-way merge.
|
# ? Apr 4, 2016 18:08 |
|
|
# ? Jun 3, 2024 09:06 |
|
ctz posted:Except they're clearly using perforce here. This. Also, most version control tools work this way, or at least have the ability to. Also, most version control tools (notably including git) have the decency to prevent you from checking in those conflict markers unless you manually elect to do so. If you'd like to use a tool that doesn't handle conflicts textually, GUI version control tools usually have a merge editor.
|
# ? Apr 4, 2016 18:08 |
|
Obsurveyor posted:git reset --hard HEAD I've been saying for years that Git needs a newbie mode. It's incredibly unfriendly and unintuitive for new users.
|
# ? Apr 4, 2016 18:10 |
|
Ithaqua posted:I've been saying for years that Git needs a newbie mode. It's incredibly unfriendly and unintuitive for new users. I've started sending people here: https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init I actually showed that to my mother and after she finished the tutorial she told me that she liked git and would like to use it more.
|
# ? Apr 4, 2016 18:17 |
|
qntm posted:It's called a three-way merge. I don't really understand what you're trying to say. You think that git doesn't do three way merges and also you think that three way merges completely eliminate the need to manually resolve conflicts?
|
# ? Apr 4, 2016 18:23 |
|
Ithaqua posted:I've been saying for years that Git needs a newbie mode. It's incredibly unfriendly and unintuitive for new users.
|
# ? Apr 4, 2016 18:32 |
|
Ithaqua posted:I've been saying for years that Git needs a newbie mode. It's incredibly unfriendly and unintuitive for new users. DVCS is not a natural concept to begin with. It requires some education, regardless of some mode available to hold a user's hand. I think GUI tools obfuscate enough of what git does that they are actively harmful to new users and so many people start out on them. The command line has warnings all over that a merge conflict has happened and that you're merging a conflict which should be a big red flag to stop and look at it more closely(at least do a git diff HEAD before committing and look over the merge). Git also requires a lot of trust that it's not going to trash your files and trust that if you've committed it, it's never lost if you do screw up*. That's tough for new users to get a handle on. *except the worst mistake: Deleting the .git folder. I had a user do that just last week and I still partially blame the GUI file interface they were using.
|
# ? Apr 4, 2016 18:36 |
|
Do something that guarantees you resolve all merge conflicts and doesn't leave the option to fart out git metatext by accident?
|
# ? Apr 4, 2016 19:07 |
|
FamDav posted:Do something that guarantees you resolve all merge conflicts and doesn't leave the option to fart out git metatext by accident? good idea, i'll make the wiki
|
# ? Apr 4, 2016 19:09 |
|
More loving insanity today. I'm currently dealing with a PHP class that doesn't have a construct but instead has an 'init' method that's called everywhere this thing is instantiated. It does everything that a constructor does otherwise. WHHHHYYYYYY
|
# ? Apr 4, 2016 19:31 |
|
Soricidus posted:good idea, i'll make the wiki It's literally a pre-commit hook that does this that ships with Git as an example.
|
# ? Apr 4, 2016 19:32 |
|
IT BEGINS posted:More loving insanity today. I'm currently dealing with a PHP class that doesn't have a construct but instead has an 'init' method that's called everywhere this thing is instantiated. It does everything that a constructor does otherwise. WHHHHYYYYYY In a normal language (and thus potentially also for PHP; I have no idea personally) this is done if you need to do additional steps to create the object that can't be done in the constructor (see e.g. the "leaking this in constructor" warning in Java). Ideally the init method would instead be a static "factory" method on the object, so instead of doing "foo = new Thing()" you'd do "foo = Thing.create()". I'm guessing in your example it's actually like "foo = new Thing(); foo.init()", which is rather silly but hardly awful.
|
# ? Apr 4, 2016 19:47 |
|
TooMuchAbstraction posted:In a normal language (and thus potentially also for PHP; I have no idea personally) this is done if you need to do additional steps to create the object that can't be done in the constructor (see e.g. the "leaking this in constructor" warning in Java). Ideally the init method would instead be a static "factory" method on the object, so instead of doing "foo = new Thing()" you'd do "foo = Thing.create()". I'm guessing in your example it's actually like "foo = new Thing(); foo.init()", which is rather silly but hardly awful. In PHP I've yet to find a place where it's necessary. In this particular case there's nothing in the init that needs to be done outside of the constructor. I guess it's not utterly awful but I've been loving around with it for like an hour figuring out what kind of global bullshit it touches so I can actually use its functionality in a new place.
|
# ? Apr 4, 2016 20:13 |
|
ultramiraculous posted:It would appear someone at Steam pushed a merge conflict to PROD. The most disappointing thing is that the Steam web app is built with PHP.
|
# ? Apr 4, 2016 20:42 |
|
Also, hi chrisk
|
# ? Apr 4, 2016 20:42 |
|
Dr. Stab posted:What do you propose as an alternative? code:
|
# ? Apr 4, 2016 22:02 |
|
Oh, the client doesn't want to use protobuf per the existing API because it's "too hard"? No problem, we'll write code for them so they can store their XML in a String field and just hack the rest of the protobuf with nonsense values so it serializes!
|
# ? Apr 4, 2016 22:07 |
|
IT BEGINS posted:More loving insanity today. I'm currently dealing with a PHP class that doesn't have a construct but instead has an 'init' method that's called everywhere this thing is instantiated. It does everything that a constructor does otherwise. WHHHHYYYYYY Um... it sounds like either singleton or factory pattern? http://www.phptherightway.com/pages/Design-Patterns.html Can you please paste parts of the code you found weird?
|
# ? Apr 4, 2016 22:27 |
|
Munkeymon posted:
This would be insanely bad.
|
# ? Apr 4, 2016 23:18 |
|
baquerd posted:Oh, the client doesn't want to use protobuf per the existing API because it's "too hard"? No problem, we'll write code for them so they can store their XML in a String field and just hack the rest of the protobuf with nonsense values so it serializes! How the hell are protobufs too hard? The entire reference/spec is pretty loving light reading as far as these things go. Did they give some reason beyond it being "too hard"?
|
# ? Apr 4, 2016 23:45 |
|
return0 posted:This would be insanely bad. ...why? You can't just say something like that without giving an explanation. The commandline git I use (which so far as I'm aware is the current git standard) prompts you to use "get mergetool" when there are conflicts. And that command in turn will spawn whatever program you have configured to handle conflicts. It won't stop you from trying to make commits that have merge conflicts in them, but if you aren't reviewing the diffs for every commit you make then there is no help for you anyway. I can't count the number of bugs I've fixed just by rereading my code instead of thinking "ahhh, it'll be fine." It's never fine.
|
# ? Apr 4, 2016 23:50 |
|
FamDav posted:Do something that guarantees you resolve all merge conflicts TooMuchAbstraction posted:if you aren't reviewing the diffs for every commit you make then there is no help for you anyway
|
# ? Apr 5, 2016 00:19 |
|
JawnV6 posted:These both sound like user education or process hooks more than software tooling. But I'm still seeing software tooling recommendations as if that'll take you the whole way? I think you'll find, sir, that if you can't solve a problem with software then it's not an important problem in the first place.
|
# ? Apr 5, 2016 01:31 |
|
Dr. Stab posted:I don't really understand what you're trying to say. You think that git doesn't do three way merges and also you think that three way merges completely eliminate the need to manually resolve conflicts? No, I didn't say either of those things. What I said was, qntm posted:The problem isn't that there's a conflict, the problem is that Git thinks that the sensible way to handle a conflict is to turn my file into a big pile of chevrons. Was this unclear? A better approach would be to start an interactive two- or three-way merge in an editor so I can resolve it manually myself, or put the conflicting files somewhere I can merge them at my leisure, or to roll the changes back, or in fact do basically anything other than filling my otherwise working source file with garbage. In other words, what everybody else is saying. E: perhaps what I didn't make clear was that although I'm new to Git, it's the third or fourth source control system I've used professionally. For some reason everybody assumed that I had literally never seen a merge conflict before? qntm fucked around with this message at 01:38 on Apr 5, 2016 |
# ? Apr 5, 2016 01:32 |
|
The chevron thing is hardly unique to Git. patch(1) does this, as does RCS, CVS, Subversion, and Mercurial if you don't have another interactive merge tool specified. It's not even really a poor default as merge tools are generally part of a development or desktop environment, and not really related to Git itself. Unrelated, but originally Git was to be a low-level program upon which higher level frontends, like Cogito, could interact with. These went away after GIt 1.5 came out with a "simpler" interface, although the consensus is that Git still has at least a few unintuitive command behaviors.
|
# ? Apr 5, 2016 01:51 |
|
qntm posted:A better approach would be to start an interactive two- or three-way merge in an editor so I can resolve it manually myself, or put the conflicting files somewhere I can merge them at my leisure, or to roll the changes back, or in fact do basically anything other than filling my otherwise working source file with garbage. In other words, what everybody else is saying. Marking the conflicts in the file is the standard way of passing that information to your interactive merge tool. This convention significantly predates git and is used by a whole bunch of tools, and in fact the only VCS I've used that didn't do it was SourceSafe (which couldn't really hit merge conflicts in the first place because it doesn't have functional branching and has global locks on files). qntm posted:E: perhaps what I didn't make clear was that although I'm new to Git, it's the third or fourth source control system I've used professionally. For some reason everybody assumed that I had literally never seen a merge conflict before?
|
# ? Apr 5, 2016 02:02 |
|
also i don't know wtf you're planning on doing with a working tree that's in the middle of a merge conflict that doesn't involve immediately working on resolving that conflict. your files certainly aren't "otherwise working" in any meaningful sense, and if you decide that you don't want to deal with the merge immediately then you just run the abort merge command
|
# ? Apr 5, 2016 02:05 |
|
sunaurus posted:I've started sending people here: https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init I'm in a team at work that's trying to prove that switching to Git from SVN will save us time during the review process once it's set-up right and we trained people on how to use it... and a lot of what I found so far is "git is perfect, if you don't understand the commands intuitively ur stupid " and "If you have trouble understanding git's workflow because you're used to SVN, that's your own problem, don't come asking us for help now!" That kind of attitude isn't very helpful, you know. Thanks for that link, it's one of the first actually helpful documents I've seen. Most tutorials do explain all the commands, but don't explain how you're supposed to use them, nor the difference in meaning they have compared to SVN or other VCSs.
|
# ? Apr 5, 2016 06:28 |
|
Plorkyeran posted:also i don't know wtf you're planning on doing with a working tree that's in the middle of a merge conflict that doesn't involve immediately working on resolving that conflict. your files certainly aren't "otherwise working" in any meaningful sense, and if you decide that you don't want to deal with the merge immediately then you just run the abort merge command Yeah this is what I don't get. If you've got a merge conflict, the fact that now your files don't compile doesn't matter because you should be fixing them anyway (and even for files that don't have a compilation step, you still have to re-stage them so you don't accidentally wind up with mergeshit in your tree). Though I do think that the merge-checker precommit hook should be on by default.
|
# ? Apr 5, 2016 09:12 |
|
Plorkyeran posted:Marking the conflicts in the file is the standard way of passing that information to your interactive merge tool. This convention significantly predates git and is used by a whole bunch of tools, and in fact the only VCS I've used that didn't do it was SourceSafe (which couldn't really hit merge conflicts in the first place because it doesn't have functional branching and has global locks on files). Well, there you go, I guess. When I used SVN years ago it was a single-person project so no conflicts, after that I used CMVC which has file locking and Team Concert which is Eclipse-based. Plorkyeran posted:also i don't know wtf you're planning on doing with a working tree that's in the middle of a merge conflict that doesn't involve immediately working on resolving that conflict. your files certainly aren't "otherwise working" in any meaningful sense A merge conflict is not equivalent to a broken file full of chevrons. In Team Concert, the merge conflict takes the form of a bunch of changes held in a separate area until I merge them in manually, and until I do that, my existing source tree is untouched and, from my perspective, still working. qntm fucked around with this message at 09:34 on Apr 5, 2016 |
# ? Apr 5, 2016 09:22 |
|
Well, "working" except for the fact that it hasn't actually integrated the changes you expected it to integrate when you tried to automerge things. If you have a merge conflict, and you want things to just be in a working state, you can either a) fix the conflict, or b) say "nevermind I'll merge this one later". Does that really seem an unreasonable burden?
|
# ? Apr 5, 2016 09:40 |
|
Jabor posted:If you have a merge conflict, and you want things to just be in a working state, you can either a) fix the conflict, or b) say "nevermind I'll merge this one later". Does that really seem an unreasonable burden? No, nor was that what I was annoyed about.
|
# ? Apr 5, 2016 10:04 |
|
Soricidus posted:good idea, i'll make the wiki Thanks I don't know how
|
# ? Apr 5, 2016 10:18 |
|
If your default leads to perennial cases of "look at that loving idiot they should have known better" then maybe it's not a good default? I get the reasons for why they went with it (convention, not really caring about UX, probably some UNIX argument) but I think they could have picked better defaults that make it impossible to commit merge metadata.
|
# ? Apr 5, 2016 10:31 |
|
FamDav posted:I don't know how reported
|
# ? Apr 5, 2016 10:54 |
|
I work with people that resolve conflicts by always using their version
|
# ? Apr 5, 2016 11:41 |
|
Well how about this for a FAIL FTP transfer of 5MB of small files (1k each ) Open FTP Connection Transfer file Close Connection Loop until Completed FileZilla takes 3 minutes, Java code = 4 hours
|
# ? Apr 5, 2016 12:06 |
|
canis minor posted:I work with people that resolve conflicts by always using their version That is indeed a horror. My sympathies.
|
# ? Apr 5, 2016 12:43 |
|
I'm not entirely sure what the complaint is, but I would probably consider it to be a horror if a program written for the express purpose of downloading files did not perform better than the most naïve possible implementation in a general-purpose programming language. Especially if the naïve version is completely shutting down the session and incurring a billion round-trip delays reestablishing it for every single file.
|
# ? Apr 5, 2016 12:47 |
|
|
# ? Jun 3, 2024 09:06 |
|
Valve lacking in quality control? Well, I'll never.
|
# ? Apr 5, 2016 13:49 |