Git development
 help / color / mirror / Atom feed
* Re: Git performance results on a large repository
From: Sam Vilain @ 2012-02-03 22:57 UTC (permalink / raw)
  To: Joshua Redstone
  Cc: Ævar Arnfjörð Bjarmason, git@vger.kernel.org
In-Reply-To: <4F2C6276.1070100@vilain.net>

On 2/3/12 2:40 PM, Sam Vilain wrote:
> As the git object storage model is write–only and content–addressed,
> it should git this kind of scaling well.
             ^^^

Could have sworn I typed 'suit' there.  My fingers have auto–correct ;-)

Sam

^ permalink raw reply

* Re: [PATCH v4 03/13] parseopt: make OPT_INTEGER support hexadecimal as well
From: Junio C Hamano @ 2012-02-03 22:59 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1328276078-27955-4-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> -		*(int *)opt->value = strtol(arg, (char **)&s, 10);
> +		if (!prefixcmp(arg, "0x") || !prefixcmp(arg, "0X"))
> +			*(int *)opt->value = strtol(arg + 2, (char **)&s, 16);
> +		else
> +			*(int *)opt->value = strtol(arg, (char **)&s, 10);

Can't you just do "strtol(arg, (char **)&s, 0)" instead?

^ permalink raw reply

* Re: [PATCH v4 08/13] column: add column.ui for default column output settings
From: Junio C Hamano @ 2012-02-03 23:04 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1328276078-27955-9-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> diff --git a/column.h b/column.h
> index 1912cb0..afdafc4 100644
> --- a/column.h
> +++ b/column.h
> @@ -17,6 +17,8 @@ struct column_options {
>  	const char *nl;
>  };
>  
> +extern int git_colopts;

For a global state variable, I'd prefer to see it spelled out, e.g.
git_column_opts or even git_column_options.  It's not like you would be
referring to this variable from everywhere---you would use it only from
fallback codepaths after parse_options() returns, or something, no?

^ permalink raw reply

* Re: [PATCH v4 09/13] help: reuse print_columns() for help -a
From: Junio C Hamano @ 2012-02-03 23:05 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1328276078-27955-10-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  help.c |   47 +++++++++++++----------------------------------
>  1 files changed, 13 insertions(+), 34 deletions(-)

Nice.

^ permalink raw reply

* Re: Git performance results on a large repository
From: Matt Graham @ 2012-02-03 23:05 UTC (permalink / raw)
  To: Joshua Redstone
  Cc: Ævar Arnfjörð Bjarmason, git@vger.kernel.org
In-Reply-To: <CB5179E9.3B751%joshua.redstone@fb.com>

Hi Josh,

On Fri, Feb 3, 2012 at 17:00, Joshua Redstone <joshua.redstone@fb.com> wrote:
> Thanks for the comments.  I've included a bunch more info on the test repo
> below.  It is based on a growth model of two of our current repositories
> (I.e., it's not a perforce import). We already have some of the easily
> separable projects in separate repositories, like HPHP.   If we could
> split our largest repos into multiple ones, that would help the scaling
> issue.  However, the code in those repos is rather interdependent and we
> believe it'd hurt more than help to split it up, at least for the
> medium-term future.  We derive a fair amount of benefit from the code
> sharing and keeping things together in a single repo, so it's not clear
> when it'd make sense to get more aggressive splitting things up.
>
> Some more information on the test repository:   The working directory is
> 9.5 GB, the median file size is 2 KB.  The average depth of a directory
> (counting the number of '/'s) is 3.6 levels and the average depth of a
> file is 4.6.  More detailed histograms of the repository composition is
> below:

Do you have a histogram of the types of files in the repo?
And as suggested earlier, is svn working for you now because it allows
sparse checkout?  I imagine the stats for svn on the full repo would
be comparable or worse to what you measured with git?

^ permalink raw reply

* [1.7.9] usage regression when merging annotated tag objects
From: Bart Trojanowski @ 2012-02-03 23:08 UTC (permalink / raw)
  To: git

I recently started using git 1.7.9.  Earlier today GregKH released a stable
kernel update and I tried my tried and true procedure using 'git merge
--ff-only v3.2.3'.  I was a bit surprised with the results.

There are two tags I am toying with...

69bade0 is v3.2.3
3499d64 is v3.2.2

And here is where we start...

$ git describe
v3.2.2

$ git merge-base v3.2.2 v3.2.3 | xargs git describe
v3.2.2

(it is thus eligible for a fast-forward)

Finally, the strangeness...

$ git merge --ff-only v3.2.3
fatal: Not possible to fast-forward, aborting.

$ git merge --ff-only v3.2.3~
Updating 3499d64..7b171c5
Fast-forward
...

$ git merge --ff-only v3.2.3
fatal: Not possible to fast-forward, aborting.

After talking to Junio, he pointed out that "merging tag objects gained new
meanings in 1.7.9".

I am not sure if my confusion will be shared by others and if --ff-only
needs a clarification.  Perhaps --ff-only should just continue to work as
it did before, and fast-forward from tag to tag.

Cheers,
-Bart

^ permalink raw reply

* Re: [PATCH v4 10/13] branch: add --column
From: Junio C Hamano @ 2012-02-03 23:11 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1328276078-27955-11-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> @@ -474,7 +482,7 @@ static void print_ref_item(struct ref_item *item, int maxwidth, int verbose,
>  	else if (verbose)
>  		/* " f7c0c00 [ahead 58, behind 197] vcs-svn: drop obj_pool.h" */
>  		add_verbose_info(&out, item, verbose, abbrev);
> -	printf("%s\n", out.buf);
> +	print_cell(&output, colopts, out.buf);
>  	strbuf_release(&name);
>  	strbuf_release(&out);
>  }

Hmm, disabling column output when verbose is in effect without telling the
user what we are doing needs to be fixed, but because of that, at least
this codepath won't try to stuff potentially long strings in a columnar
form.

I am not sure about the utility of columnar output for "git branch" in the
short form.  You no longer can just scan the leftmost column to scan for
'*' to see the current branch.

^ permalink raw reply

* Re: [PATCH v4 02/13] column: add API to print items in columns
From: Junio C Hamano @ 2012-02-03 23:16 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1328276078-27955-3-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> +#define MODE(mode) ((mode) & COL_MODE)
> + ...
> +void print_columns(const struct string_list *list, int mode,
> +		   struct column_options *opts)
> +{
> +	const char *indent = "", *nl = "\n";
> +	int padding = 1, width = term_columns();
> +
> +	if (!list->nr)
> +		return;
> +	if (opts) {
> +		if (opts->indent)
> +			indent = opts->indent;
> +		if (opts->nl)
> +			nl = opts->nl;
> +		if (opts->width)
> +			width = opts->width;
> +		padding = opts->padding;
> +	}
> +	if (width <= 1 || !(mode & COL_ENABLED)) {

Unless there is a compelling reason not to, make a flag word used as
collection of bitfields an unsigned, i.e. not "int mode".

^ permalink raw reply

* Re: [PATCH v4 11/13] status: add --column
From: Junio C Hamano @ 2012-02-03 23:19 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1328276078-27955-12-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> @@ -1251,7 +1260,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
>  	case STATUS_FORMAT_LONG:
>  		s.verbose = verbose;
>  		s.ignore_submodule_arg = ignore_submodule_arg;
> -		wt_status_print(&s);
> +		wt_status_print(&s, colopts);
>  		break;
>  	}

Do you really need to pass colopts around as a separate parameter all the
way through the callchain?

Why isn't it a new member of wt_status that sits next to existing
use_color, verbose, etc. that define _how_ the status is shown?

^ permalink raw reply

* Re: [PATCH] t0300-credentials: Word around a solaris /bin/sh bug
From: Jeff King @ 2012-02-03 23:27 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Ben Walton, git
In-Reply-To: <7vipjnmt8a.fsf@alter.siamese.dyndns.org>

On Fri, Feb 03, 2012 at 02:45:25PM -0800, Junio C Hamano wrote:

> Let's not over-engineer this and stick to the simple-stupid-sufficient.

Fair enough.

> Something like this?
> [...]
> +# Prepare a script to be used in the test
> +write_script () {
> +	{
> +		echo "#!${2-"$SHELL_PATH"}"
> +		cat
> +	} >"$1" &&
> +	chmod +x "$1"
> +}

Looks good to me (it probably doesn't matter, but you may want to
connect the echo and cat via &&).

-Peff

^ permalink raw reply

* Re: [PATCH v4 13/13] tag: add --column
From: Junio C Hamano @ 2012-02-03 23:30 UTC (permalink / raw)
  To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1328276078-27955-14-git-send-email-pclouds@gmail.com>

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> @@ -421,6 +428,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
>  	};
>  
>  	git_config(git_tag_config, NULL);
> +	if (!colopts)
> +		colopts = git_colopts;
>  
>  	memset(&opt, 0, sizeof(opt));
>  
> @@ -441,9 +450,19 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
>  
>  	if (list + delete + verify > 1)
>  		usage_with_options(git_tag_usage, options);
> -	if (list)
> -		return list_tags(argv, lines == -1 ? 0 : lines,
> -				 with_commit);
> +	if (list) {
> +		int ret;
> +		if (lines == -1) {
> +			struct column_options copts;
> +			memset(&copts, 0, sizeof(copts));
> +			copts.padding = 2;
> +			run_column_filter(colopts, &copts);
> +		}
> +		ret = list_tags(argv, lines == -1 ? 0 : lines, with_commit);
> +		if (lines == -1)
> +			stop_column_filter();
> +		return ret;
> +	}
>  	if (lines != -1)
>  		die(_("-n option is only allowed with -l."));
>  	if (with_commit)

The patch is surprisingly small, which is a good sign.  The same comment
to the silent suppression "branch -v --column" applies here to "tag -n".

^ permalink raw reply

* Re: Git performance results on a large repository
From: Chris Lee @ 2012-02-03 23:35 UTC (permalink / raw)
  To: Joshua Redstone; +Cc: git@vger.kernel.org
In-Reply-To: <CB5074CF.3AD7A%joshua.redstone@fb.com>

On Fri, Feb 3, 2012 at 6:20 AM, Joshua Redstone <joshua.redstone@fb.com> wrote:
> [snip]
>
> The git performance we observed here is too slow for our needs.  So the
> question becomes, if we want to keep using git going forward, what's the
> best way to improve performance.  It seems clear we'll probably need some
> specialized servers (e.g., to perform git-blame quickly) and maybe
> specialized file system integration to detect what files have changed in a
> working tree.

Have you considered upgrading all of engineering to SSDs? 200+GB SSDs
are under $400USD nowadays.

-clee

^ permalink raw reply

* Re: [1.7.9] usage regression when merging annotated tag objects
From: Junio C Hamano @ 2012-02-03 23:54 UTC (permalink / raw)
  To: Bart Trojanowski; +Cc: git
In-Reply-To: <CADeLxZTsq1M5oEb1u5Oqfxq3dYXL6E_uN9bXaTqaOZiA0fgdJQ@mail.gmail.com>

Some examples you gave were irrelevant, so I'd give an updated version.

Here are the facts of the day, without judging if the behaviour is good or
bad.

   1) If you are at Linux v3.2.2 and do not have any development on top, 

        $ git merge v3.2.3

      historically would have fast-forwarded. Git v1.7.9 would now create a
      merge commit, authored by you (who is unlikely to be Linus).

   2) You do not want such a merge, so try to work it around by this:

        $ git merge --ff-only v3.2.3
	fatal: Not possible to fast-forward, aborting.

      which is refused because merging a tag object requires a new merge
      commit.

Here are my assessments.

1. I do not think the first one is a real issue. 99% of the people who are
   merely following along the upstream will never say "git merge v3.2.3".
   They will instead say "git pull" and this _will_ fast-forward.  No
   merging of tag objects involved.  Also when they want to check out that
   specific version, they won't be using "git merge".  It will be "git
   checkout v3.2.3".  So I do not think this is an issue for the case
   where it used to result in a fast-forward.

1.5 A variant of the first one is when you have forked and are trying to
   synchronize with the latest stable. In that case, you _do_ want a merge
   to happen. It is possible that you may not want to get the "mergetag"
   header in the resulting merge commit, and "git merge v3.2.3^0" is a new
   way to do so.

   Strictly speaking, this _is_ a usage regression caused by the new
   meaning "git merge" gained in v1.7.9.  Recording the tag in the a merge
   commit, however, is the whole point of "git merge v3.2.3" that is given
   a tag; this behaviour is not going to to change.

2. This is somewhat problematic. "git merge --ff-only v2.6.29" to people
   who merely follow Linus has always been possible, and I would expect it
   to be the case.

   But again, the reason they said --ff-only in the first place is because
   they feared that they might have some unexpected commits in their
   history, and asked "git merge" to error out if the command has to
   create a merge to let them know.  So at that point, they could be
   trained to run "git merge --ff-only v3.2.3^0" instead, *given enough
   clue*.

   The problem is that we are not giving enough clue.  We just say "Not
   possible to fast-forward" without explaining why.

   We could solve this in one of two ways. We could tell them to merge
   v3.2.3^0 instead. Or we could just go ahead and do that for them
   automatically ourselves.  I am inclined to say that we should unwrap
   the tag given from the command line when --ff-only was given, i.e. we
   do the latter.

^ permalink raw reply

* Re: Git performance results on a large repository
From: Zeki Mokhtarzada @ 2012-02-04  0:01 UTC (permalink / raw)
  To: git
In-Reply-To: <CB5074CF.3AD7A%joshua.redstone@fb.com>

 
> The test repo has 4 million commits, linear history and about 1.3 million
> files.  The size of the .git directory is about 15GB, and has been
> repacked with 'git repack -a -d -f --max-pack-size=10g --depth=100
> --window=250'.  This repack took about 2 days on a beefy machine (I.e.,
> lots of ram and flash).  The size of the index file is 191 MB. I can share


Are you willing to give up all or part of your history in your working
repository?  I've heard of larger projects starting from scratch (i.e. copy all
of your files into a brand new repo.)  You can keep your old repo around for
archival purposes.  Also, how much of your repo is code, versus static assets. 
You could move all of your static assets (images, css, maybe some js?) into
another repo, and then merge the two repo's together at build time if you
absolutely need them deployed together.

Here are a couple strategies for doing a partial truncate:

http://stackoverflow.com/questions/4515580/how-do-i-remove-the-old-history-from-a-git-repository
http://bogdan.org.ua/2011/03/28/how-to-truncate-git-history-sample-script-included.html


-Zeki

^ permalink raw reply

