git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "J. Paul Reed" <preed@sigkill.com>
To: git@vger.kernel.org
Subject: git-gui patch staging errors
Date: Mon, 11 May 2020 18:07:50 -0700	[thread overview]
Message-ID: <20200512010750.GA7127@sigkill.com> (raw)


Hey all,

I ran into an interesting problem this week where git gui was erroring out
on staging partial patches in a particular file I was working on.

I worked around it with "git add -i," which worked like a champ.

I later realized the source file has some special characters (Unicode,
probably) in it to print emojis (or colors or whatever fun animations the
kids want on their terminals these days).

Interestingly, lines/hunks before the first Unicode character will
partial-stage appropriately, but attempting to stage any hunks/lines after
the characters produces a "Failed to stage selected line. error: patch
failed ... error: ... patch does not apply" error dialog.

This can be reproduced by cloning
https://github.com/debek/aws-glacier-multipart-upload.git and editing
glacierupload.sh; the special characters are in echo statements on lines
60, 74, and 97.

Removing these control characters seems to calm git gui's indigestion on
this file.

[preed@underworld ~]$ git --version
git version 2.26.2
[preed@underworld ~]$ git gui --version
git-gui version 0.21.0.66.ga5728

best,
preed
-- 
J. Paul Reed
https://jpaulreed.com
PGP: 0xDF8708F8


             reply	other threads:[~2020-05-12  1:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  1:07 J. Paul Reed [this message]
2020-05-12 12:15 ` git-gui patch staging errors Pratyush Yadav
2020-05-12 14:27   ` Kerry, Richard
2020-05-12 19:00     ` Pratyush Yadav
2020-05-12 20:42     ` J. Paul Reed
2020-05-25 13:08       ` Pratyush Yadav
2020-07-26 22:15         ` J. Paul Reed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200512010750.GA7127@sigkill.com \
    --to=preed@sigkill.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).