Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
304d3983
Commit
304d3983
authored
Dec 14, 2009
by
Friedemann Kleint
Browse files
Git: Expand commit template relative to repository directory
if it is a relative file specification. Task-number: QTCREATORBUG-451
parent
6cdb58aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/git/gitclient.cpp
View file @
304d3983
...
...
@@ -749,8 +749,12 @@ bool GitClient::getCommitData(const QString &workingDirectory,
d
->
panelData
.
email
=
readConfigValue
(
workingDirectory
,
QLatin1String
(
"user.email"
));
// Get the commit template
const
QString
templateFilename
=
readConfigValue
(
workingDirectory
,
QLatin1String
(
"commit.template"
));
QString
templateFilename
=
readConfigValue
(
workingDirectory
,
QLatin1String
(
"commit.template"
));
if
(
!
templateFilename
.
isEmpty
())
{
// Make relative to repository
const
QFileInfo
templateFileInfo
(
templateFilename
);
if
(
templateFileInfo
.
isRelative
())
templateFilename
=
repoDirectory
+
QLatin1Char
(
'/'
)
+
templateFilename
;
QFile
templateFile
(
templateFilename
);
if
(
templateFile
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
*
commitTemplate
=
QString
::
fromLocal8Bit
(
templateFile
.
readAll
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment