git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] git jump: support show

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Aug 14, 2024, 21:10 UTC
Message-ID
<CAPig+cRTbVPaF2C=u1+mVqYwK5UiPQ7jXB6sw_i4_H6qgYibLA@mail.gmail.com>
In-Reply-To
<20240814200709.53450-1-geofft@ldpreload.com>
On Wed, Aug 14, 2024 at 4:07 PM Geoffrey Thomas <geofft@ldpreload.com> wrote:
Show 26 quoted lines
> This makes it easy to go to the changes in the latest commit, or a
> previous named commit, to fix a bug and commit a fixup, to respond to
> code review feedback, etc.
>
> Signed-off-by: Geoffrey Thomas <geofft@ldpreload.com>
> ---
> diff --git a/contrib/git-jump/git-jump b/contrib/git-jump/git-jump
> @@ -41,8 +41,10 @@ open_editor() {
> -mode_diff() {
> -       git diff --no-prefix --relative "$@" |
> +do_diff() {
> +       cmd=$1
> +       shift
> +       git "$cmd" --no-prefix --relative "$@" |
>         perl -ne '
>         if (m{^\+\+\+ (.*)}) { $file = $1; next }
>         defined($file) or next;
> @@ -56,6 +58,14 @@ mode_diff() {
> +mode_diff() {
> +       do_diff diff "$@"
> +}
> +
> +mode_show() {
> +       do_diff show "$@"
> +}
> +

I'm not a git-jump user (indeed, I've never even looked at it), but should this change be accompanied by corresponding updates to the documentation in the README and usage statement emitted by the usage() function in git-jump script?

Previous: Geoffrey ThomasNext: Jeff King
Message 2 of 3 in “git jump: support show”
  1. 1/1 git jump: support showGeoffrey Thomas, Aug 14, 2024
  2. Eric SunshineAug 14, 2024
  3. Jeff KingAug 15, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.