Re: git wants to commit more files than expected ?

From: Ashish SHUKLA <ashish_at_FreeBSD.org>
Date: Sat, 13 Aug 2022 13:46:20 UTC
On 2022-08-13 15:24, Kurt Jaeger wrote:
> Hi!
> 
> I'm trying to commit the fix from
> 
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265060
> 
> and run into trouble. I have a probably pristine git repo:
> 
> $ git remote -v
> freebsd https://git.freebsd.org/ports.git (fetch)
> freebsd https://git.freebsd.org/ports.git (push)
> 
> $ git status
> On branch main
> Your branch is up to date with 'freebsd/main'.
> 
> Changes to be committed:
>   (use "git restore --staged <file>..." to unstage)
>         modified:   archivers/py-borgbackup/Makefile
>         new file:   archivers/py-borgbackup/files/patch-setup.py
> 
> But if I run a git commit, additional two files turn up:
> 
> # Changes to be committed:
> #       modified:   archivers/py-borgbackup/Makefile
> #       new file:   archivers/py-borgbackup/files/patch-setup.py
> #       modified:   print/pdf-tools/Makefile
> #       modified:   print/pdf-tools/distinfo
> 
> Why isn't git status not reporting the two pdf-tools files,
> but git commit is ?

Could you share the 'git commit' command-line that you're using ? If 
I've to guess then you're probably including the '-a' switch of git 
commit. If yes, then please don't include it.

Thanks!
-- 
Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0