Git development
 help / color / mirror / Atom feed
* [ANNOUNCE] Git homepage change
From: Petr Baudis @ 2009-01-05 16:40 UTC (permalink / raw)
  To: Scott Chacon; +Cc: git
In-Reply-To: <d411cc4a0901011040h4ab97aag20de54a6e138a4ec@mail.gmail.com>

  Hi,

  thanks for the changes, Scott!

  Based on the previous feedback of other developers and my last review
of git-scm.com, I have changed git.or.cz to redirect to git-scm.com.

  The wiki is still hosted at the original place for the time being, as
well as the man/ gitbot redirect. To reach the original manpage, use
http://git.or.cz/index.html.

  Have a fun year,

-- 
				Petr "Pasky" Baudis
The average, healthy, well-adjusted adult gets up at seven-thirty
in the morning feeling just terrible. -- Jean Kerr

^ permalink raw reply

* Consistency patches for Documentation/
From: henrik @ 2009-01-05 15:25 UTC (permalink / raw)
  To: git


The following 2 patches are rather pedantic, but should be corrected. 
Sorry if the way I've sent these are wrong :)

^ permalink raw reply

* [PATCH v3.2] rebase: learn to rebase root commit
From: Thomas Rast @ 2009-01-05 17:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <1230939915-3638-1-git-send-email-trast@student.ethz.ch>

Teach git-rebase a new option --root, which instructs it to rebase the
entire history leading up to <branch>.  This option must be used with
--onto <newbase>, and causes commits that already exist in <newbase>
to be skipped.  (Normal operation skips commits that already exist in
<upstream> instead.)

The main use-case is with git-svn: suppose you start hacking (perhaps
offline) on a new project, but later notice you want to commit this
work to SVN.  You will have to rebase the entire history, including
the root commit, on a (possibly empty) commit coming from git-svn, to
establish a history connection.  This previously had to be done by
cherry-picking the root commit manually.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>

---

Since this is still in 'pu', can you replace it again?  The test case
I designed for v3, to check that it also skips identical commits,
actually makes the _root_ commit a duplicate.  I could sleep better at
night if the root commit was actually part of the rebase :-)

3/4 is not affected patch-wise, though it of course inherits the same
test history.

Thanks!


Interdiff:

>> diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh
>> index 1978512..dd91910 100755
>> --- a/t/t3412-rebase-root.sh
>> +++ b/t/t3412-rebase-root.sh
>> @@ -15,12 +15,12 @@ test_expect_success 'prepare repository' '
>>         git commit -m 2 &&
>>         git symbolic-ref HEAD refs/heads/other &&
>>         rm .git/index &&
>> -       echo 1 > A &&
>> -       git add A &&
>> -       git commit -m 1b &&
>>         echo 3 > B &&
>>         git add B &&
>>         git commit -m 3 &&
>> +       echo 1 > A &&
>> +       git add A &&
>> +       git commit -m 1b &&
>>         echo 4 > B &&
>>         git add B &&
>>         git commit -m 4


 git-rebase.sh          |   52 ++++++++++++++++++++--------
 t/t3412-rebase-root.sh |   86 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+), 15 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index ebd4df3..d1083f1 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -3,7 +3,7 @@
 # Copyright (c) 2005 Junio C Hamano.
 #
 
-USAGE='[--interactive | -i] [-v] [--onto <newbase>] <upstream> [<branch>]'
+USAGE='[--interactive | -i] [-v] [--onto <newbase>] [<upstream>|--root] [<branch>]'
 LONG_USAGE='git-rebase replaces <branch> with a new branch of the
 same name.  When the --onto option is provided the new branch starts
 out with a HEAD equal to <newbase>, otherwise it is equal to <upstream>
@@ -47,6 +47,7 @@ dotest="$GIT_DIR"/rebase-merge
 prec=4
 verbose=
 git_am_opt=
+rebase_root=
 
 continue_merge () {
 	test -n "$prev_head" || die "prev_head must be defined"
@@ -297,6 +298,9 @@ do
 	-C*)
 		git_am_opt="$git_am_opt $1"
 		;;
+	--root)
+		rebase_root=t
+		;;
 	-*)
 		usage
 		;;
@@ -344,17 +348,28 @@ case "$diff" in
 	;;
 esac
 
+if test -z "$rebase_root"; then
 # The upstream head must be given.  Make sure it is valid.
-upstream_name="$1"
-upstream=`git rev-parse --verify "${upstream_name}^0"` ||
-    die "invalid upstream $upstream_name"
+	upstream_name="$1"
+	shift
+	upstream=`git rev-parse --verify "${upstream_name}^0"` ||
+	die "invalid upstream $upstream_name"
+	unset root_flag
+	upstream_arg="$upstream_name"
+else
+	test -z "$newbase" && die "--root must be used with --onto"
+	unset upstream_name
+	unset upstream
+	root_flag="--root"
+	upstream_arg="$root_flag"
+fi
 
 # Make sure the branch to rebase onto is valid.
 onto_name=${newbase-"$upstream_name"}
 onto=$(git rev-parse --verify "${onto_name}^0") || exit
 
 # If a hook exists, give it a chance to interrupt
-run_pre_rebase_hook ${1+"$@"}
+run_pre_rebase_hook "$upstream_arg" "$@"
 
 # If the branch to rebase is given, that is the branch we will rebase
 # $branch_name -- branch being rebased, or HEAD (already detached)
@@ -362,16 +377,16 @@ run_pre_rebase_hook ${1+"$@"}
 # $head_name -- refs/heads/<that-branch> or "detached HEAD"
 switch_to=
 case "$#" in
-2)
+1)
 	# Is it "rebase other $branchname" or "rebase other $commit"?
-	branch_name="$2"
-	switch_to="$2"
+	branch_name="$1"
+	switch_to="$1"
 
-	if git show-ref --verify --quiet -- "refs/heads/$2" &&
-	   branch=$(git rev-parse -q --verify "refs/heads/$2")
+	if git show-ref --verify --quiet -- "refs/heads/$1" &&
+	   branch=$(git rev-parse -q --verify "refs/heads/$1")
 	then
-		head_name="refs/heads/$2"
-	elif branch=$(git rev-parse -q --verify "$2")
+		head_name="refs/heads/$1"
+	elif branch=$(git rev-parse -q --verify "$1")
 	then
 		head_name="detached HEAD"
 	else
@@ -393,7 +408,8 @@ case "$#" in
 esac
 orig_head=$branch
 
-# Now we are rebasing commits $upstream..$branch on top of $onto
+# Now we are rebasing commits $upstream..$branch (or with --root,
+# everything leading up to $branch) on top of $onto
 
 # Check if we are already based on $onto with linear history,
 # but this should be done only when upstream and onto are the same.
@@ -429,10 +445,16 @@ then
 	exit 0
 fi
 
+if test ! -z "$rebase_root"; then
+	revisions="$onto..$orig_head"
+else
+	revisions="$upstream..$orig_head"
+fi
+
 if test -z "$do_merge"
 then
 	git format-patch -k --stdout --full-index --ignore-if-in-upstream \
-		"$upstream..$orig_head" |
+		$root_flag "$revisions" |
 	git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" &&
 	move_to_original_branch
 	ret=$?
@@ -455,7 +477,7 @@ echo "$orig_head" > "$dotest/orig-head"
 echo "$head_name" > "$dotest/head-name"
 
 msgnum=0
-for cmt in `git rev-list --reverse --no-merges "$upstream..$orig_head"`
+for cmt in `git rev-list --reverse --no-merges "$revisions"`
 do
 	msgnum=$(($msgnum + 1))
 	echo "$cmt" > "$dotest/cmt.$msgnum"
diff --git a/t/t3412-rebase-root.sh b/t/t3412-rebase-root.sh
new file mode 100755
index 0000000..dd91910
--- /dev/null
+++ b/t/t3412-rebase-root.sh
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+test_description='git rebase --root
+
+Tests if git rebase --root --onto <newparent> can rebase the root commit.
+'
+. ./test-lib.sh
+
+test_expect_success 'prepare repository' '
+	echo 1 > A &&
+	git add A &&
+	git commit -m 1 &&
+	echo 2 > A &&
+	git add A &&
+	git commit -m 2 &&
+	git symbolic-ref HEAD refs/heads/other &&
+	rm .git/index &&
+	echo 3 > B &&
+	git add B &&
+	git commit -m 3 &&
+	echo 1 > A &&
+	git add A &&
+	git commit -m 1b &&
+	echo 4 > B &&
+	git add B &&
+	git commit -m 4
+'
+
+test_expect_success 'rebase --root expects --onto' '
+	test_must_fail git rebase --root
+'
+
+test_expect_success 'setup pre-rebase hook' '
+	mkdir -p .git/hooks &&
+	cat >.git/hooks/pre-rebase <<EOF &&
+#!$SHELL_PATH
+echo "\$1,\$2" >.git/PRE-REBASE-INPUT
+EOF
+	chmod +x .git/hooks/pre-rebase
+'
+cat > expect <<EOF
+4
+3
+2
+1
+EOF
+
+test_expect_success 'rebase --root --onto <newbase>' '
+	git checkout -b work &&
+	git rebase --root --onto master &&
+	git log --pretty=tformat:"%s" > rebased &&
+	test_cmp expect rebased
+'
+
+test_expect_success 'pre-rebase got correct input (1)' '
+	test "z$(cat .git/PRE-REBASE-INPUT)" = z--root,
+'
+
+test_expect_success 'rebase --root --onto <newbase> <branch>' '
+	git branch work2 other &&
+	git rebase --root --onto master work2 &&
+	git log --pretty=tformat:"%s" > rebased2 &&
+	test_cmp expect rebased2
+'
+
+test_expect_success 'pre-rebase got correct input (2)' '
+	test "z$(cat .git/PRE-REBASE-INPUT)" = z--root,work2
+'
+
+test_expect_success 'setup pre-rebase hook that fails' '
+	mkdir -p .git/hooks &&
+	cat >.git/hooks/pre-rebase <<EOF &&
+#!$SHELL_PATH
+false
+EOF
+	chmod +x .git/hooks/pre-rebase
+'
+
+test_expect_success 'pre-rebase hook stops rebase' '
+	git checkout -b stops1 other &&
+	GIT_EDITOR=: test_must_fail git rebase --root --onto master &&
+	test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops1
+	test 0 = $(git rev-list other...stops1 | wc -l)
+'
+
+test_done
-- 
tg: (f62b77f..) t/rr-normal (depends on: origin/master t/rebase-hook-order)

^ permalink raw reply related

* Re: [BUG] unable to checkout branch with a clean worktree
From: Anders Melchiorsen @ 2009-01-05 17:54 UTC (permalink / raw)
  To: Clemens Buchacher; +Cc: git
In-Reply-To: <20090105160527.GA7718@localhost>

Clemens Buchacher <drizzd@aon.at> writes:

> On Mon, Jan 05, 2009 at 04:42:48PM +0100, Anders Melchiorsen wrote:
>> Git v1.6.1: The final checkout fails with an error about merge conflicts.
>
> This is fixed by the recent patches for verify_absent. (Actually,
> just PATCH 2/3 should be enough to fix this issue.)
>
> http://article.gmane.org/gmane.comp.version-control.git/104317

