These are chat archives for symengine/symengine

4th
Jun 2015
Sumith Kulal
@Sumith1896
Jun 04 2015 07:34
Or is there a way to convert const Polynomial &a to RCP or vice-versa?
Isuru Fernando
@isuruf
Jun 04 2015 07:38
rcp(a)
and *a
Sumith Kulal
@Sumith1896
Jun 04 2015 09:24
/home/sumith/github/csympy/src/polynomial.cpp:203:41: error: no matching function for call to ‘rcp(const SymEngine::Polynomial&)’
         RCP<const Polynomial> pa = rcp(a);
I'm getting the above error, any help?
Sumith Kulal
@Sumith1896
Jun 04 2015 10:10
I have pushed mul_poly() and some other new methods in my recent commit to sympy/symengine#454. You could have a look.
A lot of unnecessary files have been introduced, any help on how to remove them from the commit?
Isuru Fernando
@isuruf
Jun 04 2015 10:11
git rm /path/to/file
In the future when adding files, avoid git add --all and do it one by one, so that unnecessary files are not added.
Sumith Kulal
@Sumith1896
Jun 04 2015 10:15
Yeah
Updated, now the overall changes look a lot cleaner https://github.com/sympy/symengine/pull/454/files
Sumith Kulal
@Sumith1896
Jun 04 2015 12:40
@isuruf All the changes suggested have been taken care of.
For the rebase, will this work?
git checkout poly_init
git merge master
Isuru Fernando
@isuruf
Jun 04 2015 13:21
yes
it won't rebase, but a merge is fine too
Sumith Kulal
@Sumith1896
Jun 04 2015 13:22
Already merged commits won't be introduced right?
Isuru Fernando
@isuruf
Jun 04 2015 13:22
yes
Sumith Kulal
@Sumith1896
Jun 04 2015 13:23
Because in the past, I have done some unclean rebases, just checking :smile:
Amit Kumar
@aktech
Jun 04 2015 13:23
But the above command will give you:
Automatic merge failed; fix conflicts and then commit the result.
Sumith Kulal
@Sumith1896
Jun 04 2015 13:24
Okay, so any interactive way out?
Amit Kumar
@aktech
Jun 04 2015 13:24
git mergetool should do it in a better way.
I am downloading dependency for it as of now.
@isuruf any better way?
@Sumith1896
I think, you need to install kdiff3 and meld for mergetool to work.
Isuru Fernando
@isuruf
Jun 04 2015 13:32
kdiff3 is okay if you want an interactive way
Btw, @Sumith1896, git repo with your PR is 18MB compared to the total size 2MB before
Sumith Kulal
@Sumith1896
Jun 04 2015 13:35
Ohh man, I have no clue how it happened.
Give me sometime to figure it out
Isuru Fernando
@isuruf
Jun 04 2015 13:36
That's because even though you removed the binary files in a later repo, they are still there in the history
Isuru Fernando
@isuruf
Jun 04 2015 13:53
@Sumith1896 let me know if you need help with git
Sumith Kulal
@Sumith1896
Jun 04 2015 13:54
Once kdiff3 is installed, how to I merge it?
Guide tells to use git mergetool -t kdiff3, but where do I mention master here?
Isuru Fernando
@isuruf
Jun 04 2015 13:57
you have to first merge and then use mergetool, but there's only a small conflict, you should be able to do it by hand
Sumith Kulal
@Sumith1896
Jun 04 2015 13:58
Okay I'm on it. I was a bit reluctant as this is a big PR.
Isuru Fernando
@isuruf
Jun 04 2015 13:59
Btw, before merging you should remove those binary files from history
after merging it's going to be a bit tricky to remove the binary files
Sumith Kulal
@Sumith1896
Jun 04 2015 14:07
I understand that filter-branch does this
Isuru Fernando
@isuruf
Jun 04 2015 14:07
or git rebase -i commit and then editing the commit manually
Sumith Kulal
@Sumith1896
Jun 04 2015 14:08
But that should be done commit by commit
git filter-branch --index-filter \
    'git rm --cached --ignore-unmatch path/to/mylarge_50mb_file' \
    --tag-name-filter cat -- --all
rm -Rf .git/refs/original       # careful
git gc --aggressive --prune=now # danger
was suggested in this SO answer: http://stackoverflow.com/questions/8740187/git-how-to-remove-file-from-historical-commit
Looks a bit painful though
Isuru Fernando
@isuruf
Jun 04 2015 14:09
yeah, it should work
Sumith Kulal
@Sumith1896
Jun 04 2015 14:10
How should I change these commands for my scenario?
Isuru Fernando
@isuruf
Jun 04 2015 14:12
git filter-branch --index-filter \
'git rm --cached --ignore-unmatch .gitignore.swn' \
--tag-name-filter cat -- --all
Sumith Kulal
@Sumith1896
Jun 04 2015 14:23
I need to do this for all files, right?
Isuru Fernando
@isuruf
Jun 04 2015 14:23
yes
Sumith Kulal
@Sumith1896
Jun 04 2015 14:23
Once I am done, what about the last two commands?
Isuru Fernando
@isuruf
Jun 04 2015 14:24
that's to reduce the size in your local repo, that's not necessary
Sumith Kulal
@Sumith1896
Jun 04 2015 14:25
Okay, I'll let you know once I'm done
Sumith Kulal
@Sumith1896
Jun 04 2015 14:33
Doesn't seem like the size has changed, I did this for all the binary files
Isuru Fernando
@isuruf
Jun 04 2015 14:35
Can you push it into another branch in github?
Sumith Kulal
@Sumith1896
Jun 04 2015 14:37
Should I branch out from poly_init and push the new branch to github?
Isuru Fernando
@isuruf
Jun 04 2015 14:37
yes
Isuru Fernando
@isuruf
Jun 04 2015 14:39
It's reduced now. Thanks
Sumith Kulal
@Sumith1896
Jun 04 2015 14:40
So is even the poly_init reduced or only the new branch poly2?
Isuru Fernando
@isuruf
Jun 04 2015 14:41
poly2 only. You need to push the changes into poly_init as well
Ondřej Čertík
@certik
Jun 04 2015 14:41
Thanks @isuruf for helping @Sumith1896 with git and other issues.
Sumith Kulal
@Sumith1896
Jun 04 2015 14:43
poly2 was branched from poly_init no changes done.
They both were pushed as it is to remote, why is that poly_init not changed in size?
Isuru Fernando
@isuruf
Jun 04 2015 14:44
Oops, I missed your changes into poly_init. They are the same now
Sumith Kulal
@Sumith1896
Jun 04 2015 14:44
Cool, so all I now have to do is merge master, right?
Isuru Fernando
@isuruf
Jun 04 2015 14:49
If possible, remove this commit which has no changes, Sumith1896/csympy@9f67a42
Sumith Kulal
@Sumith1896
Jun 04 2015 14:50
Yes. In that commit previously, I had removed the executables, now this commit needs removal.
Sumith Kulal
@Sumith1896
Jun 04 2015 15:30
@isuruf Just out of curiosity, how do you check the size of a repo/branch?
Isuru Fernando
@isuruf
Jun 04 2015 15:31
Fresh clone
When I checked out your branch it downloaded 16MB, that's why I noticed
Sumith Kulal
@Sumith1896
Jun 04 2015 15:31
Thanks
Sumith Kulal
@Sumith1896
Jun 04 2015 16:43
Looks like Travis is back up!
Sumith Kulal
@Sumith1896
Jun 04 2015 17:02
git reset 9f67a42 --hard
git push -f
Will the above work to remove the unnecessary commit?
Isuru Fernando
@isuruf
Jun 04 2015 17:17
Nope.
Isuru Fernando
@isuruf
Jun 04 2015 17:34
git filter-branch -f --prune-empty
Sumith Kulal
@Sumith1896
Jun 04 2015 17:46
Thanks @isuruf for all the help today
The PR is ready, unless there are any other suggestions.