Git development
 help / color / mirror / Atom feed
* Re: [PATCH] Add msg_sep to diff_options
From: Junio C Hamano @ 2006-06-25 11:40 UTC (permalink / raw)
  To: Timo Hirvonen; +Cc: git
In-Reply-To: <20060625135414.425580d1.tihirvon@gmail.com>

Timo Hirvonen <tihirvon@gmail.com> writes:

> Add msg_sep variable to struct diff_options.  msg_sep is printed after
> commit message.  Default is "\n", format-patch sets it to "---\n".
>
> This also removes the second argument from show_log() because all
> callers derived it from the first argument:
>
>     show_log(rev, rev->loginfo, ...

Good catch.  Thanks.

> Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
> ---

I often wonder if the separator should be "\n---\n" instead when
I see something like the above, but do not change it yet please.

>   I'm not 100% sure if format-patch is the only one wanting "---\n".

git log --patch-with-stat should also show "---\n".

>   But I think "\n" should be used for every command that doesn't create
>   patches.

This sounds good.

We probably would want to have an output format testsuite to
catch regression.

^ permalink raw reply

* git-repack -a -d produces unusable packs with 1.4.0
From: Thomas Glanzmann @ 2006-06-25 11:35 UTC (permalink / raw)
  To: GIT

Hello everyone,
what on earth is going wrong here (this is with 1.4.0):

        (node01) [~] git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
        Checking files out...)
        100% (19830/19830) done
        (node01) [~] cd linux-2.6/
        (node01) [~/linux-2.6] git repack -a -d
        Generating pack...
        Done counting 263175 objects.
        Deltifying 263175 objects.
        100% (263175/263175) done
        Writing 263175 objects.
        100% (263175/263175) done
        Total 263175, written 263175 (delta 206825), reused 262943 (delta 206593)
        Pack pack-ce49d2efd5af06ed6093049050b5ba41da8b683f created.
        mv: overwrite `.git/objects/pack/pack-ce49d2efd5af06ed6093049050b5ba41da8b683f.pack', overriding mode 0444? y
        mv: overwrite `.git/objects/pack/pack-ce49d2efd5af06ed6093049050b5ba41da8b683f.idx', overriding mode 0444? y
        fatal: packfile .git/objects/pack/pack-ce49d2efd5af06ed6093049050b5ba41da8b683f.pack does not match index.
        (node01) [~/linux-2.6] git repack -a -d
        Generating pack...
        fatal: expected sha1, got garbage:
        fatal: packfile .git/objects/pack/pack-ce49d2efd5af06ed6093049050b5ba41da8b683f.pack does not match index.

Oh and are there localized git mirrors like for example
git.de.kernel.org or is the git protocoll only available from the
primary site?

        Thomas

^ permalink raw reply

* [PATCH] Don't xcalloc() struct diffstat_t
From: Timo Hirvonen @ 2006-06-25 11:28 UTC (permalink / raw)
  To: Timo Hirvonen; +Cc: junkio, git
In-Reply-To: <20060624202153.1001a66c.tihirvon@gmail.com>

Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
 diff.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/diff.c b/diff.c
index cc2af30..8880150 100644
--- a/diff.c
+++ b/diff.c
@@ -2062,17 +2062,16 @@ void diff_flush(struct diff_options *opt
 	}
 
 	if (output_format & DIFF_FORMAT_DIFFSTAT) {
-		struct diffstat_t *diffstat;
+		struct diffstat_t diffstat;
 
-		diffstat = xcalloc(sizeof (struct diffstat_t), 1);
-		diffstat->xm.consume = diffstat_consume;
+		memset(&diffstat, 0, sizeof(struct diffstat_t));
+		diffstat.xm.consume = diffstat_consume;
 		for (i = 0; i < q->nr; i++) {
 			struct diff_filepair *p = q->queue[i];
 			if (check_pair_status(p))
-				diff_flush_stat(p, options, diffstat);
+				diff_flush_stat(p, options, &diffstat);
 		}
-		show_stats(diffstat);
-		free(diffstat);
+		show_stats(&diffstat);
 	}
 
 	if (output_format & DIFF_FORMAT_SUMMARY) {
-- 
1.4.1.rc1.g5472-dirty

^ permalink raw reply related

* Re: [PATCH 0/7] Rework diff options
From: Timo Hirvonen @ 2006-06-25 11:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Johannes.Schindelin
In-Reply-To: <7vslltopzg.fsf@assigned-by-dhcp.cox.net>

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

> Here are a few problems I have seen:
> 
>  - "git show --stat HEAD" gives '---' marker as Johannes and you
>    have already discussed (I do not mind this that much though);

The patch I sent as a reply to 2/7 should fix this.

>  - "--cc" seems to be quite broken.  "git show v1.0.0" nor "git
>    diff-tree --pretty --cc v1.0.0" does not give the log
>    message, and gives something quite confused instead.  I think
>    it is showing "-m -p" followed by "--cc".

Sorry about that.  I don't understand the --cc stuff very well but I try
to fix the bug.

-- 
http://onion.dynserv.net/~timo/

^ permalink raw reply

* [PATCH] whatchanged: Default to DIFF_FORMAT_RAW
From: Timo Hirvonen @ 2006-06-25 11:11 UTC (permalink / raw)
  To: Timo Hirvonen; +Cc: junkio, git
In-Reply-To: <20060624202153.1001a66c.tihirvon@gmail.com>


Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---
 builtin-log.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index 5b3fadc..8a39770 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -28,6 +28,15 @@ static int cmd_log_wc(int argc, const ch
 			rev->always_show_header = 0;
 	}
 
+	if (!rev->diffopt.output_format && !rev->simplify_history) {
+		/* Ugly hack!
+		 *
+		 * rev->simplify_history == 0 -> whatchanged
+		 * Can't do this before setup_revisions()
+		 */
+		rev->diffopt.output_format = DIFF_FORMAT_RAW;
+	}
+
 	if (argc > 1)
 		die("unrecognized argument: %s", argv[1]);
 
-- 
1.4.1.rc1.g6e272-dirty

^ permalink raw reply related

* Re: [RFC] GIT user survey
From: Junio C Hamano @ 2006-06-25 11:06 UTC (permalink / raw)
  To: Paolo Ciarrocchi; +Cc: git
In-Reply-To: <4d8e3fd30606250347o47c4b200t6feb0406bfa535fa@mail.gmail.com>

"Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com> writes:

> About you
>
>    1. What country are you in?
>    2. What is your preferred language?
>    3. What's your gender?

Demography is interesting and quite relevant to understand the
bias in the answers to the rest of the questions, although I do
not see much point about #3.  Question #2 is relevant in i18n,
of course.

I would also ask if the respondent has her own patch in the
git.git repository.  If most of them are git developers, the
answer to the question "was git easy to learn" becomes
suspicious, for example.

> Getting started with GIT
>
>    1. How did you hear about GIT?
>    2. Did you find GIT easy to learn?
>    3. What helped you most in learning to use it?

Also "When did you start using git?" -- old timers who learned
git when it was still young and small would have had an easier
time to learn it.

> How you use GIT
>
>    1. Do you use GIT for work, unpaid projects, or both?
>    2. How do you obtain GIT?  Source tarball, binary package, or
>       pull the main repository?
>    3. What platforms (hardware, OS, version) do you use GIT on?
>    4. How many people do you collaborate with using GIT?
>    5. How big are the repositories that you work on? (e.g. how many
>       files, how much disk space)
>    6. How many different projects do you manage using GIT?
>    7. Which porcelains do you use?

After seeing the Mercurial survey result, I think question #3
should be stated a bit more concretely.  The results having
mixture of i386 and Linux are not very interesting.  I would
also add "how deep the history" to #5.

> Getting help, staying in touch
>
>    1. Have you tried to get GIT help from other people?
>          * If yes, did you get these problems resolved quickly and to
>            your liking?
>    2. Do you subscribe to the mailing list?
>          * If yes, do you find it useful, and traffic levels OK?
>    3. Do you use the IRC channel (#git on irc.freenode.net)?
>          * If no, did you know that all of the core developers use
>            IRC, and that there's almost 24-hour help available?

About #3, I do not see some people I consider "core" often on
the IRC.  Maybe "most of the core".

^ permalink raw reply

* [RFC] git --trace: trace command execution
From: Matthias Lederhofer @ 2006-06-25 10:57 UTC (permalink / raw)
  To: git

Show parameters to execve/builtin-cmds before executing them. This
version does not yet have a parameter --trace to git to enable this I
just want to get feedback first :)

I think this is quite useful to debug what is going on since a command
may be another program (shell/python/perl/.. script etc) or just an
alias for a internal command. Before that many commands became
built-ins this was quite easy to do with strace.

Example:
% git repo-config alias.showtag
trace: exec: /home/matled/local/stow/git/bin/git-repo-config
alias.showtag
% git showtag v1.4.1-rc1 > /dev/null
trace: exec: /home/matled/local/stow/git/bin/git-showtag v1.4.1-rc1
trace: exec failed: No such file or directory
trace: built-in command: git cat-file tag v1.4.1-rc1
% git showtag 'a b "c" `d` $e \f'
trace: exec: /home/matled/local/stow/git/bin/git-showtag "a b \"c\" \`d\` \$e \\f"
trace: exec failed: No such file or directory
trace: built-in command: git cat-file tag "a b \"c\" \`d\` \$e \\f"
fatal: Not a valid object name a b "c" `d` $e \f
% git cat-file tag "a b \"c\" \`d\` \$e \\f"
trace: built-in command: git cat-file tag "a b \"c\" \`d\` \$e \\f"
fatal: Not a valid object name a b "c" `d` $e \f

print_shell_escape will escape the arguments to be used as strings in
the shell to prevent ambiguity with spaces and other special
characters and make them copy-and-pastable.

---
 exec_cmd.c |   42 ++++++++++++++++++++++++++++++++++++++++++
 exec_cmd.h |    1 +
 git.c      |   10 ++++++++++
 3 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/exec_cmd.c b/exec_cmd.c
index c1539d1..85afbf3 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -87,6 +87,16 @@ int execv_git_cmd(const char **argv)
 			break;
 		}
 
+		fprintf(stderr, "trace: exec: ");
+		print_shell_escape(stderr, git_command);
+		const char **p = argv;
+		while (*(++p)) {
+			putc(' ', stderr);
+			print_shell_escape(stderr, *p);
+		}
+		putc('\n', stderr);
+		fflush(stderr);
+
 		/* argv[0] must be the git command, but the argv array
 		 * belongs to the caller, and my be reused in
 		 * subsequent loop iterations. Save argv[0] and
@@ -98,6 +108,8 @@ int execv_git_cmd(const char **argv)
 
 		/* execve() can only ever return if it fails */
 		execve(git_command, (char **)argv, environ);
+		fprintf(stderr, "trace: exec failed: %s\n", strerror(errno));
+		fflush(stderr);
 
 		argv[0] = tmp;
 	}
@@ -128,3 +140,33 @@ int execl_git_cmd(const char *cmd,...)
 	argv[argc] = NULL;
 	return execv_git_cmd(argv);
 }
+
+void print_shell_escape(FILE *stream, const char *s)
+{
+	const char *c = s;
+	short int quote = 0;
+	while (*c) {
+		if (*c == '"' || *c == '`' || *c == '$' || *c == '\\' ||
+			isspace(*c))
+		{
+			quote = 1;
+			break;
+		}
+		++c;
+	}
+
+	if (!quote) {
+		fputs(s, stream);
+		return;
+	}
+
+	putc('"', stream);
+	c = s;
+	while (*c) {
+		if (*c == '"' || *c == '`' || *c == '$' || *c == '\\')
+			putc('\\', stream);
+		putc(*c, stream);
+		++c;
+	}
+	putc('"', stream);
+}
diff --git a/exec_cmd.h b/exec_cmd.h
index 989621f..8b237fa 100644
--- a/exec_cmd.h
+++ b/exec_cmd.h
@@ -5,6 +5,7 @@ extern void git_set_exec_path(const char
 extern const char* git_exec_path(void);
 extern int execv_git_cmd(const char **argv); /* NULL terminated */
 extern int execl_git_cmd(const char *cmd, ...);
+extern void print_shell_escape(FILE *stream, const char *s);
 
 
 #endif /* __GIT_EXEC_CMD_H_ */
diff --git a/git.c b/git.c
index 94e9a4a..361fb25 100644
--- a/git.c
+++ b/git.c
@@ -198,6 +198,16 @@ static void handle_internal_command(int 
 		struct cmd_struct *p = commands+i;
 		if (strcmp(p->cmd, cmd))
 			continue;
+
+		fprintf(stderr, "trace: built-in command: git");
+		int i;
+		for (i = 0; i < argc; ++i) {
+			putc(' ', stderr);
+			print_shell_escape(stderr, argv[i]);
+		}
+		putc('\n', stderr);
+		fflush(stderr);
+
 		exit(p->fn(argc, argv, envp));
 	}
 }
-- 
1.4.GIT

^ permalink raw reply related

* [PATCH] Add msg_sep to diff_options
From: Timo Hirvonen @ 2006-06-25 10:54 UTC (permalink / raw)
  To: Timo Hirvonen; +Cc: junkio, git
In-Reply-To: <20060624202153.1001a66c.tihirvon@gmail.com>

Add msg_sep variable to struct diff_options.  msg_sep is printed after
commit message.  Default is "\n", format-patch sets it to "---\n".

This also removes the second argument from show_log() because all
callers derived it from the first argument:

    show_log(rev, rev->loginfo, ...

Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
---

  I'm not 100% sure if format-patch is the only one wanting "---\n".
  But I think "\n" should be used for every command that doesn't create
  patches.

 builtin-log.c  |    1 +
 combine-diff.c |    7 ++++---
 diff.c         |    1 +
 diff.h         |    1 +
 log-tree.c     |   15 ++++++---------
 log-tree.h     |    2 +-
 6 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index f173070..5b3fadc 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -175,6 +175,7 @@ int cmd_format_patch(int argc, const cha
 	rev.diff = 1;
 	rev.combine_merges = 0;
 	rev.ignore_merges = 1;
+	rev.diffopt.msg_sep = "---\n";
 
 	git_config(git_format_config);
 	rev.extra_headers = extra_headers;
diff --git a/combine-diff.c b/combine-diff.c
index 3daa8cb..39fb10c 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -701,7 +701,7 @@ static int show_patch_diff(struct combin
 		const char *abb;
 
 		if (rev->loginfo)
-			show_log(rev, rev->loginfo, "\n");
+			show_log(rev, opt->msg_sep);
 		dump_quoted_path(dense ? "diff --cc " : "diff --combined ", elem->path);
 		printf("index ");
 		for (i = 0; i < num_parent; i++) {
@@ -769,7 +769,7 @@ static void show_raw_diff(struct combine
 		inter_name_termination = 0;
 
 	if (rev->loginfo)
-		show_log(rev, rev->loginfo, "\n");
+		show_log(rev, opt->msg_sep);
 
 	if (opt->output_format & DIFF_FORMAT_RAW) {
 		offset = strlen(COLONS) - num_parent;
@@ -855,7 +855,8 @@ void diff_tree_combined(const unsigned c
 		paths = intersect_paths(paths, i, num_parent);
 
 		if (opt->output_format & DIFF_FORMAT_DIFFSTAT && rev->loginfo)
-			show_log(rev, rev->loginfo, "---\n");
+			show_log(rev, opt->msg_sep);
+
 		diff_flush(&diffopts);
 		if (opt->output_format & DIFF_FORMAT_DIFFSTAT)
 			putchar('\n');
diff --git a/diff.c b/diff.c
index 4b1b4eb..cc2af30 100644
--- a/diff.c
+++ b/diff.c
@@ -1359,6 +1359,7 @@ void diff_setup(struct diff_options *opt
 	options->break_opt = -1;
 	options->rename_limit = -1;
 	options->context = 3;
+	options->msg_sep = "\n";
 
 	options->change = diff_change;
 	options->add_remove = diff_addremove;
diff --git a/diff.h b/diff.h
index 2b6dc0c..729cd02 100644
--- a/diff.h
+++ b/diff.h
@@ -57,6 +57,7 @@ struct diff_options {
 	int rename_limit;
 	int setup;
 	int abbrev;
+	const char *msg_sep;
 	const char *stat_sep;
 	long xdl_opts;
 
diff --git a/log-tree.c b/log-tree.c
index 7d4c51f..ab6b682 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -43,9 +43,10 @@ static int append_signoff(char *buf, int
 	return at;
 }
 
-void show_log(struct rev_info *opt, struct log_info *log, const char *sep)
+void show_log(struct rev_info *opt, const char *sep)
 {
 	static char this_header[16384];
+	struct log_info *log = opt->loginfo;
 	struct commit *commit = log->commit, *parent = log->parent;
 	int abbrev = opt->diffopt.abbrev;
 	int abbrev_commit = opt->abbrev_commit ? opt->abbrev : 40;
@@ -163,13 +164,9 @@ int log_tree_diff_flush(struct rev_info 
 		return 0;
 	}
 
-	if (opt->loginfo && !opt->no_commit_id) {
-		if (opt->diffopt.output_format & DIFF_FORMAT_DIFFSTAT) {
-			show_log(opt, opt->loginfo,  "---\n");
-		} else {
-			show_log(opt, opt->loginfo,  "\n");
-		}
-	}
+	if (opt->loginfo && !opt->no_commit_id)
+		show_log(opt, opt->diffopt.msg_sep);
+
 	diff_flush(&opt->diffopt);
 	return 1;
 }
@@ -266,7 +263,7 @@ int log_tree_commit(struct rev_info *opt
 	shown = log_tree_diff(opt, commit, &log);
 	if (!shown && opt->loginfo && opt->always_show_header) {
 		log.parent = NULL;
-		show_log(opt, opt->loginfo, "");
+		show_log(opt, "");
 		shown = 1;
 	}
 	opt->loginfo = NULL;
diff --git a/log-tree.h b/log-tree.h
index a26e484..e82b56a 100644
--- a/log-tree.h
+++ b/log-tree.h
@@ -11,6 +11,6 @@ void init_log_tree_opt(struct rev_info *
 int log_tree_diff_flush(struct rev_info *);
 int log_tree_commit(struct rev_info *, struct commit *);
 int log_tree_opt_parse(struct rev_info *, const char **, int);
-void show_log(struct rev_info *opt, struct log_info *log, const char *sep);
+void show_log(struct rev_info *opt, const char *sep);
 
 #endif
-- 
1.4.1.rc1.g35ee-dirty

^ permalink raw reply related

* Re: New web frontend: gitarella
From: Marco Costalba @ 2006-06-25 10:49 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, flameeyes
In-Reply-To: <Pine.LNX.4.63.0606251211490.29667@wbgn013.biozentrum.uni-wuerzburg.de>

On 6/25/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> just to inform you I saw gitarella announced on freshmeat. It is inspired
> by gitweb, but written in Ruby.
>

It's amazing to see in how many different ways a lot of people try to
find an (almost the same) solution for (almost) the same problem. IMHO
this is one of the main differences between developing for fun and as
a day job.

Welcome abroad gitarella.

    Marco

P.S: BTW gitarella, pronounced with the 'gi'  like in 'giant' it means
"little trip" in Italian.

^ permalink raw reply

* Re: PPC SHA-1 Updates in "pu"
From: Junio C Hamano @ 2006-06-25 10:48 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git, Johannes Schindelin, Linus Torvalds, Randal L. Schwartz
In-Reply-To: <20060625102037.GI29364@pasky.or.cz>

Petr Baudis <pasky@suse.cz> writes:

>> And old ones. If you would require me to upgrade to Perl 5.8.1, I would 
>> rather stop upgrading git.
>
>   please read it again - I'm not requiring you to upgrade to Perl 5.8.1.
> I'm just saying that if you have Perl older than 5.8.1, you might need
> to install some extra modules from CPAN.
>
>   Now, if that's not acceptable either that's fine by me and I can
> adapt, I just need to know at which point we _will_ require you to
> upgrade or install extra modules.

I vaguely recall that last time we discussed the minimum Perl
version requirement somebody perhaps Merlyn said 5.6 is old
enough but in some corporate settings people may still be stuck
with 5.004.

Tentatively let's say our cut-off point is somewhere around 5.6.
If we can get away without relying on extra from CPAN that would
be great.  Otherwise as long as the modules from CPAN we end up
depending on are all compatible with the cut-off version of Perl
that would be acceptable.  We might even try to be nicer and
carry a straight copy of what we require from CPAN in compat/
just like we have subprocess.py there (modulo licensing worries
if any, of course).

Johannes, Linus and the list, would that be a good enough
guideline?

^ permalink raw reply

* Re: [RFC] GIT user survey
From: Paolo Ciarrocchi @ 2006-06-25 10:47 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: Git Mailing List
In-Reply-To: <46a038f90606241642q1467d577q329412f4ad09da34@mail.gmail.com>

On 6/25/06, Martin Langhoff <martin.langhoff@gmail.com> wrote:
> Paolo,
>
> I've seen in the irc logs that you were wondering whether we could a
> web-based survey tool. Perhaps I can setup Moodle with an
> easy-to-fillout survey. Interested?

Yes, that would be really fantastic!!

Here is the latest version of the survey, including the comments I
received so far:

About you

    1. What country are you in?
    2. What is your preferred language?
    3. What's your gender?

Getting started with GIT

    1. How did you hear about GIT?
    2. Did you find GIT easy to learn?
    3. What helped you most in learning to use it?

How you use GIT

    1. Do you use GIT for work, unpaid projects, or both?
    2. How do you obtain GIT?  Source tarball, binary package, or
       pull the main repository?
    3. What platforms (hardware, OS, version) do you use GIT on?
    4. How many people do you collaborate with using GIT?
    5. How big are the repositories that you work on? (e.g. how many
       files, how much disk space)
    6. How many different projects do you manage using GIT?
    7. Which porcelains do you use?

What you think of GIT

    1. Overall, how happy are you with GIT?
    2. How does GIT compare to other SCM tools you have used?
    3. What do you like about using GIT?
    4. What would you most like to see improved about GIT?
       (features, bugs, plugins, documentation, ...)
    5. If you want to see GIT more widely used, what do you
       think we could do to make this happen?

Documentation

    1. Do you use the GIT wiki?   If yes, do you find it useful?
    2. Do you find GIT's online help useful?
    3. What is your favourite user documentation for any software
       projects or products you have used?
    4. What could be improved on the GIT homepage?

Getting help, staying in touch

    1. Have you tried to get GIT help from other people?
          * If yes, did you get these problems resolved quickly and to
            your liking?
    2. Do you subscribe to the mailing list?
          * If yes, do you find it useful, and traffic levels OK?
    3. Do you use the IRC channel (#git on irc.freenode.net)?
          * If no, did you know that all of the core developers use
            IRC, and that there's almost 24-hour help available?

Open forum

    1. What other comments or suggestions do you have that are not
       covered by the questions above?


Ciao,

-- 
Paolo
http://paolociarrocchi.googlepages.com
http://picasaweb.google.com/paolo.ciarrocchi

^ permalink raw reply

* Re: PPC SHA-1 Updates in "pu"
From: Petr Baudis @ 2006-06-25 10:20 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Junio C Hamano, Linus Torvalds, git
In-Reply-To: <Pine.LNX.4.63.0606251202320.29667@wbgn013.biozentrum.uni-wuerzburg.de>

  Hi,

Dear diary, on Sun, Jun 25, 2006 at 12:07:21PM CEST, I got a letter
where Johannes Schindelin <Johannes.Schindelin@gmx.de> said that...
> On Sun, 25 Jun 2006, Petr Baudis wrote:
> 
> > All the modules we depend on should come bundled with Perl since 5.8.1.
> > Now, I'm not sure what our "cutoff" point is, and even if it is
> > something like 5.6.0 whether we can just require users of Perl older
> > than 5.8.1 (which should be only some rare and obscure systems anyway)
> > to install the modules from CPAN.
> 
> NO! It is _wrong_ to require users to upgrade, when a little more work on 
> our side would fix it. Requiring users to upgrade is a proactive way to 
> get rid of new users.
> 
> And old ones. If you would require me to upgrade to Perl 5.8.1, I would 
> rather stop upgrading git.

  please read it again - I'm not requiring you to upgrade to Perl 5.8.1.
I'm just saying that if you have Perl older than 5.8.1, you might need
to install some extra modules from CPAN.

  Now, if that's not acceptable either that's fine by me and I can
adapt, I just need to know at which point we _will_ require you to
upgrade or install extra modules.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.

^ permalink raw reply

* Re: [PATCH] Repack should try to prevent itself from running twice, concurrently.
From: Johannes Schindelin @ 2006-06-25 10:17 UTC (permalink / raw)
  To: Ryan Anderson; +Cc: Junio C Hamano, git
In-Reply-To: <11512302144123-git-send-email-ryan@michonline.com>

Hi,

On Sun, 25 Jun 2006, Ryan Anderson wrote:

> +if [ -f $GIT_DIR/repack.lock ]
> +then
> +	echo "Existing repack job appears to be running."
> +	echo "Remove $GIT_DIR/repack.lock if this is not the case."
> +	exit 1
> +else
> +	echo $$ > $GIT_DIR/repack.lock
> +fi

It is not like it is being an atomic operation, but then, we are not going 
to call repack multiple times a second. I'd say it is sufficient.

Ciao,
Dscho

^ permalink raw reply

* New web frontend: gitarella
From: Johannes Schindelin @ 2006-06-25 10:13 UTC (permalink / raw)
  To: git, flameeyes

Hi,

just to inform you I saw gitarella announced on freshmeat. It is inspired 
by gitweb, but written in Ruby.

Ciao,
Dscho

^ permalink raw reply

* [PATCH] Repack should try to prevent itself from running twice, concurrently.
From: Ryan Anderson @ 2006-06-25 10:10 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Ryan Anderson
In-Reply-To: <7vy7vmormn.fsf@assigned-by-dhcp.cox.net>

Signed-off-by: Ryan Anderson <ryan@michonline.com>
---
 git-repack.sh |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/git-repack.sh b/git-repack.sh
index eb75c8c..20f9b55 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -24,6 +24,15 @@ do
 	shift
 done
 
+if [ -f $GIT_DIR/repack.lock ]
+then
+	echo "Existing repack job appears to be running."
+	echo "Remove $GIT_DIR/repack.lock if this is not the case."
+	exit 1
+else
+	echo $$ > $GIT_DIR/repack.lock
+fi
+
 rm -f .tmp-pack-*
 PACKDIR="$GIT_OBJECT_DIRECTORY/pack"
 
@@ -83,3 +92,5 @@ case "$no_update_info" in
 t) : ;;
 *) git-update-server-info ;;
 esac
+
+rm $GIT_DIR/repack.lock
-- 
1.4.1.rc1.gacb70

^ permalink raw reply related

* Re: PPC SHA-1 Updates in "pu"
From: Johannes Schindelin @ 2006-06-25 10:07 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Junio C Hamano, Linus Torvalds, git
In-Reply-To: <20060625093444.GD21864@pasky.or.cz>

Hi,

On Sun, 25 Jun 2006, Petr Baudis wrote:

> All the modules we depend on should come bundled with Perl since 5.8.1.
> Now, I'm not sure what our "cutoff" point is, and even if it is
> something like 5.6.0 whether we can just require users of Perl older
> than 5.8.1 (which should be only some rare and obscure systems anyway)
> to install the modules from CPAN.

NO! It is _wrong_ to require users to upgrade, when a little more work on 
our side would fix it. Requiring users to upgrade is a proactive way to 
get rid of new users.

And old ones. If you would require me to upgrade to Perl 5.8.1, I would 
rather stop upgrading git. Hell, something I really like about git: I just 
download the tar.gz, unpack it, and type make install. And usually that 
Just Works. (Except MinGW32, but I have already managed to see a nice 
"git-log -p" with it.)

Ciao,
Dscho

^ permalink raw reply

* What's in git.git
From: Junio C Hamano @ 2006-06-25  9:37 UTC (permalink / raw)
  To: git

No v1.4.1-rc2 this weekend, as I am expecting a visitor today
and will mostly be offline.  But we got a dozen or so good fixes
and cleanups in "master" so far.

In "next", we have the following being cooked.  I expect most of
them to be in v1.4.1-rc2 sometime next week.  Please report
breakage on any of these if you see one.

 - "git rebase --merge" updates by Eric Wong.
 - "git diff -b -w" by Johannes.
 - "git cvsimport" multi-branch fixes by Martin and Johannes.
 - "git diff --color" can be controlled from $GIT_DIR/config.
 - "git merge --squash"; this may not be strictly needed as it
   can be emulated with repeated use of "cherry-pick -n" but it
   might be handy in some workflows.

In "pu", I have queued other bigger changes.  I do not think
most of them are v1.4.1 material yet.

 - "git format-patch --ignore-already-merged" fixes by
   Johannes; I am hoping to have this in v1.4.1.

 - Perl scripts clean-up and Git.xs by Pasky with a few fixes by
   me; in my mailbox there are several other patches in this
   series not in "pu" that primarily makes more scripts to use
   the new Perl infrastructure.  My feeling is that the series
   needs to be proven to have a sound infrastructure (building,
   testing and installation) on a bit wider platforms before
   starting to consider them for inclusion in "next".  We may be
   able to have the basics from this series in v1.4.1, but am
   still uneasy to convert any important scripts to use this,
   even in "next", at this moment.  Not just yet.

 - built-in "git am" by Lukas; it fails some tests which is not
   a good sign, and as I said in a separate message a few days
   ago, I think it is not worth going this route for something
   high-level as "am", so probably the next round I'd drop the
   last patch from the topic.  The patch to clean up cmd_apply()
   might be worth keeping and merging in "next", depending on
   how the Git.xs effort goes, though.

 - "git diff" option clean-ups by Timo Hirvonen; this is moving
   things in a good direction but as with any intrusive cleanups
   still has some rough edges.  I am hoping we can round them
   off soon to merge it in "next".

 - A new PPC SHA-1 implementation by linux@horizon.com; Linus
   showed that this does not make much difference in real life
   from performance point of view.  If it has other benefits
   (such as code size -- which I do not know how it fares), I am
   willing to merge it as it seems to be correct and does not
   seem to introduce regressions.  But I am not a PPC user so
   somebody needs to push my back on this one.

----------------------------------------------------------------

* The 'master' branch has these since the last announcement.

   Jeff King:
      git-commit: allow -e option anywhere on command line

   Johannes Schindelin:
      patch-id: take "commit" prefix as well as "diff-tree" prefix
      apply: replace NO_ACCURATE_DIFF with --inaccurate-eof runtime flag.

   Junio C Hamano:
      Makefile: do not recompile main programs when libraries have changed.
      usage: minimum type fix.
      git-pull: abort when fmt-merge-msg fails.
      diff --color: use reset sequence when we mean reset.
      repo-config: fix printing of bool

   Linus Torvalds:
      Tweak diff colors

   Martin Langhoff:
      git-repack -- respect -q and be quiet

   Matthias Kestenholz:
      add GIT-CFLAGS to .gitignore

   Peter Eriksen:
      Rename safe_strncpy() to strlcpy().

   Petr Baudis:
      Customizable error handlers

   Timo Hirvonen:
      git-merge: Don't use -p when outputting summary
      Clean up diff.c

   Yann Dirson:
      git-commit: filter out log message lines only when editor was run.


* The 'next' branch, in addition, has these.

   Eric Wong:
      rebase: allow --merge option to handle patches merged upstream
      rebase: cleanup rebasing with --merge
      rebase: allow --skip to work with --merge

   Johannes Schindelin:
      Teach diff about -b and -w flags
      cvsimport: always set $ENV{GIT_INDEX_FILE} to $index{$branch}

   Junio C Hamano:
      Makefile: add framework to verify and bench sha1 implementations.
      git-merge --squash
      test-sha1: test hashing large buffer
      diff --color: use $GIT_DIR/config

   Martin Langhoff:
      cvsimport: setup indexes correctly for ancestors and incremental imports


* The 'pu' branch, in addition, has these (this fails the tests).

   Johannes Schindelin:
      add diff_flush_patch_id() to calculate the patch id
      format-patch: introduce "--ignore-if-in-upstream"

   Junio C Hamano:
      Perl interface: add build-time configuration to allow building with -fPIC
      Perl interface: make testsuite work again.
      perl: fix make clean
      Git.pm: tentative fix to test the freshly built Git.pm

   Lukas Sandström:
      Make it possible to call cmd_apply multiple times
      Make git-am a builtin

   Petr Baudis:
      Introduce Git.pm (v4)
      Git.pm: Implement Git::exec_path()
      Git.pm: Call external commands using execv_git_cmd()
      Git.pm: Implement Git::version()
      Add Error.pm to the distribution
      Git.pm: Better error handling
      Git.pm: Handle failed commands' output
      Git.pm: Enhance the command_pipe() mechanism
      Git.pm: Implement options for the command interface
      Git.pm: Add support for subdirectories inside of working copies
      Convert git-mv to use Git.pm
      Git.pm: assorted build related fixes.

   Timo Hirvonen:
      Merge with_raw, with_stat and summary variables to output_format
      Make --raw option available for all diff commands
      Set default diff output format after parsing command line
      DIFF_FORMAT_RAW is not default anymore
      --name-only, --name-status, --check and -s are mutually exclusive
      Remove awkward compatibility warts

   Unknown (linux@horizon.com):
      A better-scheduled PPC SHA-1 implementation.

^ permalink raw reply

* Re: [PATCH 7/7] Convert git-annotate to use Git.pm
From: Petr Baudis @ 2006-06-25  9:36 UTC (permalink / raw)
  To: Ryan Anderson; +Cc: Junio C Hamano, git
In-Reply-To: <20060625092719.GH3154@h4x0r5.com>

Dear diary, on Sun, Jun 25, 2006 at 11:27:23AM CEST, I got a letter
where Ryan Anderson <ryan@michonline.com> said that...
> I don't see that Git.pm provides the compatibility functionality we have
> stubbed out, here.

Please see [PATCH 2/7] Git.pm: Try to support ActiveState output pipe.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.

^ permalink raw reply

* Re: PPC SHA-1 Updates in "pu"
From: Petr Baudis @ 2006-06-25  9:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Linus Torvalds, git
In-Reply-To: <7vfyhtopjm.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Sun, Jun 25, 2006 at 05:57:33AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Petr Baudis <pasky@suse.cz> writes:
> 
> >>  - RPM target -- we probably acquired a new build-dependency in
> >>    which case the .spec file needs to be updated;
> >
> > Well, perl is currently not listed even as a runtime dependency,
> > so does it really need to be listed as a build dependency?
> 
> Really?  I think rpmbuild is getting anything that matches "^use "
> and listing the perl modules as dependencies.

I had on my mind to depend only on modules that are part of the default
Perl distribution, since installing them from CPAN is a bother if you
are installing Git to your home directory. That is why we bundle Error.

All the modules we depend on should come bundled with Perl since 5.8.1.
Now, I'm not sure what our "cutoff" point is, and even if it is
something like 5.6.0 whether we can just require users of Perl older
than 5.8.1 (which should be only some rare and obscure systems anyway)
to install the modules from CPAN.

If not, we can just get rid of Scalar::Util and XSLoader and we should
be clean; XSLoader should be easy, Scalar::Util somewhat more messy
since we will have to get Error.pm own .xs as well.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.

^ permalink raw reply

* Re: [PATCH 7/7] Convert git-annotate to use Git.pm
From: Ryan Anderson @ 2006-06-25  9:27 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Junio C Hamano, git
In-Reply-To: <20060625015434.29906.23422.stgit@machine.or.cz>

On Sun, Jun 25, 2006 at 03:54:34AM +0200, Petr Baudis wrote:
> -sub open_pipe {
> -	if ($^O eq '##INSERT_ACTIVESTATE_STRING_HERE##') {
> -		return open_pipe_activestate(@_);
> -	} else {
> -		return open_pipe_normal(@_);
> -	}
> -}
> -
> -sub open_pipe_activestate {
> -	tie *fh, "Git::ActiveStatePipe", @_;
> -	return *fh;
> -}
> -
> -sub open_pipe_normal {
> -	my (@execlist) = @_;
> -
> -	my $pid = open my $kid, "-|";
> -	defined $pid or die "Cannot fork: $!";
> -
> -	unless ($pid) {
> -		exec @execlist;
> -		die "Cannot exec @execlist: $!";
> -	}
> -
> -	return $kid;
> -}

I don't see that Git.pm provides the compatibility functionality we have
stubbed out, here.

(It clearly has never been used, because there hasn't been a patch to
set the actual ActiveState string there.. 'MSWin32', btw.)

I suspect that the other scripts, that have more users, will see
regression complaints when the qx() calls get replaced by calls to
open(my $fh, "-|"), indirectly, in Git.pm

-- 

Ryan Anderson
  sometimes Pug Majere

^ permalink raw reply

* Re: [PATCH] cvsimport: setup indexes correctly for ancestors and incremental imports
From: Junio C Hamano @ 2006-06-25  9:27 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Johannes Schindelin, Martin Langhoff, git
In-Reply-To: <20060625085359.GC21864@pasky.or.cz>

Petr Baudis <pasky@suse.cz> writes:

> Dear diary, on Sun, Jun 25, 2006 at 05:10:36AM CEST, I got a letter
> where Junio C Hamano <junkio@cox.net> said that...
>> Please please please do not use --- between the cover letter and
>> commit message body if you choose to do the cover letter first.
>
> Oops, I suspect that I'm a huge offender in this regard in that case.
> Can I format my patch mails so that they look like natural replies _and_
> you can still apply them easily?

It's not a big deal.

I do it with scissors mark "-- >8 --" because I can use "git-am"
while still in GNUS with '|' (gnus-summary-pipe-output) on the
message, and immediately after that I can amend the commit with
"git-commit --amend" to remove everything up to the scissors
mark.

If you have --- then I have to save the message in a separate
file with 'C-o' (gnus-summary-save-article-mail), open the file
and remove up to that first --- in the editor, and then run
git-am on the file.

Only when the cover letter is short, I'd prefer Linus style,
which places cover letter material after the --- and the
diffstat, although that makes the message like top-posting.

^ permalink raw reply

* Re: [PATCH] cvsimport: setup indexes correctly for ancestors and incremental imports
From: Johannes Schindelin @ 2006-06-25  9:26 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v64iqq6ab.fsf@assigned-by-dhcp.cox.net>

Hi,

On Sat, 24 Jun 2006, Junio C Hamano wrote:

> Please please please do not use --- between the cover letter and commit 
> message body if you choose to do the cover letter first.

Sorry. Will not happen again.

Ciao,
Dscho

^ permalink raw reply

* Re: [RFC] git-fetch - repack in the background after fetching
From: Johannes Schindelin @ 2006-06-25  9:25 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Martin Langhoff, git, junkio
In-Reply-To: <Pine.LNX.4.64.0606242049500.3747@g5.osdl.org>

Hi,

On Sat, 24 Jun 2006, Linus Torvalds wrote:

> However, the more worrisome thing about background repacking is that while 
> it should be safe against normal users, if you have two _repacks_ at the 
> same time, they can decide to remove each others packs. Yeah, yeah, that's 
> pretty damn unlikely, but hey, "pretty damn unlikely" is not "impossible".

Why not introduce a lock file for repack?

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] cvsimport: setup indexes correctly for ancestors and incremental imports
From: Petr Baudis @ 2006-06-25  8:53 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin, Martin Langhoff, git
In-Reply-To: <7v64iqq6ab.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Sun, Jun 25, 2006 at 05:10:36AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Please please please do not use --- between the cover letter and
> commit message body if you choose to do the cover letter first.

Oops, I suspect that I'm a huge offender in this regard in that case.
Can I format my patch mails so that they look like natural replies _and_
you can still apply them easily?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.

^ permalink raw reply

* Re: [PATCH] git-commit: filter out log message lines only when editor was run.
From: Yann Dirson @ 2006-06-25  7:21 UTC (permalink / raw)
  To: Marco Costalba; +Cc: junkio, GIT list
In-Reply-To: <e5bfff550606250008k702acfadm8860e9b672bced56@mail.gmail.com>

On Sun, Jun 25, 2006 at 09:08:02AM +0200, Marco Costalba wrote:
> 1) It's ok to let git-comit do not strip comment lines, it's already
> done by qgit.

That's great news :)

> 2) Please don't change git status output to use another symbol to mark
> comment lines because it will break line stripping code.

If it ever gets changed, it should anyway IMHO be made a parameter.  A
strategy could be to make it customizable first, advertize this loudly
so tools adapt themselves to force the prefix to what suits them best,
and then eventually change the default in a major release.

Best regards,
-- 
Yann Dirson    <ydirson@altern.org> |
Debian-related: <dirson@debian.org> |   Support Debian GNU/Linux:
                                    |  Freedom, Power, Stability, Gratis
     http://ydirson.free.fr/        | Check <http://www.debian.org/>

^ 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