zopencommunity / zopencommunity/gitport

git stash push <file> doesn't encode file properly

Open
#185 1 comment 0 reactions 1 assignee View on GitHub

@HarithaIBM is already working on this.

Since Jul 20, 2026.

Dominant language
Shell
Stars
10
Forks
7
PR merge metrics
No merged PRs in 30d

Description

After running git stash push zosGen/src/igyvcntl.plx, git appears to successfully stash the file away, but the file that is "restored" appears to be corrupted (probably because of the result of a bad conversion)....here is what I get:

~/ws/cobfe.v65/cobfe $ git stash push zosGen/src/igyvcntl.plx
Saved working directory and index state WIP on feature/1656-jys-v65-utf8-srcfile-2: 99e490fa dev: TCOMMON2 extended from 1k to 4k (#503)
<stdin>:95: trailing whitespace.

warning: 1 line adds whitespace errors.

Then when I view the file it looks corrupted. Doing a pop restores the file perfectly fine though.

Note that doing a git stash push also works fine! So this problem appears to be specifically related to git stash push <file> when you specify a file.

edit: I'm not sure why there is whitespace errors on that line either - and it's hard to check because the file isn't restored properly. I'll update if i can find out anything.

edit2: so it turns out that the restored file (after git stash push <file>) is encoded in IBM-1047 but is tagged as ISO8859-1. When I retag it, it is readable. I anticipate that I will run into a character encoding problem related to that error message above, however.

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.