Giter VIP home page Giter VIP logo

Comments (3)

ibizaman avatar ibizaman commented on August 15, 2024 2

What about functions like these?

(defun git-link-master-branch ()
  (interactive)
  (let ((git-link-default-branch "master"))
    (call-interactively 'git-link)))
(defun git-link-at-commit ()
  (interactive)
  (let ((git-link-use-commit t))
    (call-interactively 'git-link)))

from git-link.

sshaw avatar sshaw commented on August 15, 2024

Hi!

I am sometimes working on a local branch (not pushed to a remote location) and in this case using git-link generate a wrong url

Do you know about these options?

Would it be possible to allow to chose the branch in some cases?

Certainly seems reasonable.

I am thinking of something simple, e.g:
M-x git-link => do not prompt, generate link
C-u M-x git-link => ask for the remote name first
C-u C-u M-x git-link => ask for the remote and the branch n

Also seems reasonable, though could this be done another way? Just curious.

What do you think? I could work on a simple PR to implement this if you like the idea.

Pull request it up! :neckbeard:

from git-link.

sshaw avatar sshaw commented on August 15, 2024

C-u M-x git-link => ask for the remote name first
C-u C-u M-x git-link => ask for the remote and the branch name

But... what if someone only wants to specify the branch name? May get complicated.

At some point I wanted to remove git-link-commit and incorporate it into git-link. That's a lot of prefix options. So I guess my question of "could this be done another way" may be somewhat more relevant.

Maybe it's sign that adding git-link-commit to git-link is a bad idea. Or, that prompting for branch is 😈.

from git-link.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.