mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Andrew Thorp <>
Subject: BUG: `git commit` adding unstaged chunks of files to commits on 2.33.0
Date: Tue, 31 Aug 2021 13:15:18 -0400	[thread overview]
Message-ID: <> (raw)

Hello all,

As described in the subject line, it seems like git commit is
committing entire files when chunks of the files are staged using `git
add -p`, in spite of leaving chunks out of the stage. See below for
the bug-report template questionnaire. Please let me know if there is
anything I can do to help resolve this issue or if there is anything


Andrew Thorp

> What did you do before the bug happened? (Steps to reproduce your issue)

Edit a checked-in file, adding multiple chunks of lines to the file.
Using `git add -p <file>`, stage one of the chunks, leave some chunks unstaged.
After running `git status` the file should both in the section
`Changes to be committed:` and `Changes not staged for commit`.
Commit the changes.

> What did you expect to happen? (Expected behavior)

I expected all staged changes to be committed and unstaged changes to
remain unstaged.

> What happened instead? (Actual behavior)

The entire file was committed, including the unstaged chunks of changes.

> What's different between what you expected and what actually happened?

It appears as though the remaining file lines were both checked in and
committed, when only the later should have happened.

[System Info]
git version:
git version 2.33.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Darwin 20.4.0 Darwin Kernel Version 20.4.0: Thu Apr 22 21:46:47
PDT 2021; root:xnu-7195.101.2~1/RELEASE_X86_64 x86_64
compiler info: clang: 12.0.5 (clang-1205.0.22.9)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh

             reply	other threads:[~2021-08-31 17:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 17:15 Andrew Thorp [this message]
2021-08-31 17:56 ` BUG: `git commit` adding unstaged chunks of files to commits on 2.33.0 Junio C Hamano
2021-08-31 18:01   ` Andrew Thorp
2021-08-31 18:01     ` Andrew Thorp
2021-08-31 19:25       ` Junio C Hamano
2021-08-31 19:45         ` Andrew Thorp
2021-09-01 14:03 ` Philippe Blain

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:

  List information:

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

  git send-email \ \ \ \

* 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

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).