schacon/ticgit

ticgit on archlinux

svenkeidel opened this issue · 4 comments

I had a few issues, using ticgit on arch:

I installed it via gem.
Here are some of my system informations which could be relevant:

$ ruby --version 
1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
$ gem --version
1.8.11
$ git --version
1.7.7
$ gem list
...
git (1.2.5)
haml (3.1.3)
rubygems-update (1.8.11)
sass (3.1.10)
sinatra (1.3.1)
TicGit-ng (1.0.2.9)
...

If I run ti in a non-git folder, I get the following error:

/home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:235:in `puts': private method `puts' called for nil:NilClass (NoMethodError)
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:30:in `rescue in initialize'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:23:in `initialize'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:14:in `new'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:14:in `parse'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:9:in `execute'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/bin/ti:13:in `<top (required)>'
    from /home/sven/.gem/bin/ti:19:in `load'
    from /home/sven/.gem/bin/ti:19:in `<main>'

If I setup a new git repos and run the ti command inside:

/home/sven/.gem/gems/git-1.2.5/lib/git/lib.rb:153:in `block in process_commit_data': undefined method `[]=' for nil:NilClass (NoMethodError)
    from /home/sven/.gem/gems/git-1.2.5/lib/git/lib.rb:135:in `each'
    from /home/sven/.gem/gems/git-1.2.5/lib/git/lib.rb:135:in `process_commit_data'
    from /home/sven/.gem/gems/git-1.2.5/lib/git/lib.rb:93:in `full_log_commits'
    from /home/sven/.gem/gems/git-1.2.5/lib/git/log.rb:108:in `run_log'
    from /home/sven/.gem/gems/git-1.2.5/lib/git/log.rb:101:in `check_log'
    from /home/sven/.gem/gems/git-1.2.5/lib/git/log.rb:84:in `each'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/base.rb:25:in `map'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/base.rb:25:in `initialize'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng.rb:46:in `new'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng.rb:46:in `open'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:24:in `initialize'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:14:in `new'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:14:in `parse'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/lib/ticgit-ng/cli.rb:9:in `execute'
    from /home/sven/.gem/gems/TicGit-ng-1.0.2.9/bin/ti:13:in `<top (required)>'
    from /home/sven/.gem/bin/ti:19:in `load'
    from /home/sven/.gem/bin/ti:19:in `<main>'

If this isn't a general problem, I could fix some of these problems.

Greetings Sven

Hi, thanks for filing the issue about this :)
I'll see if I can replicate this issue on an Arc VM and fix this, I'll post back when I have something news-worthy..

Ok, I could fix the second issue and some more by turning off the git colors. i had a [color] ui = always in my gitconfig. If i turn it off, all specs pass.

I debugged some rspecs (with colors turned on) and inspected, that the branchnames contains the shell color sequences: \e[32mmaster\e[m. If I turn the colors off, i get the plain master branchlable. I open a new Issue for the color topic.

Is there a way to turn off the colors in the git gem interface when fetching the informations?

Greetings Sven

P.S.: the first bug still exists.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hmm.. I'm not sure if there's a way to disable colors from the git gem
interface, but the first thing that comes to mind for me is to just
try to strip out the special characters, there must be an easy to way
to recognize an strip them.

On 11-10-14 7:55 AM, Sven Keidel wrote:

Ok, I could fix the second issue and some more by turning off the
git colors. i had a [color] ui = always in my gitconfig. If i
turn it of all specs pass. But there must be a way to use ticgit
with colors.

I debugged some rspecs (with colors turned on) and inspected, that
the branchnames contains the shell color sequences:
\e[32mmaster\e[m. If I turn the colors off, i get the plain
master branchlable.

Is there a way to turn off the colors in the git gem interface when
fetching the informations?

Greetings Sven

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6Yi2kACgkQoAi0Ar0kfbgVdgCgvoxBOzarxz0eGEGprayHti3R
PxAAnjkVePJ5dhnfJ5Yhr7bh1sRBEAbL
=0TuN
-----END PGP SIGNATURE-----

This issue was addressed and closed as Issue #36 in JeffWelling/ticgit ( jeffWelling#36 )

If this bug persists for you, please re-open this bug or the bug on jeffWelling/ticgit. Thanks :)