Right, I can confirm that the patch [2/3] fixes this, also in the repo
where the issue originally turned up.


Thanks,
Anders.

^ permalink raw reply

* Re: [PATCH 2/2] Be consistent in switch usage for tar
From: Alexander Potashev @ 2009-01-05 18:19 UTC (permalink / raw)
  To: henrik; +Cc: git
In-Reply-To: <1231169137-32653-3-git-send-email-henrik@austad.us>

On 16:25 Mon 05 Jan     , henrik@austad.us wrote:
> From: Henrik Austad <henrik@austad.us>
> 
> tar handles switches with and witouth preceding '-', but the documentation should be

s/witouth/without

> consistent nonetheless.
> 
> Signed-off-by: Henrik Austad <henrik@austad.us>
> ---
>  Documentation/user-manual.txt |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index 5242a7e..19f571a 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -1009,7 +1009,7 @@ $ git init
>  If you have some initial content (say, a tarball):
>  
>  -------------------------------------------------
> -$ tar -xzvf project.tar.gz
> +$ tar xzvf project.tar.gz

Btw, tar manpage uses dashed options in usage examples:

	tar -xvf foo.tar
		verbosely extract foo.tar
	...


>  $ cd project
>  $ git init
>  $ git add . # include everything below ./ in the first commit:
> -- 
> 1.6.1.36.g8430e

^ permalink raw reply

* Re: [ANNOUNCE] Git homepage change
From: Miklos Vajna @ 2009-01-05 18:57 UTC (permalink / raw)
  To: Scott Chacon; +Cc: Petr Baudis, git
In-Reply-To: <20090105164001.GA12275@machine.or.cz>

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]

On Mon, Jan 05, 2009 at 05:40:01PM +0100, Petr Baudis <pasky@suse.cz> wrote:
>   Based on the previous feedback of other developers and my last review
> of git-scm.com, I have changed git.or.cz to redirect to git-scm.com.

Just wondering, why don't you use the -s option of git shortlog in
./script/get_authors.sh?

I mean:

diff --git a/script/get_authors.sh b/script/get_authors.sh
index 9aa8c6b..89948e2 100755
--- a/script/get_authors.sh
+++ b/script/get_authors.sh
@@ -1,3 +1,3 @@
 export GIT_DIR=/Users/schacon/projects/git/.git
 cd /Users/schacon/projects/git
-git log --pretty=short --no-merges | git shortlog -n | grep -v -e '^ ' | grep ':' > ../gitscm/config/authors.txt
+git shortlog -s -n > ../gitscm/config/authors.txt

I suppose fixing up the ruby part after this is not that hard, sadly I
don't speak Ruby myself, so I have no idea where and what to touch. ;-)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply related

* Re: [ANNOUNCE] Git homepage change
From: Miklos Vajna @ 2009-01-05 19:03 UTC (permalink / raw)
  To: Scott Chacon; +Cc: Petr Baudis, git
In-Reply-To: <20090105185737.GV21154@genesis.frugalware.org>

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

On Mon, Jan 05, 2009 at 07:57:37PM +0100, Miklos Vajna <vmiklos@frugalware.org> wrote:
> --- a/script/get_authors.sh
> +++ b/script/get_authors.sh
> @@ -1,3 +1,3 @@
>  export GIT_DIR=/Users/schacon/projects/git/.git
>  cd /Users/schacon/projects/git
> -git log --pretty=short --no-merges | git shortlog -n | grep -v -e '^ ' | grep ':' > ../gitscm/config/authors.txt
> +git shortlog -s -n > ../gitscm/config/authors.txt

Err, --no-merges still makes sense, so probably this one would be
better:

diff --git a/script/get_authors.sh b/script/get_authors.sh
index 9aa8c6b..1656da4 100755
--- a/script/get_authors.sh
+++ b/script/get_authors.sh
@@ -1,3 +1,3 @@
 export GIT_DIR=/Users/schacon/projects/git/.git
 cd /Users/schacon/projects/git
-git log --pretty=short --no-merges | git shortlog -n | grep -v -e '^ ' | grep ':' > ../gitscm/config/authors.txt
+git shortlog --no-merges -s -n > ../gitscm/config/authors.txt

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply related

* [PATCH] stgit namelength is an integer
From: Pete Wyckoff @ 2009-01-05 19:03 UTC (permalink / raw)
  To: git

Interpret stgit namelength as an integer, else the use of
name_len will fail with

  File "/usr/lib/python2.5/site-packages/stgit/utils.py", line 206, in patch_name_from_msg
    return re.sub('[\W]+', '-', subject_line).strip('-')[:name_len]
TypeError: slice indices must be integers or None or have an __index__ method

Signed-off-by: Pete Wyckoff <pw@padd.com>
---
 stgit/utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stgit/utils.py b/stgit/utils.py
index 81035a5..1fa96c2 100644
--- a/stgit/utils.py
+++ b/stgit/utils.py
@@ -215,7 +215,7 @@ def patch_name_from_msg(msg):
     if not msg:
         return None
 
-    name_len = config.get('stgit.namelength')
+    name_len = config.getint('stgit.namelength')
     if not name_len:
         name_len = 30
 
-- 
1.6.0.6

^ permalink raw reply related

* Re: [PATCH v2] parse-opt: migrate builtin-apply.
From: Pierre Habouzit @ 2009-01-05 19:12 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Miklos Vajna, git
In-Reply-To: <7vvdt5cmu6.fsf@gitster.siamese.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 807 bytes --]