* [RFC/PATCH] verify-tag: check sig of all tags to given object
From: Tom Grennan @ 2012-02-04  1:25 UTC (permalink / raw)
  To: git; +Cc: jasampler

If the command argument is a non-tag object, scan and verify all tags to
the given object; for example:

john$ git tag -s -m "I approve" john-README master:README
...
john$ git tag -s -m "I recommend" john-HEAD HEAD
...
john$ git push <url> tag john-README
john$ git push <url> tag john-HEAD

jane$ git fetch --tags <url>
jane$ git tag -s -m "I also approve" jane-README master:README
...
jane$ git push <url> tag jane-README

jeff$ git fetch --tags <url>
jeff$ git verify-tag master:README
tag john-README: OK
tag jane-README: OK
jeff$ git verify-tag HEAD
tag john-HEAD: OK

Signed-off-by: Tom Grennan <tom.grennan@ericsson.com>
---
 Documentation/git-verify-tag.txt |    6 +++-
 builtin/verify-tag.c             |   53 +++++++++++++++++++++++++++++++++++---
 2 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/Documentation/git-verify-tag.txt b/Documentation/git-verify-tag.txt
index 5ff76e8..ce47f95 100644
--- a/Documentation/git-verify-tag.txt
+++ b/Documentation/git-verify-tag.txt
@@ -8,7 +8,7 @@ git-verify-tag - Check the GPG signature of tags
 SYNOPSIS
 --------
 [verse]
-'git verify-tag' <tag>...
+'git verify-tag' <object>...
 
 DESCRIPTION
 -----------
@@ -20,8 +20,10 @@ OPTIONS
 --verbose::
 	Print the contents of the tag object before validating it.
 
-<tag>...::
+<object>...::
 	SHA1 identifiers of git tag objects.
+	For non-tag objects, scan and verify all tags to the given
+	object.
 
 GIT
 ---
diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
index 28c2174..df9e93c 100644
--- a/builtin/verify-tag.c
+++ b/builtin/verify-tag.c
@@ -7,6 +7,7 @@
  */
 #include "cache.h"
 #include "builtin.h"
+#include "refs.h"
 #include "tag.h"
 #include "run-command.h"
 #include <signal.h>
@@ -14,7 +15,7 @@
 #include "gpg-interface.h"
 
 static const char * const verify_tag_usage[] = {
-		"git verify-tag [-v|--verbose] <tag>...",
+		"git verify-tag [-v|--verbose] <object>...",
 		NULL
 };
 
@@ -32,6 +33,46 @@ static int run_gpg_verify(const char *buf, unsigned long size, int verbose)
 	return verify_signed_buffer(buf, len, buf + len, size - len, NULL);
 }
 
+struct obj_filter {
+	const unsigned char *sha1;
+	int verbose;
+	struct strbuf sb;
+};
+
+static int verify_tag_of_obj(const char *refname, const unsigned char *sha1,
+			     int flag, void *cb_data)
+{
+	struct obj_filter *obj = cb_data;
+	enum object_type type;
+	unsigned long size;
+	int len, ret;
+	char *buf = NULL;
+	unsigned char tagged_sha1[20];
+
+	if ((type = sha1_object_info(sha1, NULL), type == OBJ_TAG) \
+	    && (buf = read_sha1_file(sha1, &type, &size), buf) \
+	    && !memcmp("object ", buf, 7) \
+	    && !get_sha1_hex(buf + 7, tagged_sha1) \
+	    && buf[47] == '\n' \
+	    && !memcmp(obj->sha1, tagged_sha1, 20) \
+	    && (len = parse_signature(buf, size), len != size)) {
+		strbuf_reset(&obj->sb);
+		ret = verify_signed_buffer(buf, len, buf + len, size - len,
+					   &obj->sb);
+		if (obj->verbose) {
+			write_in_full(1, buf, len);
+			write_in_full(1, obj->sb.buf, obj->sb.len);
+		} else if (ret) {
+			printf("tag %s: FAILED\n", refname);
+			write_in_full(1, obj->sb.buf, obj->sb.len);
+		} else
+			printf("tag %s: OK\n", refname);
+	}
+	if (buf)
+		free(buf);
+	return 0;
+}
+
 static int verify_tag(const char *name, int verbose)
 {
 	enum object_type type;
@@ -44,9 +85,13 @@ static int verify_tag(const char *name, int verbose)
 		return error("tag '%s' not found.", name);
 
 	type = sha1_object_info(sha1, NULL);
-	if (type != OBJ_TAG)
-		return error("%s: cannot verify a non-tag object of type %s.",
-				name, typename(type));
+	if (type != OBJ_TAG) {
+		struct obj_filter obj = { sha1, verbose };
+		strbuf_init(&obj.sb, 4096);
+		for_each_tag_ref(verify_tag_of_obj, (void *) &obj);
+		strbuf_release(&obj.sb);
+		return 0;
+	}
 
 	buf = read_sha1_file(sha1, &type, &size);
 	if (!buf)
-- 
1.7.9.dirty

^ permalink raw reply related

* Re: Git performance results on a large repository
From: Evgeny Sazhin @ 2012-02-04  1:25 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: Joshua Redstone, git@vger.kernel.org
In-Reply-To: <CACBZZX4BsFZxB6A-Hg-k37FBavgTV8SDiQTK_sVh9Mb9iskiEw@mail.gmail.com>

 

On Feb 3, 2012, at 9:56 AM, Ævar Arnfjörð Bjarmason wrote:

> On Fri, Feb 3, 2012 at 15:20, Joshua Redstone <joshua.redstone@fb.com> wrote:
> 
>> We (Facebook) have been investigating source control systems to meet our
>> growing needs.  We already use git fairly widely, but have noticed it
>> getting slower as we grow, and we want to make sure we have a good story
>> going forward.  We're debating how to proceed and would like to solicit
>> people's thoughts.
> 
> Where I work we also have a relatively large Git repository. Around
> 30k files, a couple of hundred thousand commits, clone size around
> half a GB.
> 
> You haven't supplied background info on this but it really seems to me
> like your testcase is converting something like a humongous Perforce
> repository directly to Git.
> 
> While you /can/ do this it's not a good idea, you should split up
> repositories at the boundaries code or data doesn't directly cross
> over, e.g. there's no reason why you need HipHop PHP in the same
> repository as Cassandra or the Facebook chat system, is there?
> 
> While Git could better with large repositories (in particular applying
> commits in interactive rebase seems to be to slow down on bigger
> repositories) there's only so much you can do about stat-ing 1.3
> million files.
> 
> A structure that would make more sense would be to split up that giant
> repository into a lot of other repositories, most of them probably
> have no direct dependencies on other components, but even those that
> do can sometimes just use some other repository as a submodule.
> 
> Even if you have the requirement that you'd like to roll out
> *everything* at a certain point in time you can still solve that with
> a super-repository that has all the other ones as submodules, and
> creates a tag for every rollout or something like that.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



I concur. I'm working in the company with many years of development history with several huge CVS repos and we are slowly but surely migrating the codebase from CVS to Git. 
Split the things up. This will allow you to reorganize things better and there is IMHO no downsides. 
As for rollout - i think this job should be given to build/release system that will have an ability to gather necessary code from different repos and tag it properly.

just my 2 cents

Thanks,
Eugene

^ permalink raw reply

* Installing git-svn on Linux without root
From: Andrew Keller @ 2012-02-04  2:10 UTC (permalink / raw)
  To: Git List

I am attempting to install git, including the ability to access subversion repositories on a Linux machine.  I do not have root access on the machine, so I prepended my PATH with a folder in my home directory.

Installing Git worked just fine, but when I try to clone a subversion repository, I get:

$ git svn clone file:///svn --prefix=svn/ --no-metadata --trunk=dba/trunk --branches=dba/branches --tags=dba/tags dba
Initialized empty Git repository in /home/kelleran/Documents/togit/converted/dba/.git/
Can't locate SVN/Core.pm in @INC (@INC contains: /homedirs/kelleran/local/lib/perl5/site_perl/5.8.8 /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /homedirs/kelleran/local/libexec/git-core/git-svn line 41.

Google suggested that the above error could be due to missing perl bindings.  So, I installed swig, and followed the instructions for installing the perl bindings: http://svn.apache.org/repos/asf/subversion/trunk/subversion/bindings/swig/INSTALL (I used the alternate build steps, since I had to set the prefix).

Unfortunately, I still get exactly the same error.  So, I looked to see whether or not the missing library was installed:

$ find ~/local -iname Core.pm
/homedirs/kelleran/local/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/SVN/Core.pm

So, the module does exist, but not in a location included by @INC.  This sounds like a simple misconfiguration during the installation on my part, but after reading the manuals and searching the web, I was unable to find a parameter that gets git to be able to see the perl bindings.

I'm guessing I need either more sleep or a fresh point of view.  Any thoughts?

The machine is running Linux 2.6.32 64-bit, and has perl 5.8.8.  Of the software I installed, I am using:
  libpcre 8.21
  swig 2.8.4
  neon 0.29.6
  apr 1.3.x
  apr-util 1.3.x
  subversion 1.7.2
  git 1.7.9

Thanks,
Andrew Keller

^ permalink raw reply

* Re: [RFC/PATCH] verify-tag: check sig of all tags to given object
From: Junio C Hamano @ 2012-02-04  3:16 UTC (permalink / raw)
  To: Tom Grennan; +Cc: git, jasampler
In-Reply-To: <1328318751-4470-1-git-send-email-tom.grennan@ericsson.com>

Tom Grennan <tom.grennan@ericsson.com> writes:

> If the command argument is a non-tag object, scan and verify all tags to
> the given object; for example:
>
> john$ git tag -s -m "I approve" john-README master:README
> ...
> john$ git tag -s -m "I recommend" john-HEAD HEAD
> ...
> john$ git push <url> tag john-README
> john$ git push <url> tag john-HEAD
>
> jane$ git fetch --tags <url>
> jane$ git tag -s -m "I also approve" jane-README master:README
> ...
> jane$ git push <url> tag jane-README
>
> jeff$ git fetch --tags <url>
> jeff$ git verify-tag master:README
> tag john-README: OK
> tag jane-README: OK
> jeff$ git verify-tag HEAD
> tag john-HEAD: OK
>
> Signed-off-by: Tom Grennan <tom.grennan@ericsson.com>

You did not describe what problem you are trying to solve, but the above
tells me that the design of this feature has a lot of room to be improved
to be useful for even a single trivial use scenario I can think of off the
top of my head.

Let's say after tagging v1.7.10, for some reason (as I do not know what
problem you are trying to solve), I decided to ask my back-up maintainers,
let's call them Shawn and Jeff, to sign that tag.  Shawn is expected to do
this:

    spearce$ git fetch tag v1.7.10
    spearce$ git tag -s -m "This tag is Gitster's" v1.7.10-spearce v1.7.10
    spearce$ git push http://example.com/spearce/git tags/v1.7.10-spearce

Jeff will do the same, and I'll fetch v1.7.10-spearce and v1.7.10-peff
tags from them.

It is natural for me to be able to ask "I want to verify all tags that
point at the object I asked to be signed, namely, v1.7.10" from this
feature.

But

    gitster$ git verify-tag v1.7.10

would not be a way to do so, as that would check my signature in v1.7.10
tag itself.

It gets even worse.  Suppose Jeff does this instead by mistake:

    peff$ git fetch v1.7.10
    peff$ git tag v1.7.10-peff v1.7.10
    peff$ git push http://example.com/peff/git tags/v1.7.10-peff

Even if you added "git verify-tag --pointed v1.7.10" to disambiguate the
request to use the new feature, the result is unusable, as I would see:

    gitster$ git verify-tag --pointed v1.7.10
    v1.7.10-spearce: OK
    v1.7.10-peff: OK

v1.7.10-spearce and v1.7.10-peff both resolve to my v1.7.10, and they both
are signed by known key, but v1.7.10-peff is a lightweight tag that points
directly at my v1.7.10 and I would be seeing a signature of my own as "OK".

^ permalink raw reply

* Re: [PATCH v4 03/13] parseopt: make OPT_INTEGER support hexadecimal as well
From: Nguyen Thai Ngoc Duy @ 2012-02-04  4:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vaa4zmsku.fsf@alter.siamese.dyndns.org>

2012/2/4 Junio C Hamano <gitster@pobox.com>:
> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>
>> -             *(int *)opt->value = strtol(arg, (char **)&s, 10);
>> +             if (!prefixcmp(arg, "0x") || !prefixcmp(arg, "0X"))
>> +                     *(int *)opt->value = strtol(arg + 2, (char **)&s, 16);
>> +             else
>> +                     *(int *)opt->value = strtol(arg, (char **)&s, 10);
>
> Can't you just do "strtol(arg, (char **)&s, 0)" instead?

I could but that means "01234" is now in base 8 and that's currently
accepted as base 10. 0x1234 does not have this problem because current
git rejects it.
-- 
Duy

^ permalink raw reply

* Re: [PATCH v4 10/13] branch: add --column
From: Nguyen Thai Ngoc Duy @ 2012-02-04  5:01 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vwr83ldfz.fsf@alter.siamese.dyndns.org>

2012/2/4 Junio C Hamano <gitster@pobox.com>:
> I am not sure about the utility of columnar output for "git branch" in the
> short form.  You no longer can just scan the leftmost column to scan for
> '*' to see the current branch.

I rely on color for that. Without color you may need to scan more
columns for '*'. Though I would really like to see "git branch
--current" added to show just current branch if I'm on colorless
terminal.
-- 
Duy

^ permalink raw reply

* Re: Git performance results on a large repository
From: Joey Hess @ 2012-02-04  5:07 UTC (permalink / raw)
  To: Joshua Redstone; +Cc: git@vger.kernel.org
In-Reply-To: <CB5074CF.3AD7A%joshua.redstone@fb.com>

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

Joshua Redstone wrote:
> The test repo has 4 million commits, linear history and about 1.3 million
> files.

Have you tried separating these two factors, to see how badly each is
affecting performance?

If the number of commits is the problem (seems likely for git blame at
least), a shallow clone would avoid that overhead.

I think that git often writes .git/index inneficiently when staging
files (though your `git add` is pretty fast) and committing. It rewrites
the whole file to .git/index.lck and the renames it over .git/index at
the end. I have code that keeps a journal of changes to avoid rewriting
the index repeatedly, but it's application specific. Fixing git to write
the index more intelligently is something I'd like to see.

Hint for git status: `git status .` in a smaller subdirectory will be much
faster than the default that stats everything.

-- 
see shy jo

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

^ permalink raw reply

* Re: [RFC/PATCH] verify-tag: check sig of all tags to given object
From: Tom Grennan @ 2012-02-04  5:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, jasampler, tomg.grennan
In-Reply-To: <D140688E-B86C-4A67-9AD6-56160C26884D@ericsson.com>

Junio C Hamano <gitster@pobox.com<mailto:gitster@pobox.com>> writes:
>Tom Grennan <tom.grennan@ericsson.com<mailto:tom.grennan@ericsson.com>> writes:
>>
>>If the command argument is a non-tag object, scan and verify all tags to
>>the given object; for example:
>>
>>john$ git tag -s -m "I approve" john-README master:README
>>...
>>john$ git tag -s -m "I recommend" john-HEAD HEAD
>>...
>>john$ git push <url> tag john-README
>>john$ git push <url> tag john-HEAD
>>
>>jane$ git fetch --tags <url>
>>jane$ git tag -s -m "I also approve" jane-README master:README
>>...
>>jane$ git push <url> tag jane-README
>>
>>jeff$ git fetch --tags <url>
>>jeff$ git verify-tag master:README
>>tag john-README: OK
>>tag jane-README: OK
>>jeff$ git verify-tag HEAD
>>tag john-HEAD: OK
>>
>>Signed-off-by: Tom Grennan <tom.grennan@ericsson.com<mailto:tom.grennan@ericsson.com>>
>
>You did not describe what problem you are trying to solve, but the above
>tells me that the design of this feature has a lot of room to be improved
>to be useful for even a single trivial use scenario I can think of off the
>top of my head.
>
>Let's say after tagging v1.7.10, for some reason (as I do not know what
>problem you are trying to solve), I decided to ask my back-up maintainers,
>let's call them Shawn and Jeff, to sign that tag.  Shawn is expected to do
>this:
>
>   spearce$ git fetch tag v1.7.10
>   spearce$ git tag -s -m "This tag is Gitster's" v1.7.10-spearce v1.7.10
>   spearce$ git push http://example.com/spearce/git tags/v1.7.10-spearce
>
>Jeff will do the same, and I'll fetch v1.7.10-spearce and v1.7.10-peff
>tags from them.
>
>It is natural for me to be able to ask "I want to verify all tags that
>point at the object I asked to be signed, namely, v1.7.10" from this
>feature.
>
>But
>
>   gitster$ git verify-tag v1.7.10
>
>would not be a way to do so, as that would check my signature in v1.7.10
>tag itself.
>
>It gets even worse.  Suppose Jeff does this instead by mistake:
>
>   peff$ git fetch v1.7.10
>   peff$ git tag v1.7.10-peff v1.7.10
>   peff$ git push http://example.com/peff/git tags/v1.7.10-peff
>
>Even if you added "git verify-tag --pointed v1.7.10" to disambiguate the
>request to use the new feature, the result is unusable, as I would see:
>
>   gitster$ git verify-tag --pointed v1.7.10
>   v1.7.10-spearce: OK
>   v1.7.10-peff: OK
>
>v1.7.10-spearce and v1.7.10-peff both resolve to my v1.7.10, and they both
>are signed by known key, but v1.7.10-peff is a lightweight tag that points
>directly at my v1.7.10 and I would be seeing a signature of my own as "OK".

Sorry for messing up this thread. I had remote access trouble with work.

Wouldn't you want Shawn and Jeff to tag the object (commit, tree, or
blob) that you had tagged?

   spearce$ git fetch tag v1.7.10
   spearce$ eval $(git verify-tag -v v1.7.10 | sed -n '1s/ /=/p')
   spearce$ git tag -s -m "This tag is Gitster's" v1.7.10-spearce $object
   spearce$ git push http://example.com/spearce/git tags/v1.7.10-spearce

Or,

   spearce$ git fetch tag v1.7.10
   spearce$ git tag -s -m "This tag is Gitster's" v1.7.10-spearce --pointed v1.7.10
   spearce$ git push http://example.com/spearce/git tags/v1.7.10-spearce

Then,

   gitster$ git verify-tag $object
   tag v1.7.10: OK
   tag v1.7.10-spearce: OK

Or,

   gitster$ git verify-tag --pointed v1.7.10
   tag v1.7.10: OK
   tag v1.7.10-spearce: OK

I hadn't thought of tagging a tag.  As you indicate, this would be
tricky to disambiguate.

So, I intended this to verify all tags of the non-tag object that one
asked to be signed; no sign, no record.

BTW, it may also be convenient to use auto-generated tag names for the
secondary sign-offs, perhaps using the tag SHA as it's refs/tags/SHA.

   spearce$ git tag -s -m "This is Gitster's v1.7.10" -- --pointed v1.7.10

   peff$ git tag -s -m "This is Gitster's v1.7.10" -- --pointed v1.7.10

   gitster$ git verify-tag --pointed v1.7.10
   tag v1.7.10: OK
   tag XXX....XXX: OK
   tag YYY....YYY: OK

`git tag -l` could then ignore refs/tags/SHA with content SHA.

