« first day (1 day earlier)      last day (366 days later) » 

12:07 AM
@Izzy Already did. I also pulled your commits into a matching branch on my fork and installed the result. We both have nearly identical branches now but they autoupdate off of whoever you install from.
Appears to be working.
I propose we get per site remote URLs working before trying to get this merged upstream. Then it would be really useful for other sites.
 
@Caleb I never noticed any auto-update happen. That would have destroyed my adjustments. I started implementing with v1.2.8, and one day noted master had moved to 1.3.0 already. I still had 1.2.8.
@Caleb Good point. We still can leave a note on StackApps for people interested in "early birds".
 
@Braiam @Izzy Biaiam is right about this. Pushing often is no sweat off your back, the only gotcha is that in the case of a public repo like this it gives others access to the commit set. If they pull it over anywhere that can make it hard to change you commits.
Up until they are in somebody elses hands you can refactor your commits any way you like. Once somebody else has them, they will kill you if you go mucking around it your commit history and suddenly they have merge conflicts on stuff they already merged.
 
Which reminds me, I should place a comment on bmdixon's https request before Benjol does the work again :)
 
@Izzy certainly
@Izzy How are you managing your user scripts?
@Izzy Beat you to it.
 
@Caleb 100% – I'd do the same :)
 
12:14 AM
It's starting to got untangled!
 
@Caleb ??? I was working on the copy I used. On multiple machines even.
 
Well I think we've suffed you full of more than a basic intro to git, and it's past my bed time.
@Izzy I meant in your browser.
 
@Caleb What about Oliver's branch? Looked like something useful, too.
 
@Izzy I was just looking at that.
 
@Caleb Don't know what you mean. Can't remember any update notifications for that script; but might well be I just ignored them since I knew it would destroy my work.
@Caleb Fast-inserts and some stylish stuff.
 
12:18 AM
Greesemonkey? Tampermonkey?
 
@Caleb Ah! Scriptish.
 
It merges nicely onto my branch, one second and I'll push.
And it works.
 
OK. So it should merge nicely into mine as well. Or should I wait until it comes "via upstream"?
 
@Izzy If you use gits merge tools it won't matter because it keeps track of what commits are in what branches already. Just don't make the same changes manually and commit them yourself.
 
@Caleb That I want to avoid. So if I want to pull that in, what would I have to do – and is it revertible if I don't like the results?
Oh, you already did that ("plus_pretty")
 
12:36 AM
> git checkout -b <new branch name>
git remote add benjol git@github.com:Benjol/SE-AutoReviewComments.git
git fetch benjol
git merge benjol/oliversalzbur
git push -u origin <new branch name>
After you do that notice that you will be on a new branch locally. You can toggle back to your other one with:
> git checkout per_site_comments
 
I'll try to understand what you're proposing. Already thought something like branch-switching might be involved... So <new branch name> would be that "pretty" one?
Or a new one locally?
 
@Izzy Yes. And since you are on your per_site_comments right now, branching will use that as a starting point.
The you are telling git about benjol's repo and using the onliersalzburg branch I left over there and merging all the commits from it into your (new) branch.
:14005582 No. Unlike svn that keeps heavy copies when you tag or branch (both actually copy operations), git is all smoke and mirrors super lightweight pointers to the same data in different views.
You can easily delete branches once you are done fiddling with a feature and either discard it or merge it into wherever it belongs.
 
So basically I...
1. create a new copy of my branch (`git checkout -b <new branch name>`)
2. tell git there's another source I'd like to use (`git remote add benjol ...`)
3. ...and to ??? (`git fetch benjol`)
4. ...and to merge in changes from its branch (`git merge benjol/oliversalzbur`)
5. finally I make the results available to everyone interested (`git push -u origin <new branch name>`
Correct?
And in #5, I could specify my original branch as origin if I'm sure I don't need all that stuff separately?
 
@Izzy Yes. 3 just tells git to download a local copy of the stuff available at the remote you added in 2.
You can actually combine 3 and 4. git pull is basically git fetch + git merge. I did it separately here because if anything goes wrong it's easier to figure out which step was failing.
@Izzy Yup, you got it.
 
@Caleb Whoa – great!
Lemme copy that above.
 
12:48 AM
@Izzy If you do that, you should probably delete your local branch for it too so you don't ever push from it again and backtrack the server. It will warn you (note the -f flag I had you use when you fixed those commits that you'd already pushed was to force suppress those warnings) but all the same its nice to clean up.
 
@Caleb ugh, that's too much for me today. Guess I better skip that before I start messing up and lose my sleep. 2am here already...
For today, I'm glad I learned...
- to start with a fresh clone
- modify/add/commit locally
- push to the central repo
More another day :)
 
OK, night for know. Can no longer concentrate.
@Caleb feel free to ping me if there's something I need to do :)
 
 
1 hour later…
2:16 AM
So.. Is there a reason I'm here? :)
 
 
3 hours later…
5:30 AM
OK, let me read
 
5:43 AM
@Caleb. Yesterday I did a bit of filter-branching....
So now all those commits have lovely comments.
There's just a tiny problem...
... I also put a comment on the initial commit.
And you know what that means...
Some other questions:
- I must admit to never having used the remote option (apart from testing a bit), but in my mind it was *can* be per site. (The whole *point* of remote was that it's not possible to share localStorage across different sites, so giving the remote option meant that you only have to set the remote url on each site, and then you can hack on one source for all sites.) That said, if you *do* want a unique source AND you want to differentiate per site, then you will need Izzy's change. I'm just worried that it adds an extra permutation to the available functionality which wil
- I'm wondering about how you could continue to have you personal branches with your hacks and also keep auto-updating working. I guess you could also modify the update url in your versions, but then you would have to rely on github to tell you when I've done a new version... Otherwise you keep my github url, but have to manually update your scripts to your browser. (And one should also consider other people who may be using your versions).
- @Izzy, thanks for the pull request. I've not yet accepted, because I'm wondering whether it deserves a version number change or not...
Anyways, I'm around for the next ~9 hours on and off, so feel free to ping me.
 
6:52 AM
@Benjol That's what Caleb suggested as well, and what our feature-branches currently do (have the update URLs point to our respective repos)
@Benjol You can change that part if you feel so. I've got a little lost with all the magic Caleb applied yesterday, and must admit to have been "flying blind" for most of the stuff I did.
Basically, that pull request just makes the script fit for https URLs.
 
7:14 AM
@Izzy, yes I'm going to need a magician to guide me through putting my 'mess' straight as well
 
@Caleb So 2 questions on that: 1) How would I do that? I know we already did it at one point yesterday – but as I wrote to Benjol, I was rather "flying blind" then. 2) I probably could save myself that step if I kept staying in my branch (omitting step 1). But then, how to revert changes if things go awry? Does a simple "git reset" (or "git reset --hard" – in case of a successful merge where I don't like the results, probably rather "git reset --hard HEAD~1") after the merge undo that?
@Benjol Yeah, I can't blame you :) I just know it's possible, because that's something I've explicitly asked Caleb yesterday.
As you can see from what just took me ~15min to write (the message immediately before my last one to you), I'm still in the process to understand how quite basic things work. I used CVS for a long time, then SVN for years already. But 1) git is something different, and 2) I rarely played with branching/merging in the past either...
 
7:41 AM
"I used CVS & SVN" then "I rarely played with branching/merging"
Kind of logical :D
 
@Benjol Huh? I used branches. But usually those were "compatibility branches" when trunk "moved on", and they were rarely merged back into trunk (only the other way around: some bug fixes I back-ported).
Difference is: with CVS/SVN you had one repository to care about. With git, there's the "central repository", your local copy, and then maybe a ton of other "central repositories" where you want to pick "feature branches" from to merge you a** off. And that complexity is scaring the sh*t out of me #D
 
7:59 AM
@Izzy I've been using git for ages, but only ever on my own (I don't know anyone else who uses it!), so I have the same learning curve as you on that front. But it's why micro-commits are handy. Makes it easier to pick and choose the bits you want
 
8:09 AM
@Benjol One of the reasons Caleb guided me to that pull request before merging in the main stuff :)
 
8:30 AM
@Benjol I do. And I'll hely Izzy through the pain. But I don't see the changes in your github repo yet. Did you do a push yet? (you'll have to use -f)
 
@Caleb, I didn't push yet, precisely because I didn't want to inflict pain on anyone without their assent. My first worry was how to fix all the other branches you made. I can't merge them anymore, because there's no common ancestor...
 
@Benjol Can you push to a separate branch at let me have a look (git push origin filterd_comments or something like that)?
 
I can try :)
I run that command off my master?
 
@Benjol Or from whatever local branch you did your munging around in, yes.
It should leave the master branch in the repo alone for now and make a new branch to push to.
 
hm, do I need a -f?
src refspec filtered_comments does not match any
 
8:41 AM
@Benjol No because it should be pushing to a clean branch
Hm.
 
@Caleb sorry
 
Sure try -f.
Looks like that might be a sanity check github is doing in a pre-push hook that could be side stepped with --no-verify, but not sure.
 
do you want me to try?
 
If you run git commit from your master right now does it come up with anything to do?
Actually try naming your local branch to match first.
> git checkout -b filtered_comments
git push -u origin filtered_comments
 
weirdly, it says I've got differences, but my visual tool (SmartGit) can't see any
(in answer to your question about committing)
is that because it's seeing differences with origin?
 
8:49 AM
@Benjol Ya kind of expected that.
It's a matter of the reflog needing a new pointer, not of a file having been changed.
 
okaaaaay...?
well, I did change branch
but I'm guessing that's not going to help with pushing if I've got reflog problems?
 
@Benjol A commit should fix that.
 
ok, but what do I 'say' in the commit? Won't it look empty?
 
@Benjol -m "finished munging commit comments"
 
(Sorry for my aesthetic qualms, but now I've got all my lovely commit messages lined up in a row...:))
 
8:53 AM
@Benjol If it really comes through with nothing attached we can rebase and squash it.
 
690 insertions/690 deletions :)
 
@Benjol Ya I'm a bit OCD myself so I know the feeling.
@Benjol LOL, oh that's useful.
 
ok
done
 
Got it already.
 
9:06 AM
@Benjol Ok these version comments are worth keeping (much with the pretty) but it's going to take me a minute to figure out how to rebase the other branches on this. I'm now pushing the limits of my git experience here.
 
@Caleb, we're all learning, I guess :)
 
@nickwilde You around?
 
When I tried, because there was no common root, it couldn't do the merge, so it was a bit similar to that 690/690 commit above
 
yesterday, by Nick Wilde
If anyone has any questions that the docs don't immediately make apparent feel free to msg or email me
@Benjol True. But I know there is a way to do this. I'll hack on it until it's fixed or I run out of hack time, whichever comes first.
 
google git "grafts"?
@Caleb filter-branch with --parent-filter looks promising (and scary!)
 
9:17 AM
@Benjol I don't think that's want.
@Benjol Hmm, maybe. The thing is we don't need to even save the original history of master, we basically just need to bootstrap our other branches to take off on this instead.
58
A: Setting git parent pointer to a different parent

AmberUsing git rebase. It's the generic "take commit(s) and plop it/them on a different parent (base)" command in Git. Some things to know, however: Since commit SHAs involve their parents, when you change the parent of a given commit, its SHA will change - as will the SHAs of all commits which com...

I think this is the sort of thing we need.
 
yeah, except that there's no common parent...
 
9:50 AM
@Benjol Got it!
 
@Caleb, I'm not far off myself, but go on
spill the beans :)
 
