* gets "-dirty" under fakeroot
@ 2007-01-23 10:59 Yasushi SHOJI
2007-01-23 14:22 ` Matthias Lederhofer
0 siblings, 1 reply; 3+ messages in thread
From: Yasushi SHOJI @ 2007-01-23 10:59 UTC (permalink / raw)
To: git
Hi,
I noticed that compiling git under fakeroot always gives me "-dirty"
in the version string even though the working directory is clean.
Git generates version string with GIT-VERSION-GEN. in the script,
working directory is checked to see whether it's clean or not. if you
run the script under fakeroot, it always say the working directory is
dirty. that is, git diff-index HEAD reports files have changed.
that is because under fakeroot, we get faked value 0 for uid and gid,
but we already have our own uid/gid in the cache. those two values are
compared in ce_match_stat_basic()::read-cache.c:
if (ce->ce_uid != htonl(st->st_uid) ||
ce->ce_gid != htonl(st->st_gid))
changed |= OWNER_CHANGED;
I noticed that the code fragment is important because:
/*
* dev/ino/uid/gid/size are also just tracked to the low 32 bits
* Again - this is just a (very strong in practice) heuristic that
* the inode hasn't changed.
Now what should I do?
1) run git update-index --refresh with fakeroot before doing
diff-index.
2) add --except-uid-gid to diff-index
3) just don't care about the "-dirty" string.
4) do whatever I do under real root env.
How do you guys do when you create snapshot package like rpm or deb?
or is this just me?
regards,
--
yashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-24 0:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23 10:59 gets "-dirty" under fakeroot Yasushi SHOJI
2007-01-23 14:22 ` Matthias Lederhofer
2007-01-24 0:27 ` Yasushi SHOJI
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.