From: Yuri Kanivetsky <yuri.kanivetsky@gmail.com>
To: git@vger.kernel.org
Subject: Git doesn't always add files to a commit (amend)
Date: Mon, 4 Jul 2016 16:50:38 +0300 [thread overview]
Message-ID: <CAMhVC3Y9iT9X=JbB5tguXm8MRX4v2fDEqMwrMuDR6TD2+2+HLQ@mail.gmail.com> (raw)
Hi,
When intent to add a directory is made (`git add -N`), and then
contents of any but the first file is staged, `git commit -v --amend`
doesn't add it to the commit, see for yourself:
#!/usr/bin/env bash
set -eu
rm -rf 1
mkdir 1
cd 1
git init
echo 1 > 1 && git add 1 && git commit -m 1
mkdir 2
echo 2/1 > 2/1
echo 2/2 > 2/2
git add -N 2
# git add 2/1 # this file is added
git add 2/2 # as opposed to this one
git commit --amend -m 1
git --no-pager log -p
git reset
git --no-pager status
I'm running git-2.9.0.
Regards,
Yuri
next reply other threads:[~2016-07-04 13:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 13:50 Yuri Kanivetsky [this message]
2016-07-04 15:48 ` Git doesn't always add files to a commit (amend) Duy Nguyen
2016-07-04 17:48 ` [PATCH] cache-tree.c: fix i-t-a check skipping directory updates sometimes Nguyễn Thái Ngọc Duy
2016-07-06 17:43 ` Junio C Hamano
2016-07-06 17:55 ` Junio C Hamano
2016-07-06 18:48 ` [PATCH v2 0/2] cache-tree building fix in the presence of ita entries Nguyễn Thái Ngọc Duy
2016-07-06 18:48 ` [PATCH v2 1/2] cache-tree.c: fix i-t-a entry skipping directory updates sometimes Nguyễn Thái Ngọc Duy
2016-07-06 18:48 ` [PATCH v2 2/2] cache-tree: do not generate empty trees as a result of all i-t-a subentries Nguyễn Thái Ngọc Duy
2016-07-06 19:26 ` Junio C Hamano
2016-07-07 17:12 ` Duy Nguyen
2016-07-07 18:52 ` Junio C Hamano
2016-07-08 15:39 ` Duy Nguyen
2016-07-08 15:53 ` Junio C Hamano
2016-07-08 16:36 ` Duy Nguyen
2016-07-08 17:23 ` Junio C Hamano
2016-07-09 5:23 ` [PATCH v3 0/4] cache-tree building fix in the presence of ita entries Nguyễn Thái Ngọc Duy
2016-07-09 5:23 ` [PATCH v3 1/4] test-lib.sh: introduce and use $_EMPTY_TREE Nguyễn Thái Ngọc Duy
2016-07-12 20:40 ` Junio C Hamano
2016-07-13 15:04 ` Duy Nguyen
2016-07-09 5:23 ` [PATCH v3 2/4] test-lib.sh: introduce and use $_EMPTY_BLOB Nguyễn Thái Ngọc Duy
2016-07-09 5:23 ` [PATCH v3 3/4] cache-tree.c: fix i-t-a entry skipping directory updates sometimes Nguyễn Thái Ngọc Duy
2016-07-09 5:23 ` [PATCH v3 4/4] cache-tree: do not generate empty trees as a result of all i-t-a subentries Nguyễn Thái Ngọc Duy
2016-07-12 20:49 ` Junio C Hamano
2016-07-13 14:59 ` Duy Nguyen
2016-07-16 5:06 ` [PATCH v4 0/4] cache-tree building fix in the presence of ita entries Nguyễn Thái Ngọc Duy
2016-07-16 5:06 ` [PATCH v4 1/4] test-lib.sh: introduce and use $EMPTY_TREE Nguyễn Thái Ngọc Duy
2016-07-16 5:06 ` [PATCH v4 2/4] test-lib.sh: introduce and use $EMPTY_BLOB Nguyễn Thái Ngọc Duy
2016-07-16 5:06 ` [PATCH v4 3/4] cache-tree.c: fix i-t-a entry skipping directory updates sometimes Nguyễn Thái Ngọc Duy
2016-07-16 5:06 ` [PATCH v4 4/4] cache-tree: do not generate empty trees as a result of all i-t-a subentries Nguyễn Thái Ngọc Duy
2016-07-18 20:48 ` [PATCH v4 0/4] cache-tree building fix in the presence of ita entries Junio C Hamano
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMhVC3Y9iT9X=JbB5tguXm8MRX4v2fDEqMwrMuDR6TD2+2+HLQ@mail.gmail.com' \
--to=yuri.kanivetsky@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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.
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 NNTP newsgroup(s).