Git development
 help / color / mirror / Atom feed
* Re: Cloning from sites with 404 overridden
From: Marco Costalba @ 2006-03-20  6:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vmzfmm35t.fsf@assigned-by-dhcp.cox.net>

On 3/20/06, Junio C Hamano <junkio@cox.net> wrote:
>
> Your inability to produce 404 is a different matter -- often the
> hosting server is not under your control.  But that does not
> change the fact that the repository observed by your clients is
> "broken".  That is why a workaround flag like I suggested may be
> needed for such a setup.
>
> This is totally untested, but maybe something like this?
>

It works for me. Just some trailing white space warning when applying.

I didn't found a way to pass '--unreliable-404' flag from git-clone,
perhaps my bad,
I have tested forcing the flag in sources.


Marco

^ permalink raw reply

* Re: Cloning from sites with 404 overridden
From: Junio C Hamano @ 2006-03-20  8:44 UTC (permalink / raw)
  To: Marco Costalba; +Cc: git
In-Reply-To: <e5bfff550603192231k7843a741xbf14394bc5e4c57@mail.gmail.com>

"Marco Costalba" <mcostalba@gmail.com> writes:

>> This is totally untested, but maybe something like this?
>
> It works for me. Just some trailing white space warning when applying.

The change only removes the error message without changing any
other logic, so if that works for you, I wonder if leaving
things as they are is a better option than doing anything short
of implementing an AI that tries to pattern-match the "allegedly
corrupt file" with "sorry no such page found" in many natural
languages.

My test patch makes it impossible to track down the real
breakage when an HTTP-reachable repository _does_ have a corrupt
object.

So how about doing this instead?

-- >8 --
diff --git a/http-fetch.c b/http-fetch.c
index 8fd9de0..1405c1f 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -8,6 +8,7 @@
 #define RANGE_HEADER_SIZE 30
 
 static int got_alternates = -1;
+static int corrupt_object_found = 0;
 
 static struct curl_slist *no_pragma_header;
 
@@ -830,6 +831,7 @@ static int fetch_object(struct alt_base 
 				    obj_req->errorstr, obj_req->curl_result,
 				    obj_req->http_code, hex);
 	} else if (obj_req->zret != Z_STREAM_END) {
+		corrupt_object_found++;
 		ret = error("File %s (%s) corrupt", hex, obj_req->url);
 	} else if (memcmp(obj_req->sha1, obj_req->real_sha1, 20)) {
 		ret = error("File %s has bad hash", hex);
@@ -989,5 +991,11 @@ int main(int argc, char **argv)
 
 	http_cleanup();
 
+	if (corrupt_object_found) {
+		fprintf(stderr,
+"Some loose object were found to be corrupt, but they might be just\n"
+"a false '404 Not Found' error message sent with incorrect HTTP\n"
+"status code.  Suggest running git fsck-objects.\n");
+	}
 	return rc;
 }

^ permalink raw reply related

* Re: efficient cloning
From: Junio C Hamano @ 2006-03-20  8:54 UTC (permalink / raw)
  To: James Cloos; +Cc: git
In-Reply-To: <7vbqw1nakz.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano <junkio@cox.net> writes:

> So in case you are really in a rush, and in a mood to build on
> top of my WIP, here is one.

And this is an replacement, which actually has seen some
testing.  I'll place this in the "next" branch tonight.  Further
testing is appreciated.

-- >8 --
[PATCH] revamp git-clone.

This does two things.

 * A new flag --reference can be used to name a local repository
   that is to be used as an alternate.  This is in response to
   an inquiry by James Cloos in the message on the list
   <m3r74ykue7.fsf@lugabout.cloos.reno.nv.us>.

 * A new flag --use-separate-remote stops contaminating local
   branch namespace by upstream branch names.  The upstream
   branch heads are copied in .git/refs/remotes/ instead of
   .git/refs/heads/ and .git/remotes/origin file is set up to
   reflect this as well.  It requires to have fetch/pull update
   to understand .git/refs/remotes by Eric Wong to further
   update the repository cloned this way.

For the former change, git-fetch-pack is taught a new flag --all
to fetch from all the remote heads.  Nobody uses the git-clone-pack
with this change, so we could deprecate the command, but removal
of the command will be left to a separate round.

Signed-off-by: Junio C Hamano <junkio@cox.net>

---

 fetch-pack.c |   18 ++++--
 git-clone.sh |  184 ++++++++++++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 166 insertions(+), 36 deletions(-)

dfeff66ed9a3931d60f3cd600ad8c14b5cc3d9e5
diff --git a/fetch-pack.c b/fetch-pack.c
index 535de10..a3bcad0 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -7,8 +7,9 @@
 static int keep_pack;
 static int quiet;
 static int verbose;
+static int fetch_all;
 static const char fetch_pack_usage[] =
-"git-fetch-pack [-q] [-v] [-k] [--thin] [--exec=upload-pack] [host:]directory <refs>...";
+"git-fetch-pack [--all] [-q] [-v] [-k] [--thin] [--exec=upload-pack] [host:]directory <refs>...";
 static const char *exec = "git-upload-pack";
 
 #define COMPLETE	(1U << 0)
@@ -266,8 +267,9 @@ static void filter_refs(struct ref **ref
 	for (prev = NULL, current = *refs; current; current = next) {
 		next = current->next;
 		if ((!memcmp(current->name, "refs/", 5) &&
-					check_ref_format(current->name + 5)) ||
-				!path_match(current->name, nr_match, match)) {
+		     check_ref_format(current->name + 5)) ||
+		    (!fetch_all &&
+		     !path_match(current->name, nr_match, match))) {
 			if (prev == NULL)
 				*refs = next;
 			else
@@ -376,7 +378,11 @@ static int fetch_pack(int fd[2], int nr_
 		goto all_done;
 	}
 	if (find_common(fd, sha1, ref) < 0)
-		fprintf(stderr, "warning: no common commits\n");
+		if (!keep_pack)
+			/* When cloning, it is not unusual to have
+			 * no common commit.
+			 */
+			fprintf(stderr, "warning: no common commits\n");
 
 	if (keep_pack)
 		status = receive_keep_pack(fd, "git-fetch-pack", quiet);
@@ -426,6 +432,10 @@ int main(int argc, char **argv)
 				use_thin_pack = 1;
 				continue;
 			}
+			if (!strcmp("--all", arg)) {
+				fetch_all = 1;
+				continue;
+			}
 			if (!strcmp("-v", arg)) {
 				verbose = 1;
 				continue;
diff --git a/git-clone.sh b/git-clone.sh
index 4ed861d..9db678b 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -9,7 +9,7 @@
 unset CDPATH
 
 usage() {
-	echo >&2 "Usage: $0 [--bare] [-l [-s]] [-q] [-u <upload-pack>] [-o <name>] [-n] <repo> [<dir>]"
+	echo >&2 "Usage: $0 [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [-o <name>] [-n] <repo> [<dir>]"
 	exit 1
 }
 
@@ -40,13 +40,61 @@ Perhaps git-update-server-info needs to 
 	do
 		name=`expr "$refname" : 'refs/\(.*\)'` &&
 		case "$name" in
-		*^*)	;;
-		*)
-			git-http-fetch -v -a -w "$name" "$name" "$1/" || exit 1
+		*^*)	continue;;
 		esac
+		if test -n "$use_separate_remote" &&
+		   branch_name=`expr "$name" : 'heads/\(.*\)'`
+		then
+			tname="remotes/$branch_name"
+		else
+			tname=$name
+		fi
+		git-http-fetch -v -a -w "$tname" "$name" "$1/" || exit 1
 	done <"$clone_tmp/refs"
 	rm -fr "$clone_tmp"
+	http_fetch "$1/HEAD" "$GIT_DIR/REMOTE_HEAD"
+}
+
+# Read git-fetch-pack -k output and store the remote branches.
+copy_refs='
+use File::Path qw(mkpath);
+use File::Basename qw(dirname);
+my $git_dir = $ARGV[0];
+my $use_separate_remote = $ARGV[1];
+
+my $branch_top = ($use_separate_remote ? "remotes" : "heads");
+my $tag_top = "tags";
+
+sub store {
+	my ($sha1, $name, $top) = @_;
+	$name = "$git_dir/refs/$top/$name";
+	mkpath(dirname($name));
+	open O, ">", "$name";
+	print O "$sha1\n";
+	close O;
+}
+
+open FH, "<", "$git_dir/CLONE_HEAD";
+while (<FH>) {
+	my ($sha1, $name) = /^([0-9a-f]{40})\s(.*)$/;
+	next if ($name =~ /\^\173/);
+	if ($name eq "HEAD") {
+		open O, ">", "$git_dir/REMOTE_HEAD";
+		print O "$sha1\n";
+		close O;
+		next;
+	}
+	if ($name =~ s/^refs\/heads\///) {
+		store($sha1, $name, $branch_top);
+		next;
+	}
+	if ($name =~ s/^refs\/tags\///) {
+		store($sha1, $name, $tag_top);
+		next;
+	}
 }
+close FH;
+'
 
 quiet=
 use_local=no
@@ -54,8 +102,10 @@ local_shared=no
 no_checkout=
 upload_pack=
 bare=
-origin=origin
+reference=
+origin=
 origin_override=
+use_separate_remote=
 while
 	case "$#,$1" in
 	0,*) break ;;
@@ -68,7 +118,14 @@ while
         *,-s|*,--s|*,--sh|*,--sha|*,--shar|*,--share|*,--shared) 
           local_shared=yes; use_local=yes ;;
 	*,-q|*,--quiet) quiet=-q ;;
+	*,--use-separate-remote)
+		use_separate_remote=t ;;
 	1,-o) usage;;
+	1,--reference) usage ;;
+	*,--reference)
+		shift; reference="$1" ;;
+	*,--reference=*)
+		reference=`expr "$1" : '--reference=\(.*\)'` ;;
 	*,-o)
 		git-check-ref-format "$2" || {
 		    echo >&2 "'$2' is not suitable for a branch name"
@@ -100,9 +157,24 @@ then
 		echo >&2 '--bare and -o $origin options are incompatible.'
 		exit 1
 	fi
+	if test t = "$use_separate_remote"
+	then
+		echo >&2 '--bare and --use-separate-remote options are incompatible.'
+		exit 1
+	fi
 	no_checkout=yes
 fi
 
+if test -z "$origin_override$origin"
+then
+	if test -n "$use_separate_remote"
+	then
+		origin=remotes/master
+	else
+		origin=heads/origin
+	fi
+fi
+
 # Turn the source into an absolute path if
 # it is local
 repo="$1"
@@ -130,6 +202,28 @@ yes)
 	GIT_DIR="$D/.git" ;;
 esac
 
+if test -n "$reference"
+then
+	if test -d "$reference"
+	then
+		if test -d "$reference/.git/objects"
+		then
+			reference="$reference/.git"
+		fi
+		reference=$(cd "$reference" && pwd)
+		echo "$reference/objects" >"$GIT_DIR/objects/info/alternates"
+		(cd "$reference" && tar cf - refs) |
+		(cd "$GIT_DIR/refs" &&
+		 mkdir reference-tmp &&
+		 cd reference-tmp &&
+		 tar xf -)
+	else
+		echo >&2 "$reference: not a local directory." && usage
+	fi
+fi
+
+rm -f "$GIT_DIR/CLONE_HEAD"
+
 # We do local magic only when the user tells us to.
 case "$local,$use_local" in
 yes,yes)
@@ -165,24 +259,14 @@ yes,yes)
 	    } >"$GIT_DIR/objects/info/alternates"
 	    ;;
 	esac
-
-	# Make a duplicate of refs and HEAD pointer
-	HEAD=
-	if test -f "$repo/HEAD"
-	then
-		HEAD=HEAD
-	fi
-	(cd "$repo" && tar cf - refs $HEAD) |
-	(cd "$GIT_DIR" && tar xf -) || exit 1
+	git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD"
 	;;
 *)
 	case "$repo" in
 	rsync://*)
 		rsync $quiet -av --ignore-existing  \
-			--exclude info "$repo/objects/" "$GIT_DIR/objects/" &&
-		rsync $quiet -av --ignore-existing  \
-			--exclude info "$repo/refs/" "$GIT_DIR/refs/" || exit
-
+			--exclude info "$repo/objects/" "$GIT_DIR/objects/" ||
+		exit
 		# Look at objects/info/alternates for rsync -- http will
 		# support it natively and git native ones will do it on the
 		# remote end.  Not having that file is not a crime.
