Git development
 help / color / mirror / Atom feed
* Re: [PATCH] Fix core.sharedRepository = 2
From: martin f krafft @ 2007-07-11 14:52 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, gitster
In-Reply-To: <Pine.LNX.4.64.0707111517050.4516@racer.site>

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

also sprach Johannes Schindelin <Johannes.Schindelin@gmx.de> [2007.07.11.1618 +0200]:
> This patch fixes both issues, and adds a test to prove it.

I also tested it and can confirm.

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
spamtraps: madduck.bogus@madduck.net
 
"wer ein warum hat, dem ist kein wie zu schwer."
                                                 - friedrich nietzsche

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

^ permalink raw reply

* Re: Hook after pull ?
From: Alex Riesen @ 2007-07-11 14:51 UTC (permalink / raw)
  To: Claudio Scordino; +Cc: git, Johannes.Schindelin
In-Reply-To: <4694EC0F.10003@gmail.com>

On 7/11/07, Claudio Scordino <cloud.of.andor@gmail.com> wrote:
> Hi all.
>
> Does any hook being called after the pull (that means, after fetch or merge) ?
>

There are some

> If no, does exist any easy way of creating such hook ?
>

What for? What do you want to do?

^ permalink raw reply

* Hook after pull ?
From: Claudio Scordino @ 2007-07-11 14:41 UTC (permalink / raw)
  To: git; +Cc: Johannes.Schindelin

Hi all.

Does any hook being called after the pull (that means, after fetch or merge) ?

If no, does exist any easy way of creating such hook ?

Many thanks in advance,

           Claudio

^ permalink raw reply

* Re: git-update-server-info may be required,cannot clone and pull from a remote repository
From: Alex Riesen @ 2007-07-11 14:31 UTC (permalink / raw)
  To: pradeep singh; +Cc: git
In-Reply-To: <a901b49a0707110708o7c883bb0s707d9791f344f1f6@mail.gmail.com>

On 7/11/07, pradeep singh <pradeep.rautela@gmail.com> wrote:

> I followed the howto instruction for setting up a git repo over http
> using the HOWTO  given in the /usr/share/doc/git-doc/howtos .
>

You may want to consider an upgrade to your git installation.
But it is unrelated to your problems.

> 1. I already have a source tree controlled by git on the same
> machine.I want to make this as the master for the new public
> repository. I created a bare git repo in it as per the howto. Now i
> want to commit my local git repo to this public repository.I failed to
> do so sadly :-/.Can anyone point me to the correct place or link?

Try Documentation/everyday.txt in git source distribution

> 2. Even when i did a (from another machine)
>  $git-clone http://100.121.232/work.git work
>  It says,
>  Cannot get remote repository information.

Well, you can try this link in your browser.
Does it show something?
Does http://100.121.232/work.git/objects/info/packs work?

>  Perhaps git-update-server-info needs to be run there?

Yes. But it wont help unless your web server is setup correctly.

> Can any one help me with this?

Any reason you cannot use ssh?

> I ll appreciate some good documents or howtos on setting up git
> repository painlessly.

Usually it is as simple as "git init" in directory where you want it.

^ permalink raw reply

* [PATCH] Fix core.sharedRepository = 2
From: Johannes Schindelin @ 2007-07-11 14:18 UTC (permalink / raw)
  To: martin f krafft; +Cc: git, gitster
In-Reply-To: <20070711135656.GA28593@piper.oerlikon.madduck.net>


For compatibility reasons, "git init --shared=all" does not write
"all" into the config, but a number.  In the shared setup, you
really have to support even older clients on the _same_ repository.

But git_config_perm() did not pick up on it.

Also, "git update-server-info" failed to pick up on the shared
permissions.

This patch fixes both issues, and adds a test to prove it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---

	On Wed, 11 Jul 2007, martin f krafft wrote:

	> also sprach Johannes Schindelin <Johannes.Schindelin@gmx.de>
	> > Earlier, update-server-info used the umask, even if
	> > core.sharedRepository = 1.
	> > 
	> > Noticed by madduck on IRC.
	> > 	Does this work for you?
	>	 
	> Yes, it does, but only if I put = all/group into the config. 
	> init-db --shared=all however sets core.sharedRepository=2, and 
	> then update-server-info produces a 0660 file.

	Should be fixed now.

 server-info.c          |    2 ++
 setup.c                |    4 ++++
 t/t1301-shared-repo.sh |   27 +++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100755 t/t1301-shared-repo.sh

diff --git a/server-info.c b/server-info.c
index f9be5a7..0d1312c 100644
--- a/server-info.c
+++ b/server-info.c
@@ -38,6 +38,7 @@ static int update_info_refs(int force)
 		return error("unable to update %s", path0);
 	for_each_ref(add_info_ref, NULL);
 	fclose(info_ref_fp);
+	adjust_shared_perm(path1);
 	rename(path1, path0);
 	free(path0);
 	free(path1);
@@ -227,6 +228,7 @@ static int update_info_packs(int force)
 		return error("cannot open %s", name);
 	write_pack_info_file(fp);
 	fclose(fp);
+	adjust_shared_perm(name);
 	rename(name, infofile);
 	return 0;
 }
diff --git a/setup.c b/setup.c
index bb26f3a..7b07144 100644
--- a/setup.c
+++ b/setup.c
@@ -364,6 +364,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
 int git_config_perm(const char *var, const char *value)
 {
 	if (value) {
+		int i;
 		if (!strcmp(value, "umask"))
 			return PERM_UMASK;
 		if (!strcmp(value, "group"))
@@ -372,6 +373,9 @@ int git_config_perm(const char *var, const char *value)
 		    !strcmp(value, "world") ||
 		    !strcmp(value, "everybody"))
 			return PERM_EVERYBODY;
+		i = atoi(value);
+		if (i > 1)
+			return i;
 	}
 	return git_config_bool(var, value);
 }
diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh
new file mode 100755
index 0000000..bb5f302
--- /dev/null
+++ b/t/t1301-shared-repo.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Johannes Schindelin
+#
+
+test_description='Test shared repository initialization'
+
+. ./test-lib.sh
+
+test_expect_success 'shared=all' '
+	mkdir sub &&
+	cd sub &&
+	git init --shared=all &&
+	test 2 = $(git config core.sharedrepository)
+'
+
+test_expect_success 'update-server-info honors core.sharedRepository' '
+	: > a1 &&
+	git add a1 &&
+	test_tick &&
+	git commit -m a1 &&
+	umask 0277 &&
+	git update-server-info &&
+	test 444 = $(stat -c %a .git/info/refs)
+'
+
+test_done
-- 
1.5.3.rc0.2783.gf3f7

^ permalink raw reply related

* git-update-server-info may be required,cannot clone and pull from a remote repository
From: pradeep singh @ 2007-07-11 14:08 UTC (permalink / raw)
  To: git

hi All,

Please bear with me as i am completely new to git.
I tired setting up git repository on one of my Ubuntu 7.04 machines.

I followed the howto instruction for setting up a git repo over http
using the HOWTO  given in the /usr/share/doc/git-doc/howtos .

All went correct.
Now i am facing some trouble here.

1. I already have a source tree controlled by git on the same
machine.I want to make this as the master for the new public
repository. I created a bare git repo in it as per the howto. Now i
want to commit my local git repo to this public repository.I failed to
do so sadly :-/.Can anyone point me to the correct place or link?

2. Even when i did a (from another machine)
 $git-clone http://100.121.232/work.git work
 It says,
 Cannot get remote repository information.
 Perhaps git-update-server-info needs to be run there?

 I ran git-update-server on the original machine, restarted even
apache2 but still same thing.

Can any one help me with this?
I ll appreciate some good documents or howtos on setting up git
repository painlessly.

BTW how am i supposed to use gitweb?
PS: I am not an expert sysadmin so i am completely unaware of apache2
tweaks and cgi pecularities.

Any help or pointers will be great.

Thank you
--pradeep
-- 
Pradeep

^ permalink raw reply

* Re: [PATCH] update-server-info: honor core.sharedRepository
From: martin f krafft @ 2007-07-11 13:56 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, gitster
In-Reply-To: <Pine.LNX.4.64.0707111338360.4516@racer.site>

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

also sprach Johannes Schindelin <Johannes.Schindelin@gmx.de> [2007.07.11.1439 +0200]:
> Earlier, update-server-info used the umask, even if
> core.sharedRepository = 1.
> 
> Noticed by madduck on IRC.
> 	Does this work for you?

Yes, it does, but only if I put = all/group into the config. init-db
--shared=all however sets core.sharedRepository=2, and then
update-server-info produces a 0660 file.

This may be another bug...

Thanks!

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
spamtraps: madduck.bogus@madduck.net
 
"even if you persuade me, you won't persuade me."
                                                       -- aristophanes

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

^ permalink raw reply

* Re: cg switch -l doesn't work when branches point to the same commit
From: Alex Riesen @ 2007-07-11 13:36 UTC (permalink / raw)
  To: Bradford Smith; +Cc: git
In-Reply-To: <f158199e0707110559q43c290b4x2caee13cac46cf29@mail.gmail.com>

On 7/11/07, Bradford Smith <bradford.carl.smith@gmail.com> wrote:
> The message below applies to software versions:
>
> git version 1.4.4.2

It is fixed sometime between your version and git-1.5.2.2.
Use git checkout.

> cogito-0.18.2

Cogito is unmaintained ATM.

^ permalink raw reply

* cg switch -l doesn't work when branches point to the same commit
From: Bradford Smith @ 2007-07-11 12:59 UTC (permalink / raw)
  To: git

The message below applies to software versions:

git version 1.4.4.2
cogito-0.18.2

Why doesn't cg switch -l save local changes when you switch to a
branch that points at the same commit you're already on?  Here's the
case I ran into.

1. On my master branch I was part of the way through making a fairly
complex change when I discovered an unrelated bug.  So, I wanted to:
     a. move my partial changes to a topical branch
     b. fix the bug on master
     c. finish my changes on the topical branch
     d. merge the topical branch back into master

2. I didn't really want to _commit_ my partial changes yet, though,
because I was really in mid-thought there, so I wanted to do it this
way:

# create the topical branch, carrying my local changes along with me
cg switch -c topical-branch
# switch back to master, leaving my local changes with the topical branch
cg switch -l master
# fix bug on master then
cg commit
# switch back to topical branch
cg switch topical-branch
# continue with changes and eventually
cg commit
cg switch master
cg merge topical-branch

Unfortunately, I found that 'cg switch -l master' did NOT save my
local changes.  I had to switch back to the branch, commit my partial
changes, then back to master to fix the bug.  So, I was able to work
around this, but I still found the behavior surprising.  If this is
expected behavior, shouldn't it be documented in the cg-switch man
page?

BTW, in a test repository/working directory I was able to confirm that
cg switch -l worked as documented when the two branches involved
pointed to different commits.

Thanks,

Bradford C. Smith

^ permalink raw reply

* Re: [PATCH] send-email: extend sanitize_address_rfc822 to do rfc2047 quoting
From: Sven Verdoolaege @ 2007-07-11 12:49 UTC (permalink / raw)
  To: Alex Riesen; +Cc: Uwe Kleine-König, git
In-Reply-To: <81b0412b0707110538s7eda05e8g6973e20fc4d91931@mail.gmail.com>

On Wed, Jul 11, 2007 at 02:38:11PM +0200, Alex Riesen wrote:
> On 7/11/07, Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> wrote:
> >Try:
> >
> >        my $recipient = 'skimo@kotnet.org';
> >        my ($recipient_name, $recipient_addr) = ($recipient =~ 
> >        /^(.*?)(\s+<.*)/);
> >        print "Hoppla\n" if (!$recipient_name);
> 
> Still wrong. Try it on "0 <0user@buildhost.localnet>"

I was going to suggest using defined($recipient_name) to make it clear,
but it won't affect correctness as "0" won't match the regexps in
sanitize_address_rfc822 anyway.

skimo

^ permalink raw reply

* [PATCH] update-server-info: honor core.sharedRepository
From: Johannes Schindelin @ 2007-07-11 12:39 UTC (permalink / raw)
  To: martin f krafft; +Cc: git, gitster


Earlier, update-server-info used the umask, even if
core.sharedRepository = 1.

Noticed by madduck on IRC.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

	Does this work for you?

 server-info.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/server-info.c b/server-info.c
index f9be5a7..0d1312c 100644
--- a/server-info.c
+++ b/server-info.c
@@ -38,6 +38,7 @@ static int update_info_refs(int force)
 		return error("unable to update %s", path0);
 	for_each_ref(add_info_ref, NULL);
 	fclose(info_ref_fp);
+	adjust_shared_perm(path1);
 	rename(path1, path0);
 	free(path0);
 	free(path1);
@@ -227,6 +228,7 @@ static int update_info_packs(int force)
 		return error("cannot open %s", name);
 	write_pack_info_file(fp);
 	fclose(fp);
+	adjust_shared_perm(name);
 	rename(name, infofile);
 	return 0;
 }

^ permalink raw reply related

* Re: git-rm isn't the inverse action of git-add
From: Jakub Narebski @ 2007-07-11 12:20 UTC (permalink / raw)
  To: git
In-Reply-To: <46895EA4.5040803@jaeger.mine.nu>

Christian Jaeger wrote:

> I don't per se require undo actions. I just don't understand why git-rm
> refuses to remove the file from the index, even if I didn't commit it.
> The index is just an intermediate record of the changes in my
> understandings, and the rm action would also be intermediate until it's
> being committed. And a non-committed action being deleted shouldn't need
> a special confirmation from me, especially not one which is consisting
> of a combination of two flags (of which one is a destructive one).

Should git-rm refuse to remove index entry if it is different from working
directory version or not?

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply

* Re: [PATCH] send-email: extend sanitize_address_rfc822 to do rfc2047 quoting
From: Sven Verdoolaege @ 2007-07-11 12:08 UTC (permalink / raw)
  To: Uwe Kleine-König, git
In-Reply-To: <20070711114909.GA14086@informatik.uni-freiburg.de>

On Wed, Jul 11, 2007 at 01:49:09PM +0200, Uwe Kleine-König wrote:
> Sven Verdoolaege wrote:
> > On Tue, Jul 10, 2007 at 07:02:43PM +0200, Uwe Kleine-König wrote:
> > >  	my ($recipient) = @_;
> > > -	my ($recipient_name) = ($recipient =~ /^(.*?)\s+</);
> > > +	my ($recipient_name, $recipient_addr) = ($recipient =~ /^(.*?)(\s+<.*)/);
> > > +
> > > +	if ($recipient_name && $recipient_name =~ /[^-a-zA-Z0-9!*+\/ ]/ && $recipient_name !~ /=\?utf-8\?q?.*\?=/) {
> > 
> > Why the extra test for truthness of $recipient_name ?
> 
> i.e. if the pattern doesn't match, recipient_name is undefined.

I know.  I just didn't realize git-send-email was run with -w.
Sorry for the noise.

skimo

^ permalink raw reply

* Re: [PATCH] send-email: extend sanitize_address_rfc822 to do rfc2047 quoting
From: Uwe Kleine-König @ 2007-07-11 11:49 UTC (permalink / raw)
  To: skimo; +Cc: git
In-Reply-To: <20070711084232.GE1528MdfPADPa@greensroom.kotnet.org>

Sven Verdoolaege wrote:
> On Tue, Jul 10, 2007 at 07:02:43PM +0200, Uwe Kleine-König wrote:
> >  	my ($recipient) = @_;
> > -	my ($recipient_name) = ($recipient =~ /^(.*?)\s+</);
> > +	my ($recipient_name, $recipient_addr) = ($recipient =~ /^(.*?)(\s+<.*)/);
> > +
> > +	if ($recipient_name && $recipient_name =~ /[^-a-zA-Z0-9!*+\/ ]/ && $recipient_name !~ /=\?utf-8\?q?.*\?=/) {
> 
> Why the extra test for truthness of $recipient_name ?
Try:

	my $recipient = 'skimo@kotnet.org';
	my ($recipient_name, $recipient_addr) = ($recipient =~ /^(.*?)(\s+<.*)/);
	print "Hoppla\n" if (!$recipient_name);

i.e. if the pattern doesn't match, recipient_name is undefined.

But the function could be simplyfied anyhow.  e.g.

	if ($recipient_name) {
		... do all the quoting ...
		return "$recipient_name$recipient_addr";
	} else {
		return $recipient;
	}

Best regards
Uwe

-- 
Uwe Kleine-König

http://www.google.com/search?q=square+root+of+2

^ permalink raw reply

* Getting version output for a file.
From: David Kastrup @ 2007-07-11 11:39 UTC (permalink / raw)
  To: git


Hi,

the Emacs support for git is incomplete, making it bomb out, for
example, when doing
C-u C-x v =

In order to have it work better, I need to fill in the following
functions:

(vc-git-previous-version FILE REV)
Return the version number immediately preceding REV for FILE,
or nil if there is no previous version.

(vc-git-next-version FILE REV)
Return the version number immediately following REV for FILE,
or nil if there is no previous version.

REV will tend to be a symbolic reference like "master" or possibly
"master{2}" (I am fuzzy about the details, but at least repeated
invocations of vc-git-previous-version should work with the previous
output).  The corresponding next and previous versions should be
changes that actually changed the file in question.

There is likely going to be some magic shell invocation of
git-rev-list, git-symbolic-ref and/or similar things to achieve this
task.  I don't have enough of a clue to fill in the necessary details,
but I'd be able to convert them into Elisp.

Anybody with good suggestions?  It would be beneficial if this would
not require the newest git version in order to work.  If that means
that the output needs to be somewhat more massaged, that's ok.

Thanks,

-- 
David Kastrup

^ permalink raw reply

* Re: test suite fails if sh != bash || tar != GNU tar
From: Johannes Schindelin @ 2007-07-11 11:09 UTC (permalink / raw)
  To: David Frech; +Cc: Linus Torvalds, git
In-Reply-To: <7154c5c60707102108g59280301pa5c3c0dc3911753d@mail.gmail.com>

Hi,

On Tue, 10 Jul 2007, David Frech wrote:

> On 7/10/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > On Wed, 11 Jul 2007, Johannes Schindelin wrote:
> > > As for GNU tar, I think that this is easily fixable if you have 
> > > access to non-GNU tar.  We do not use tar _ever_, except for the 
> > > test suite, to verify that things are working as expected.
> > >
> > > If you could put in some time to make the tests work, that would be 
> > > awesome.
> > 
> > Yeah, it would be a good thing to get rid of any bashisms, but to 
> > _keep_ it working somebody would then need to test every once in a 
> > while that it still works ;)
> 
> I'll see what I can do. As I'm planning on running git on both FreeBSD 
> and DragonFly for the forseeable future, and plan to track git's 
> evolution (running stable releases if not more bleeding-edge code), I 
> can run the test suite every time I build a new git.

If you want to, I can help you setting up a nightly cron job to fetch what 
is the current "next", run the tests, and report failures by email.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] GIT-VERSION-GEN: don't convert - delimiter to .'s
From: Jakub Narebski @ 2007-07-11 10:49 UTC (permalink / raw)
  To: git
In-Reply-To: <11831937823982-git-send-email-sam.vilain@catalyst.net.nz>

Sam Vilain wrote:

> Otherwise, a custom "v1.5.2.42.gb1ff" is considered newer than a
> "v1.5.2.1.69.gcafe"

Wouldn't it be better to do what tig did, namely put the extra part,
i.e. the number of commits since tagged revision and shortened sha1 into
REVISION rather than VERSION for an rpm for example?

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply

* Re: how to combine two clones in a collection
From: Jakub Narebski @ 2007-07-11 10:46 UTC (permalink / raw)
  To: git
In-Reply-To: <20070710174543.GA16054@piper.oerlikon.madduck.net>

martin f krafft wrote:

> I wonder how to create a project with two completely independent
> branches which have no common ancestry. I don't think it's possible.
> One needs a throwaway branch to create the first commit, then branch
> each of the two branches off that, then delete the throwaya branch
> (or keep it around).

Git repository itself  has a few completely independent branches, some of
them visible. One of them, the 'todo' branch is actually from independent
repository, two other, 'man' and 'html' are generated automatically by the
build script.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply

* [PATCH] git-merge: run commit hooks when making merge commits
From: Sam Vilain @ 2007-07-11 10:32 UTC (permalink / raw)
  To: git; +Cc: Sam Vilain

git-merge.sh was not running the commit hooks, so run them in the two
places where we go to commit.

Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
---
   Not sure if it should call these or some specialist hooks, like
   git-am does.

 git-merge.sh |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/git-merge.sh b/git-merge.sh
index 981d69d..ef4f51b 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -117,6 +117,29 @@ merge_name () {
 	fi
 }
 
+call_pre_hooks () {
+	message="$1"
+	if test -x "$GIT_DIR"/hooks/pre-commit
+	then
+		"$GIT_DIR"/hooks/pre-commit || exit 1
+	fi
+	if test -x "$GIT_DIR"/hooks/commit-msg
+	then
+		printf '%s\n' "$message" > "$GIT_DIR"/MERGE_MSG
+		"$GIT_DIR"/hooks/commit-msg "$GIT_DIR"/MERGE_MSG || exit 1
+		cat "$GIT_DIR"/MERGE_MSG
+	else
+		echo "$message"
+	fi
+}
+
+call_post_hook () {
+	if test -x "$GIT_DIR"/hooks/post-commit
+	then
+		"$GIT_DIR"/hooks/post-commit
+	fi
+}
+
 case "$#" in 0) usage ;; esac
 
 have_message=
@@ -334,11 +357,13 @@ f,*)
 		   result_tree=$(git-write-tree)
 		then
 			echo "Wonderful."
+			merge_msg=$(call_pre_hooks "$merge_msg")
 			result_commit=$(
 				printf '%s\n' "$merge_msg" |
 				git-commit-tree $result_tree -p HEAD -p "$1"
 			) || exit
 			finish "$result_commit" "In-index merge"
+			call_post_hook
 			dropsave
 			exit 0
 		fi
@@ -440,8 +465,10 @@ done
 if test '' != "$result_tree"
 then
     parents=$(git-show-branch --independent "$head" "$@" | sed -e 's/^/-p /')
+    merge_msg=$(call_pre_hooks "$merge_msg")
     result_commit=$(printf '%s\n' "$merge_msg" | git-commit-tree $result_tree $parents) || exit
     finish "$result_commit" "Merge made by $wt_strategy."
+    call_post_hook
     dropsave
     exit 0
 fi
-- 
1.5.2.1.1131.g3b90

^ permalink raw reply related

* Re: git-svn+cygwin failed fetch
From: Russ Dill @ 2007-07-11  9:54 UTC (permalink / raw)
  To: Eric Wong; +Cc: git
In-Reply-To: <20070711090600.GB29676@muzzle>

On 7/11/07, Eric Wong <normalperson@yhbt.net> wrote:
> Russ Dill <russ.dill@gmail.com> wrote:
> > [...]/src $ mkdir foo
> > [...]/src $ cd foo
> > [...]/src/foo $ git-svn init -t tags -b branches -T trunk
> > https://www.[...].com/svn/foo/bar/bla
> > Initialized empty Git repository in .git/
> > Using higher level of URL: https://www.[...].com/svn/foo/bar/bla =>
> > https://www.[...].com/svn/foo
> >
> > [...]/src/foo $ git-svn fetch
> > config --get svn-remote.svn.url: command returned error: 1
> >
> > [...]/src/foo $ git config --get svn-remote.svn.url
> > https://www.[...].com/svn/foo
>
> Sorry, I can't help here other than recommending a real UNIX with
> fork + pipe + exec and all that fun stuff.
>
> git-svn relies heavily[1] on both input and output pipes of the
> safer-but-made-for-UNIX fork + pipe + exec(@list) variety, so I suspect
> this is just the tip of the iceberg for Windows incompatibilies with
> git-svn...

Its actually reading and writing quite a bit of stuff from the config
file, so why this one simple command would fail eludes me. Especially
since it wrote it there in the first place. If I comment out the
command_oneline and hardcode the value I know it should return,
git-fetch runs. Its actually been running for several hours now.

^ permalink raw reply

* Re: --ignore-invalid flag to git log et al.?
From: Paul Mackerras @ 2007-07-11  9:07 UTC (permalink / raw)
  To: Alex Riesen; +Cc: Junio C Hamano, git
In-Reply-To: <81b0412b0707110046n5ec27328pab0ff33c183f79e@mail.gmail.com>

Alex Riesen writes:

> git rev-parse --revs-only ref1 ref2 ref3 ...?

That stops when it sees an invalid ref and doesn't check the rest.
Also if you give it a string of 40 hex digits it will print it out
whether it's a valid object ID or not.

Paul.

^ permalink raw reply

* Re: git-svn+cygwin failed fetch
From: Eric Wong @ 2007-07-11  9:06 UTC (permalink / raw)
  To: Russ Dill; +Cc: git
In-Reply-To: <f9d2a5e10707101106w305e28acy55f465e558485298@mail.gmail.com>

Russ Dill <russ.dill@gmail.com> wrote:
> [...]/src $ mkdir foo
> [...]/src $ cd foo
> [...]/src/foo $ git-svn init -t tags -b branches -T trunk
> https://www.[...].com/svn/foo/bar/bla
> Initialized empty Git repository in .git/
> Using higher level of URL: https://www.[...].com/svn/foo/bar/bla =>
> https://www.[...].com/svn/foo
> 
> [...]/src/foo $ git-svn fetch
> config --get svn-remote.svn.url: command returned error: 1
> 
> [...]/src/foo $ git config --get svn-remote.svn.url
> https://www.[...].com/svn/foo

Sorry, I can't help here other than recommending a real UNIX with
fork + pipe + exec and all that fun stuff.

git-svn relies heavily[1] on both input and output pipes of the
safer-but-made-for-UNIX fork + pipe + exec(@list) variety, so I suspect
this is just the tip of the iceberg for Windows incompatibilies with
git-svn...

Maybe somebody can finally libify git? :)


[1] - probably more so than anything else in git

-- 
Eric Wong

^ permalink raw reply

* Re: [PATCH] send-email: extend sanitize_address_rfc822 to do rfc2047 quoting
From: Sven Verdoolaege @ 2007-07-11  8:42 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: git
In-Reply-To: <11840869641759-git-send-email-ukleinek@informatik.uni-freiburg.de>

On Tue, Jul 10, 2007 at 07:02:43PM +0200, Uwe Kleine-König wrote:
>  	my ($recipient) = @_;
> -	my ($recipient_name) = ($recipient =~ /^(.*?)\s+</);
> +	my ($recipient_name, $recipient_addr) = ($recipient =~ /^(.*?)(\s+<.*)/);
> +
> +	if ($recipient_name && $recipient_name =~ /[^-a-zA-Z0-9!*+\/ ]/ && $recipient_name !~ /=\?utf-8\?q?.*\?=/) {

Why the extra test for truthness of $recipient_name ?

>  	if ($recipient_name && $recipient_name =~ /\./ && $recipient_name !~ /^".*"$/) {
> -		my ($name, $addr) = ($recipient =~ /^(.*?)(\s+<.*)/);
> -		$recipient = "\"$name\"$addr";
> +		$recipient_name = "\"$recipient_name\"";
> +	}
> +
> +	if ($recipient_name) {
> +		return "$recipient_name$recipient_addr";
> +	} else {
> +		return "$recipient";
>  	}
> -	return $recipient;

Why did you introduce interpolation just to get $recipient again?
Then again, why do you need a test at all here?

	return $recipient_name . $recipient_addr;

should work, no?

skimo

^ permalink raw reply

* Re: git-svn problems with branches containing spaces
From: Eric Wong @ 2007-07-11  8:29 UTC (permalink / raw)
  To: git; +Cc: Ewald, Robert
In-Reply-To: <20070710134236.2870.qmail@986bac8bfff25d.315fe32.mid.smarden.org>

Gerrit Pape <pape@smarden.org> wrote:
> On Wed, Jun 27, 2007 at 08:53:06AM +0200, Ewald, Robert wrote:
> > As I have reported yesterday on IRC, git-svn has problems with branches
> > containing spaces.
> > I get the following message, when I want to clone from the repository
> > containing a branch with a space.
> > Cloning until the revision the branch is created everything works fine.
> > 
> > fatal: refs/remotes/Modbus Error Limit Fix: cannot lock the ref
> > update-ref -m r1897 refs/remotes/Modbus Error Limit Fix
> > ff0819c8e9c97c24e9865bc868c503fd9b64f980: command returned error: 128
> > 
> > Thanks for your help.
> 
> Hi, the same problem has been reported some time ago through
>  http://bugs.debian.org/430518
> 
> There's a patch attached to the report, but from a first glance, I don't
> think it's the solution.

That patch is definitely not a correct solution.  If another branch came
along with the same name as an automatically renamed one, it would break
things badly.

I started working on a patch that allowed the user to interactively
specify replacement branch names, but never got around to finishing
it:

http://permalink.gmane.org/gmane.comp.version-control.git/45651

-- 
Eric Wong

^ permalink raw reply

* Re: git-svn and renames
From: Eric Wong @ 2007-07-11  8:20 UTC (permalink / raw)
  To: Rogan Dawes; +Cc: Git Mailing List
In-Reply-To: <46938594.2010607@dawes.za.net>

Rogan Dawes <lists@dawes.za.net> wrote:
> Hi folks,
> 
> I am trying to push my local changes to an imported SVN project back to 
> the SVN repo. For anyone who cares, this is the WebGoat repository which 
> you can find at http://dawes.za.net/rogan/webgoat/webgoat.git/
> 
> I am trying to push it back to the primary GoogleCode repo. I have 
> successfully managed to push 20 or so commits, but I am now running up 
> against a problem with a renamed/moved file.
> 
> I moved a file from a directory to a subdirectory, and made minimal 
> changes to this file so that it remained a valid Java class. i.e. I 
> changed the package, and a few other minor things. As can be seen at 
> <http://dawes.za.net/gitweb.cgi?p=rogan/webgoat/webgoat.git;a=commitdiff;h=486416188a3e49d60e1510166ac197e5e66cc4d2>, 
>  git detects the rename with 93% similarity.
> 
> However, when I try to push this change to the Google repo, git-svn dies 
> with the following error:
> 
> $ git svn dcommit
> RA layer request failed: PROPFIND request failed on '/svn/trunk/ 
> webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/DefaultLessonAction.java': 
> PROPFIND of '/svn/trunk/ 
> webgoat/main/project/JavaSource/org/owasp/webgoat/lessons/DefaultLessonAction.java': 
> 400 Bad Request (https://webgoat.googlecode.com) at 
> /home/rdawes/bin/git-svn line 400
> 
> [Yes, those paths have a space in them, however this does not seem to 
> have prevented me from committing the previous 20 or so changes.]
> 
> I noted the following in the git-svn documentation, with regards to 
> handling renames. However, I am not renaming a directory, only a couple 
> of files.

I've personally noted a rename issue with committing funky characters
"#{}" in filenames (I was renaming to get rid of those funky characters of
course).   Haven't had proper time to look into it.

Did any previous successful commits have renames in them?  You may want
to set similarity to 100% to disable rename detection.

-- 
Eric Wong

^ 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