Perl 6 - the future is here, just unevenly distributed

IRC log for #perl11, 2016-07-29

| Channels | #perl11 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:07 travis-ci RPerl build passed. Will Braswell says 'Learning RPerl, Print Operator'
00:07 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148180040 https://github.com/wbraswell/rperl/compare/8447b40d8778...45ac4d0ef738
00:26 willthechill yay
00:31 travis-ci RPerl build passed. bulk88 says 'see if freed SV *s are being used on travis'
00:31 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148180879 https://github.com/wbraswell/rperl/commit/86b06d0dfcd7
00:32 bulk88 how on earth did that pass ^^^^^^^^^??????
00:33 willthechill checking
00:33 bulk88 it fails on my 5.24
00:34 willthechill well I have no idea what you are doing here
00:35 willthechill do you plan do somehow force-delete this change in the main repo, or are you going to leave it here?  because I really don't want random changes made to the main repo
00:35 bulk88 the first av_store deletes the 2nd SV * that gets a SvREFCNT_inc
00:35 bulk88 that was a branch
00:35 willthechill false, master branch main repo
00:35 willthechill https://github.com/wbraswell/rperl/commits/master
00:36 willthechill I see you have created additional branches in the main repo
00:36 bulk88 https://github.com/wbraswell/rperl/commit/cab393ed938622cd19790c8005a1ede6a7dd348d that is just a small perf improvement, unrelated to the free SV * problem
00:37 willthechill oh I see 2 different commits
00:37 bulk88 it also fixes teh leak i mentioned yesterday
00:38 willthechill okay I see this is good  https://github.com/wbraswell/rperl/commit/cab393ed938622cd19790c8005a1ede6a7dd348d
00:38 willthechill good deal
00:40 willthechill and it is passing on travis so far  https://travis-ci.org/wbraswell/rperl/builds/148183026
00:43 willthechill as for https://github.com/wbraswell/rperl/commit/86b06d0dfcd7     I honestly have no idea why your refcount is croaking but mine isn't
00:44 willthechill as for https://github.com/wbraswell/rperl/commit/79d7709aca8bb9f4d5190852b51c158a1f235e4c      there is at least 1 or 2 ways to make travis use development versions of Perl, I started looking at it a while back when I heard there were problems running under 5.23 shortly before v5.24 was released and the P5 Pumpking changed
00:44 willthechill but I never reached a conclusion and never fully tested under anything newer than v5.22
00:45 willthechill I don't know if travis support v5.24 yet, we will find out in a few mins when this build gets there   148183786
00:45 willthechill oops   https://travis-ci.org/wbraswell/rperl/builds/148183786
00:47 bulk88 I stepped teh code, av_store frees SV * swap
00:47 bulk88 refcnt goes from1  to 0
00:47 willthechill okay is that good or bad?
00:47 willthechill somehow that is different on your OS?
00:47 willthechill different between Windows and Linux?
00:48 bulk88 i suspect there was another owner of the SV * in earlier perls and teh refcnt was higher
00:48 bulk88 some optimization removed teh 2nd owner
00:48 bulk88 complete guess
00:49 bulk88 ill try a MSVC 5.20 rperl and see what happens
00:50 willthechill okay that is weird!  :P
00:51 bulk88 rperl with MSVC 5.20, no croak, it passes
00:51 willthechill so you are saying it is only w/ strawberry in windows that it fails?
00:51 bulk88 it only fails with perl 5.24, any OS
00:52 willthechill OH I see
00:52 willthechill sorry I was totally confused there
00:55 mako left #perl11
00:56 bulk88 http://paste.scsys.co.uk/528677 with 5.20, everything is fine, there is a 2nd owner for some reason
00:56 bulk88 on 5.24, there usually ISNT a 2nd owner, IDK y http://paste.scsys.co.uk/528678
00:57 willthechill owner?
00:57 bulk88 every refcnt notch must have an owner
00:58 willthechill oh you mean reference owner
00:58 bulk88 yeah
00:58 willthechill okay gotcha
00:58 bulk88 some other data structure in the process must have a ptr to that SV *
00:58 bulk88 anything else is a leak
00:58 willthechill but only in v5.24
00:58 bulk88 how my perl warning got into the Dumper dump IDK
01:03 willthechill haha yes I see that
01:03 willthechill I don't know either but I don't think it's a concern  ;)
01:08 travis-ci RPerl build passed. bulk88 says 'HelperFunctions.h AV_ELEMENT dont call av_fetch getter twice in a row
01:08 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148183026 https://github.com/wbraswell/rperl/compare/45ac4d0ef738...cab393ed9386
01:10 bulk88 okay, the warn internally allocates a new SV *, that new SV * is teh previously freed one that the warning is about
01:11 bulk88 push onto free list, then warn() pops off the free SV * list
01:11 willthechill and this is new to Perl v5.24 only?
01:12 bulk88 no, I just figured out why the  array gets the warning string i printed to stderr
01:13 bulk88 because im warning that there is a freed SV * in the AV, and the perl warn() code creates a new temporary SV *, which happens to be the freed SV * still in the AV that the warnign is complaining about
01:13 bulk88 *in
01:13 willthechill on phone call
01:34 travis-ci RPerl build failed. bulk88 says 'WIP lets see what happens if travis is forced to use 5.24
01:34 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148183786 https://github.com/wbraswell/rperl/commit/79d7709aca8b
01:57 bulk88 willthechill the 11.t failures for travis 5.24 are identical to the 11.t failures I see on MSVC 5.24, MSVC 5.25 failures from 1 week ago, look at the test numbers for 11.t http://paste.scsys.co.uk/528400 they are identical to failed test in travis https://travis-ci.org/wbraswell/rperl/jobs/148183794
02:06 willthechill still on phone
02:54 travis-ci RPerl build passed. bulk88 says 'see if freed SV *s are being used on travis'
02:54 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148202155 https://github.com/wbraswell/rperl/compare/86b06d0dfcd7...29f6a60e2f95
02:54 bulk88 GRRRRRR
02:57 bulk88 even strawberry 5.20 fails on that commiot
04:04 travis-ci RPerl build passed. bulk88 says 'see if freed SV *s are being used on travis'
04:04 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148210892 https://github.com/wbraswell/rperl/compare/29f6a60e2f95...be2d25a886ab
05:05 willthechill bulk88: checking
05:16 willthechill okay so the first failure in this travis  https://travis-ci.org/wbraswell/rperl/jobs/148183794    is t/11 test #103
05:16 willthechill which is a call to  RPerl::Algorithm::Sort::Bubble::cpp_load()    right after Inline calls gcc to compile 'RPerl/Algorithm/Sort/Bubble.cpp'
05:16 willthechill in CPPOPS_PERLTYPES mode
05:18 willthechill this paste doesn't help me http://paste.scsys.co.uk/528400   because I can't see what the first failure was
05:21 willthechill but I can at least tell you that Bubble.pm line 21 is a reference to Bubble.pmc line 21 https://github.com/wbraswell/rperl/blob/master/lib/RPerl/Algorithm/Sort/Bubble.pmc.CPPOPS_DUALTYPES#L21     and the missing subroutine is because line 21 is one of the subroutine shims which is trying to shim a subroutine which doesn't exist (presumably) because Bubble.cpp was not compiled correctly
05:22 willthechill so it all comes back to answering the question: why is it failing on v5.24 now?  I still don't know the answer
05:22 willthechill why does the compile fail?
05:22 willthechill what has changed in v5.24 that causes the compile to fail somehow?
05:22 willthechill is it because of the SV freeing issue?
07:36 travis-ci RPerl build failed. bulk88 says 'turn on 5.24 testing on Travis'
07:36 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148233960 https://github.com/wbraswell/rperl/compare/a14eab1050cf^...94fbba72ab18
07:54 bulk88 my fix in https://github.com/wbraswell/rperl/commit/a14eab1050cfb4d3b84ec26e058350adf3538ee1 knocked down the fail count from 12 fails in 11.t https://travis-ci.org/wbraswell/rperl/jobs/148183794 to 7 fails https://travis-ci.org/wbraswell/rperl/jobs/148233968
08:12 bulk88 RPerl__Algorithm__Sort__Bubble__number_bubblesort needs all the fixers that RPerl__Algorithm__Sort__Bubble__integer_bubblesort already got
08:57 travis-ci RPerl build passed. bulk88 says 'turn on 5.24 testing on Travis'
08:57 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148248095 https://github.com/wbraswell/rperl/compare/94fbba72ab18...b3ebf2dbc951
09:31 travis-ci perl11/cperl#1358 (smoke/gh126-mderef_u - 0847e74 : Reini Urban): The build passed. https://travis-ci.org/perl11/cperl/builds/148254183
09:43 mako joined #perl11
10:54 travis-ci perl11/cperl#1359 (smoke/gh126-mderef_u - 8e77dab : Reini Urban): The build was broken. https://travis-ci.org/perl11/cperl/builds/148269551
10:59 sten1 joined #perl11
13:48 travis-ci perl11/cperl#1360 (smoke/gh126-mderef_u - edfc60c : Reini Urban): The build was fixed. https://travis-ci.org/perl11/cperl/builds/148304355
15:08 mako joined #perl11
16:24 bulk88 willthechill msvc 2013 with perl 5.24, all rperl tests pass on my branch
17:43 willthechill bulk88: I thought v5.24 was broken?
17:43 willthechill I'm confused
18:56 bulk88 not anymore https://travis-ci.org/wbraswell/rperl/builds/148248095
18:56 willthechill checking
18:56 bulk88 im going to push the smoke_bubble_cpp_corruption_fix branch to master ok?
18:57 willthechill wait
18:57 willthechill all I see is a change in .travis.yml?
18:57 willthechill https://github.com/wbraswell/rperl/commit/b3ebf2dbc95148d81cb55a86b8a9f068dd0bccb9
18:57 willthechill how did that fix v5.24?
18:57 willthechill I mean, I see it ENABLED v5.24 in Travis, that's nice
18:58 willthechill oh wait is it this?   https://github.com/wbraswell/rperl/compare/smoke_bubble_cpp_corruption_fix
18:58 bulk88 there are 2 commits on the branch
18:59 willthechill okay yes I see that now
19:00 willthechill hold on just a min please
19:00 willthechill okay sorry not quite right
19:01 willthechill you have totally deleted the semantics of the "swap" variable
19:01 willthechill and we need those semantics to remain in place
19:01 willthechill because we are compiling from this:   https://github.com/wbraswell/rperl/blob/master/lib/RPerl/Algorithm/Sort/Bubble.pm#L83-L85
19:01 willthechill I understand that it was causing problems the way I had it implemented
19:02 willthechill so we need to find an in-between solution where the "swap" variable still exists but it doesn't fail
19:02 bulk88 why is the $swap needed in Bubble.pm?
19:04 willthechill good question, I am trying to remember if it was causing a problem maybe in CPPOPS_CPPTYPES w/out swap
19:04 willthechill or maybe it was CPPOPS_PERLTYPES because I didn't know how to achieve what you have done
19:05 bulk88 also SV * in C with =, have different semantics from $scalar in Perl
19:05 willthechill yes that could be part of it
19:05 willthechill hold on I will try it in CPPOPS_CPPTYPES mode w/out the "swap" variable
19:06 bulk88 $ref = \sub($_[0]); ${$ref} = 1; # this code couldve changed $_[0] depending how the sub was written
19:07 willthechill okay that's pretty obscure, not sure I understand your point?
19:08 bulk88 copying a SV * from one C uato to another C auto is more like perl references, perl = op is more like sv_setsv() everytime
19:08 mako joined #perl11
19:08 willthechill okay
19:11 willthechill bulk88: don't push anything to master yet, still testing
19:12 willthechill bulk88: also, I just realized that I have gone on working on my own local copy of the master branch after you pushed your 1 fix to master last night, when I run `git status` I have uncommitted changes
19:12 willthechill what should I be doing?
19:12 willthechill do I need to run a `git pull origin master`?
19:13 willthechill will that mess up what I'm working on now?
19:19 willthechill bulk88: okay the good news is that it works in CPPOPS_CPPTYPES w/out the "swap" var, so it must've been CPPOPS_PERLTYPES that caused me to create swap in the first place
19:19 willthechill now I have modified lib/RPerl/Algorithm/Sort/Bubble.cpp.CPPOPS_DUALTYPES    just like you have
19:19 willthechill so I really don't know how to proceed safely w/ git!
19:19 willthechill help please
19:21 willthechill here is what I would assume that I could do safely, but I'm totally not sure:   first, manually revert any changes to CPPOPS_CPPTYPES in lib/RPerl/Algorithm/Sort/Bubble.cpp.CPPOPS_DUALTYPES and backup my modified copy;   second, have you make your push to master w/ changed CPPOPS_PERLTYPES code only;  third, pull your changes into my local repo;  fourth, manually merge in my CPPOPS_CPPTYPES changes;  fifth, push ba
19:21 willthechill ck to master on github
19:21 willthechill yes or now?
19:21 willthechill *no
19:21 willthechill :P
19:31 bulk88 I only know how to use git from a GUI
19:31 bulk88 fetch and rebase from the remote is my usual receipie
19:31 bulk88 along with stash so the rebase can happen
19:31 willthechill hmm okay I remember now, I don't ever use those commands
19:32 bulk88 you better learn how to use fetch if you want to have mroe than 1 author on a project ;)
19:32 bulk88 git isn't blog software
19:33 willthechill okay `git pull` is `git fetch` + `git merge`
19:33 bulk88 i never use pull, it create very broken and pintless merge branches
19:33 willthechill okay so it is never good to do a merge?
19:34 bulk88 only when you have a very specific reason, and you want the branch concept to be kept in the git log
19:34 bulk88 the specific reason being 3 or more commits, highly related to each other, by usually 1 author
19:35 bulk88 adding a huge feature, or a huge refactor of the code, the merge commit makes it stand out as a sub project/large sub task
19:35 bulk88 rperl doesn't have enough acitivty for branches to make sense
19:36 bulk88 the merge commits are useful for IDing that the commits came from a PR and not a commit bit author tho
19:36 willthechill PR?
19:36 willthechill oh pull request
19:37 bulk88 "> here is what I would assume that I could do safely, but I'm totally not sure:   first, manually revert any changes to CPPOPS_CPPTYPES in lib/RPerl/Algorithm/Sort/Bubble.cpp.CPPOPS_DUALTYPES and backup my modified copy;   second, have you make your push to master w/ changed CPPOPS_PERLTYPES code only;  third, pull your changes into my local repo;  fourth, manually merge in my CPPOPS_CPPTYPES
19:37 bulk88 changes;  fifth, push ba" I dont understand your proposal
19:37 willthechill the word "merge" there does not refer to `git merge`
19:37 bulk88 you can switch to my branch on your machine, create another branch with a slightly different name, then rebase/ammend commit it until you like it
19:38 bulk88 then push it to github under the new branch name
19:38 willthechill no I think it is okay if you go ahead and modify the master branch, then I will deal with it on my end w/out using `git pull` or `git merge`
19:38 willthechill I will try to do stash and rebase
19:38 willthechill if that fails then I will do it manually
19:39 willthechill and also fetch I guess!  :-)
19:39 bulk88 ill push my 2 commits to master ok? we knwo from yesterday they pass on travis
19:39 bulk88 you hvae to fix the other 2 Bubble files, bubble.pm and c type/c ops
19:40 bulk88 so all 3-5 Bubbles match
19:40 willthechill yes that sounds good to me
19:41 willthechill I have already fixed those files on my machine so that's a start!
19:42 bulk88 done
19:45 willthechill great
19:45 willthechill checking on proper commands for fetch & stash & rebase now
19:53 willthechill bulk88: do you ever use git staging?  is it somehow important that I stage files?
19:54 bulk88 I only understand the "stage" concept as a list of diffs/deltas/lines/blobs that are being assembled for the next commit
19:55 willthechill yes that is correct from what I have read
19:55 willthechill I'm just wondering if you personally found a need for it, or if there was a hidden technical need for it
19:55 bulk88 you can change 3 files, A B and C, and then stage only A, do a commit surrounding file A, then stage B, do a commit about B and so forth
19:55 willthechill the git docs say you can skip staging, so I shall!
19:55 willthechill I guess that could be useful but is not needed now
19:55 willthechill :P
19:56 bulk88 in my GUI I have to click eahc file to stage it, because you cant have a commit with no changes unless its a merge commit i think
19:56 bulk88 I can fine tune the diff lines tho, so you stage by line/by diff not really by file
19:57 bulk88 there is somewhere an option in my GUI to stage everything, but that can wind up commiting untracked files and other garbage
19:57 willthechill okay well I just skip straight to commit so I'll stick with that for now I guess
19:57 willthechill yes I can see untracked files and garbage stuff before finalizing a commit
19:57 bulk88 *untracked unignored
19:57 willthechill I can abort a commit if I see garbage
19:57 willthechill yes untracked unignored
20:06 mako I'm very amused seeing you guys coping with git issues. If you spare time allows it: https://stevebennett.me/2012/02/24/10-things-i-hate-about-git/
20:07 mako And: https://stevebennett.me/2014/02/26/git-what-they-didnt-tell-you/
20:09 mako This gets me to the point asking: Should there be a bullet proof step-by-step guide how to do contributions/forkings/anything-git-related when it comes to RPerl-repository?
20:10 willthechill mako: yes I already have a git notes file and I am updating it now
20:11 willthechill and I will publish it as well
20:12 willthechill mako: it looks like you made a pull request containing no files???
20:12 willthechill https://github.com/wbraswell/rperl/pull/57/files
20:12 willthechill from here   https://github.com/wbraswell/rperl/pull/57
20:13 willthechill what's that all about?
20:13 mako consider this obsolete
20:14 mako I had to figure out how to keep my fork of rperl in sync with your master branch.
20:16 mako Something went wrong there. Did delete my fork of rperl and reforked.
20:16 willthechill ah okay that is why it says "unknown repo"
20:17 mako So you see some manual would be of great benefit. Would ease the life of any newcoming sys dev of RPerl.
20:18 mako And anybody not well acquainted with git.
20:18 willthechill mako: did you read the devs_getting_started.txt doc?  it at least gives a few pointers on clicking the right buttons in github
20:18 willthechill but it does not provide an actual git command reference
20:18 willthechill which as I said I am doing now
20:19 willthechill also, I have deleted the pull request which was a mistake
20:21 mako willthechill: Yes, I'm still reading devs_getting_started.txt. Do you have step 3 in mind?
20:22 willthechill well step 3 does relate to making a fork on github
20:23 willthechill I have a different doc with a github command cheat sheet
20:23 willthechill but I will also integrate it into the devs_getting_started.txt doc as well
20:23 willthechill first cheat sheet (for my understanding) then getting started doc
20:26 mako willthechill: Some best practices when it comes to git and working on RPerl would be helpful. Would keep you away from many annoyances. Maybe this is stupid stuff but even if it is, solving this issue once makes your life a little bit easier.
20:27 mako Your life of the maintainer and project leader of RPerl, that is.
20:28 willthechill yes I know, documentation is my life now
20:28 willthechill :P
20:28 willthechill for better or worse!
20:28 willthechill (I wish I had a clone of myself to do docs while I code)
20:31 mako (Me too. Everybody has this wish. Would be nice to automate this task. Where is artificial intelligence when you need it?)
20:35 willthechill LOL only about 5 years away
20:35 willthechill ;)
20:35 travis-ci RPerl build passed. bulk88 says 'turn on 5.24 testing on Travis'
20:35 travis-ci https://travis-ci.org/wbraswell/rperl/builds/148409582 https://github.com/wbraswell/rperl/compare/cab393ed9386...b3ebf2dbc951
20:42 mako ;-)
20:46 ribasushi joined #perl11
21:18 willthechill bulk88: I've been reading this   https://www.atlassian.com/git/tutorials/merging-vs-rebasing/workflow-walkthrough    but I'm still not sure if I'm supposed to to a merge, rebase, or neither in this case
21:18 willthechill I think I understand git stash now
21:18 willthechill and also fetch
21:18 willthechill but merge vs rebase is still confusing to me, at least in this specific case today  :P
21:19 willthechill ribasushi: maybe you can help me understand as well
21:19 willthechill bulk88 has pushed 2 good commits to master    https://github.com/wbraswell/rperl/commits/master
21:20 willthechill I am in sync with master from before bulk made those 2 commits
21:20 willthechill so now I need to know how to proceed: I think we may need fetch and/or stash and/or rebase (or merge?) but I just don't know
21:20 willthechill especially the rebase vs merge part
21:25 willthechill actually I made changes to my local repo before, during and after bulk88 was making his changes to his branch, which is now merged back into master
21:26 willthechill and perhaps most importantly, some of the changes I made after bulk88's commits also edit at least 1 of the same files that bulk88 edited, but I was working off the older copy of the file from before his changes, because I never did a git pull or git merge or git fetch to download his changed files
21:50 bulk88 rebase your local master on the remote master, that will move your newer commits and stack them after mine on the remote
21:51 willthechill bulk88: yes but that will overwrite your new changes to Bubble.cpp.CPPOPS_DUALTYPES because I have also modified that file?
21:51 willthechill or will it merge together your copy of the Bubble.cpp.CPPOPS_DUALTYPES file with my copy?
21:51 willthechill because we modified different parts of that file
21:52 bulk88 it will be merged usually, else you get a git conflict in applying/rebasing
21:52 willthechill okay great then I will try it
21:52 willthechill do I need to do a stash?
21:53 bulk88 I've found I always get errors that I need to stash or tree is not clean if I rebase
21:53 bulk88 you cant rebase with uncommitted changes to the tree
21:53 willthechill okay so I have to first commit my changes?
21:53 willthechill because I have modified Learning.pm and also Bubble.cpp.CPPOPS_DUALTYPES at least
21:53 bulk88 yes
21:53 willthechill also Bubble.cpp.CPPOPS_CPPTYPES
21:54 willthechill ribasushi: you around?
21:54 bulk88 http://i.stack.imgur.com/YxI3C.png http://i.stack.imgur.com/vJpiQ.png
21:54 bulk88 use git log to figure it out
21:55 willthechill I also have gitk installed now
21:55 willthechill so I can see the snakey graph
21:55 willthechill :-)
21:57 bulk88 I like to compare git log to https://en.wikipedia.org/wiki/Flight_progress_strip
21:57 willthechill bulk88: look at this  https://www.atlassian.com/git/tutorials/merging-vs-rebasing/the-golden-rule-of-rebasing
21:57 willthechill it says I should not use git rebase on a public branch like master?
21:57 bulk88 dont rebase BEHIND the last PUBLIC/PUSHED commit to the remote master
21:58 bulk88 you have to rebase to move a branch, that forked a long time ago, and have it "fork" off the latest commit on remote master
21:59 bulk88 once you applied the old commits, ontop of the latest public remote master commit, you havbe a single timeline/log line, then you push it like usual to the remote master
21:59 bulk88 if youhave to force push, you did something wrong, like rewrote a commit already on remote master
21:59 willthechill I think I kinda understand!  :D
22:00 willthechill so I will do `git commit -a` then give a commit message; then I will do `git rebase master`
22:00 willthechill but where does `git fetch` come in?
22:00 bulk88 IDK, I cant advise you on indivial git commands, jsut theory
22:00 willthechill is fetch supposed to be before commit or in between commit and rebase?
22:00 willthechill because `git pull` is `git fetch; git merge`
22:00 bulk88 before always, you wanna know if osmeone pushed commits int he meantime
22:01 bulk88 you dont want ot rebase ontop of an out of date local copy of the remote master tag/branch thing
22:01 willthechill yes and obviously I know you pushed commits in the mean time because that is the basis of our current conversation, so presumably I need to do a fetch to get the references to the latest remote stuff?
22:01 bulk88 yes
22:02 willthechill I'm thinking commit then fetch then rebase
22:02 willthechill because fetch and merge are together in pull
22:02 willthechill and we are replacing merge with rebase
22:21 willthechill bulk88: looks like I'm gonna need to do a `git pull --rebase`  http://stackoverflow.com/questions/18930527/difference-between-git-pull-and-git-pull-rebase
22:22 willthechill in simple cases `git pull --rebase` == `git fetch; git rebase`
22:22 willthechill but in complex cases only `git pull --rebase` will work correctly
22:22 willthechill according to the docs
22:23 willthechill so now I'm saying I should do `git commit -a; git pull --rebase; FOO; git push`
22:24 willthechill so now what about the FOO?  do I need to make more changes and do a new commit before I do a push
22:24 willthechill ?
22:24 willthechill or do I go straight from pull to push?
22:27 willthechill also what about stash?
22:27 willthechill am I supposed to be using a stash here somewhere?
22:27 willthechill am I supposed to do stash then pull/rebase then unstash then commit then push?
22:31 kentnl "Stash" is "I have dirty files in my tree and I have to get rid of them temporarily to make everything else work"
22:32 willthechill kentnl: yes that is kindof correct!
22:32 willthechill I mean yes that is kindof the situation we have
22:32 willthechill :-)
22:33 willthechill I have "dirty" files which I have changed since bulk88's last push to master
22:34 kentnl Right, there what I'd typically do is just commit them, and then do `git remote update`, followed by `git rebase -i origin/master'
22:34 kentnl the first part being "sync without pull" and the latter part being "explicitly move my commits to happen after theirs" ( with an interactive edit on the way, mostly for a sanity check for me )
22:34 willthechill hmm okay haven't heard about `git remote update` yet
22:35 kentnl when you do "pull" git basically does "remote update; git merge origin" or something like that.
22:35 willthechill ah okay so `git remote update` seems similar to `git fetch`
22:35 kentnl ( there's not much difference between 'remote update' and 'fetch', I just prefer the former out of habit )
22:35 kentnl yeah.
22:36 willthechill ah okay I see now   http://stackoverflow.com/questions/2688251/what-is-the-difference-between-git-fetch-origin-and-git-remote-update-origin
22:36 willthechill they use the same codepath since 2009 according to that URL
22:36 willthechill :-)
22:37 willthechill different in special cases, same in general case like this
22:37 kentnl Yeah. I wasn't aware of them consciously, but now I know what they are, I know why I prefer the one I do ;)
22:38 * kentnl does tend to abuse some of those features
22:39 willthechill well I'm definitely learning my share of git today, whether I like it or not, haha!  :P
22:40 willthechill kentnl: what if one of the not-yet-committed file changes I have is the same file which was in bulk88's latest commits to master?
22:40 willthechill will it actually merge my parts of the file with his parts of the file into 1 new file?
22:40 willthechill or will my file totally overwrite his?
22:43 kentnl if you stash it, when you resurrect the stash, it will "conflict"
22:43 kentnl and it will enter merge resolution
22:44 kentnl "stash application" and "patch application" "cherry-pick" and "rebase" are all conceptually the same operation
22:44 kentnl they're just differently namespaced / workflowed / batched
22:45 kentnl like "Rebase" is "be very careful, follow these branches, find a parent, then cherry-pick all these commits on top of it, creating a new branch"
22:46 kentnl a "Stash" is  just "a branch I committed to but don't care about the name or having it mirror"
22:46 willthechill okay so is there any option where somehow my edited file and bulk88's edited file are magically merged together without destroying one another's edits?
22:46 willthechill or do I need to manually copy one file out into /tmp then cut & paste edited sections together manually?
22:47 kentnl well, no, but you're asking the wrong question: There's no condition where they magically have one cancel out the other.
22:47 willthechill hmmm not sure I follow you
22:47 kentnl It recognises both have derived from a common ancestor, and makes the burden of the person performing the "merge" to resolve which parts have to happen.
22:48 willthechill okay great and what are my options to handle that burden of deciding?
22:48 willthechill does it have like 3 main options it always gives or something like that?
22:48 willthechill abort retry fail?  hahaha
22:48 kentnl Well, when there's a conflict, git will just go "uh oh, there's a conflict" and will require you to make the conflict as "resolved" before it will let you finish, and it has `git merge-t0ol`
22:49 kentnl which will launch something like `gvimdiff` or `KDiff3` or `Meld` to review what changed and make your choices.
22:49 kentnl Only when one file was deleted in entirety does it give you a reduced "delete or keep" question.
22:50 kentnl `git mergetool --tool=gvimdiff` is what I usually use.
22:51 kentnl Also, the "conflicted" file gets mangled using "conflict markers"
22:51 kentnl and so the file shows *both* versions interleaved until you fix it
22:52 kentnl https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging
22:52 willthechill wow okay so there is an entire complex process to manually merging together files like this
22:53 willthechill that has been hidden from me this entire time I've been questioning what to do!  :P
22:53 kentnl though if git is *sure* you never made conflicting edits, ( ie: you didn't change the same lines ), sometimes git is smart enough to just interleave the files automatically and pick both sets of changes.
22:53 willthechill oh okay well yes we did NOT edit the same lines
22:53 willthechill we edited different subroutines within the same file
22:54 kentnl yeah. Under a rebase/merge, you'll get both sets of changes, in all likelihood
22:55 willthechill okay so you mean it WILL "magically" merge together my changes w/ bulk88's changes within the same file
22:55 willthechill great!
22:55 kentnl yeah. Just without that "Destroying edits" problem you were worried about :)
22:56 willthechill sweet
22:56 willthechill okay so again, should I stash here or not stash?
22:56 willthechill sounds like I'm going to get a merge conflict either way, which will (hopefully) be "magically" auto-resolved either way?
22:57 kentnl stash is the easiest for you probably.
22:58 kentnl I hardly ever use the stash because I tend to prefer "just commit it to the working branch and rebase it later"
22:58 kentnl where I use the stash more for things I'm not really done enough to say "This is done"
22:59 willthechill well my edits are "done" in the sense that they are ready to be committed now
22:59 willthechill but I have not yet done a commit
22:59 willthechill so git status shows "changes not staged for commit"
22:59 kentnl Right, in that situation I'd be likely to just commit it, fetch, and then rebase my commits on top of the newly fetched branch. Mostly because most of the time there's no effort needed to make that work.
23:00 kentnl yeah, `stash` is like `commit` in that it only stashes staged ( added ) files.
23:00 kentnl you can change that as well, but I wouldn't. ;)
23:02 willthechill so I would do `git commit -a`  then  `git remote update`  then  `git rebase -i origin/master`
23:02 willthechill ?
23:03 kentnl I personally never use `git commit -a` :).  But yes, at least, that's what I'd do here.
23:04 willthechill okay then what stage will I be at after doing those 3 commands?
23:04 willthechill will github remote master be updated?
23:04 willthechill or only stuff on my local harddrive?
23:05 kentnl local only.  You'd need to re-push that back to github before anyone saw it.
23:06 willthechill so do I need to do anything like make some extra file changes or extra commits before I can issue the push command?
23:07 kentnl nope, you've effectively re-arranged time. You in effect didn't code anything, bulk88 wrote his fixes, he pushed them, you pulled them, then you wrote your fixes, and you hit "commit". <This is where you are now>
23:08 willthechill sweet
23:08 willthechill that is ACTUALLY what I need!
23:09 willthechill I think, haha!
23:09 kentnl and if you failed to re-arrange time in a consistent manner, git will tell you it doesn't want your commits because it will be rejected due to "Non-fast-foward" :)
23:09 willthechill okay good
23:10 kentnl because when you do things without people seeing them, the time it happened in didn't exist. So If you try to tell github "hey, I know you saw this, but here's some stuff that happened before that" ( by analogy ), it will go "TIME PARADOX" :)
23:10 kentnl so as long as you keep the things happening afterwards, github won't reject you.
23:11 kentnl ( you can force time to change outside yourself, but that causes extreme dizzyness in other people )
23:12 willthechill so the 4th and final command should be `git push origin master` ?
23:13 kentnl yep.
23:29 willthechill okay gonna try shortly
23:49 willthechill kentnl: yes it appears to have worked, hooray!  :-D
23:49 willthechill thank you so much
23:49 willthechill kentnl++

| Channels | #perl11 index | Today | | Search | Google Search | Plain-Text | summary