@@ -205,6 +289,7 @@ yes,yes)
 		    done
 		    rm -f "$GIT_DIR/TMP_ALT"
 		fi
+		git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD"
 		;;
 	http://*)
 		if test -z "@@NO_CURL@@"
@@ -217,37 +302,71 @@ yes,yes)
 		;;
 	*)
 		cd "$D" && case "$upload_pack" in
-		'') git-clone-pack $quiet "$repo" ;;
-		*) git-clone-pack $quiet "$upload_pack" "$repo" ;;
-		esac || {
-			echo >&2 "clone-pack from '$repo' failed."
+		'') git-fetch-pack --all -k $quiet "$repo" ;;
+		*) git-fetch-pack --all -k $quiet "$upload_pack" "$repo" ;;
+		esac >"$GIT_DIR/CLONE_HEAD" || {
+			echo >&2 "fetch-pack from '$repo' failed."
 			exit 1
 		}
 		;;
 	esac
 	;;
 esac
+test -d "$GIT_DIR/refs/reference-tmp" && rm -fr "$GIT_DIR/refs/reference-tmp"
+
+if test -f "$GIT_DIR/CLONE_HEAD"
+then
+	# Figure out where the remote HEAD points at.
+	perl -e "$copy_refs" "$GIT_DIR" "$use_separate_remote"
+fi
 
 cd "$D" || exit
 
-if test -f "$GIT_DIR/HEAD" && test -z "$bare"
+if test -z "$bare" && test -f "$GIT_DIR/REMOTE_HEAD"
 then
-	head_points_at=`git-symbolic-ref HEAD`
+	head_sha1=`cat "$GIT_DIR/REMOTE_HEAD"`
+	# Figure out which remote branch HEAD points at.
+	case "$use_separate_remote" in
+	'')	remote_top=refs/heads ;;
+	*)	remote_top=refs/remotes ;;
+	esac
+	head_points_at=$(
+		(
+			echo "master"
+			cd "$GIT_DIR/$remote_top" &&
+			find . -type f -print | sed -e 's/^\.\///'
+		) | (
+		done=f
+		while read name
+		do
+			test t = $done && continue
+			branch_tip=`cat "$GIT_DIR/$remote_top/$name"`
+			if test "$head_sha1" = "$branch_tip"
+			then
+				echo "$name"
+				done=t
+			fi
+		done
+		)
+	)
 	case "$head_points_at" in
-	refs/heads/*)
-		head_points_at=`expr "$head_points_at" : 'refs/heads/\(.*\)'`
+	?*)
 		mkdir -p "$GIT_DIR/remotes" &&
 		echo >"$GIT_DIR/remotes/origin" \
 		"URL: $repo
-Pull: $head_points_at:$origin" &&
-		git-update-ref "refs/heads/$origin" $(git-rev-parse HEAD) &&
-		(cd "$GIT_DIR" && find "refs/heads" -type f -print) |
+Pull: refs/heads/$head_points_at:refs/$origin" &&
+		case "$use_separate_remote" in
+		t) git-update-ref HEAD "$head_sha1" ;;
+		*) git-update-ref "refs/$origin" $(git-rev-parse HEAD)
+		esac &&
+		(cd "$GIT_DIR" && find "$remote_top" -type f -print) |
 		while read ref
 		do
-			head=`expr "$ref" : 'refs/heads/\(.*\)'` &&
-			test "$head_points_at" = "$head" ||
+			head=`expr "$ref" : 'refs/\(.*\)'` &&
+			name=`expr "$ref" : 'refs/[^\/]*/\(.*\)'` &&
+			test "$head_points_at" = "$name" ||
 			test "$origin" = "$head" ||
-			echo "Pull: ${head}:${head}"
+			echo "Pull: refs/heads/${name}:$remote_top/${name}"
 		done >>"$GIT_DIR/remotes/origin"
 	esac
 
@@ -256,6 +375,7 @@ Pull: $head_points_at:$origin" &&
 		git-read-tree -m -u -v HEAD HEAD
 	esac
 fi
+rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"
 
 trap - exit
 
-- 
1.2.4.gb7986

^ permalink raw reply related

* Re: [PATCH] ls-files: Don't require exclude files to end with a newline.
From: Alexandre Julliard @ 2006-03-20  9:14 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git
In-Reply-To: <20060319212911.GD18185@pasky.or.cz>

Petr Baudis <pasky@suse.cz> writes:

> Dear diary, on Sat, Mar 18, 2006 at 11:27:45AM CET, I got a letter
> where Alexandre Julliard <julliard@winehq.org> said that...
>> Without this patch, the last line of an exclude file is silently
>> ignored if it doesn't end with a newline.
>> 
>> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
>
> $ echo -en "a\nb" | wc -l
> 1
>
> In UNIX, a line is a string terminated by a newline, therefore the blob
> past the last newline character is not really a line at all. ;-)
>
> Perhaps a warning might be in order. Why don't you just add the trailing
> newline to the file?

Of course I can do that, but I think that if a user entered something
on the last line it's a safe bet they didn't mean for it to be
ignored; and since it's trivial to DTRT here, I don't see why we
shouldn't.

-- 
Alexandre Julliard
julliard@winehq.org

^ permalink raw reply

* Re: [ANNOUNCE] qgit 1.1.1
From: Ingo Molnar @ 2006-03-20 10:20 UTC (permalink / raw)
  To: Marco Costalba; +Cc: git, proski
In-Reply-To: <e5bfff550603191404l7511e76awe980fad51ffde98d@mail.gmail.com>

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


* Marco Costalba <mcostalba@gmail.com> wrote:

> > Put in this way it seems a very major bug! really not a small one!
> >
> > I cannot reproduce it. Please can you give me some more info as repository
> > (linux tree?) and commit sha.
> >
> 
> And please also the error message that appears in qgit window so to 
> know what git command failed.

i've attached a screenshot of the failure message. It's plain Linus' 
kernel git tree, clicking on any merge commit produces this window. FC4 
box.

	Ingo

[-- Attachment #2: qgit-bug.png --]
[-- Type: image/png, Size: 46247 bytes --]

^ permalink raw reply

* Re: [PATCH] Fix multi-paragraph list items in OPTIONS section
From: Francis Daly @ 2006-03-20 10:41 UTC (permalink / raw)
  To: git

On Mon, Mar 20, 2006 at 10:39:46, Jonas Fonseca wrote:

> Asciidoc cannot handle multi-paragraph description list items without the
> need for adding special control characters and reindenting all paragraphs
> but the first. 

This issue affects the display of current git-cvsimport and
git-svnimport doc pages. There was a general tidy-up done in
df8baa42fe4eeb5a021ac262caf601f44d2a5746 last October, but additions
since then didn't keep the layout.

I don't think there is a full "fix" for this; either the html docs are
ugly (see the -A section in the pages mentioned above as they are now),
or the asciidoc source files look odd (although that's probably not a
big problem) or the manpages look a bit funny.

This patch makes the html docs right, makes the asciidoc docs a bit odd
but consistent with what is there already, and makes the manpages look
OK using docbook-xsl 1.68, but miss a paragraph separator when using 1.69.

For the manpages, current is like

       -A <author_file>
              Read a file with lines on the form

              username = User's Full Name <email@addr.es>

              and use "User's Full Name <email@addr.es>" as the GIT

With this patch, docbook-xsl v1.68 looks like

       -A <author_file>
              Read a file with lines on the form

                      username = User's Full Name <email@addr.es>

              and use "User's Full Name <email@addr.es>" as the GIT author and

while docbook-xsl v1.69 becomes

       -A <author_file>
              Read a file with lines on the form

                        username = User's Full Name <email@addr.es>
              and use "User's Full Name <email@addr.es>" as the GIT author and

The extra indentation is to keep the v1.69 manpage looking sane.

---
diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt
index 57027b4..b0c6d7c 100644
--- a/Documentation/git-cvsimport.txt
+++ b/Documentation/git-cvsimport.txt
@@ -99,21 +99,24 @@ If you need to pass multiple options, se
 	CVS by default uses the unix username when writing its
 	commit logs. Using this option and an author-conv-file
 	in this format
-
++
+---------
 	exon=Andreas Ericsson <ae@op5.se>
 	spawn=Simon Pawn <spawn@frog-pond.org>
 
-	git-cvsimport will make it appear as those authors had
-	their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly
-	all along.
-
-	For convenience, this data is saved to $GIT_DIR/cvs-authors
-	each time the -A option is provided and read from that same
-	file each time git-cvsimport is run.
-
-	It is not recommended to use this feature if you intend to
-	export changes back to CVS again later with
-	git-link[1]::git-cvsexportcommit.
+---------
++
+git-cvsimport will make it appear as those authors had
+their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly
+all along.
++
+For convenience, this data is saved to $GIT_DIR/cvs-authors
+each time the -A option is provided and read from that same
+file each time git-cvsimport is run.
++
+It is not recommended to use this feature if you intend to
+export changes back to CVS again later with
+git-link[1]::git-cvsexportcommit.
 
 OUTPUT
 ------
diff --git a/Documentation/git-svnimport.txt b/Documentation/git-svnimport.txt
index 9d38657..b1b87c2 100644
--- a/Documentation/git-svnimport.txt
+++ b/Documentation/git-svnimport.txt
@@ -75,18 +75,21 @@ When importing incrementally, you might 
 
 -A <author_file>::
 	Read a file with lines on the form
++
+------
+	username = User's Full Name <email@addr.es>
 
-	  username = User's Full Name <email@addr.es>
-
-	and use "User's Full Name <email@addr.es>" as the GIT
-	author and committer for Subversion commits made by
-	"username". If encountering a commit made by a user not in the
-	list, abort.
-
-	For convenience, this data is saved to $GIT_DIR/svn-authors
-	each time the -A option is provided, and read from that same
-	file each time git-svnimport is run with an existing GIT
-	repository without -A.
+------
++
+and use "User's Full Name <email@addr.es>" as the GIT
+author and committer for Subversion commits made by
+"username". If encountering a commit made by a user not in the
+list, abort.
++
+For convenience, this data is saved to $GIT_DIR/svn-authors
+each time the -A option is provided, and read from that same
+file each time git-svnimport is run with an existing GIT
+repository without -A.
 
 -m::
 	Attempt to detect merges based on the commit message. This option

-- 
Francis Daly        francis@daoine.org

^ permalink raw reply related

* Re: gitk: bug report: invalid command name "contmergediff"
From: Paul Mackerras @ 2006-03-20 11:31 UTC (permalink / raw)
  To: git; +Cc: git
In-Reply-To: <20060308183718.GA9855@nospam.com>

Rutger Nijlunsing writes:

> Bug report on gitk, maybe already reported.
> 
> do:
>    gitk HEAD~1000..
> 
> ...select first commit (why is this not done automatically?), and keep
> pressing down-arrow.
> 
> This gives me:
>    Error: invalid command name "contmergediff"

Ooooh, it does too!  Thanks, I'll fix that.

Paul.

^ permalink raw reply

* Re: What should I use instead of git show?
From: Paul Mackerras @ 2006-03-20 11:33 UTC (permalink / raw)
  To: Olivier Galibert; +Cc: Radoslaw Szkodzinski, git
In-Reply-To: <20060313165015.GC87487@dspnet.fr.eu.org>

Olivier Galibert writes:

> gitk does not seem to have an export function.  Dunno about qgit.

Right-click on a commit should bring up a context menu which includes
a "write commit to file" option.  Or did you mean something different
by "export"?

Paul.

^ permalink raw reply

* Re: [ANNOUNCE] qgit 1.1.1
From: Marco Costalba @ 2006-03-20 12:13 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: git, proski
In-Reply-To: <20060320102022.GA21917@elte.hu>

On 3/20/06, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Marco Costalba <mcostalba@gmail.com> wrote:
>
> > > Put in this way it seems a very major bug! really not a small one!
> > >
> > > I cannot reproduce it. Please can you give me some more info as repository
> > > (linux tree?) and commit sha.
> > >
> >
> > And please also the error message that appears in qgit window so to
> > know what git command failed.
>
> i've attached a screenshot of the failure message. It's plain Linus'
> kernel git tree, clicking on any merge commit produces this window. FC4
> box.
>

The wrong command is git-diff-tree -r -c -p 46571...

I think it's about the quite new option -c of git-diff-tree.

Please upgrade your git to latest version, better upstream one, but
1.2.4 should be enough.

Marco

^ permalink raw reply

* Re: Cloning from sites with 404 overridden
From: Marco Costalba @ 2006-03-20 12:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v8xr5ld38.fsf@assigned-by-dhcp.cox.net>

On 3/20/06, Junio C Hamano <junkio@cox.net> wrote:
> "Marco Costalba" <mcostalba@gmail.com> writes:
>
> >> This is totally untested, but maybe something like this?
> >
> > It works for me. Just some trailing white space warning when applying.
>
> The change only removes the error message without changing any
> other logic, so if that works for you, I wonder if leaving
> things as they are is a better option than doing anything short
> of implementing an AI that tries to pattern-match the "allegedly
> corrupt file" with "sorry no such page found" in many natural
> languages.
>
> My test patch makes it impossible to track down the real
> breakage when an HTTP-reachable repository _does_ have a corrupt
> object.
>
> So how about doing this instead?
>
> -- >8 --

> +               fprintf(stderr,
> +"Some loose object were found to be corrupt, but they might be just\n"
> +"a false '404 Not Found' error message sent with incorrect HTTP\n"
> +"status code.  Suggest running git fsck-objects.\n");
> +       }
>         return rc;
>  }
>

I think it's better, read more correct.

Could be a real corrupted file or just a false 404, so better a
warning then an error message and also better a warning then nothing.

Marco

^ permalink raw reply

* [PATCH] Be verbose when !initial commit
From: Yasushi SHOJI @ 2006-03-20 13:11 UTC (permalink / raw)
  To: git

verbose option in git-commit.sh lead us to run git-diff-index, which
needs a commit-ish we are making diff against.  When we are commiting
the fist set, we obviously don't have any commit-ish in the repo.  So
we just skip the git-diff-index run.

It might be possible to produce diff against empty but do we need
that?

Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>


---

 git-commit.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

e071afdc1c6e9ce6bbee14aa0652e7bb7043550c
diff --git a/git-commit.sh b/git-commit.sh
index 330a434..1e7c09e 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -161,7 +161,7 @@ run_status () {
 	    }
 	'
 
-	if test -n "$verbose"
+	if test -n "$verbose" -a -z "$IS_INITIAL"
 	then
 	    git-diff-index --cached -M -p --diff-filter=MDTCRA $REFERENCE
 	fi
-- 
1.2.4

^ permalink raw reply related

* Re: What should I use instead of git show?
From: Olivier Galibert @ 2006-03-20 13:16 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Radoslaw Szkodzinski, git
In-Reply-To: <17438.37643.583091.800359@cargo.ozlabs.ibm.com>

On Mon, Mar 20, 2006 at 10:33:31PM +1100, Paul Mackerras wrote:
> Olivier Galibert writes:
> 
> > gitk does not seem to have an export function.  Dunno about qgit.
> 
> Right-click on a commit should bring up a context menu which includes
> a "write commit to file" option.  Or did you mean something different
> by "export"?

No, I meant exactly that.  Thanks, that can be quite useful.

  OG.

^ permalink raw reply

* Re: [ANNOUNCE] qgit 1.1.1
From: Ingo Molnar @ 2006-03-20 14:46 UTC (permalink / raw)
  To: Marco Costalba; +Cc: git, proski
In-Reply-To: <e5bfff550603200413i22a37a43n4d5a9b0ba63e880d@mail.gmail.com>


* Marco Costalba <mcostalba@gmail.com> wrote:

> The wrong command is git-diff-tree -r -c -p 46571...
> 
> I think it's about the quite new option -c of git-diff-tree.
> 
> Please upgrade your git to latest version, better upstream one, but 
> 1.2.4 should be enough.

ok, that did the trick.

there's a weird rendering artifact as well, see the white line in the 
screenshot [that i'll send you in a separate mail]. It goes away if i 
drag another window in front of the qgit window. It happens if i 
double-click a 'merge' branch, exit qgit and start it again [and the 
separator line needs to obscur the commit line just partially]. This is 
an uptodate FC4 installation.

	Ingo

^ permalink raw reply

* Re: efficient cloning
From: Petr Baudis @ 2006-03-20 15:18 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: James Cloos, git
In-Reply-To: <7vu09tjy38.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Mon, Mar 20, 2006 at 09:54:03AM CET, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
>  * A new flag --use-separate-remote stops contaminating local
>    branch namespace by upstream branch names.  The upstream
>    branch heads are copied in .git/refs/remotes/ instead of
>    .git/refs/heads/ and .git/remotes/origin file is set up to
>    reflect this as well.  It requires to have fetch/pull update
>    to understand .git/refs/remotes by Eric Wong to further
>    update the repository cloned this way.

I think this sucks the way it is, because you still have only a single
namespace for remotes (still quite a huge improvement to the current git
situation), but you can have many upstreams. So it would be a quite more
reasonable to have:

	.git/refs/remotes/<remotename>/<headname>

This is also how I would like to do it for cg-clone -a (which I planned
to implement the last weekend... well... ;). Actually, I think I will
stay in .git/refs/heads/ at least for now until git versions with
.git/refs/remotes/ in the refs search path will be released.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.

^ permalink raw reply

* Question about possible git races
From: Radoslaw Szkodzinski @ 2006-03-20 16:24 UTC (permalink / raw)
  To: git

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

I'd like to write a multithreaded application using git, so I'd like to see if 
there are any races:

- push vs pull
One thread pushes to the repository while another is pulling from it at the 
same time. I should get the older commit.

- push vs push
Both threads push at the same time. What happens?
Any good way to merge those pushes?
(I have full access to both repos)

Possibly those two aren't fast-forward of each other.
I think one of the pushes should abort in this case unless I force it.

- fetch vs fetch
I mean that two threads try to fetch from different repositories to a single 
one. Possibly those two aren't fast-forward of each other.
Any good way to merge those fetches?
(I have full access to both repos)

I'm meaning really bare git there, w/o bash+perl scripts.

-- 
GPG Key id:  0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0  9105 9543 0453 D1F1 0BA2

AstralStorm

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

^ permalink raw reply

* Re: efficient cloning
From: Josef Weidendorfer @ 2006-03-20 16:30 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vu09tjy38.fsf@assigned-by-dhcp.cox.net>

On Monday 20 March 2006 09:54, you wrote:
>  * A new flag --use-separate-remote stops contaminating local
>    branch namespace by upstream branch names.  The upstream
>    branch heads are copied in .git/refs/remotes/ instead of

Shouldn't this be .git/refs/remotes/origin/?
Ie. different namespaces for different remotes?

Linus wanted to still be able to say "origin" which automatically
would map to "remotes/origin/master", where the name of the remote
branch (here "master") is the first mentioned in the Pull line of
the .git/remotes file in eg.

	git diff origin..master

I am not sure whether we really want "take first refspec mentioned on Pull
line", as there can be multiple tracked remote branches with their own local
developments...
Ie. I want to be able to specify: "The local development branch X is based on
the following remote branch Y , which is tracked locally as Z.".
This way, you also could warn/prohobit accidential nonsense merges because of wrong use
of "git-pull". 

Josef

^ permalink raw reply

* Re: [ANNOUNCE] qgit 1.1.1
From: Marco Costalba @ 2006-03-20 16:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: git, proski
In-Reply-To: <20060320144613.GA25617@elte.hu>

On 3/20/06, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Marco Costalba <mcostalba@gmail.com> wrote:
>
> > The wrong command is git-diff-tree -r -c -p 46571...
> >
> > I think it's about the quite new option -c of git-diff-tree.
> >
> > Please upgrade your git to latest version, better upstream one, but
> > 1.2.4 should be enough.
>
> ok, that did the trick.
>
> there's a weird rendering artifact as well, see the white line in the
> screenshot [that i'll send you in a separate mail]. It goes away if i
> drag another window in front of the qgit window. It happens if i
> double-click a 'merge' branch, exit qgit and start it again [and the
> separator line needs to obscur the commit line just partially]. This is
> an uptodate FC4 installation.
>
Yes, sometimes I see it either. To remove I use the scrollbar to
hide/unhide the line,
i.e. to force a repaint.

I think it is something related to Qt rendering engine, I doubt I
could do something about it.

BTW someone off list suggested me to implement a 'git version check'
control and related message box to avoid your troubles to someone
else: I'm surely going to do it.

Marco

^ permalink raw reply

* Re: Cloning from sites with 404 overridden
From: Lukas Sandström @ 2006-03-20 18:29 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Paolo Ciarrocchi
In-Reply-To: <7vk6aqql9e.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> "Marco Costalba" <mcostalba@gmail.com> writes:
>>http://digilander.libero.it /mcostalba/scm/qgit.git/objects/8d/ea03519e75f47d
> 
> To be fair, the site is _not_ missing anything from HTTP
> protocol perspective, because when git asks 8d/ea0351... file,
> the server responds with a regular "HTTP/1.0 200 OK" response.
> So it is _your_ repository that is corrupt -- instead of
> correctly _lacking_ the file you should have removed with
> prune-packed, it has a garbage file.

Actually, it sends a 302 redirect. 

Perhaps a repository config option to treat a 302 as a 404?

/Lukas Sandström

^ permalink raw reply

* [PATCH] http-push: add support for deleting remote branches
From: Nick Hengeveld @ 2006-03-20 18:31 UTC (permalink / raw)
  To: git

Processes new command-line arguments -d and -D to remove a remote branch
if the following conditions are met:
- one branch name is present on the command line
- the specified branch name matches exactly one remote branch name
- the remote HEAD is a symref
- the specified branch is not the remote HEAD
- the remote HEAD resolves to an object that exists locally (-d only)
- the specified branch resolves to an object that exists locally (-d only)
- the specified branch is an ancestor of the remote HEAD (-d only)

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>


---

 http-push.c |  219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 218 insertions(+), 1 deletions(-)

245873d765d8d380a146c7b77d09c1e9c2645daa
diff --git a/http-push.c b/http-push.c
index 42b0d59..e44310f 100644
--- a/http-push.c
+++ b/http-push.c
@@ -7,6 +7,7 @@
 #include "http.h"
 #include "refs.h"
 #include "revision.h"
+#include "exec_cmd.h"
 
 #include <expat.h>
 
@@ -32,6 +33,7 @@ enum XML_Status {
 #define DAV_PROPFIND "PROPFIND"
 #define DAV_PUT "PUT"
 #define DAV_UNLOCK "UNLOCK"
+#define DAV_DELETE "DELETE"
 
 /* DAV lock flags */
 #define DAV_PROP_LOCKWR (1u << 0)
@@ -64,6 +66,9 @@ enum XML_Status {
 #define FETCHING (1u << 7)
 #define PUSHING  (1u << 8)
 
+/* We allow "recursive" symbolic refs. Only within reason, though */
+#define MAXDEPTH 5
+
 static int pushing = 0;
 static int aborted = 0;
 static char remote_dir_exists[256];
@@ -2103,6 +2108,197 @@ static int remote_exists(const char *pat
 	return -1;
 }
 
+static void fetch_symref(char *path, char **symref, unsigned char *sha1)
+{
+	char *url;
+	struct buffer buffer;
+	struct active_request_slot *slot;
+	struct slot_results results;
+
+	url = xmalloc(strlen(remote->url) + strlen(path) + 1);
+	sprintf(url, "%s%s", remote->url, path);
+
+	buffer.size = 4096;
+	buffer.posn = 0;
+	buffer.buffer = xmalloc(buffer.size);
+
+	slot = get_active_slot();
+	slot->results = &results;
+	curl_easy_setopt(slot->curl, CURLOPT_FILE, &buffer);
+	curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_buffer);
+	curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, NULL);
+	curl_easy_setopt(slot->curl, CURLOPT_URL, url);
+	if (start_active_slot(slot)) {
+		run_active_slot(slot);
+		if (results.curl_result != CURLE_OK) {
+			die("Couldn't get %s for remote symref\n%s",
+			    url, curl_errorstr);
+		}
+	} else {
+		die("Unable to start remote symref request");
+	}
+	free(url);
+
+	if (*symref != NULL)
+		free(*symref);
+	*symref = NULL;
+	memset(sha1, 0, 20);
+
+	if (buffer.posn == 0)
+		return;
+
+	/* If it's a symref, set the refname; otherwise try for a sha1 */
+	if (!strncmp((char *)buffer.buffer, "ref: ", 5)) {
+		*symref = xcalloc(buffer.posn - 5, 1);
+		strncpy(*symref, (char *)buffer.buffer + 5, buffer.posn - 6);
+	} else {
+		get_sha1_hex(buffer.buffer, sha1);
+	}
+
+	free(buffer.buffer);
+}
+
+static int verify_merge_base(unsigned char *head_sha1, unsigned char *branch_sha1)
+{
+	int pipe_fd[2];
+	pid_t merge_base_pid;
+	char line[PATH_MAX + 20];
+	unsigned char merge_sha1[20];
+	int verified = 0;
+
+	if (pipe(pipe_fd) < 0)
+		die("Verify merge base: pipe failed");
+
+	merge_base_pid = fork();
+	if (!merge_base_pid) {
+		static const char *args[] = {
+			"merge-base",
+			"-a",
+			NULL,
+			NULL,
+			NULL
+		};
+		args[2] = strdup(sha1_to_hex(head_sha1));
+		args[3] = sha1_to_hex(branch_sha1);
+
+		dup2(pipe_fd[1], 1);
+		close(pipe_fd[0]);
+		close(pipe_fd[1]);
+		execv_git_cmd(args);
+		die("merge-base setup failed");
+	}
+	if (merge_base_pid < 0)
+		die("merge-base fork failed");
+
+	dup2(pipe_fd[0], 0);
+	close(pipe_fd[0]);
+	close(pipe_fd[1]);
+	while (fgets(line, sizeof(line), stdin) != NULL) {
+		if (get_sha1_hex(line, merge_sha1))
+			die("expected sha1, got garbage:\n %s", line);
+		if (!memcmp(branch_sha1, merge_sha1, 20)) {
+			verified = 1;
+			break;
+		}
+	}
+
+	return verified;
+}
+
+static int delete_remote_branch(char *pattern, int force)
+{
+	struct ref *refs = remote_refs;
+	struct ref *remote_ref = NULL;
+	unsigned char head_sha1[20];
+	char *symref = NULL;
+	int match;
+	int patlen = strlen(pattern);
+	int i;
+	struct active_request_slot *slot;
+	struct slot_results results;
+	char *url;
+
+	/* Find the remote branch(es) matching the specified branch name */
+	for (match = 0; refs; refs = refs->next) {
+		char *name = refs->name;
+		int namelen = strlen(name);
+		if (namelen < patlen ||
+		    memcmp(name + namelen - patlen, pattern, patlen))
+			continue;
+		if (namelen != patlen && name[namelen - patlen - 1] != '/')
+			continue;
+		match++;
+		remote_ref = refs;
+	}
+	if (match == 0)
+		return error("No remote branch matches %s", pattern);
+	if (match != 1)
+		return error("More than one remote branch matches %s",
+			     pattern);
+
+	/*
+	 * Remote HEAD must be a symref (not exactly foolproof; a remote
+	 * symlink to a symref will look like a symref)
+	 */
+	fetch_symref("HEAD", &symref, head_sha1);
+	if (!symref)
+		return error("Remote HEAD is not a symref");
+
+	/* Remote branch must not be the remote HEAD */
+	for (i=0; symref && i<MAXDEPTH; i++) {
+		if (!strcmp(remote_ref->name, symref))
+			return error("Remote branch %s is the current HEAD",
+				     remote_ref->name);
+		fetch_symref(symref, &symref, head_sha1);
+	}
+
+	/* Run extra sanity checks if delete is not forced */
+	if (!force) {
+		/* Remote HEAD must resolve to a known object */
+		if (symref)
+			return error("Remote HEAD symrefs too deep");
+		if (is_zero_sha1(head_sha1))
+			return error("Unable to resolve remote HEAD");
+		if (!has_sha1_file(head_sha1))
+			return error("Remote HEAD resolves to object %s\nwhich does not exist locally, perhaps you need to fetch?", sha1_to_hex(head_sha1));
+
+		/* Remote branch must resolve to a known object */
+		if (is_zero_sha1(remote_ref->old_sha1))
+			return error("Unable to resolve remote branch %s",
+				     remote_ref->name);
+		if (!has_sha1_file(remote_ref->old_sha1))
+			return error("Remote branch %s resolves to object %s\nwhich does not exist locally, perhaps you need to fetch?", remote_ref->name, sha1_to_hex(remote_ref->old_sha1));
+
+		/* Remote branch must be an ancestor of remote HEAD */
+		if (!verify_merge_base(head_sha1, remote_ref->old_sha1)) {
+			return error("The branch '%s' is not a strict subset of your current HEAD.\nIf you are sure you want to delete it, run:\n\t'git http-push -D %s %s'", remote_ref->name, remote->url, pattern);
+		}
+	}
+
+	/* Send delete request */
+	fprintf(stderr, "Removing remote branch '%s'\n", remote_ref->name);
+	url = xmalloc(strlen(remote->url) + strlen(remote_ref->name) + 1);
+	sprintf(url, "%s%s", remote->url, remote_ref->name);
+	slot = get_active_slot();
+	slot->results = &results;
+	curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
+	curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_null);
+	curl_easy_setopt(slot->curl, CURLOPT_URL, url);
+	curl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, DAV_DELETE);
+	if (start_active_slot(slot)) {
+		run_active_slot(slot);
+		free(url);
+		if (results.curl_result != CURLE_OK)
+			return error("DELETE request failed (%d/%ld)\n",
+				     results.curl_result, results.http_code);
+	} else {
+		free(url);
+		return error("Unable to start DELETE request");
+	}
+
+	return 0;
+}
+
 int main(int argc, char **argv)
 {
 	struct transfer_request *request;
@@ -2112,6 +2308,8 @@ int main(int argc, char **argv)
 	struct remote_lock *ref_lock = NULL;
 	struct remote_lock *info_ref_lock = NULL;
 	struct rev_info revs;
+	int delete_branch = 0;
+	int force_delete = 0;
 	int objects_to_send;
 	int rc = 0;
 	int i;
@@ -2138,7 +2336,15 @@ int main(int argc, char **argv)
 				push_verbosely = 1;
 				continue;
 			}
-			usage(http_push_usage);
+			if (!strcmp(arg, "-d")) {
+				delete_branch = 1;
+				continue;
+			}
+			if (!strcmp(arg, "-D")) {
+				delete_branch = 1;
+				force_delete = 1;
+				continue;
+			}
 		}
 		if (!remote->url) {
 			remote->url = arg;
@@ -2158,6 +2364,9 @@ int main(int argc, char **argv)
 	if (!remote->url)
 		usage(http_push_usage);
 
+	if (delete_branch && nr_refspec != 1)
+		die("You must specify only one branch name when deleting a remote branch");
+
 	memset(remote_dir_exists, -1, 256);
 
 	http_init();
@@ -2193,6 +2402,14 @@ int main(int argc, char **argv)
 	fprintf(stderr, "Fetching remote heads...\n");
 	get_dav_remote_heads();
 
+	/* Remove a remote branch if -d or -D was specified */
+	if (delete_branch) {
+		if (delete_remote_branch(refspec[0], force_delete) == -1)
+			fprintf(stderr, "Unable to delete remote branch %s\n",
+				refspec[0]);
+		goto cleanup;
+	}
+
 	/* match them up */
 	if (!remote_tail)
 		remote_tail = &remote_refs;
-- 
1.2.4.g55c6-dirty

^ permalink raw reply related

* Signed char assumption..
From: Linus Torvalds @ 2006-03-20 19:20 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List


On ppc, I now get:

  http-push.c: In function 'add_fetch_request':
  http-push.c:831: warning: comparison is always false due to limited range of data type
  http-push.c: In function 'add_send_request':
  http-push.c:864: warning: comparison is always false due to limited range of data type

because the code assumes that "char" is signed and can take a -1. 

		Linus

^ permalink raw reply

* Re: Cloning from sites with 404 overridden
From: Petr Baudis @ 2006-03-20 19:43 UTC (permalink / raw)
  To: Lukas Sandström; +Cc: git, Junio C Hamano, Paolo Ciarrocchi
In-Reply-To: <441EF46E.5050907@etek.chalmers.se>

Dear diary, on Mon, Mar 20, 2006 at 07:29:02PM CET, I got a letter
where Lukas Sandström <lukass@etek.chalmers.se> said that...
> Junio C Hamano wrote:
> > "Marco Costalba" <mcostalba@gmail.com> writes:
> >>http://digilander.libero.it /mcostalba/scm/qgit.git/objects/8d/ea03519e75f47d
> > 
> > To be fair, the site is _not_ missing anything from HTTP
> > protocol perspective, because when git asks 8d/ea0351... file,
> > the server responds with a regular "HTTP/1.0 200 OK" response.
> > So it is _your_ repository that is corrupt -- instead of
> > correctly _lacking_ the file you should have removed with
> > prune-packed, it has a garbage file.
> 
> Actually, it sends a 302 redirect. 
> 
> Perhaps a repository config option to treat a 302 as a 404?

I think that would be too ugly _and_ specific a workaround for the
particular site. It's reasonable to keep it generalized for all the
broken repositories when already doing it.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.

^ permalink raw reply

* [PATCH] http-push: don't assume char is signed
From: Nick Hengeveld @ 2006-03-20 19:50 UTC (permalink / raw)
  To: git

Declare remote_dir_exists[] as signed char to be sure that values of -1
are valid.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>


---

 http-push.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

446e5a54db80664a0ae2a418766811136952067e
diff --git a/http-push.c b/http-push.c
index 42b0d59..a35e74d 100644
--- a/http-push.c
+++ b/http-push.c
@@ -66,7 +66,7 @@ enum XML_Status {
 
 static int pushing = 0;
 static int aborted = 0;
-static char remote_dir_exists[256];
+static signed char remote_dir_exists[256];
 
 static struct curl_slist *no_pragma_header;
 static struct curl_slist *default_headers;
-- 
1.2.4.g55c6-dirty

^ permalink raw reply related

* Re: Cloning from sites with 404 overridden
From: Nick Hengeveld @ 2006-03-20 19:54 UTC (permalink / raw)
  To: Lukas Sandström; +Cc: git, Junio C Hamano, Paolo Ciarrocchi
In-Reply-To: <441EF46E.5050907@etek.chalmers.se>

On Mon, Mar 20, 2006 at 07:29:02PM +0100, Lukas Sandström wrote:

> Perhaps a repository config option to treat a 302 as a 404?

FWIW, it used to work that way and was modified to follow redirects back at
commit 66c9ec25553ce7332c46e2017b9c4d7c26310fff.

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

^ permalink raw reply

* Re: Pulling tags from git.git
From: Florian Weimer @ 2006-03-20 18:30 UTC (permalink / raw)
  To: Andreas Ericsson; +Cc: git
In-Reply-To: <441064DD.2010903@op5.se>

* Andreas Ericsson:

>> The current implementation is rather counter-intuitive because it's
>> much easier to create lightweight tags, and you wonder why they aren't
>> replicated by fetches (but some other tags are).

> Well, you wouldn't want to go through the trouble of writing a
> tag-message for a temporary tag, but signing and writing a short note
> for a tag that you intend those who share your workload to have is not
> that much of a bother imo.

It's not obvious from the git-tag documentation that signing makes a
difference down the road in terms of replication.  IOW, I don't
question the distinction per se, but it's counter-intuitive if you
aren't told about it.

^ permalink raw reply

* Re: Pulling tags from git.git
From: Junio C Hamano @ 2006-03-20 20:31 UTC (permalink / raw)
  To: Florian Weimer; +Cc: git
In-Reply-To: <87lkv5ynnp.fsf@mid.deneb.enyo.de>

Florian Weimer <fw@deneb.enyo.de> writes:

> It's not obvious from the git-tag documentation that signing makes a
> difference down the road in terms of replication.  IOW, I don't
> question the distinction per se, but it's counter-intuitive if you
> aren't told about it.

Agreed.  Please make it so ;-).

^ 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