From: Finn Arne Gangstad <finnag@pvv.org>
To: "Henrik Grubbström" <grubba@roxen.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: [PATCH v4 0/5] Patches to avoid reporting conversion changes.
Date: Thu, 10 Jun 2010 21:55:55 +0200 [thread overview]
Message-ID: <20100610195555.GA20759@pvv.org> (raw)
In-Reply-To: <Pine.GSO.4.63.1006091943100.22466@shipon.roxen.com>
On Wed, Jun 09, 2010 at 08:04:34PM +0200, Henrik Grubbström wrote:
> Ok, so the expanded-keywords file in the example should show up as
> modified in relaxed mode as well, but be cleaned if the modified
> attributes file is added to the index? Or only after being committed?
Not before being committed, since you would otherwise have to add all
other files before adding .gitattributes, but I am not sure even that
is sufficient reason to claim the files are unmodified (see case 3 below).
I think we agree on the following:
If there is a discrepancy between .gitattributes and the contents in
the repository, the following should be true:
git checkout -f (or git reset --hard)
git status -> ALWAYS report modified files in strict mode
sleep 1
touch *
git status -> NEVER report modified files in relaxed mode
The case I think you are asking about above is the following in
"relaxed" mode:
echo "something that causes a discrepancy" >> .gitattributes
git status -> MODIFIED (1)
git add .gitattributes
git status -> MODIFIED (2)
git commit -m "bad commit"
git status -> ??????? (3) <<-- Do you want this to be CLEAN?
git reset --hard (or git checkout -f)
sleep 1
touch *
git status -> CLEAN (4)
1 and 4 should be uncontroversial and 2 I think is necessary because
you should be able to git add in several steps. Whether 3 should be
clean or modified I'm not so sure about, I think that it would make it
more likely to get the repo normalized properly if it was still seen
as modified there.
- Finn Arne
prev parent reply other threads:[~2010-06-10 19:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-01 14:41 [PATCH v4 0/5] Patches to avoid reporting conversion changes Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 1/5] sha1_file: Add index_blob() Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 2/5] strbuf: Add strbuf_add_uint32() Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 3/5] cache: Keep track of conversion mode changes Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 4/5] cache: Add index extension "CONV" Henrik Grubbström (Grubba)
2010-06-01 14:41 ` [PATCH v4 5/5] t/t0021: Test that conversion changes are detected Henrik Grubbström (Grubba)
2010-06-02 4:40 ` [PATCH v4 0/5] Patches to avoid reporting conversion changes Junio C Hamano
2010-06-03 16:00 ` Henrik Grubbström
2010-06-04 0:56 ` Jonathan Nieder
2010-06-04 11:59 ` Henrik Grubbström
2010-06-04 19:42 ` Jonathan Nieder
2010-06-06 10:50 ` Henrik Grubbström
2010-06-07 8:59 ` Finn Arne Gangstad
2010-06-07 16:37 ` Henrik Grubbström
2010-06-07 19:50 ` Finn Arne Gangstad
2010-06-08 15:52 ` Henrik Grubbström
2010-06-09 14:03 ` Finn Arne Gangstad
2010-06-09 18:04 ` Henrik Grubbström
2010-06-10 19:55 ` Finn Arne Gangstad [this message]
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=20100610195555.GA20759@pvv.org \
--to=finnag@pvv.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=grubba@roxen.com \
--cc=jrnieder@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.