-- 
TomG

^ permalink raw reply

* Re: [RFC/PATCH] verify-tag: check sig of all tags to given object
From: Junio C Hamano @ 2012-02-04  5:16 UTC (permalink / raw)
  To: Tom Grennan; +Cc: git, jasampler
In-Reply-To: <7v8vkjl24d.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> You did not describe what problem you are trying to solve, but the above
> tells me that the design of this feature has a lot of room to be improved
> to be useful for even a single trivial use scenario I can think of off the
> top of my head.

Having said all that, the biggest problem I have with the approach of this
patch is that it does not decompose the necessary functionalities in a way
that allows combinations of options people naturally would expect from the
description of the feature.

"git tag" can be used to create (-a), delete (-d), show (-l) and verify
(-v).  Among these modes, creation has to work on a single tag, so it is a
bit special. But the other three modes could also use the filtering
feature of what "show" supports among themselves.

The mode to show tags (-l) starts from _all_ tags, but limits the output
to those that match given patterns, and the output can further be limited
to the ones that contain a given commit. The verify mode and the delete
mode do not offer this behaviour and require the user to specify exact tag
names. If you are adding "I want to do X on all tags that point at this
object" feature, in which X happens to be "verification" in your case,
don't you think other people would naturally want to use the feature with
X=show instead?

The right first step to do this would be to enhance the "filter" logic so
that it not just lets "--contains", but also "--points-at", be specified.
Once that is done, you could just say:

	$ git tag -l --points-at master:README

to list all the tags that point at the blob, and then your original
example becomes:

	$ git tag --points-at master:README | xargs git tag -v

It even allows something like this:

	$ git tag --points-at master:README 'v1.[0-4].?' |
          xargs git tag -v

to work on tags that point at the blob but only those whose names match
the given pattern, i.e. versions from v1.0 series up to v1.4 series but
not later.

After that is done, you could teach the --verify mode to also accept the
patterns, not exact names, so that the above could become:

	$ git tag --verify --points-at master:README
        $ git tag --verify --points-at master:README 'v1.[0-4].?'

Theoretically, the "start from all and then filter" feature could be
shared also with "delete" mode, but I would not recommend doing so for
safety reasons (i.e. "delete" is destructive). Even so, if somebody does
want to do a bulk delete, it is just a simple matter of:

	$ git tag --points-at master:README 'v1.[0-4].?' |
          xargs git tag -d

So it is not a big deal if you did not to teach --delete to share the
filtering logic with "show".

For exactly the same reason, --verify mode does not have to share the
logic, either. Not having to use "| xargs" is merely an icing on the cake.

Hmm?

^ permalink raw reply

* Re: [RFC/PATCH] verify-tag: check sig of all tags to given object
From: Junio C Hamano @ 2012-02-04  5:22 UTC (permalink / raw)
  To: Tom Grennan; +Cc: git, jasampler, tomg.grennan
In-Reply-To: <20120204050818.GA2477@tgrennan-laptop>

Tom Grennan <tmgrennan@gmail.com> writes:

> Wouldn't you want Shawn and Jeff to tag the object (commit, tree, or
> blob) that you had tagged?

No.

We _designed_ our tag objects so that they are capable of pointing at
another tag, not the object that is pointed at that other tag.  And that
is the example usage I gave you.

The statement by Shawn and Jeff, "This tag is Gitster's" is exactly that.
It was not about asserting the authenticity of the commit. It was about
the tag object I created.

>    gitster$ git verify-tag --pointed v1.7.10
>    tag v1.7.10: OK

Just saying "$name: OK" will *never* be acceptable. "A signature made by
any key in my keychain is fine" is not the usual use case. At least the
output needs to be "Good signature from X".

^ permalink raw reply

* Re: [PATCH v4 03/13] parseopt: make OPT_INTEGER support hexadecimal as well
From: Junio C Hamano @ 2012-02-04  5:32 UTC (permalink / raw)
  To: Nguyen Thai Ngoc Duy; +Cc: git
In-Reply-To: <CACsJy8Ba2qxyT4XqeRmUv63Z3rT1-FmBkZ3tB6YMh6qrXjLP1Q@mail.gmail.com>

Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:

> 2012/2/4 Junio C Hamano <gitster@pobox.com>:
>> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
>>
>>> -             *(int *)opt->value = strtol(arg, (char **)&s, 10);
>>> +             if (!prefixcmp(arg, "0x") || !prefixcmp(arg, "0X"))
>>> +                     *(int *)opt->value = strtol(arg + 2, (char **)&s, 16);
>>> +             else
>>> +                     *(int *)opt->value = strtol(arg, (char **)&s, 10);
>>
>> Can't you just do "strtol(arg, (char **)&s, 0)" instead?
>
> I could but that means "01234" is now in base 8 and that's currently
> accepted as base 10.

Yes, but I wonder if that is a problem in practice. Who in the right mind
would give 00001000 to tell git that they want one thousand?

^ 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