Skip to content

question: git.remote -> drs.remote #140

@bwalsh

Description

@bwalsh

Clarify linkage between git.remote and drs.remote in pre-push hook

--
 

Problem

There appears to be an implied linkage between git.remote and drs.remote, but it’s not clear what that linkage is, when it should apply, or why it should be enforced. This ambiguity makes it difficult to reason about correct behavior when pushing to named remotes vs. ad-hoc URLs.
 

Context: Pre-push hook arguments

Git’s pre-push hook always receives two parameters:
 

  1. The name of the remote (e.g., origin)
  2. The remote URL/location (e.g., git@github.com:user/repo.git)
     
    If Git can’t determine a named remote (e.g., push directly to a URL), it passes the URL for both parameters. Examples:
     

Open questions

  • What is the intended relationship between git.remote and drs.remote?
  • Under what conditions should a mismatch be enforced vs. allowed?
  • How should the system behave when $1 == $2 (ad-hoc URL push)?
     

Relevant code

Expected outcome

Document (or implement) the intended linkage behavior between git.remote and drs.remote, including edge cases like ad-hoc URL pushes where $1 == $2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions