Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
304d3983
Commit
304d3983
authored
15 years ago
by
Friedemann Kleint
Browse files
Options
Downloads
Patches
Plain Diff
Git: Expand commit template relative to repository directory
if it is a relative file specification. Task-number: QTCREATORBUG-451
parent
6cdb58aa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/git/gitclient.cpp
+5
-1
5 additions, 1 deletion
src/plugins/git/gitclient.cpp
with
5 additions
and
1 deletion
src/plugins/git/gitclient.cpp
+
5
−
1
View file @
304d3983
...
@@ -749,8 +749,12 @@ bool GitClient::getCommitData(const QString &workingDirectory,
...
@@ -749,8 +749,12 @@ bool GitClient::getCommitData(const QString &workingDirectory,
d
->
panelData
.
email
=
readConfigValue
(
workingDirectory
,
QLatin1String
(
"user.email"
));
d
->
panelData
.
email
=
readConfigValue
(
workingDirectory
,
QLatin1String
(
"user.email"
));
// Get the commit template
// Get the commit template
const
QString
templateFilename
=
readConfigValue
(
workingDirectory
,
QLatin1String
(
"commit.template"
));
QString
templateFilename
=
readConfigValue
(
workingDirectory
,
QLatin1String
(
"commit.template"
));
if
(
!
templateFilename
.
isEmpty
())
{
if
(
!
templateFilename
.
isEmpty
())
{
// Make relative to repository
const
QFileInfo
templateFileInfo
(
templateFilename
);
if
(
templateFileInfo
.
isRelative
())
templateFilename
=
repoDirectory
+
QLatin1Char
(
'/'
)
+
templateFilename
;
QFile
templateFile
(
templateFilename
);
QFile
templateFile
(
templateFilename
);
if
(
templateFile
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
if
(
templateFile
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
*
commitTemplate
=
QString
::
fromLocal8Bit
(
templateFile
.
readAll
());
*
commitTemplate
=
QString
::
fromLocal8Bit
(
templateFile
.
readAll
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment