Coder Social home page Coder Social logo

gitter's People

Contributors

bmanolov avatar cbourgois avatar cschorn avatar fabpot avatar gromnan avatar h4cc avatar imdevin567 avatar keradus avatar klaussilveira avatar modess avatar nateeag avatar pimlie avatar saurvs avatar siwinski avatar spantaleev avatar tobya avatar tomzx avatar tribis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitter's Issues

Only load certain amount of commit history

At the moment the FULL commit history is loaded into memory when you do getCommits() -- this can consume a lot of memory on large repositories. It would be cool to be able to pass a time filter to the commit function like getCommits('1 week ago');

git log --since="1 week ago"

Or even better, allow options to be passed:

getCommits(['since' => '1 week ago', 'n' => 20]);

Latest git tag

Hi,
I would like to add getLatestTag method into the Repository class.

Or, getTag method return with Tag class from Repository class, and getAll; getLast methods will be in Tag class.

What do you think about this?

PrettyFormat trips on invalid UTF-8 sequences

The guichan repo (https://code.google.com/p/guichan/) has some log entries which are utf-8 encoded, some which are not. All of these get appended together and the XML encoder has not way to parse the string.

Fixed by adding a single line to getPrettyFormat in Repository.php:

     public function getPrettyFormat($command)
     {
         $output = $this->getClient()->run($this, $command);
         $format = new PrettyFormat;

+        // Remove invalid UTF-8 sequences (which would trip the XML parser)
+        $output = mb_convert_encoding($output, 'UTF-8', 'UTF-8');
         return $format->parse($output);
     }

Gitter uses git command line argument which isn't available in older git versions

In the gitter client on line 134 (https://github.com/klaussilveira/gitter/blob/master/lib/Gitter/Client.php#L134) there is a command line option which isn't available on older git clients.

In my case this was with git 1.7.1, on CentOS release 6.3 (Final). Running git -c on my system gives the same option as the GitList application is given, with the cause located in Gitter, see debug below

Debug

RuntimeException: Unknown option: -c
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]
[-p|--paginate|--no-pager] [--no-replace-objects]
[--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
[--help] COMMAND [ARGS]

  • in /bigdisk/apache_sites/gitlist/gitlist-0.3/vendor/klaussilveira/gitter/lib/Gitter/Client.php line 139
  • at Client->run(object(Repository), 'branch') in /bigdisk/apache_sites/gitlist/gitlist-0.3/vendor/klaussilveira/gitter/lib/Gitter/Repository.php line 162
  • at Repository->getBranches() in /bigdisk/apache_sites/gitlist/gitlist-0.3/vendor/klaussilveira/gitter/lib/Gitter/Repository.php line 194
  • at Repository->hasBranch('master') in /bigdisk/apache_sites/gitlist/gitlist-0.3/vendor/klaussilveira/gitter/lib/Gitter/Repository.php line 403
  • at Repository->getHead() in /bigdisk/apache_sites/gitlist/gitlist-0.3/src/GitList/Controller/TreeController.php line 21
  • at GitList\Controller{closure}('mobidesk.git') in /bigdisk/apache_sites/gitlist/gitlist-0.3/src/GitList/Controller/TreeController.php line 79
  • at GitList\Controller{closure}('mobidesk.git')
  • at call_user_func_array(object(Closure), array('mobidesk.git')) in /bigdisk/apache_sites/gitlist/gitlist-0.3/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 129
  • at HttpKernel->handleRaw(object(Request), '1') in /bigdisk/apache_sites/gitlist/gitlist-0.3/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 73
  • at HttpKernel->handle(object(Request), '1', true) in /bigdisk/apache_sites/gitlist/gitlist-0.3/vendor/silex/silex/src/Silex/Application.php line 509
  • at Application->handle(object(Request)) in /bigdisk/apache_sites/gitlist/gitlist-0.3/vendor/silex/silex/src/Silex/Application.php line 484
  • at Application->run() in /bigdisk/apache_sites/gitlist/gitlist-0.3/index.php line 10

ls-tree in Model/Tree does not exist.

This command is not available, at least not on my system and not on the internet.

Perhaps a variation of 'git ls-tree' was meant here? If so, please check the parameters needed here for the call, because that doesn't work either. the '-l' parameter is not defined, and the call needs a branch name.

When commit merge, file name fail to be set on a Diff

A normal commit has the following line in a diff (if filename is "master")

diff --git a/master b/master

On a merge, this line might be:

diff --cc master

The regex then fails on lib/Gitter/Repository.php line 436

if (preg_match('/^diff --[\S]+ a\/?(.+) b\/?/', $log, $name)) {
    $diff->setFile($name[1]);
}

refactoring branch

What is it refactoring branch?
Is there still some work on it? Or could it be deleted?

Exception: DateTime::__construct(): It is not safe to rely on the system's timezone settings

When trying to view the commits of particular repository in GitList I get this exception:

Exception: DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead

and this trace:

in /var/www/gitlist/vendor/klaussilveira/gitter/lib/Gitter/Util/DateTime.php line 39
at DateTime->construct('@1350996256', null) in /var/www/gitlist/vendor/klaussilveira/gitter/lib/Gitter/Util/DateTime.php line 39
at DateTime->construct('@1350996256') in /var/www/gitlist/vendor/klaussilveira/gitter/lib/Gitter/Model/Commit/Commit.php line 42
at Commit->importData(array('hash' => '513560c083067d258ee92c0caf7da3aa897d38d4', 'short_hash' => '513560c', 'tree' => '587411bbe4a6fd2dbac5e6a3618968f859382eed', 'parent' => 'd455b09ae033b93b1d6da2adfa537ba8fe53f1c8', 'author' => 'Jasper Lievisse Adriaanse', 'author_email' => 'jasper@localhost', 'date' => '1350996256', 'commiter' => 'Jasper Lievisse Adriaanse', 'commiter_email' => 'jasper@localhost', 'commiter_date' => '1350996256', 'message' => 'moved to branches/$release/sites/')) in /var/www/gitlist/src/GitList/Git/Repository.php line 31
at Repository->getPaginatedCommits('master', '0') in /var/www/gitlist/src/GitList/Controller/CommitController.php line 21
at GitList\Controller{closure}('scripts', 'master', '')
at call_user_func_array(object(Closure), array('scripts', 'master', '')) in /var/www/gitlist/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 129
at HttpKernel->handleRaw(object(Request), '1') in /var/www/gitlist/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 73
at HttpKernel->handle(object(Request), '1', true) in /var/www/gitlist/vendor/silex/silex/src/Silex/Application.php line 509
at Application->handle(object(Request)) in /var/www/gitlist/vendor/silex/silex/src/Silex/Application.php line 484
at Application->run() in /var/www/gitlist/index.php line 10

my php.ini has:

;date.timezone =

This happens on OpenBSD 5.2 with 5.3.17 with the Suhosin patch applied.

Adding this to Gitter/Util/DateTime.php on line 39 fixes the issue for me:

date_default_timezone_set('UTC');

Error 500 brought by "PHP Fatal error: Cannot use 'Object' as class"

Hello,
apparently php 7.2.2 brings this type of errors to the server:

PHP Fatal error: Cannot use 'Object' as class name as it is reserved in /usr/share/webapps/gitlist/vendor/klaussilveira/gitter/lib/Gitter/Model/Object.php
I googled a bit and found this to be not unique to gitlist, for instance:
unclead/yii2-multiple-input@7b79bfa

I tried to follow the solution as featured on the git commit above on the following files:
gitter/lib/Gitter/Model/Commit/Commit.php
gitter/lib/Gitter/Model/Tree.php
gitter/lib/Gitter/Model/Blob.php
and renamed
gitter/lib/Gitter/Model/Object.php -> gitter/lib/Gitter/Model/BaseObject.php

and got it to half work. I was able to navigate the git commits and history but I was not able to retrieve files directly.

Thanks for this software, this were just my two cents on the issue.

Filenames that include characters that need escaping on command lines fail to display contents.

The git repos contains files named like index(0).html. The file names display correctly when the enclosing directory is selected but the contents are not displayed neither pretty print nor raw.

screen shot 2018-10-31 at 12 13 13

screen shot 2018-10-31 at 12 13 44

gitter_issue_web_source.tar.gz

After pressing 'blame' button
screen shot 2018-10-31 at 11 49 05

After pressing the 'patch log' button
screen shot 2018-10-31 at 11 50 17

Note the proliferation of the '\' character

I wondered if the problem was caused by the %5c%280%5c%29 string not being translated into ascii characters but I tried using urldecode() in Blob.php to no avail.

Repository::getCommit is not generating xml properly which then causes a fatal error.

On line 393 of /lib/Gitter/Repository.php the follwing terminal command is generated:

git show --ignore-blank-lines -w -b --pretty=format:"%H<short_hash>%h</short_hash>%T%P%an<author_email>%ae</author_email>%at%cn<commiter_email>%ce</commiter_email><commiter_date>%ct</commiter_date>" 452942534f9edfa02cc914964d3fecce451c6d81

It should assign a string of xml tags to the $logs variable.

Lines 397 to 401 appear to turn these xml tags into an array. And then that array is given to $commit->importData on line 407.

I am getting a fatal error:
Catchable fatal error: Argument 1 passed to Gitter\Model\Commit\Commit::importData() must be of the type array, null given, called in lib/Gitter/Repository.php on line 407

If I take the terminal command responsible for generating the $logs variable and run it in my terminal I do not get any xml tags in the output.

This in turn causes the rest of the code to fail.

Undefined index: ini.file

Hi there,

I'm using Gitter though composer on a Laravel app. Everything seemed to go fine in the installation except this error I'm getting:

Undefined index: ini.file

The error points to this line:

$this->inifile = $options['ini.file'];

What should I do to overcome this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.