On Sat, Dec 27, 2008 at 09:47:13PM +0000, Junio C Hamano wrote:
> Miklos Vajna <vmiklos@frugalware.org> writes:
> 
> > +static int option_parse_inaccurate(const struct option *opt,
> > +				   const char *arg, int unset)
> > +{
> > +	options |= INACCURATE_EOF;
> > +	return 0;
> > +}
> > +
> > +static int option_parse_recount(const struct option *opt,
> > +				const char *arg, int unset)
> > +{
> > +	options |= RECOUNT;
> > +	return 0;
> > +}
> 
> I still haven't applied and ran the testsuite myself, but these makes me
> wonder if there isn't a built-in "bit" type support in parse_options().

There is.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* Re: [ANNOUNCE] Git homepage change
From: Mike Hommey @ 2009-01-05 19:40 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Scott Chacon, git
In-Reply-To: <20090105164001.GA12275@machine.or.cz>

On Mon, Jan 05, 2009 at 05:40:01PM +0100, Petr Baudis wrote:
>   Hi,
> 
>   thanks for the changes, Scott!
> 
>   Based on the previous feedback of other developers and my last review
> of git-scm.com, I have changed git.or.cz to redirect to git-scm.com.
> 
>   The wiki is still hosted at the original place for the time being, as
> well as the man/ gitbot redirect. To reach the original manpage, use
> http://git.or.cz/index.html.

FWIW, I think the "mascot" or whatever it is supposed to be, on the
top right end, is "safe", trademark/copyright-wise. It looks too much
like どーもくん(Dômo-kun), the NHK mascot.
http://images.google.co.jp/images?q=%E3%81%A9%E3%83%BC%E3%82%82%E3%81%8F%E3%82%93&ie=UTF-8&oe=UTF-8&hl=en&um=1&sa=N&tab=wi

Mike

^ permalink raw reply

* Re: [PATCH v2] parse-opt: migrate builtin-apply.
From: Miklos Vajna @ 2009-01-05 20:06 UTC (permalink / raw)
  To: Pierre Habouzit; +Cc: Junio C Hamano, git
In-Reply-To: <20090105191222.GA14793@artemis.corp>

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

On Mon, Jan 05, 2009 at 08:12:22PM +0100, Pierre Habouzit <madcoder@debian.org> wrote:
> > I still haven't applied and ran the testsuite myself, but these makes me
> > wonder if there isn't a built-in "bit" type support in parse_options().
> 
> There is.

FYI, in the meantime f26c494 is already in next, using OPT_BIT. :-)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* Re: [ANNOUNCE] Git homepage change
From: Felipe Oliveira Carvalho @ 2009-01-05 20:16 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Scott Chacon, git
In-Reply-To: <20090105164001.GA12275@machine.or.cz>

On the footer we have:
"Source for this website was forked from Petr Baudis's git.or.cz"

The link git.or.cz should be changed to git.or.cz/index.html to avoid
confusion for newcomers.

git-scm.com is a very good page for "git quick start".

--
Felipe

^ permalink raw reply

* Re: [ANNOUNCE] Git homepage change
From: Ted Pavlic @ 2009-01-05 20:27 UTC (permalink / raw)
  To: git; +Cc: Petr Baudis, Scott Chacon
In-Reply-To: <20090105164001.GA12275@machine.or.cz>

>    The wiki is still hosted at the original place for the time being, as
> well as the man/ gitbot redirect. To reach the original manpage, use
> http://git.or.cz/index.html.

There were a couple of other pages under git.or.cz that may still be 
linked elsewhere (e.g., the "external patches" page and the SVN crash 
course). It would be nice if permanent redirects were added from those 
pages to their new homes (so that existing links on the web wind up in 
the right place).

--Ted


-- 
Ted Pavlic <ted@tedpavlic.com>

^ permalink raw reply

* Re: [ANNOUNCE] Git homepage change
From: Scott Chacon @ 2009-01-05 20:33 UTC (permalink / raw)
  To: Felipe Oliveira Carvalho; +Cc: Petr Baudis, git
In-Reply-To: <a2075f4c0901051216q193057fdrc07e17b580d67150@mail.gmail.com>

Hi,

On Mon, Jan 5, 2009 at 12:16 PM, Felipe Oliveira Carvalho
<felipekde@gmail.com> wrote:
> On the footer we have:
> "Source for this website was forked from Petr Baudis's git.or.cz"
>
> The link git.or.cz should be changed to git.or.cz/index.html to avoid
> confusion for newcomers.

Thanks, that is a good catch - I just updated this.

Scott

>
> git-scm.com is a very good page for "git quick start".
>
> --
> Felipe
>

^ permalink raw reply

* Re: [ANNOUNCE] Git homepage change
From: Boyd Lynn Gerber @ 2009-01-05 20:51 UTC (permalink / raw)
  To: Scott Chacon; +Cc: Felipe Oliveira Carvalho, Petr Baudis, git
In-Reply-To: <d411cc4a0901051233v416a3b13n22811715a534872d@mail.gmail.com>

On Mon, 5 Jan 2009, Scott Chacon wrote:
> On Mon, Jan 5, 2009 at 12:16 PM, Felipe Oliveira Carvalho
> <felipekde@gmail.com> wrote:
>> On the footer we have:
>> "Source for this website was forked from Petr Baudis's git.or.cz"
>>
>> The link git.or.cz should be changed to git.or.cz/index.html to avoid
>> confusion for newcomers.
>
> Thanks, that is a good catch - I just updated this.

Also the mail list archive should really point to a valid archive.  2005 
is really old.

-- 
Boyd Gerber <gerberb@zenez.com> 801 849-0213
ZENEZ	1042 East Fort Union #135, Midvale Utah  84047

^ permalink raw reply

* Re: [ANNOUNCE] Git homepage change
From: David Bryson @ 2009-01-05 21:27 UTC (permalink / raw)
  To: Mike Hommey; +Cc: Scott Chacon, git
