Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
8a5c78d03493
Commit
8a5c78d0
authored
Oct 27, 2015
by
Douwe Maan
Browse files
Reset memoized project repository when path changes
parent
cc4c9fed3aed
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
8a5c78d0
...
...
@@ -647,6 +647,7 @@
gitlab_shell
.
mv_repository
(
"
#{
old_path_with_namespace
}
.wiki"
,
"
#{
new_path_with_namespace
}
.wiki"
)
send_move_instructions
(
old_path_with_namespace
)
reset_events_cache
@repository
=
nil
rescue
# Returning false does not rollback after_* transaction but gives
# us information about failing some of tasks
...
...
app/views/projects/edit.html.haml
View file @
8a5c78d0
...
...
@@ -24,6 +24,6 @@
.col-sm-10
=
f
.
text_area
:description
,
placeholder:
"Awesome project"
,
class:
"form-control"
,
rows:
3
,
maxlength:
250
-
if
@project
.
repository
.
exists?
&&
@project
.
repository
.
branch_names
.
any
?
-
unless
@project
.
empty_repo
?
.form-group
=
f
.
label
:default_branch
,
"Default Branch"
,
class:
'control-label'
...
...
@@ -28,6 +28,6 @@
.form-group
=
f
.
label
:default_branch
,
"Default Branch"
,
class:
'control-label'
.col-sm-10
=
f
.
select
(
:default_branch
,
@repository
.
branch_names
,
{},
{
class:
'select2 select-wide'
})
.col-sm-10
=
f
.
select
(
:default_branch
,
@
project
.
repository
.
branch_names
,
{},
{
class:
'select2 select-wide'
})
=
render
'shared/visibility_level'
,
f:
f
,
visibility_level:
@project
.
visibility_level
,
can_change_visibility_level:
can_change_visibility_level?
(
@project
,
current_user
),
form_model:
@project
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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