From: Jacob Kroon <jacob.kroon@gmail.com>
To: git@vger.kernel.org
Subject: [RFC PATCH] gitk: Don't mark files with new time-stamp as modified
Date: Tue, 15 Jan 2019 20:21:18 +0100 [thread overview]
Message-ID: <20190115192118.14072-1-jacob.kroon@gmail.com> (raw)
Run 'git update-index --refresh' in order to get rid
of false positives about unstaged changes in files.
To reproduce:
1. git status # no local changes
2. touch <file-under-version-control>
3. gitk # file shows up as unstaged modified file
4. git update-index --refresh
5. gitk # file does not show up
See link below for more discussion.
https://public-inbox.org/git/0c4b21c8-996b-3017-a1f9-894ac5b27232@gmail.com/T/#m121ab8bd38196a53a6d7ccb89034a99dcd3a703e
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
---
gitk-git/gitk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index a14d7a16b..016c1d7fe 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -5334,6 +5334,7 @@ proc readdiffindex {fd serial inst} {
}
# now see if there are any local changes not checked in to the index
+ catch { exec git update-index --refresh }
set cmd "|git diff-files"
if {$vfilelimit($curview) ne {}} {
set cmd [concat $cmd -- $vfilelimit($curview)]
@@ -7829,6 +7830,7 @@ proc diffcmd {ids flags} {
}
} else {
# comparing working directory with index
+ catch { exec git update-index --refresh }
set cmd [concat | git diff-files $flags]
if {$j == 1} {
lappend cmd -R
--
2.11.0
reply other threads:[~2019-01-15 19:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190115192118.14072-1-jacob.kroon@gmail.com \
--to=jacob.kroon@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).