* new GIT-VERSION-GEN with old GIT
@ 2008-02-23 17:34 Martin Koegler
2008-02-23 18:46 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Martin Koegler @ 2008-02-23 17:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Debian, git 1.4.4 is still shipped in the stable distribution.
Since e5fc9a0aea2c3c49829b5cdf499339e5c759706b, simply running make in
a git checkout yields to an error message.
The error is in GIT-VERSION-GEN:
| + git diff-index --quiet HEAD
| usage: git-diff-index [-m] [--cached] [<common diff options>] <tree-ish> [<path>...]
| common diff options:
| -z output diff-raw with lines terminated with NUL.
| -p output patch format.
| -u synonym for -p.
| --patch-with-raw
| output both a patch and the diff-raw format.
| --stat show diffstat instead of patch.
| --numstat show numeric diffstat instead of patch.
| --patch-with-stat
| output a patch and prepend its diffstat.
| --name-only show only names of changed files.
| --name-status show names and status of changed files.
| --full-index show full object name on index lines.
| --abbrev=<n> abbreviate object names in diff-tree header and diff-raw.
| -R swap input file pairs.
| -B detect complete rewrites.
| -M detect renames.
| -C detect copies.
| --find-copies-harder
| try unchanged files as candidate for copy detection.
| -l<n> limit rename attempts up to <n> paths.
| -O<file> reorder diffs according to the <file>.
| -S<string> find filepair whose only one side contains the string.
| --pickaxe-all
| show all files diff when -S is used and hit is found.
| -a --text treat all files as text.
The problem is not critical, as the build process continues with wrong
version information.
mfg Martin Kögler
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: new GIT-VERSION-GEN with old GIT
2008-02-23 17:34 new GIT-VERSION-GEN with old GIT Martin Koegler
@ 2008-02-23 18:46 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2008-02-23 18:46 UTC (permalink / raw)
To: Martin Koegler; +Cc: git
mkoegler@auto.tuwien.ac.at (Martin Koegler) writes:
> On Debian, git 1.4.4 is still shipped in the stable distribution.
>
> Since e5fc9a0aea2c3c49829b5cdf499339e5c759706b, simply running make in
> a git checkout yields to an error message.
>
> The error is in GIT-VERSION-GEN:
> | + git diff-index --quiet HEAD
> ...
Sorry about that. I already have forgotten that --quiet was a
relatively recent invention.
Before e5fc9a, we used --name-only, which was around forever.
The original diff-cache had it since mid July 2005, and the
command kept the option when it was renamed to diff-index in
early September 2005. That is what we should use.
GIT-VERSION-GEN | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 03fb9d7..d4714ee 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -16,7 +16,8 @@ elif test -d .git &&
case "$VN" in
*$LF*) (exit 1) ;;
v[0-9]*)
- git diff-index --quiet HEAD || VN="$VN-dirty" ;;
+ test -z "$(git diff-index --name-only HEAD)" ||
+ VN="$VN-dirty" ;;
esac
then
VN=$(echo "$VN" | sed -e 's/-/./g');
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-23 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-23 17:34 new GIT-VERSION-GEN with old GIT Martin Koegler
2008-02-23 18:46 ` Junio C Hamano
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).