adamchainz / adamchainz/pygments-git

Support warning: and remote: lines

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8
Forks
0
Avg merge
1d 3h
Merged PRs (30d)
1

Description

Description
$ git comit -m "Some awesome work"
WARNING: You called a Git command named 'comit', which does not exist.
Continuing under the assumption that you meant 'commit'.
[main 25112f085] Some awesome work
$ git rev-parse 'main@{1 year ago}'
warning: log for 'main' only goes back to Thu, 8 Dec 2022 13:41:33 +0000
ca0d22d67c766c0dfb8f70b5176ec3880dd9fc13
$ git push
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 205 bytes | 205.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error: refusing to update checked out branch: refs/heads/main
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the existing Git lexer and its handling of command output. Add support for the warning: and remote: lines shown in the issue examples, then verify that those lines receive the intended highlighting alongside the surrounding Git output.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.