In-Reply-To: <20090105194011.GB25104@glandium.org>

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

On Mon, Jan 05, 2009 at 08:40:11PM +0100 or thereabouts, Mike Hommey wrote:
> 
> FWIW, I think the "mascot" or whatever it is supposed to be, on the
> top right end, is "safe", trademark/copyright-wise. It looks too much
> like ???????????????(D??mo-kun), the NHK mascot.
> http://images.google.co.jp/images?q=%E3%81%A9%E3%83%BC%E3%82%82%E3%81%8F%E3%82%93&ie=UTF-8&oe=UTF-8&hl=en&um=1&sa=N&tab=wi

I think Scott mentioned at GitTogether that they paid the same artist
design some artwork for them including that tree munching monster and an
octopus.

Scott do you care to elaborate ?

Dave


[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* [PATCH] get_authors.sh, author.rb: use -s option of git shortlog.
From: Adeodato Simó @ 2009-01-05 22:52 UTC (permalink / raw)
  To: Scott Chacon; +Cc: git, Miklos Vajna, Adeodato Simó
In-Reply-To: <20090105185737.GV21154@genesis.frugalware.org>

Suggested by Miklos Vajna <vmiklos@frugalware.org>.
---
 app/models/author.rb  |   26 ++++++++++++--------------
 script/get_authors.sh |    2 +-
 2 files changed, 13 insertions(+), 15 deletions(-)

> I suppose fixing up the ruby part after this is not that hard, sadly I
> don't speak Ruby myself, so I have no idea where and what to touch. ;-)

Done.

Btw, I don't think authors.txt should be in the repo at all, since it's
automatically generated, but it's your choice. :-)

diff --git a/app/models/author.rb b/app/models/author.rb
index 8fafc15..6bf069a 100644
--- a/app/models/author.rb
+++ b/app/models/author.rb
@@ -1,22 +1,20 @@
 class Author
-	
-	def self.all
-		authors =  File.join(RAILS_ROOT, 'config/authors.txt')
+  def self.all
+    authors = File.join(RAILS_ROOT, 'config/authors.txt')
     if File.exists?(authors)
       authors = File.readlines(authors)
       @authors = {:main => [], :contrib => []}
       authors.each do |author|
-        data = author.split(' ')
-        number = data.pop.gsub('(', '').gsub(')', '').chomp
-        name = data.join(' ')
-        if(number.to_i > 50)
-          @authors[:main] << [name, number.to_i]
-        else
-          @authors[:contrib] << [name, number.to_i]
+        if author =~ /(\d+)\s+(.+)/
+          name, number = $2, $1.to_i
+          if number > 50
+            @authors[:main] << [name, number]
+          else
+            @authors[:contrib] << [name, number]
+          end
         end
       end
+      @authors
     end
-		@authors
-	end
-	
-end
\ No newline at end of file
+  end
+end
diff --git a/script/get_authors.sh b/script/get_authors.sh
index 9aa8c6b..028a354 100755
--- a/script/get_authors.sh
+++ b/script/get_authors.sh
@@ -1,3 +1,3 @@
 export GIT_DIR=/Users/schacon/projects/git/.git
 cd /Users/schacon/projects/git
-git log --pretty=short --no-merges | git shortlog -n | grep -v -e '^ ' | grep ':' > ../gitscm/config/authors.txt
+git shortlog --no-merges -sn > ../gitscm/config/authors.txt
-- 
1.6.1.62.g677ca

^ permalink raw reply related

* Re: [PATCH] Permit a wider range of repository names in jgit daemon requests
From: Robin Rosenberg @ 2009-01-05 23:07 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20090105024622.GC20973@spearce.org>

måndag 05 januari 2009 03:46:22 skrev Shawn O. Pearce:
> The earlier restriction was too narrow for some applications, for
> example repositories named "jgit.dev" and "jgit.test" are perfectly
> valid Git repositories and should still be able to be served by
> the daemon.
> 
> By blocking out only uses of ".." as a path component and Windows
> UNC paths (by blocking "\") we can reasonably prevent the client
> from escaping the base dirctories configured in the daemon.
> 
> +		if (name.startsWith("../") || name.contains("/../")
> +				|| name.contains("\\"))

//host/share also works as UNC path (even the DOS commands support it, provided
you quote the paths) and if you block // shuldn't '/', and '[A-Z]:' also be blocked? 
\\ is a UNC-prefix only at the beginning of a path so if / need not be filtered, nor 
does //. Inside a path \\ is the same as \ AFAIK (except directly after the drive letter.
This should probablybe factored out into a utilty so we can have a simple unit test for it.

-- robin

^ permalink raw reply

* Re: [PATCH] get_authors.sh, author.rb: use -s option of git shortlog.
From: Miklos Vajna @ 2009-01-05 23:54 UTC (permalink / raw)
  To: Adeodato Simó; +Cc: Scott Chacon, git
In-Reply-To: <1231195946-20967-1-git-send-email-dato@net.com.org.es>

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

On Mon, Jan 05, 2009 at 11:52:26PM +0100, Adeodato Simó <dato@net.com.org.es> wrote:
> > I suppose fixing up the ruby part after this is not that hard, sadly I
> > don't speak Ruby myself, so I have no idea where and what to touch. ;-)
> 
> Done.

Heh, great, thanks. :)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* gitweb: removal of old style blobdiff support breaks ikiwiki
From: Joey Hess @ 2009-01-05 23:54 UTC (permalink / raw)
  To: Gerrit Pape; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]

>  * debian/diff/0005-gitweb-do-not-run-git-diff-that-is-Porcelain.diff:
>     new; fix possible gitweb vulnerability: calling "git diff": Jakub
>     says that legacy-style URI to view two blob differences are never
>     generated since 1.4.3.  This codepath runs "git diff" Porcelain from
>     the gitweb, which is a no-no.  It can trigger diff.external command
>     that is specified in the configuration file of the repository being
>     viewed.

Jakub didn't know the whole picture. This change breaks ikiwiki
configurations that use the old url form with gitweb. That url form
is used in configuration examples that have probably been copied into a
lot of ikiwiki setup files.

(Who knows what else might rely on the old url form.. One other thing I've
found that does is various cut-n-pasted gitweb urls embedded on various
websites..)

I wonder if it wouldn't be better to make gitweb continue to support the
old urls, using diff-tree instead of the porcelain?

Gerrit:
I'll be releasing a new version of ikiwiki to that documents how to use
the new gitweb url form. The version in Debian testing would need to
have a new-ish feature backported into it to support the new url form at
all. So please let me know if there are any plans to make this change to
the git in testing (or stable).

-- 
see shy jo

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* [PATCH] parse-opt: migrate builtin-ls-files.
From: Miklos Vajna @ 2009-01-06  0:11 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

option_parse_ignored(), option_parse_directory() and
option_parse_no_empty() callbacks are necessary because
dir->show_ignored, dir->show_other_directories and
dir->hide_empty_directories are bitfields in struct dir_struct. Maybe it
would worth just removing them, but I did not want to touch dir.h just
because of parseopt.

 builtin-ls-files.c |  294 ++++++++++++++++++++++++++++------------------------
 1 files changed, 159 insertions(+), 135 deletions(-)

diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index f72eb85..a2f3de4 100644
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
@@ -10,6 +10,7 @@
 #include "dir.h"
 #include "builtin.h"
 #include "tree.h"
+#include "parse-options.h"
 
 static int abbrev;
 static int show_deleted;
@@ -28,6 +29,7 @@ static const char **pathspec;
 static int error_unmatch;
 static char *ps_matched;
 static const char *with_tree;
+static int exc_given;
 
 static const char *tag_cached = "";
 static const char *tag_unmerged = "";
@@ -395,156 +397,178 @@ int report_path_error(const char *ps_matched, const char **pathspec, int prefix_
 	return errors;
 }
 
-static const char ls_files_usage[] =
-	"git ls-files [-z] [-t] [-v] (--[cached|deleted|others|stage|unmerged|killed|modified])* "
-	"[ --ignored ] [--exclude=<pattern>] [--exclude-from=<file>] "
-	"[ --exclude-per-directory=<filename> ] [--exclude-standard] "
-	"[--full-name] [--abbrev] [--] [<file>]*";
+static const char * const ls_files_usage[] = {
+	"git ls-files [options] [<file>]*",
+	NULL
+};
+
+static int option_parse_z(const struct option *opt,
+			  const char *arg, int unset)
+{
+	if (unset)
+		line_terminator = '\n';
+	else
+		line_terminator = 0;
+	return 0;
+}
+
+static int option_parse_exclude(const struct option *opt,
+				const char *arg, int unset)
+{
+	struct dir_struct *dir = opt->value;
+
+	exc_given = 1;
+	add_exclude(arg, "", 0, &dir->exclude_list[EXC_CMDL]);
+
+	return 0;
+}
+
+static int option_parse_exclude_from(const struct option *opt,
+				     const char *arg, int unset)
+{
+	struct dir_struct *dir = opt->value;
+
+	exc_given = 1;
+	add_excludes_from_file(dir, arg);
+
+	return 0;
+}
+
+static int option_parse_exclude_standard(const struct option *opt,
+					 const char *arg, int unset)
+{
+	struct dir_struct *dir = opt->value;
+
+	exc_given = 1;
+	setup_standard_excludes(dir);
+
+	return 0;
+}
+
+static int option_parse_ignored(const struct option *opt,
+				const char *arg, int unset)
+{
+	struct dir_struct *dir = opt->value;
+
+	dir->show_ignored = 1;
+
+	return 0;
+}
+
+static int option_parse_directory(const struct option *opt,
+				  const char *arg, int unset)
+{
+	struct dir_struct *dir = opt->value;
+
+	dir->show_other_directories = 1;
+
+	return 0;
+}
+
+static int option_parse_no_empty(const struct option *opt,
+				 const char *arg, int unset)
+{
+	struct dir_struct *dir = opt->value;
+
+	dir->hide_empty_directories = 1;
+
+	return 0;
+}
+
+static int option_parse_full_name(const struct option *opt,
+				  const char *arg, int unset)
+{
+	prefix_offset = 0;
+
+	return 0;
+}
 
 int cmd_ls_files(int argc, const char **argv, const char *prefix)
 {
-	int i;
-	int exc_given = 0, require_work_tree = 0;
+	int require_work_tree = 0, show_tag = 0;
 	struct dir_struct dir;
+	struct option builtin_ls_files_options[] = {
+		{ OPTION_CALLBACK, 'z', NULL, NULL, NULL,
+			"paths are separated with NUL character",
+			PARSE_OPT_NOARG, option_parse_z },
+		OPT_BOOLEAN('t', NULL, &show_tag,
+			"identify the file status with tags"),
+		OPT_BOOLEAN('v', NULL, &show_valid_bit,
+			"use lowercase letters for 'assume unchanged' files"),
+		OPT_BOOLEAN('c', "cached", &show_cached,
+				"show cached files in the output (default)"),
+		OPT_BOOLEAN('d', "deleted", &show_deleted,
+				"show deleted files in the output"),
+		OPT_BOOLEAN('m', "modified", &show_modified,
+				"show modified files in the output"),
+		OPT_BOOLEAN('o', "others", &show_others,
+				"show other files in the output"),
+		{ OPTION_CALLBACK, 'i', "ignored", &dir, NULL,
+			"show ignored files in the output",
+			PARSE_OPT_NOARG, option_parse_ignored },
+		OPT_BOOLEAN('s', "stage", &show_stage,
+			"show staged contents' object name in the output"),
+		OPT_BOOLEAN('k', "killed", &show_killed,
+			"show files on the filesystem that need to be removed"),
+		{ OPTION_CALLBACK, 0, "directory", &dir, NULL,
+			"show 'other' directories' name only",
+			PARSE_OPT_NOARG, option_parse_directory },
+		{ OPTION_CALLBACK, 0, "no-empty-directory", &dir, NULL,
+			"do not list empty directories",
+			PARSE_OPT_NOARG, option_parse_no_empty },
+		OPT_BOOLEAN('u', "unmerged", &show_unmerged,
+			"show unmerged files in the output"),
+		{ OPTION_CALLBACK, 'x', "exclude", &dir, "pattern",
+			"skip files matching pattern",
+			0, option_parse_exclude },
+		{ OPTION_CALLBACK, 'X', "exclude-from", &dir, "file",
+			"exclude patterns are read from <file>",
+			0, option_parse_exclude_from },
+		OPT_STRING(0, "exclude-per-directory", &dir.exclude_per_dir, "file",
+			"read additional per-directory exclude patterns in <file>"),
+		{ OPTION_CALLBACK, 0, "exclude-standard", &dir, NULL,
+			"add the standard git exclusions",
+			PARSE_OPT_NOARG, option_parse_exclude_standard },
+		{ OPTION_CALLBACK, 0, "full-name", NULL, NULL,
+			"make the output relative to the project top directory",
+			PARSE_OPT_NOARG, option_parse_full_name },
+		OPT_BOOLEAN(0, "error-unmatch", &error_unmatch,
+			"if any <file> is not in the index, treat this as an error"),
+		OPT_STRING(0, "with-tree", &with_tree, "tree-ish",
+			"pretend that paths removed since <tree-ish> are still present"),
+		OPT__ABBREV(&abbrev),
+		OPT_END()
+	};
 
 	memset(&dir, 0, sizeof(dir));
 	if (prefix)
 		prefix_offset = strlen(prefix);
 	git_config(git_default_config, NULL);
 
-	for (i = 1; i < argc; i++) {
-		const char *arg = argv[i];
-
-		if (!strcmp(arg, "--")) {
-			i++;
-			break;
-		}
-		if (!strcmp(arg, "-z")) {
-			line_terminator = 0;
-			continue;
-		}
-		if (!strcmp(arg, "-t") || !strcmp(arg, "-v")) {
-			tag_cached = "H ";
-			tag_unmerged = "M ";
-			tag_removed = "R ";
-			tag_modified = "C ";
-			tag_other = "? ";
-			tag_killed = "K ";
-			if (arg[1] == 'v')
-				show_valid_bit = 1;
-			continue;
-		}
-		if (!strcmp(arg, "-c") || !strcmp(arg, "--cached")) {
-			show_cached = 1;
-			continue;
-		}
-		if (!strcmp(arg, "-d") || !strcmp(arg, "--deleted")) {
-			show_deleted = 1;
-			continue;
-		}
-		if (!strcmp(arg, "-m") || !strcmp(arg, "--modified")) {
-			show_modified = 1;
-			require_work_tree = 1;
-			continue;
-		}
-		if (!strcmp(arg, "-o") || !strcmp(arg, "--others")) {
-			show_others = 1;
-			require_work_tree = 1;
-			continue;
-		}
-		if (!strcmp(arg, "-i") || !strcmp(arg, "--ignored")) {
-			dir.show_ignored = 1;
-			require_work_tree = 1;
-			continue;
-		}
-		if (!strcmp(arg, "-s") || !strcmp(arg, "--stage")) {
-			show_stage = 1;
-			continue;
-		}
-		if (!strcmp(arg, "-k") || !strcmp(arg, "--killed")) {
-			show_killed = 1;
-			require_work_tree = 1;
-			continue;
-		}
-		if (!strcmp(arg, "--directory")) {
-			dir.show_other_directories = 1;
-			continue;
-		}
-		if (!strcmp(arg, "--no-empty-directory")) {
-			dir.hide_empty_directories = 1;
-			continue;
-		}
-		if (!strcmp(arg, "-u") || !strcmp(arg, "--unmerged")) {
-			/* There's no point in showing unmerged unless
-			 * you also show the stage information.
-			 */
-			show_stage = 1;
-			show_unmerged = 1;
-			continue;
-		}
-		if (!strcmp(arg, "-x") && i+1 < argc) {
-			exc_given = 1;
-			add_exclude(argv[++i], "", 0, &dir.exclude_list[EXC_CMDL]);
-			continue;
-		}
-		if (!prefixcmp(arg, "--exclude=")) {
-			exc_given = 1;
-			add_exclude(arg+10, "", 0, &dir.exclude_list[EXC_CMDL]);
-			continue;
-		}
-		if (!strcmp(arg, "-X") && i+1 < argc) {
-			exc_given = 1;
-			add_excludes_from_file(&dir, argv[++i]);
-			continue;
-		}
-		if (!prefixcmp(arg, "--exclude-from=")) {
-			exc_given = 1;
-			add_excludes_from_file(&dir, arg+15);
-			continue;
-		}
-		if (!prefixcmp(arg, "--exclude-per-directory=")) {
-			exc_given = 1;
-			dir.exclude_per_dir = arg + 24;
-			continue;
-		}
-		if (!strcmp(arg, "--exclude-standard")) {
-			exc_given = 1;
-			setup_standard_excludes(&dir);
-			continue;
-		}
-		if (!strcmp(arg, "--full-name")) {
-			prefix_offset = 0;
-			continue;
-		}
-		if (!strcmp(arg, "--error-unmatch")) {
-			error_unmatch = 1;
-			continue;
-		}
-		if (!prefixcmp(arg, "--with-tree=")) {
-			with_tree = arg + 12;
-			continue;
-		}
-		if (!prefixcmp(arg, "--abbrev=")) {
-			abbrev = strtoul(arg+9, NULL, 10);
-			if (abbrev && abbrev < MINIMUM_ABBREV)
-				abbrev = MINIMUM_ABBREV;
-			else if (abbrev > 40)
-				abbrev = 40;
-			continue;
-		}
-		if (!strcmp(arg, "--abbrev")) {
-			abbrev = DEFAULT_ABBREV;
-			continue;
-		}
-		if (*arg == '-')
-			usage(ls_files_usage);
-		break;
+	argc = parse_options(argc, argv, builtin_ls_files_options,
+			ls_files_usage, 0);
+	if (show_tag || show_valid_bit) {
+		tag_cached = "H ";
+		tag_unmerged = "M ";
+		tag_removed = "R ";
+		tag_modified = "C ";
+		tag_other = "? ";
+		tag_killed = "K ";
 	}
+	if (show_modified || show_others || dir.show_ignored || show_killed)
+		require_work_tree = 1;
+	if (show_unmerged)
+		/* There's no point in showing unmerged unless
+		 * you also show the stage information.
+		 */
+		show_stage = 1;
+	if (dir.exclude_per_dir)
+		exc_given = 1;
 
 	if (require_work_tree && !is_inside_work_tree())
 		setup_work_tree();
 
-	pathspec = get_pathspec(prefix, argv + i);
+	pathspec = get_pathspec(prefix, argv);
 
 	/* Verify that the pathspec matches the prefix */
 	if (pathspec)
-- 
1.6.1

^ permalink raw reply related

* Re: gitweb: removal of old style blobdiff support breaks ikiwiki
From: Jeff King @ 2009-01-06  0:25 UTC (permalink / raw)
  To: Joey Hess; +Cc: Gerrit Pape, git
In-Reply-To: <20090105235418.GA9373@gnu.kitenet.net>

On Mon, Jan 05, 2009 at 06:54:18PM -0500, Joey Hess wrote:

> I wonder if it wouldn't be better to make gitweb continue to support the
> old urls, using diff-tree instead of the porcelain?

It can't; there is currently no interface for diffing two arbitrary
blobs except "git diff". The simplest fix to retain functionality but
plug the hole is to pass --no-ext-diff to all versions, and
--no-textconv to versions which have textconv (i.e., 1.6.1 and later).
IIRC, there is a problem with --no-ext-diff in some versions, so that
fix might have to be backported, too.

-Peff

^ permalink raw reply

* git documentation
From: david @ 2009-01-06  1:46 UTC (permalink / raw)
  To: git

on lwn there is a comment (under the GNOME survey topic)
http://lwn.net/Articles/313435/

The Shlomi Fish "Better SCM" site for example is very clear that Git won't 
do a merge across a rename. It even has a citation for this claim. But as 
a Git user who has actually done a merge across a rename I know it works 
just fine, and anyone familiar with Git's internals will guess immediately 
why. Yet probably there is no line of documentation on the Git site or 
elsewhere that I can quote to justify adding a "Yes" to the comparison.


sounds like a missing piece of documentation that someone should be able 
to fill in fairly easily.

David Lang

^ permalink raw reply

* Re: [EGIT PATCH] Sorting commit items by click on the table header in commit dialog.
From: Robin Rosenberg @ 2009-01-06  0:49 UTC (permalink / raw)
  To: Vasyl' Vavrychuk; +Cc: Shawn O. Pearce, git
In-Reply-To: <200901050835.20038.robin.rosenberg.lists@dewire.com>


Seems this was trivial to apply after patchin the patch, so I did.

-- robin

^ permalink raw reply

* git merge failure: what next?
From: Daniel Quinlan @ 2009-01-06  0:41 UTC (permalink / raw)
  To: git

I cannot figure out how to resolve a problem with git merge.

I usually use "git pull" to merge changes from a central repository  
before pushing local changes to the central repository.
I've learned from bitter experience not to have changes in the  
intermediate cache/stage/index, since that always leads to
confusion -- but it's possible I failed to follow that rule in this  
case.

The working tree is currently dirty with lots of changes I'm not ready  
to commit.

Anyway, now  I get this:

> % git pull
> *** : needs update
> 	.
> 	.
> fatal: Entry 'correct/orblag/orblag' would be overwritten by merge.  
> Cannot merge.
> Merge with strategy recursive failed.
> %
>

At this point, I usually do something like remove the 'correct/orblag/ 
orblag', knowing that I just want
whatever is in the repository (or ultimately, not caring, provided I  
can get past this message).

However, that doesn't work:

> % rm correct/orblag/orblag
> rm: cannot remove `correct/orblag/orblag': No such file or directory
>

Also,

> % git mergetool
> No files need merging
>


I'm stuck.

A related problem is that although I'm usually able to get past this  
problem by deleting
a file, this can be tedious as there may be multiple files with  
conflicts, but git-merge only
lets me know about the first one it finds.  Knowing all the conflicts  
right off the bat would
give me an idea about the breadth of the problem.

Another possibility I might like to see is the CVS approach -- just  
create combined files
with all the differences in them instead of hanging up on the first  
conflict.

Suggestions?
Thanks,
-- danq

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox