Bug: partially staged file is committed in whole, if there is another staged file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If I have two modified files, and file1 is staged (git add file1), and file2 is partially staged (git add -p file2), and then try to commit only the partially staged file2, git commits *all* changes to file2, not just the staged part.

There is no bug without file1 also being staged.

Here is a transcript illustrating the problem:

$ uname -v
Darwin Kernel Version 14.0.0: Tue Jul 29 16:22:25 PDT 2014; root:xnu-2782.1.62~4/RELEASE_X86_64

$ git version
git version 2.1.0

$ git status -sb
## master
M  file1
MM file2
$ git commit file2 -m "adding patch"
[master 066a6e2] adding patch
 1 file changed, 2 insertions(+)

$ git status -sb
## master
M  file1
$


Regards,
Paul--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]