* Speed up git-merge-base a lot
From: Linus Torvalds @ 2005-08-10 23:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
In commit 4f7eb2e5a351e0d1f19fd4eab7e92834cc4528c2 I fixed git-merge-base
getting confused by datestamps that caused it to traverse things in a
non-obvious order.
However, my fix was a very brute-force one, and it had some really
horrible implications for more complex trees with lots of parallell
development. It might end up traversing all the way to the root commit.
Now, normally that isn't that horrible: it's used mainly for merging, and
the bad cases really tend to happen fairly rarely, so if it takes a few
seconds, we're not in too bad shape.
However, gitk will also do the git-merge-base for every merge it shows,
because it basically re-does the trivial merge in order to show the
"interesting" parts. And there we'd really like the result to be
instantaneous.
This patch does that by walking the tree more completely, and using the
same heuristic as git-rev-list to decide "ok, the rest is uninteresting".
In one - hopefully fairly extreme - case, it made a git-merge-base go from
just under five seconds(!) to a tenth of a second on my machine.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
diff --git a/merge-base.c b/merge-base.c
--- a/merge-base.c
+++ b/merge-base.c
@@ -2,6 +2,22 @@
#include "cache.h"
#include "commit.h"
+#define PARENT1 1
+#define PARENT2 2
+#define UNINTERESTING 4
+
+static int interesting(struct commit_list *list)
+{
+ while (list) {
+ struct commit *commit = list->item;
+ list = list->next;
+ if (commit->object.flags & UNINTERESTING)
+ continue;
+ return 1;
+ }
+ return 0;
+}
+
static struct commit *common_ancestor(struct commit *rev1, struct commit *rev2)
{
struct commit_list *list = NULL;
@@ -18,19 +34,18 @@ static struct commit *common_ancestor(st
insert_by_date(rev1, &list);
insert_by_date(rev2, &list);
- while (list) {
+ while (interesting(list)) {
struct commit *commit = list->item;
struct commit_list *tmp = list, *parents;
- int flags = commit->object.flags & 3;
+ int flags = commit->object.flags & 7;
list = list->next;
free(tmp);
- switch (flags) {
- case 3:
+ if (flags == 3) {
insert_by_date(commit, &result);
- continue;
- case 0:
- die("git-merge-base: commit without either parent?");
+
+ /* Mark children of a found merge uninteresting */
+ flags |= UNINTERESTING;
}
parents = commit->parents;
while (parents) {
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Matthias Urlichs @ 2005-08-10 23:39 UTC (permalink / raw)
To: Martin Langhoff; +Cc: git
In-Reply-To: <46a038f9050810155642bb5580@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
Hi,
Martin Langhoff:
> On 8/11/05, Matthias Urlichs <smurf@smurf.noris.de> wrote:
> > Debian packaging fixes for 0.99.4:
>
> Is this anywhere in the archive?
>
Cogito 0.12.1 (which includes git) has been packaged by Sebastian
Kuzminsky <seb@highlab.com>; it's in Debian Unstable. I assume
he'll do something about packaging the current version; I just filed a
wishlist bug in Debian.
The current "cogito" package in Debian renames both the git and cg
command line programs because there are already packages with conflicting
commands in Debian ("git" and "cgvg"). I consider that to be a mistake,
to be honest.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
Coding is easy. All you do is sit staring at a terminal
until the drops of blood form on your forehead.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* [PATCH] Need to set PAGER in tests
From: Pavel Roskin @ 2005-08-11 2:10 UTC (permalink / raw)
To: git
Hello!
"t5400-send-pack.sh --verbose" stops waiting for user input. It happens
because "git log" uses less for output now. To prevent this, PAGER
should be set to cat.
Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/t/test-lib.sh b/t/test-lib.sh
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -5,8 +5,9 @@
# For repeatability, reset the environment to known value.
LANG=C
+PAGER=cat
TZ=UTC
-export LANG TZ
+export LANG PAGER TZ
unset AUTHOR_DATE
unset AUTHOR_EMAIL
unset AUTHOR_NAME
--
Regards,
Pavel Roskin
^ permalink raw reply
* [PATCH] Missing test_done
From: Pavel Roskin @ 2005-08-11 2:15 UTC (permalink / raw)
To: git
Hello!
All test scripts should end with test_done, which reports the test
results. In the future, it could be used for other purposes, e.g. to
distinguish graceful end from "exit" in a test. This patch fixes
scripts that don't call test_done.
Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh
--- a/t/t2003-checkout-cache-mkdir.sh
+++ b/t/t2003-checkout-cache-mkdir.sh
@@ -93,3 +93,4 @@ test_expect_success \
test -d tmp-path1 &&
test -f tmp-path1/file1'
+test_done
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh
--- a/t/t3001-ls-files-others-exclude.sh
+++ b/t/t3001-ls-files-others-exclude.sh
@@ -66,3 +66,5 @@ test_expect_success \
--exclude-from=.git/ignore \
>output &&
diff -u expect output'
+
+test_done
diff --git a/t/t4101-apply-nonl.sh b/t/t4101-apply-nonl.sh
--- a/t/t4101-apply-nonl.sh
+++ b/t/t4101-apply-nonl.sh
@@ -30,3 +30,5 @@ do
"git-apply <diff.$i-$j && diff frotz.$j frotz"
done
done
+
+test_done
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -52,3 +52,5 @@ test_expect_success \
git-send-pack --force ./victim/.git/ master &&
cmp victim/.git/refs/heads/master .git/refs/heads/master
'
+
+test_done
--
Regards,
Pavel Roskin
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Sebastian Kuzminsky @ 2005-08-11 3:17 UTC (permalink / raw)
To: Matthias Urlichs; +Cc: Martin Langhoff, git
In-Reply-To: <20050810233953.GV28270@kiste.smurf.noris.de>
Matthias Urlichs <smurf@smurf.noris.de> wrote:
> Cogito 0.12.1 (which includes git) has been packaged by Sebastian
> Kuzminsky <seb@highlab.com>; it's in Debian Unstable. I assume
> he'll do something about packaging the current version; I just filed a
> wishlist bug in Debian.
>
> The current "cogito" package in Debian renames both the git and cg
> command line programs because there are already packages with conflicting
> commands in Debian ("git" and "cgvg"). I consider that to be a mistake,
> to be honest.
I agree completely - it's super bogus to rename the two central programs.
It makes Debian essentially incompatible with the rest of the world.
My cogito Debian package initially conflicted with the original git
(GNU Interactive Tools), so that both could install /usr/bin/git, but
I got flamed pretty good for this on the debian-devel list, and as a
junior maintainer I followed the recommendations of the more experienced
maintainers - renaming "our" git executable was their choice.
I even suggested using update-alternatives, but that was nixed too.
I predict the current "native" debian package of git will be critizised
for the same reason: because it conflicts with GNU Interactive
Tools. Before uploading it to the Debian archive I (or someone)
will have to either mangle it like cogito.deb (renaming /usr/bin/git
to /usr/bin/something-else), or convince the Debian people to change
their minds. If it's the former, I assume everyone who cares will just
compile their own version of git and install that.
--
Sebastian Kuzminsky
^ permalink raw reply
* [PATCH] Trapping exit in tests, using return for errors
From: Pavel Roskin @ 2005-08-11 3:56 UTC (permalink / raw)
To: git
Hello!
I have noticed that "make test" fails without any explanations when the
"merge" utility is missing. I don't think tests should be silent in
case of failure.
It turned out that the particular test was using "exit" to interrupt the
test in case of an error. This caused the whole test script to exit.
No further tests would be run even if "--immediate" wasn't specified.
No error message was printed.
This patch does following:
All instances of "exit", "exit 1" and "(exit 1)" in tests have been
replaced with "return 1". In fact, "(exit 1)" had no effect.
File descriptor 5 is duplicated from file descriptor 1. This is needed
to print important error messages from tests.
New function test_run_() has been introduced. Any "return" in the test
would merely cause that function to return without skipping calls to
test_failure_() and test_ok_(). The new function also traps "exit" and
treats it like a fatal error (in case somebody reintroduces "exit" in
the tests).
test_expect_failure() and test_expect_success() check both the result of
eval and the return value of test_run_(). If the later is not 0, it's
always a failure because it indicates the the test didn't complete.
Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/t/t1001-read-tree-m-2way.sh b/t/t1001-read-tree-m-2way.sh
--- a/t/t1001-read-tree-m-2way.sh
+++ b/t/t1001-read-tree-m-2way.sh
@@ -100,7 +100,7 @@ test_expect_success \
git-checkout-cache -u -f -q -a &&
git-update-cache --add yomin &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >4.out || exit
+ git-ls-files --stage >4.out || return 1
diff -u M.out 4.out >4diff.out
compare_change 4diff.out expected &&
check_cache_at yomin clean'
@@ -114,7 +114,7 @@ test_expect_success \
git-update-cache --add yomin &&
echo yomin yomin >yomin &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >5.out || exit
+ git-ls-files --stage >5.out || return 1
diff -u M.out 5.out >5diff.out
compare_change 5diff.out expected &&
check_cache_at yomin dirty'
@@ -215,7 +215,7 @@ test_expect_success \
echo nitfol nitfol >nitfol &&
git-update-cache --add nitfol &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >14.out || exit
+ git-ls-files --stage >14.out || return 1
diff -u M.out 14.out >14diff.out
compare_change 14diff.out expected &&
check_cache_at nitfol clean'
@@ -229,7 +229,7 @@ test_expect_success \
git-update-cache --add nitfol &&
echo nitfol nitfol nitfol >nitfol &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >15.out || exit
+ git-ls-files --stage >15.out || return 1
diff -u M.out 15.out >15diff.out
compare_change 15diff.out expected &&
check_cache_at nitfol dirty'
diff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh
--- a/t/t1002-read-tree-m-u-2way.sh
+++ b/t/t1002-read-tree-m-u-2way.sh
@@ -73,7 +73,7 @@ test_expect_success \
'rm -f .git/index &&
git-update-cache --add yomin &&
git-read-tree -m -u $treeH $treeM &&
- git-ls-files --stage >4.out || exit
+ git-ls-files --stage >4.out || return 1
diff --unified=0 M.out 4.out >4diff.out
compare_change 4diff.out expected &&
check_cache_at yomin clean &&
@@ -90,7 +90,7 @@ test_expect_success \
git-update-cache --add yomin &&
echo yomin yomin >yomin &&
git-read-tree -m -u $treeH $treeM &&
- git-ls-files --stage >5.out || exit
+ git-ls-files --stage >5.out || return 1
diff --unified=0 M.out 5.out >5diff.out
compare_change 5diff.out expected &&
check_cache_at yomin dirty &&
@@ -192,7 +192,7 @@ test_expect_success \
echo nitfol nitfol >nitfol &&
git-update-cache --add nitfol &&
git-read-tree -m -u $treeH $treeM &&
- git-ls-files --stage >14.out || exit
+ git-ls-files --stage >14.out || return 1
diff --unified=0 M.out 14.out >14diff.out
compare_change 14diff.out expected &&
sum bozbar frotz >actual14.sum &&
@@ -212,7 +212,7 @@ test_expect_success \
git-update-cache --add nitfol &&
echo nitfol nitfol nitfol >nitfol &&
git-read-tree -m -u $treeH $treeM &&
- git-ls-files --stage >15.out || exit
+ git-ls-files --stage >15.out || return 1
diff --unified=0 M.out 15.out >15diff.out
compare_change 15diff.out expected &&
check_cache_at nitfol dirty &&
diff --git a/t/t1005-read-tree-m-2way-emu23.sh b/t/t1005-read-tree-m-2way-emu23.sh
--- a/t/t1005-read-tree-m-2way-emu23.sh
+++ b/t/t1005-read-tree-m-2way-emu23.sh
@@ -120,7 +120,7 @@ test_expect_success \
git-checkout-cache -u -f -q -a &&
git-update-cache --add yomin &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >4.out || exit
+ git-ls-files --stage >4.out || return 1
diff -u M.out 4.out >4diff.out
compare_change 4diff.out expected &&
check_cache_at yomin clean'
@@ -136,7 +136,7 @@ test_expect_success \
git-update-cache --add yomin &&
echo yomin yomin >yomin &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >5.out || exit
+ git-ls-files --stage >5.out || return 1
diff -u M.out 5.out >5diff.out
compare_change 5diff.out expected &&
check_cache_at yomin dirty'
@@ -241,7 +241,7 @@ test_expect_success \
echo nitfol nitfol >nitfol &&
git-update-cache --add nitfol &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >14.out || exit
+ git-ls-files --stage >14.out || return 1
diff -u M.out 14.out >14diff.out
compare_change 14diff.out expected &&
check_cache_at nitfol clean'
@@ -255,7 +255,7 @@ test_expect_success \
git-update-cache --add nitfol &&
echo nitfol nitfol nitfol >nitfol &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >15.out || exit
+ git-ls-files --stage >15.out || return 1
diff -u M.out 15.out >15diff.out
compare_change 15diff.out expected &&
check_cache_at nitfol dirty'
@@ -352,7 +352,7 @@ test_expect_success \
sed -e "s/such as/SUCH AS/" bozbar-old >bozbar &&
git-update-cache --add bozbar &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >22.out || exit
+ git-ls-files --stage >22.out || return 1
diff -u M.out 22.out >22diff.out
compare_change 22diff.out &&
check_cache_at bozbar clean'
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
--- a/t/t4002-diff-basic.sh
+++ b/t/t4002-diff-basic.sh
@@ -191,7 +191,7 @@ test_expect_success \
'rm -fr Z [A-Z][A-Z] &&
git-read-tree $tree_A &&
git-checkout-cache -f -a &&
- git-read-tree -m $tree_O || (exit 1)
+ git-read-tree -m $tree_O || return 1
git-update-cache --refresh >/dev/null ;# this can exit non-zero
git-diff-files >.test-a &&
cmp_diff_files_output .test-a .test-recursive-OA'
@@ -201,7 +201,7 @@ test_expect_success \
'rm -fr Z [A-Z][A-Z] &&
git-read-tree $tree_B &&
git-checkout-cache -f -a &&
- git-read-tree -m $tree_O || (exit 1)
+ git-read-tree -m $tree_O || return 1
git-update-cache --refresh >/dev/null ;# this can exit non-zero
git-diff-files >.test-a &&
cmp_diff_files_output .test-a .test-recursive-OB'
@@ -211,7 +211,7 @@ test_expect_success \
'rm -fr Z [A-Z][A-Z] &&
git-read-tree $tree_B &&
git-checkout-cache -f -a &&
- git-read-tree -m $tree_A || (exit 1)
+ git-read-tree -m $tree_A || return 1
git-update-cache --refresh >/dev/null ;# this can exit non-zero
git-diff-files >.test-a &&
cmp_diff_files_output .test-a .test-recursive-AB'
diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh
--- a/t/t5300-pack-object.sh
+++ b/t/t5300-pack-object.sh
@@ -16,7 +16,7 @@ test_expect_success \
for i in a b c
do
dd if=/dev/zero bs=4k count=1 | tr "\\0" $i >$i &&
- git-update-cache --add $i || exit
+ git-update-cache --add $i || return 1
done &&
cat c >d && echo foo >>d && git-update-cache --add d &&
tree=`git-write-tree` &&
@@ -29,7 +29,7 @@ test_expect_success \
while read object
do
t=`git-cat-file -t $object` &&
- git-cat-file $t $object || exit 1
+ git-cat-file $t $object || return 1
done <obj-list
} >expect'
@@ -58,7 +58,7 @@ test_expect_success \
do
cmp $path ../.git/$path || {
echo $path differs.
- exit 1
+ return 1
}
done'
cd $TRASH
@@ -88,7 +88,7 @@ test_expect_success \
do
cmp $path ../.git/$path || {
echo $path differs.
- exit 1
+ return 1
}
done'
cd $TRASH
@@ -106,7 +106,7 @@ test_expect_success \
while read object
do
t=`git-cat-file -t $object` &&
- git-cat-file $t $object || exit 1
+ git-cat-file $t $object || return 1
done <obj-list
} >current &&
diff expect current'
@@ -122,7 +122,7 @@ test_expect_success \
while read object
do
t=`git-cat-file -t $object` &&
- git-cat-file $t $object || exit 1
+ git-cat-file $t $object || return 1
done <obj-list
} >current &&
diff expect current'
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -18,7 +18,7 @@ test_expect_success setup '
do
sleep 1 &&
commit=$(echo "Commit #$i" | git-commit-tree $tree -p $parent) &&
- parent=$commit || exit
+ parent=$commit || return 1
done &&
echo "$commit" >.git/HEAD &&
git clone -l ./. victim &&
@@ -31,7 +31,7 @@ test_expect_success setup '
do
sleep 1 &&
commit=$(echo "Rebase #$i" | git-commit-tree $tree -p $parent) &&
- parent=$commit || exit
+ parent=$commit || return 1
done &&
echo "$commit" >.git/HEAD &&
echo Rebase &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -63,6 +63,7 @@ do
esac
done
+exec 5>&1
if test "$verbose" = "t"
then
exec 4>&2 3>&1
@@ -96,15 +97,24 @@ test_debug () {
test "$debug" == "" || eval "$1"
}
+test_run_ () {
+ trap 'echo >&5 "FATAL: Unexpected exit with code $?"; exit 1' exit
+ eval >&3 2>&4 "$1"
+ eval_ret="$?"
+ trap - exit
+ return 0
+}
+
test_expect_failure () {
test "$#" == 2 ||
error "bug in the test script: not 2 parameters to test-expect-failure"
say >&3 "expecting failure: $2"
- if eval >&3 2>&4 "$2"
+ test_run_ "$2"
+ if [ "$?" = 0 -a "$eval_ret" != 0 ]
then
- test_failure_ "$@"
- else
test_ok_ "$1"
+ else
+ test_failure_ "$@"
fi
}
@@ -112,7 +122,8 @@ test_expect_success () {
test "$#" == 2 ||
error "bug in the test script: not 2 parameters to test-expect-success"
say >&3 "expecting success: $2"
- if eval >&3 2>&4 "$2"
+ test_run_ "$2"
+ if [ "$?" = 0 -a "$eval_ret" = 0 ]
then
test_ok_ "$1"
else
--
Regards,
Pavel Roskin
^ permalink raw reply
* Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards
From: Pavel Roskin @ 2005-08-11 4:01 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vy87c2lrv.fsf@assigned-by-dhcp.cox.net>
Hi, Junio!
On Mon, 2005-08-08 at 13:53 -0700, Junio C Hamano wrote:
> Seriously, I do not intend to discarded this patch, but I am
> currently not taking Makefile patches unless they fix real
> breakage.
Try "make CFLAGS=-O3"
> I do want to revisit Makefile issues after 0.99.4, along with
> the changes Pasky sent several days ago. Please remind me about
> them after Wednesday.
It's "after Wednesday" and 0.99.4 is out (many thanks).
--
Regards,
Pavel Roskin
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Martin Langhoff @ 2005-08-11 4:44 UTC (permalink / raw)
To: Sebastian Kuzminsky; +Cc: Matthias Urlichs, git
In-Reply-To: <E1E33Zb-0004dT-Bx@highlab.com>
On 8/11/05, Sebastian Kuzminsky <seb@highlab.com> wrote:
> I agree completely - it's super bogus to rename the two central programs.
> It makes Debian essentially incompatible with the rest of the world.
Well, I doubt this problem lies with Debian. GNU Interactive Tools is
packaged for most (all?) distributions, and has been there for ages. A
quick google search shows a page tracking a few of its distributed
versions: http://linux.maruhn.com/sec/git.html
So it is fair to assume all distros are going to rename it, and wreak
havoc with the calls to the binaries from cogito, qgit, etc. Perhaps
it'd be better to rename the binaries within the git project. Better
Junio at it than a bunch of package maintainers... It'll also nullify
the risk of different packagers choosing different renaming
strategies.
cheers,
martin
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Sebastian Kuzminsky @ 2005-08-11 5:01 UTC (permalink / raw)
To: Martin Langhoff; +Cc: Matthias Urlichs, git
In-Reply-To: <46a038f90508102144358a4bcf@mail.gmail.com>
Martin Langhoff <martin.langhoff@gmail.com> wrote:
> On 8/11/05, Sebastian Kuzminsky <seb@highlab.com> wrote:
> > I agree completely - it's super bogus to rename the two central programs.
> > It makes Debian essentially incompatible with the rest of the world.
>
> Well, I doubt this problem lies with Debian. GNU Interactive Tools is
> packaged for most (all?) distributions, and has been there for ages. A
> quick google search shows a page tracking a few of its distributed
> versions: http://linux.maruhn.com/sec/git.html
>
> So it is fair to assume all distros are going to rename it, and wreak
> havoc with the calls to the binaries from cogito, qgit, etc. Perhaps
> it'd be better to rename the binaries within the git project. Better
> Junio at it than a bunch of package maintainers... It'll also nullify
> the risk of different packagers choosing different renaming
> strategies.
Yes, this would be best. Linus was resistant to this idea, but maybe
Junio will be sympathetic?
I'll once again suggest "lit", for "Linu{x,s} Information Tracker",
meaning "filled with light", "on fire", and "drunk".
While we're at it, renaming cogito's "cg" to "cog" would fix another
filename conflict in Debian, and would give the right hand something to
do while the left hand seeks from c to g. ;-)
--
Sebastian Kuzminsky
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Linus Torvalds @ 2005-08-11 5:05 UTC (permalink / raw)
To: Martin Langhoff; +Cc: Sebastian Kuzminsky, Matthias Urlichs, git
In-Reply-To: <46a038f90508102144358a4bcf@mail.gmail.com>
On Thu, 11 Aug 2005, Martin Langhoff wrote:
>
> Well, I doubt this problem lies with Debian.
Oh, it definitely does.
> GNU Interactive Tools is
> packaged for most (all?) distributions, and has been there for ages.
.. but no other distribution seems to install it.
The _only_ people who have ever even noticed are debian people.
That should clue somebody in.
The top man-page I found for GNU interactive tools says:
A Set of Interactive Programs
Edition 2.5, for GIT version 4.3.16
January 1997
just let it die in peace.
Linus
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Johannes Schindelin @ 2005-08-11 5:30 UTC (permalink / raw)
To: Linus Torvalds
Cc: Martin Langhoff, Sebastian Kuzminsky, Matthias Urlichs, git
In-Reply-To: <Pine.LNX.4.58.0508102200560.3295@g5.osdl.org>
Hi,
On Wed, 10 Aug 2005, Linus Torvalds wrote:
> A Set of Interactive Programs
> Edition 2.5, for GIT version 4.3.16
> January 1997
>
> just let it die in peace.
God have mercy over (old) GIT's soul.
Amen
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Sebastian Kuzminsky @ 2005-08-11 5:48 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Martin Langhoff, Matthias Urlichs, git
In-Reply-To: <Pine.LNX.4.58.0508102200560.3295@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> wrote:
> The top man-page I found for GNU interactive tools says:
>
> A Set of Interactive Programs
> Edition 2.5, for GIT version 4.3.16
> January 1997
>
> just let it die in peace.
The top of the RCS changelog says:
Fri Jun 16 06:19:24 1995 Paul Eggert <eggert@twinsun.com>
Version 5.7 released.
Should we let /usr/bin/merge die in peace too?
People still use GNU Interactive Tools. Not just crazy, stupid people,
and I bet not just Debian people.
--
Sebastian Kuzminsky
^ permalink raw reply
* Re: [PATCH] Need to set PAGER in tests
From: Junio C Hamano @ 2005-08-11 5:50 UTC (permalink / raw)
To: Pavel Roskin; +Cc: git
In-Reply-To: <1123726201.18644.10.camel@dv>
Pavel Roskin <proski@gnu.org> writes:
> "t5400-send-pack.sh --verbose" stops waiting for user input. It happens
> because "git log" uses less for output now. To prevent this, PAGER
> should be set to cat.
Good catch, thanks.
I did not notice this before, because I always work in Emacs
compilation buffer, setting PAGER to cat and EDITOR to
emacsclient.
^ permalink raw reply
* Re: [PATCH] Trapping exit in tests, using return for errors
From: Junio C Hamano @ 2005-08-11 6:06 UTC (permalink / raw)
To: Pavel Roskin; +Cc: git
In-Reply-To: <1123732581.18644.37.camel@dv>
Pavel Roskin <proski@gnu.org> writes:
> This patch does following:
>
> All instances of "exit", "exit 1" and "(exit 1)" in tests have been
> replaced with "return 1". In fact, "(exit 1)" had no effect.
Are you sure about all of the above?
You are right about "... || exit" in the expect_success tests;
they are broken. But '(exit 1)' or just saying 'false' at the
end should have done the right thing. Worse yet, return does
not seem to really work as expected, except if all you want to
do was to tell the test driver "I failed", in which case
"bloopl" would work just as well.
prompt$ cat k.sh
what="$1"
eval '
echo foo
case '$what' in
false)
(exit 1) ;;
exit)
exit 1 ;;
return)
return 1 ;;
esac
'
echo "status $?"
prompt$ bash k.sh exit
foo
prompt$ bash k.sh false
foo
status 1
prompt$ bash k.sh return
foo
k.sh: line 20: return: can only `return' from a function or sourced script
status 1
prompt$
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Junio C Hamano @ 2005-08-11 6:12 UTC (permalink / raw)
To: git; +Cc: Sebastian Kuzminsky
In-Reply-To: <E1E35C2-0004kt-VH@highlab.com>
Sebastian Kuzminsky <seb@highlab.com> writes:
> While we're at it, renaming cogito's "cg" to "cog" would fix another
> filename conflict in Debian, and would give the right hand something to
> do while the left hand seeks from c to g. ;-)
Well, these days cogito ships without git, so maybe it should be
renamed to "coo" ;-).
No, renaming git to lit is not on my list of immediate things to
do. At least not yet.
^ permalink raw reply
* Re: [PATCH] Trapping exit in tests, using return for errors
From: Junio C Hamano @ 2005-08-11 6:22 UTC (permalink / raw)
To: Pavel Roskin; +Cc: git
In-Reply-To: <7virydnh1o.fsf@assigned-by-dhcp.cox.net>
Sorry, sent it out without finishing. The worst is "return".
With ksh, ash, and dash, the script itself exits with status
code 1 (presumably you are trapping it with trap -- exit,
though).
prompt$ bash k.sh exit
foo
prompt$ bash k.sh false
foo
status 1
prompt$ bash k.sh return
foo
k.sh: line 20: return: can only `return' from a function or sourced script
status 1
prompt$ ash k.sh exit
foo
prompt$ ash k.sh false
foo
status 1
prompt$ ash k.sh return
foo
prompt$ ksh k.sh exit
foo
prompt$ ksh k.sh false
foo
status 1
prompt$ ksh k.sh return
foo
^ permalink raw reply
* Re: [PATCH] Trapping exit in tests, using return for errors
From: Junio C Hamano @ 2005-08-11 6:31 UTC (permalink / raw)
To: Pavel Roskin; +Cc: git
In-Reply-To: <7vzmrpm1q9.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> Sorry, sent it out without finishing. The worst is "return".
Ah, my mistake. You have the eval that can eval "return" in a
function and let that "return" return from that function.
Cleverly done.
Thanks.
^ permalink raw reply
* [PATCH] update Debian packaging for cogito
From: Matthias Urlichs @ 2005-08-11 10:20 UTC (permalink / raw)
To: git
In-Reply-To: <20050805020307.GP24479@pasky.ji.cz>
Cleaned up Debian files.
Conflict with cgvg instead of not installing cg.
Pass prefix=/usr to "make install".
---
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+cogito (0.13-1) stable; urgency=low
+
+ * New version.
+ * Cleaned up Debian files.
+ * Conflict with cgvg instead of not installing cg.
+ * Pass prefix=/usr to "make install".
+
+ -- Matthias Urlichs <smurf@debian.org> Thu, 11 Aug 2005 12:17:32 +0200
+
cogito (0.12.1-1) stable; urgency=low
* new version 0.12.1 (needed in order check out Linus' git trees).
diff --git a/debian/control b/debian/control
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Package: cogito
Architecture: any
Depends: git-core, ${shlibs:Depends}, patch, diff, rcs
Recommends: rsync, curl, wget, rsh-client
+Conflicts: cgvg
Description: version control system
Cogito is the user-friendly front-end to the GIT directory content
- manager. This package includes both the low-level GIT tools and the
- high-level Cogito programs.
+ manager. This package includes the high-level Cogito programs.
diff --git a/debian/copyright b/debian/copyright
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,3 +1,24 @@
-License:
+This package was downloaded via git from
+master.kernel.org:/pub/scm/cogito/cogito.git.
+
+Upstream Author: Petr Baudis
+
+Copyright:
+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 dated June, 1991.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this package; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
-GPL v2 (see COPYING for details)
diff --git a/debian/docs b/debian/docs
--- a/debian/docs
+++ b/debian/docs
@@ -1,3 +1 @@
README
-COPYING
-
diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -64,8 +64,8 @@ install: build
dh_testroot
dh_clean -k
dh_installdirs
- $(MAKE) install DESTDIR=$(CURDIR)/debian/cogito
- $(RM) $(DESTDIR)/usr/bin/cg
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/cogito prefix=/usr
+ # $(RM) $(DESTDIR)/usr/bin/cg
install -m 0644 Documentation/*.html $(DESTDIR)/usr/share/doc/cogito/html
install -m 0644 Documentation/cogito.txt $(DESTDIR)/usr/share/doc/cogito/txt
install -m 0644 Documentation/*.7 $(DESTDIR)/usr/share/man/man7
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
Wide flush the fields; the softening air is balm; Echo the mountains round;
the forest smiles; And every sense and every heart is joy.
-- Thomson
^ permalink raw reply
* Re: [PATCH] Trapping exit in tests, using return for errors
From: Pavel Roskin @ 2005-08-11 16:00 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vvf2dm1b8.fsf@assigned-by-dhcp.cox.net>
Hi, Junio!
On Wed, 2005-08-10 at 23:31 -0700, Junio C Hamano wrote:
> Junio C Hamano <junkio@cox.net> writes:
>
> > Sorry, sent it out without finishing. The worst is "return".
>
> Ah, my mistake. You have the eval that can eval "return" in a
> function and let that "return" return from that function.
> Cleverly done.
I'm glad you appreciate it. One more fix on top of the last patch is
needed.
"return" from a test would leave the exit trap set, which could cause a
spurious error message if it's the last test in the script or
--immediate is used.
The easiest solution would be to have a global trap that is set when
test-lib.sh is sourced and unset either by test_done(), error() or by
test_failure_() with --immediate. This patch also depends on the patch
that adds test_done() the the scripts that don't have it.
Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/t/test-lib.sh b/t/test-lib.sh
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -36,6 +36,7 @@ unset SHA1_FILE_DIRECTORY
error () {
echo "* error: $*"
+ trap - exit
exit 1
}
@@ -74,6 +75,8 @@ fi
test_failure=0
test_count=0
+trap 'echo >&5 "FATAL: Unexpected exit with code $?"; exit 1' exit
+
# You are not expected to call test_ok_ and test_failure_ directly, use
# the text_expect_* functions instead.
@@ -89,7 +92,7 @@ test_failure_ () {
say "FAIL $test_count: $1"
shift
echo "$@" | sed -e 's/^/ /'
- test "$immediate" == "" || exit 1
+ test "$immediate" == "" || { trap - exit; exit 1; }
}
@@ -98,10 +101,8 @@ test_debug () {
}
test_run_ () {
- trap 'echo >&5 "FATAL: Unexpected exit with code $?"; exit 1' exit
eval >&3 2>&4 "$1"
eval_ret="$?"
- trap - exit
return 0
}
@@ -132,6 +133,7 @@ test_expect_success () {
}
test_done () {
+ trap - exit
case "$test_failure" in
0)
# We could:
--
Regards,
Pavel Roskin
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Matthias Urlichs @ 2005-08-11 16:04 UTC (permalink / raw)
To: git
In-Reply-To: <E1E35vU-0004nP-JR@highlab.com>
Hi, Sebastian Kuzminsky wrote:
> People still use GNU Interactive Tools. Not just crazy, stupid people,
> and I bet not just Debian people.
Possibly. But the number of people running both git and git are, I'd bet,
smaller than those who will send annoying emails when they install git and
can't run all the "git xxx" commands we talk about here.
Same with cgvg, cogito, and cg.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
The girl who remembers her first kiss now has a daughter who can't even
remember her first husband.
^ permalink raw reply
* gitk: integer overflow
From: Matthias Urlichs @ 2005-08-11 16:07 UTC (permalink / raw)
To: git
Run gitk on the kernel archive, wait for it to finish reading commit
changesets, scroll to the middle, and watch all the pretty (NOT)
superfluous vertical lines appear and disappear pseudo-randomly.
Looks like something in there (TK or even X11, most likely) cuts off
screen coordinates after 16 bits ..?
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
You know things are bad when you're surrounded by four lawyers, and none of
them is yours.
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Linus Torvalds @ 2005-08-11 16:30 UTC (permalink / raw)
To: Sebastian Kuzminsky; +Cc: Martin Langhoff, Matthias Urlichs, git
In-Reply-To: <E1E35vU-0004nP-JR@highlab.com>
On Wed, 10 Aug 2005, Sebastian Kuzminsky wrote:
>
> People still use GNU Interactive Tools. Not just crazy, stupid people,
> and I bet not just Debian people.
Why do you say that?
Do you have anybody who actually does, or are you just claiming so?
Some distributions seems to disagree with you. rpm.pbone.net already
implies that SuSE not only has never packaged GNU interactive tools at
all, they're already packaging git-core. Redhat seems to have dropped it
after RH-7.1 according to the same admittedly very nonscientific source
(while rpmfind.net didn't find any RH packages at all).
So..
Linus
^ permalink raw reply
* Re: [PATCH] Teach git push .git/branches shorthand
From: Matthias Urlichs @ 2005-08-11 16:29 UTC (permalink / raw)
To: git
In-Reply-To: <200508081822.24582.Josef.Weidendorfer@gmx.de>
Hi, Josef Weidendorfer wrote:
> My understanding of .git/branches was that Cogito uses this as mapping of
> remote branches/heads to local branches/refs, and not to store shortcuts for
> remote git repositories.
That seems to be the case, yes.
I'd argue that the shortcut idea is inherently more flexible, as it can
emulate mappings, but not vice versa -- for instance, if my local branch
foo corresponds to more than one remote branch, .git/branches/* cannot
comprehend that idea.
That being said, I do like Junio's
>> $ cat .git/remotes/ko
>> URL: kernel.org:/pub/scm/git/git.git/
>> Fetch-Reference: master:ko-master pu:ko-pu rc:ko-rc
>> Push-Reference: master pu rc
idea. A lot.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
Sometimes I think my head is like a gas tank -- you have to be really
careful what you put into it 'cos it might affect the whole system.
-- I'VE HEARD THE MERMAIDS SINGING
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Sebastian Kuzminsky @ 2005-08-11 19:06 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Martin Langhoff, Matthias Urlichs, git
In-Reply-To: <Pine.LNX.4.58.0508110915210.3295@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> wrote:
>
> On Wed, 10 Aug 2005, Sebastian Kuzminsky wrote:
> >
> > People still use GNU Interactive Tools. Not just crazy, stupid people,
> > and I bet not just Debian people.
>
> Why do you say that?
>
> Do you have anybody who actually does, or are you just claiming so?
What I have is bug reports against the cogito package, from people who
want to install both. The reports came very soon after I released the
package, so I dont think it's a totally freak occurance.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=309776;archive=yes
Some Debian maintainers defend GNU Interactive Tools, but I'm guessing
that will only lower your opinion of Debian maintainers:
http://lists.debian.org/debian-mentors/2005/06/msg00013.html
Anyway, enough of this. I understand the name will not change and I'm
ok with that. I'll deal with it on our (Debian's) end.
--
Sebastian Kuzminsky
^ permalink raw reply
* Re: [PATCH] Debian packaging for 0.99.4
From: Junio C Hamano @ 2005-08-11 19:11 UTC (permalink / raw)
To: Sebastian Kuzminsky; +Cc: Linus Torvalds, git
In-Reply-To: <Pine.LNX.4.58.0508110915210.3295@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> On Wed, 10 Aug 2005, Sebastian Kuzminsky wrote:
>>
>> People still use GNU Interactive Tools. Not just crazy, stupid people,
>> and I bet not just Debian people.
>
> Why do you say that?
>
> Do you have anybody who actually does, or are you just claiming so?
Debian folks have a handy way to substantiate that claim or get
that claim proven wrong, and I am somewhat surprised that nobody
mentioned it so far.
Debian popularity contest (http://popcon.debian.org/).
Here is an excerpt I just made.
<name> is the package name;
<inst> is the number of people who installed this package;
<vote> is the number of people who use this package regularly;
<old> is the number of people who installed, but don't use
this package regularly;
<recent> is the number of people who upgraded this package recently;
rank name inst vote old recent
1 base-files 7147 6777 158 212
2 base-passwd 7147 6724 163 260
3 debianutils 7147 6739 120 288
4 sed 7147 6763 155 229
...
6591 git 114 24 83 7
...
25555 git-core 2 1 0 1 (Not in sid)
29939 cogito-scm 1 0 1 0 (Not in sid)
...
46416 zope2.6 0 0 0 0
-------------------------------------------------
46416 Total 6768849 2118048 2306009 595621
So yes, among 46.5K packages in the known universe, the other
git ranks 6600th. Does that mean it is popular? I dunno.
Obviously, not everybody who installs Debian participates in
popcon. The sample size of the above statistics is 7147
installations of base-files.
Among these 7147 sample installations, the other git was
installed by 114 people, and 24 people regularly use it.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox