Closed Bug 1759047 Opened 3 years ago Closed 3 years ago

MozillaBuild 4.0pre0: Git's paging is broken

Categories

(Firefox Build System :: MozillaBuild, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rkraesig, Assigned: mhentges)

References

Details

Attachments

(1 file)

Git for Windows ships with its own MSYS, including its own less. This works fine in Git Bash, but not so much in MozillaBuild's MSYS2; the visible effect of this is that git commands which trigger less will result in less not understanding the up- or down-arrow keys.

This can be alleviated by setting core.pager to MozillaBuild's less by specifying the full Windows path thereto. (Note that /usr/bin/less is interpreted by Git to mean its own /usr/bin/less, not necessarily the enclosing MSYS environment's!)

Good find, thanks!

Assignee: nobody → mhentges
Blocks: 1739443
Status: NEW → ASSIGNED

This is proving to be pretty tricky. Here's some findings so far:

  • MozillaBuild 3.4: git log works
  • As reported, MozillaBuild 4.0pre0: git log: arrow keys make dinging noise, but doesn't move pager up and down
  • MozillaBuild 4.0 with custom-built Git-for-Windows: /c/git-sdk-64/path/to/built/mingw/git.exe log: arrow keys work (?)
  • MozillaBuild 4.0 with Git-for-Windows, using upstream's shipped mingw git wrapper: /c/git-sdk-64/cmd/git log: arrow keys still work (?)

I'm really shocked that the SDK's git works, especially since it and my real git installation are both 2.35.1 (though the sdk probably has some sort of prerelease git, but it shouldn't be that different).
The next steps I have are:

  • Try hitting official git via a default MSYS2 shell (using Command Prompt, not Mintty). If this works, then I can simply diff MSYS2 and MozillaBuild 4.0pre0, which should be easy
  • If ^ doesn't work, then I need to determine the difference between the Git SDK's mingw git wrapper vs official git's mingw wrapper, then dive in - likely doing git builds and all sorts of nonsense. This could take a significant amount of time to do (week+)

Try hitting official git via a default MSYS2 shell (using Command Prompt, not Mintty). If this works, then I can simply diff MSYS2 and MozillaBuild 4.0pre0, which should be easy

This also fails for the same reason, I'll file an upstream bug

then I need to determine the difference between the Git SDK's mingw git wrapper vs official git's mingw wrapper, then dive in - likely doing git builds and all sorts of nonsense

Fortunately, there's another workaround: though we don't have access to any git config files, we can influence behaviour via environment variable - such as GIT_PAGER.

To avoid upstream issue around using Git-for-Windows' bundled less,
lets explicitly use //our// bundled less when using MozillaBuild.

Type: task → defect

Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/mozilla-build/rev/c1be1f31b182
Use MozillaBuild's less as GIT_PAGER r=ahochheiden

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: