# [GSoC] microproject idea: improve corrupt patch location reporting in git am

2 messages from 2026-03-15 to 2026-03-16. Participants: Jerry Wang, Karthik Nayak.
Thread: https://gitlist.dev/t/65257

## Jerry Wang, 2026-03-15 22:44

Subject: [GSoC] microproject idea: improve corrupt patch location reporting in git am
Message-ID: <CAKWWG_nGhD6vqhAS1mkEwBQPrg_YX0+C3-xW=Q3ifFDw4dDviw@mail.gmail.com>
URL: https://gitlist.dev/e/CAKWWG_nGhD6vqhAS1mkEwBQPrg_YX0%2BC3-xW%3DQ3ifFDw4dDviw%40mail.gmail.com

```
Hi,

My name is Jialong Wang, and I plan to apply to Git for GSoC 2026.

I have been reading the Git contribution documentation, including
Documentation/CodingGuidelines, Documentation/SubmittingPatches, and
Documentation/MyFirstContribution.txt. I have also built Git from
source locally and started looking for a small microproject.

I found an older open issue that still seems reproducible on my setup:

when git am encounters a corrupt patch, it reports "corrupt patch at
line <n>", but that line number does not correspond to the original
mail/mbox as the user sees it.

Related discussion I found:
  - bug report from 2019-10-02:
    https://public-inbox.org/git/20191002184546.GA22174@generichostname/
  - follow-up patch from 2019-10-04:
    https://public-inbox.org/git/ec38908d05f0d40190173158ef3f0753fa9f1184.1570226253.git.liu.denton@gmail.com/
  - GitGitGadget issue #374:
    https://github.com/gitgitgadget/git/issues/374

I also saw review feedback mentioning additional test coverage for
cases such as stdin input and running from a subdirectory.

I reproduced the issue locally with Git 2.51.0 on 2026-03-15, and I am
considering working on a small patch in this area.

Before I start, I wanted to ask whether this still looks like an
appropriate microproject for a GSoC applicant, and whether improving
the error location/reporting plus adding the missing tests would be a
good direction.

Thanks,
Jialong

```

## Karthik Nayak, 2026-03-16 11:17

Subject: Re: [GSoC] microproject idea: improve corrupt patch location reporting in git am
Message-ID: <CAOLa=ZQDNB+4r1s8dD=ZJmfkBMH1Zm8d4=CQjECqvRUGDNJ22g@mail.gmail.com>
URL: https://gitlist.dev/e/CAOLa%3DZQDNB%2B4r1s8dD%3DZJmfkBMH1Zm8d4%3DCQjECqvRUGDNJ22g%40mail.gmail.com
In-Reply-To: <CAKWWG_nGhD6vqhAS1mkEwBQPrg_YX0+C3-xW=Q3ifFDw4dDviw@mail.gmail.com>

```
Jerry Wang <jerrywang1201@gmail.com> writes:

> Hi,
>
> My name is Jialong Wang, and I plan to apply to Git for GSoC 2026.
>
> I have been reading the Git contribution documentation, including
> Documentation/CodingGuidelines, Documentation/SubmittingPatches, and
> Documentation/MyFirstContribution.txt. I have also built Git from
> source locally and started looking for a small microproject.
>
> I found an older open issue that still seems reproducible on my setup:
>
> when git am encounters a corrupt patch, it reports "corrupt patch at
> line <n>", but that line number does not correspond to the original
> mail/mbox as the user sees it.
>
> Related discussion I found:
>   - bug report from 2019-10-02:
>     https://public-inbox.org/git/20191002184546.GA22174@generichostname/
>   - follow-up patch from 2019-10-04:
>     https://public-inbox.org/git/ec38908d05f0d40190173158ef3f0753fa9f1184.1570226253.git.liu.denton@gmail.com/
>   - GitGitGadget issue #374:
>     https://github.com/gitgitgadget/git/issues/374
>
> I also saw review feedback mentioning additional test coverage for
> cases such as stdin input and running from a subdirectory.
>
> I reproduced the issue locally with Git 2.51.0 on 2026-03-15, and I am
> considering working on a small patch in this area.
>
> Before I start, I wanted to ask whether this still looks like an
> appropriate microproject for a GSoC applicant, and whether improving
> the error location/reporting plus adding the missing tests would be a
> good direction.
>
> Thanks,
> Jialong

I see that you already sent in a patch. For what its worth, the General
information page also covers how to approach microprojects [1].

That said, this is a good microproject. It doesn't touch too many files,
is not too complex and gives you a good starting point with the mailing
list.

[1]: https://git.github.io/General-Microproject-Information/

Regards,
Karthik

```