So the thing to do is use your new branch as canonical. I squashed that last commit to clean up the history, then went to one of my feature branches and rebased it on the now like by splicing it the new parent id it place of the old one, for example:
> git rebase --onto d71bd0822b34a9d326dbe8e81f888e0965daf86a 772e70e4ed0f38bb18ec827b9e69b483b3e401fc test2
 
ok... and it didn't mind the fact that there was no common ancestor?
 
test2 being my local feature branch and those SHA's being the new id I want to mark as the parent in place of an old id.
 
are you sure it didn't just 'squash' everything?
 
9:55 AM
@Benjol It's telling it exactly where to adopt the tree as its ancestor, so no.
 
FWIW, I just tried `git filter-branch -f --parent-filter 'sed "s/./-p NEWPARENTSHA"' COMMITTOMOVESHA
 
@Benjol yup.
 
which seems to work ok, but wouldn't if there was more than one commit to move. It has the advantage (I think) of not changing the commit date
but that doesn't move your merge, mind you
it just moves Julian-O's modification from the old branch to the same place on the new one.
I don't know which is better/worse
 
@Benjol My commit log has correct dates all the way back.
 
sounds good
so.... next step? :)
Should I just give you write permissions on my repo?
 
9:58 AM
@Benjol You already did.
 
ah?
ok
 
If you like I can rotate this unto your master and rebase the other branches on it.
 
ok, I'd be interested to know if there's any difference in the end result between the rebase and the filter-branch
did you rebase your merges as well then?
 
@Benjol Honestly I'm not sure filter-branch will leave the feature branches in a clean state. Mind you I'm not sure it doesn't either.
 
I'll try in a little sandbox
just for my own education
While I'm playing, I'll let you do the man's work, if you don't mind :)
 
10:05 AM
Ok working on it.
 
10:19 AM
@Benjol LOL probably implicitly by one of Master Caleb's magic command lines #D
 
@Benjol Your 690 problem was your editor changed the whole file to windows line endings.
Almost done...
 
oops...
 
10:43 AM
@Benjol Alright your github is all cleaned up.
It was MUCH easier that we were trying to make it. No manual picking SHA's was even necessary!
 
really?
wow
big mess in my local repo, I think I'll just delete and re-clone
 
I have rebased all the other contributor's branches that are leftover from gists against the new master, so you should be able to see "compare and and pull requests" here that make sense.
@Benjol Probably easier at this point. For posterity there is an "old master" branch that has the alternate history form gist, but I don't think it will be needed in the future. Eventually we can probably nuke that too.
 
Just one thing I don't get. If I accept the pull request, where does it get pulled to?
And if I want to check it out first, how do I do that: setup another remote pointing to Izzy?
 
@Benjol Whatever branch the pull request requests. Usually master. You can choose to merge to somewhere else thought.
@Benjol Yes.
> git add remote izzy git@github.com:IzzySoft/SE-AutoReviewComments.git
git fetch --all
Then you can checktout his branches to your local space:
 
@Caleb Okaaay. But would that still work, given that we've recreated master?
And if I do the merge myself locally, will github know that I've 'done' the pull request?
(Sorry, lots of questions)
 
10:53 AM
> git checkout -b <new_local_branch> izzy/<his_branch>
@Benjol Not till he rebases.
@Benjol Not sure. I'm always on the sending end of pull requests. I think you can cherry pick whatever you want by adding him as a remote as above, then manually close the pull request on github.
 
Do you think it's worth a version change, just adding https?
And did you see my question about the urls?
 
> git checkout -b old_master remotes/upstream/master
git push -u upstream old_master
git checkout -b new_master upstream/filtered_comments
git rebase -i HEAD~2
git commit --amend
git rebase --continue
git push -f -u upstream new_master:master
git push upstream --delete filtered_comments
git checkout -b oliversalzburg upstream/oliversalzburg
git rebase new_master
git push -f -u upstream oliversalzburg
git checkout -b TomWij upstream/TomWij
git rebase new_master
git add autoreviewcomments.user.js ; git rebase --continue
 
hm, not happy. I've just put my cherrypick, and it's not got the right email :(
so don't sync just yet, I'll have to roll back
 
That is my full command history for the entire operation minus only the various times I checked the log to make sure it was right.
Note the absense of any SHA's or other magic. Tho only thing you can't see is that before the igt add lines there were some manual conflict resolutions in an editor I had open.
 
The commit dates weren't preserved, but that doesn't bother me muchly (the author dates were)
I've fixed my push error
I just closed the pull request. It's red now, is that bad?
 
11:09 AM
@Benjol Why does it not show him as the author? I think you did that wrong.
Did you use git cherry-pick or manually apply changes?
 
I did cherry-pick
but changed the commit message - could that be it?
 
@Benjol Out of my league again.
I just wonder how that is going to be handled when he rebases now.
@Benjol Nope. Red just means its put to rest.
 
I've updated gist too, and the StackApps question
Have you tried fixing your fork?
 
@Benjol Actually I just tested Izzy's so I could walk him through that. Mine is easy I'd like to base it on his, so first things first.
@Izzy ping when you've got a second for some more dark arts.
 
11:33 AM
@Caleb Trouble is I'm at work now. So no access to my local repo, or command-line tools.
 
@Izzy No worries, whet you're ready. I can either A) walk you through the rebase magic to wire up the new upstream history or B) you can temporarily add me as a contributor to your fork and I'll clean up your branches and you can just do a clean clone later.
 
@Izzy, if you've got time, could you explain why you need the SITE specific thing: is is just to make import/export more portable?
 
I guess, we've to postpone A to later. Won't have much time today, will be home late (we're just in the middle of staging a release here). So to keep things running, B would most likely be the better approach for now.
@Benjol See my Gist with the specific messages. My LQ comment is much different on Android Enthusiasts than it is on SR, as the criteria are much different.
 
@Izzy For B, start here and go to settings on the right, then contributors on the left
 
Next example: There are comments I need on ASE only, and others I need on SR only. If all show up at the same time, no chance they fit on the screen. And actually, picking from 3 different items is easier than having to search for the correct one in a list of 10 :)
 
11:41 AM
@Izzy, but the thing is the comments that you enter are specific to the given site anyway...
that's the bit I don't understand
 
@Benjol But the popup shows them all.
 
@Izzy, it shouldn't
(goes to check)
 
See: Having them all in the format as it has been with your master, all showed up on every site.
 
it doesn't
 
Then I must have hallucinations.
 
11:43 AM
I don't think we're understanding each other. That or something weird is happening for you
If I got to site A and modify the comments (in line or via import/export), that doesn't impact site B
 
@Benjol Let's pause for a minute, so Caleb can walk me through the "contributor" part.
 
@Izzy, no problem.
 
@Caleb Collaborators you mean?
 
@Izzy Ya that.
Sorry I use a couple different platforms and they all call it something different.
 
@Caleb NP :) In there. Now what to put in the box?
sec...
 
11:49 AM
@Izzy my github username: alerque
 
@Caleb Done
 
12:04 PM
@Caleb OK, or is something missing I should do?
 
@Izzy Nope. Your repos are all better now.
Now the local working copy on your home machine is another story. I would blow it all away and start with a new git clone from your github repo.
 
@Caleb Thanks a lot!
@Caleb Will do. Maybe I'll ask you for details then.
@Benjol Just a few more minutes, I'll ping you back when I'm ready for our details.
 
> rm -rf SE-AutoReviewComments
git clone git@github.com:IzzySoft/SE-AutoReviewComments.git
git checkout -b per_site_comments origin/per_site_comments
I think that finally looks sane!
Now we can all get back to work actually developing.
 
12:20 PM
back to our day jobs :)
 
12:30 PM
@Benjol That's unfortunately what occupies me currently...
I'll try to hack in here a description of what I mean by site-(un-)specific, and how it shows here:
 
@Izzy, no worries.
 
1. I do a fresh install of your script.
2. I visit A.SE: All your stored default comments show up.
3. I visit B.SE: The very same.
4. I visit C.SE: Again.
So far, that seems logical. Now there's one comment I like added – but only for A.SE. And another one, but specific to C.SE. And Caleb over there likes my comments, so I export them for him, so he can simply use export/import. What will happen with the two "specific" comments on his import? For which sites they will show up?
 
If by fresh install you mean 'never installed before on this browser, or never used on sites A/B/C', then 1-4 would be expected.
 
That's what my site-specific format deals with: It defines for which site a comment is, or whether it's global. So if Caleb uses my branch, and imports my export, my A.comment shows up only on A and my C.comment only on C for him as well.
 
But if you update the script, any old custom comments should remain
 
12:37 PM
@Benjol Yes.
@Benjol Again, yes.
Trick is the export/import.
 
So it's mostly for sharing that you're interested in this..
 
Or pre-defined defaultComments.
@Benjol Somehow, yes, as I share with myself as well (home/work).
 
Have you ever tried with remote source?
I've never used it for any length of time, but that should be per-site as well
 
So if I add another comment at my home machine, I want to transfer that easily to my other machine at work.
@Benjol I never checked what that was doing. Export/import is much more self-explaining: I see what I export, can even edit that manually, cut'n'paste, and import.
Never got to the roots of what I'd need to do to setup a remote source (JSON? How?)
 
But even with that, you'd still have to manually import site by site
 
12:40 PM
So Export/Import is easily done with any sharing source, be it Gist or some pastebin, so it can be used by everybody.
 
Oh remote source is quite 'easy', in theory.
Open import/export. at the bottom you have a jsonp link
 
@Benjol Huh? Why? What? You mean Export/Import, or remote source here?
 
slow down... you can use import/export to generate the json for you
then you save that wherever you want (i.e. dropbox)
copy the public dropbox link and paste it into the remote dialogue
 
@Benjol Site-wise, so I had to repeat it for each site – or globally, so I can share my profile via multiple machines at once?
 
then choose whether you want it to fetch every time, or manually
You'd have to set the remote source url manually, site by site
but you could (this is true) have a single source location
in which case, yes, you'd need your 'works-for-all-sites' thing
 
12:43 PM
@Benjol OK, that's fine for the "consumer", who always wants to use my "site-specific" stuff. But it's more work for me to always keep that up-to-date.
@Benjol :)
So both don't really contradict, but rather complement each other.
 
I dunno, how can it be more work than having to copy/paste your exported text into every site on every browser on every machine that you use?
(and that, even if you are your only consumer)
 
@Benjol One too much. Not into every site separately. One time per browser, as the site-specific settings are defined by the export format already (§§§abc.stackexchange.com)
So my variant is rather targeted at the use-case "same user working on different machines, and wanting to share the same setup"
For "site-comment-maintainer wants to distribute site-specific changes for A.SE", your remote-source might be the better fit.
 
@Izzy, you'd at least have to do a 'reset' on each site: because it caches the default comments in localstorage
(and that would force you to maintain your comments inside the code of the script)
 
Import/Export does that: Deletes all localStorage desc-* etc.
 
yes but only per site
localStorage is local to the url, not to the browser, unfortunately
I did quite a long detour via trying to create 'global' storage in an iFrame that linked to Stackexchange
but SE couldn't guarantee that it would always be there, so I had to abandon that (and it meant maintaining two separate scripts)
 
12:50 PM
Ooops? Seemed to have worked for me all the time, but that might explain some strangeness I think I had one or two times.
 
I'd encourage you to try out your scenario just to make sure.
 
Oi shit, yes, you're correct (local = localSite), I completely forgot about that!
Coming from the old Greasemonkey originally (which back then used a "local storage" in the browser, which was not site specific), I must have had that in mind...
 
 
5 hours later…
5:39 PM
For @Izzy or anybody else dropping in here that is green with git, this ^^^ article is the best I've seen for covering basic branching best practices.
 
5:56 PM
@Caleb Thanks, bookmarked!
 

« first day (1 day earlier)      last day (366 days later) »