プロジェクト

全般

プロフィール

Vote #70437

未完了

git shell out hangs if commit message is too long

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
-
開始日:
2011/07/28
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
0
issue_org_id:
8940
author_id:
4
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
35
ステータス-->[New]

説明

Redmine Version: 1.2.1
Git Version: 1.6.3.3

When running Repository#fetch_changesets on a Git repository, it will shell out to get the comments for the changeset. It runs something like:

git --git-dir /home/example/git/example.git log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller --reverse 4e6f0873e74e2db0e9f5825dad73ff2e66ae264a..master

By default @git log@ uses the the default system pager (@more@?). If the message is longer than a "page", the shellout command will land in the pager and hang there forever.

You can set the GIT_PAGER=cat environment variable but it's unclear in the SCM adapter how to set environment variables. Another workaround is to have the user set the user's core.pager to @cat@ in the ~/.gitconfig.

For my own fork (https://github.com/cramerdev/redmine/commit/acb0d46242f0aebfbac2a89fa670190c6aac42db) I sent the environment variable directly to the @cmd@ variable set by IO.popen, but this is an ugly hack and it would be better if there were an easy way to set environment variables in the SCM adapters. Is there?

Admin Redmine さんが約2年前に更新

  • カテゴリSCM_3 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0