-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Features/linguist #1410
Features/linguist #1410
Conversation
@@ -9,4 +9,8 @@ do | |||
pwd=`pwd` | |||
reponame=`basename "$pwd" | cut -d. -f1` | |||
env -i redis-cli rpush "resque:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$reponame\",\"$oldrev\",\"$newrev\",\"$ref\",\"$GL_USER\"]}" > /dev/null 2>&1 | |||
# export GIT_WORK_TREE variable for Language detection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How GIT_WORK_TREE helps for the Language detection? I do not see the relation. Can you explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Git bare repo didn't have repo's source code in the file system.
If we have a GIT_WORK_TREE
variable, the work tree will be there. just like a unbare repo.
Linguist works will unbare repo(work tree).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have sattelite repo. Maybe we use it instead of patching hook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@randx If we use satellite repo , I think we should keep the satellite repo up to date.
Satellite repo didn't pull unless it has a merge request and do merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah you right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'll handle it. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more question. Does it increase repositories size 2x? As i understand we keep bare repo and normal one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets chant in campfire?
|
||
# Update project's language field | ||
update_attributes(language: detect_repo_language) | ||
|
||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's only update attributes once. Change the default branch line to just be self.default_branch = discover_default_branch
, then change yours to self.language = detect_repo_language
, then add a save
call at the bottom.
Tried this out, issue with Resque
|
close this issue now, I'll send a new PR next week.. I was been busy these days. |
use github-linguist to instead of gitlab linguist.
add detect language feature.
Important:
post-receive
need to exportgit_work_tree
variable. that is why we can detect language.projects added a
language
field. the default language isPlain Text
Next:
we can checkout
gl-pages
branch to a folder too. so , we can have our gitlab pages!.