Comments (6)
Sounds like a good idea. Currently you may be able to do this for remote by advising git-link
(untested):
(defadvice git-link (aroud git-link-remote-lookup first nil activate)
(let ((git-link-default-remote (your-lookup-funtion (git-link-repo-root))))
ad-do-it))
But that doesn't handle branch, which currently can't be set.
How would you expect to map repo to branch/remote? Per buffer via buffer local variables, a callback, prompted by prefix call to git-link
? What would be the key used to lookup mapped brach/remote?
from git-link.
Can we configure default remote (origin/upstream) (& branch also) at repository level
Ah, I think you're saying that you'd like to be able so do something like this:
git config --local --add git-link.remote some-remote
git config --local --add git-link.branch some-branch
Good idea. Please confirm.
from git-link.
@sshaw Sorry for replying late. But this is exactly I want 😄
from git-link.
@prathamesh-sonpatki checkout the git-based-config branch. It gives priority to the the branch and remote given by git config git-link.remote
and git config git-link.branch
. Let me know what you think.
One question: If git-link.remote
does not exist how should C-u M-x git-link
behave? I think current functionality is okay, but I can also see it being a tad confusing.
from git-link.
This has been merged into master and can be found in the v0.3.0
release.
from git-link.
Looks good. I will try it out.
If git-link.remote does not exist how should C-u M-x git-link
behave?
I think current behavior is good in that case.
from git-link.
Related Issues (20)
- Feature request: support for Gitiles HOT 5
- Support not stripping ".git" from directory name
- Feature request: Add custom macro or function to define a custom git forge. HOT 4
- Fails to resolve insteadOf directives when looking up remote URLs HOT 1
- Feature Request: Choose from multiple remotes HOT 2
- support for http HOT 2
- support 'Gitea' 's (and its fokr : Forgejo ?) server ? HOT 4
- How to call git-link from another interactive function? HOT 1
- Git link from buffer created by `log-view-find-revision` goes to page not found on Github
- Feature request: git-link-open-homepage HOT 6
- Add support for Savannah HOT 1
- Proper sourcehut link HOT 2
- Move CI to GitHub Actions or CircleCI HOT 1
- Support custom HTTP scheme HOT 3
- Support for Linking to `git blame` Page & Linking to Documentation Files like Org and Markdown Files on Bitbucket HOT 2
- not working for files in an auxiliary worktree (using git-worktree) HOT 4
- mapconcat: Wrong type argument: arrayp, (47 97 98 99 100 101 102 103 104 105 ...) HOT 10
- Regression - incorrect directory passed to function in "git-link-remote-alist" HOT 2
- replaces / in branch name with %2F but github URL retains the / HOT 2
- Trailing slash quirk
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-link.