Git development
 help / color / mirror / Atom feed
* Re: Git {log,diff} against tracked branch?
From: Petr Baudis @ 2009-03-18 18:26 UTC (permalink / raw)
  To: Andreas Gruenbacher; +Cc: git
In-Reply-To: <200903181448.50706.agruen@suse.de>

  Hi,

On Wed, Mar 18, 2009 at 02:48:50PM +0100, Andreas Gruenbacher wrote:
> I often want to see what the differences are between a local branch and the 
> branch it tracks (if it tracks a branch). I currently do something like "git 
> log master..origin/master". This is a lot of unnecessary typing though 
> compared to something like "git log -t master", or even "git log -t" when on 
> the master branch.

  sorry, I think Git can't do anything like this either. :-(

  However, I think something like this would be useful and probably easy
to do? Maybe someone on the list will get inspired to implement
a special refspec character to represent the "tracked branch"
relationship, so e.g. %master would expand to %origin/master. Then you
should be able to do something like:

	git log %..

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

^ permalink raw reply

* Re: [PATCH] git log: avoid segfault with --all-match
From: Junio C Hamano @ 2009-03-18 18:33 UTC (permalink / raw)
  To: Michele Ballabio; +Cc: git
In-Reply-To: <1237399576-27323-1-git-send-email-barra_cuda@katamail.com>

Michele Ballabio <barra_cuda@katamail.com> writes:

> Avoid a segfault when the command
>
> 	git log --all-match
>
> was issued.
>
> Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
> ---
>
> Not sure if this is the right fix, nor if it would be better a
> warning or an error.

I think ignoring it makes sense; you could alias "git log --all-match" to
something like "git lg", and when no grepping option appears it will still
work.

I'd add s/was issued./was issued, by ignoring the option/; or something
like that, though.

^ permalink raw reply

* Re: [PATCH 2/3] document --force-rebase
From: Junio C Hamano @ 2009-03-18 18:38 UTC (permalink / raw)
  To: Michele Ballabio; +Cc: git, gitster
In-Reply-To: <1237399558-27289-2-git-send-email-barra_cuda@katamail.com>

Michele Ballabio <barra_cuda@katamail.com> writes:

> +-f::
> +--force-rebase::
> +	Force the rebase even if the current branch is up to date.
> +	Normally, if the current branch is up to date, the rebase is
> +	aborted.
> +

For the sake of brevity we say "up to date" in the error message from the
command, but for people who looks up the manual to figure out why their
rebase is not rebasing with that error message, we may want to explain
what the phrase means in this context.  E.g.

	... even if the branch is a descendant of the commit you are
	rebasing onto.  Normally the command will exit with a message
	"Current branch is up to date" in such a situation.

^ permalink raw reply

* Re: [PATCH 2/3] document --force-rebase
From: Junio C Hamano @ 2009-03-18 18:38 UTC (permalink / raw)
  To: Michele Ballabio; +Cc: git, gitster
In-Reply-To: <1237399558-27289-2-git-send-email-barra_cuda@katamail.com>

Michele Ballabio <barra_cuda@katamail.com> writes:

> +-f::
> +--force-rebase::
> +	Force the rebase even if the current branch is up to date.
> +	Normally, if the current branch is up to date, the rebase is
> +	aborted.
> +

For the sake of brevity we say "up to date" in the error message from the
command, but for people who look up the manual to figure out why their
rebase is not rebasing with that error message, we may want to explain
what the phrase means in this context.  E.g.

	... even if the branch is a descendant of the commit you are
	rebasing onto.  Normally the command will exit with a message
	"Current branch is up to date" in such a situation.

^ permalink raw reply

* Re: [PATCH 3/3] rebase: add options passed to git-am
From: Junio C Hamano @ 2009-03-18 18:41 UTC (permalink / raw)
  To: Michele Ballabio; +Cc: git, gitster
In-Reply-To: <1237399558-27289-3-git-send-email-barra_cuda@katamail.com>

Michele Ballabio <barra_cuda@katamail.com> writes:

> Add the options --committer-date-is-author-date and --ignore-date
> to git-rebase. They were introduced in commit a79ec62d0 for git-am.
>
> Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
> ---
>
> I'm not sure if force_rebase should be set in this case.

Good thinking.

These are clearly "I want to change these commit" request just like
the "--whitespace=fix" option is, so I think it is probably a good idea.

^ permalink raw reply

* Re: [PATCH] Define a version of lstat(2) specially for copy operation
From: Junio C Hamano @ 2009-03-18 18:56 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Alex Riesen, Jeff King, layer, git
In-Reply-To: <49C0C983.5060602@viscovery.net>

Johannes Sixt <j.sixt@viscovery.net> writes:

> Sorry that I skip your elaboration on this. First, I barely understand
> read-cache.c; and second, I have the feeling that this is
> over-engineering: It introduces a genericity that we don't need in
> practice.

That's Ok.  The whole speculation depended on your answer to (2) being
"yes", and because it is not the case, you can safely skip it.

I just wanted to see if we can sprinkle a handful of lstat_remainder()
calls that disappear on POSIX side without changing anything else, which
would be the least impact solution from my point of view.

> But that wouldn't be different in principle from Alex's patch that
> introduced lstat_for_copy(), would it? Since it would be used in exactly
> the same strategic places.

Hm, I sort of agree.

If you imagine somebody with POSIX background who is new to git's codebase
and is trying understand the resulting code, I thought lstat() followed by
lstat_remainder() is conceptually slightly easier to explain ("'remainder'
is needed on platforms whose lstat() do not get the x-bit right, and we
use it only where it matters"), but I do not think the difference is that
great.

You need to explain when to add the "remainder" one after an existing
lstat() call in this API, or you need to explain when to replace an
existing lstat() with "for copy" in the Alex's API.  Either way you need
to contaminate the generic codepath with the distasteful concept that "On
some platforms, you lstat() may not do what you asked it to do".

And that was what I was unhappy about Alex's patch to begin with.  Not the
"patch" nor "Alex", but the fact that we have to deal with the "issue".

And lstat() followed by lstat_remainder() does not solve that issue at
all.  So let's scrap this lstat_fast()/lstat_remainder().

^ permalink raw reply

* [PATCH 0/3] format-patch --attach/--inline use filename instead of  sha1
From: Stephen Boyd @ 2009-03-18 19:51 UTC (permalink / raw)
  To: git

This patch series modifies the behavior of format-patch when used with
the --attach or --inline command line settings. Current behavior names
the attached or inlined patches with the sha1 of the commit, which
isn't very friendly or easy for a human to use when downloading the
attachments. This series replaces the sha1 values with the filename
used by format-patch when it outputs the patches to files.

I don't know the guidelines to modifying the rev_info struct, so
hopefully adding the filename there is not bad.

Stephen Boyd (3):
  format-patch: remove unused total parameter from reopen_stdout()
  format-patch: create patch filename in get_patch_filename()
  format-patch: --attach/inline uses filename instead of sha1

 builtin-log.c                                      |   48 ++++++++++----------
 log-tree.c                                         |    8 ++--
 revision.h                                         |    1 +
 ....format-patch_--attach_--stdout_initial..master |   12 +++---
 ...format-patch_--attach_--stdout_initial..master^ |    8 ++--
 ...ff.format-patch_--attach_--stdout_initial..side |    4 +-
 ...tdout_--subject-prefix=TESTCASE_initial..master |   12 +++---
 ....format-patch_--inline_--stdout_initial..master |   12 +++---
 ...format-patch_--inline_--stdout_initial..master^ |    8 ++--
 ...ormat-patch_--inline_--stdout_initial..master^^ |    4 +-
 ...ff.format-patch_--inline_--stdout_initial..side |    4 +-
 11 files changed, 61 insertions(+), 60 deletions(-)

^ permalink raw reply

* [PATCH 1/3] format-patch: remove unused total parameter from  reopen_stdout()
From: Stephen Boyd @ 2009-03-18 19:51 UTC (permalink / raw)
  To: git

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---
 builtin-log.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index 8684fcd..c72e35a 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -573,7 +573,7 @@ static FILE *realstdout = NULL;
 static const char *output_directory = NULL;
 static int outdir_offset;

-static int reopen_stdout(const char *oneline, int nr, int total)
+static int reopen_stdout(const char *oneline, int nr)
 {
 	char filename[PATH_MAX];
 	int len = 0;
@@ -687,7 +687,7 @@ static void make_cover_letter(struct rev_info
*rev, int use_stdout,
 		die("Cover letter needs email format");

 	if (!use_stdout && reopen_stdout(numbered_files ?
-				NULL : "cover-letter", 0, rev->total))
+				NULL : "cover-letter", 0))
 		return;

 	head_sha1 = sha1_to_hex(head->object.sha1);
@@ -1106,7 +1106,7 @@ int cmd_format_patch(int argc, const char
**argv, const char *prefix)
 		}
 		if (!use_stdout && reopen_stdout(numbered_files ? NULL :
 				get_oneline_for_filename(commit, keep_subject),
-				rev.nr, rev.total))
+				rev.nr))
 			die("Failed to create output files");
 		shown = log_tree_commit(&rev, commit);
 		free(commit->buffer);
-- 
1.6.2

^ permalink raw reply related

* [PATCH 2/3] format-patch: create patch filename in  get_patch_filename()
From: Stephen Boyd @ 2009-03-18 19:51 UTC (permalink / raw)
  To: git

reopen_stdout() used to take the oneline description of a commit, append
the patch suffix, prepend the output directory (if any) and then point
stdout to that file. Now the patch filename (the oneline description and
the patch suffix) is created in get_patch_filename() and passed to
reopen_stdout()

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---
 builtin-log.c |   48 ++++++++++++++++++++++++------------------------
 1 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index c72e35a..f2a687f 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -519,21 +519,17 @@ static int git_format_config(const char *var,
const char *value, void *cb)
 }


-static const char *get_oneline_for_filename(struct commit *commit,
-					    int keep_subject)
+static const char *get_patch_filename(char* sol, int keep_subject, int nr)
 {
 	static char filename[PATH_MAX];
-	char *sol;
 	int len = 0;
 	int suffix_len = strlen(fmt_patch_suffix) + 1;

-	sol = strstr(commit->buffer, "\n\n");
-	if (!sol)
-		filename[0] = '\0';
-	else {
+	if (sol)
+	{
 		int j, space = 0;

-		sol += 2;
+		len += sprintf(filename + len, "%04d-", nr);
 		/* strip [PATCH] or [PATCH blabla] */
 		if (!keep_subject && !prefixcmp(sol, "[PATCH")) {
 			char *eos = strchr(sol + 6, ']');
@@ -564,8 +560,11 @@ static const char
*get_oneline_for_filename(struct commit *commit,
 		while (filename[len - 1] == '.'
 		       || filename[len - 1] == '-')
 			len--;
-		filename[len] = '\0';
 	}
+	else
+		len += sprintf(filename + len, "%d", nr);
+	strcpy(filename + len, fmt_patch_suffix);
+
 	return filename;
 }

@@ -573,7 +572,7 @@ static FILE *realstdout = NULL;
 static const char *output_directory = NULL;
 static int outdir_offset;

-static int reopen_stdout(const char *oneline, int nr)
+static int reopen_stdout(const char *oneline)
 {
 	char filename[PATH_MAX];
 	int len = 0;
@@ -588,15 +587,7 @@ static int reopen_stdout(const char *oneline, int nr)
 		if (filename[len - 1] != '/')
 			filename[len++] = '/';
 	}
-
-	if (!oneline)
-		len += sprintf(filename + len, "%d", nr);
-	else {
-		len += sprintf(filename + len, "%04d-", nr);
-		len += snprintf(filename + len, sizeof(filename) - len - 1
-				- suffix_len, "%s", oneline);
-		strcpy(filename + len, fmt_patch_suffix);
-	}
+	strncpy(filename+len, oneline, PATH_MAX-len);

 	fprintf(realstdout, "%s\n", filename + outdir_offset);
 	if (freopen(filename, "w", stdout) == NULL)
@@ -686,8 +677,9 @@ static void make_cover_letter(struct rev_info
*rev, int use_stdout,
 	if (rev->commit_format != CMIT_FMT_EMAIL)
 		die("Cover letter needs email format");

-	if (!use_stdout && reopen_stdout(numbered_files ?
-				NULL : "cover-letter", 0))
+	if (!use_stdout && reopen_stdout(get_patch_filename(numbered_files ?
+							NULL : "cover-letter",
+							0, 0)))
 		return;

 	head_sha1 = sha1_to_hex(head->object.sha1);
@@ -800,6 +792,7 @@ int cmd_format_patch(int argc, const char **argv,
const char *prefix)
 	struct patch_ids ids;
 	char *add_signoff = NULL;
 	struct strbuf buf = STRBUF_INIT;
+	char *sol = NULL;

 	git_config(git_format_config, NULL);
 	init_revisions(&rev, prefix);
@@ -1104,9 +1097,16 @@ int cmd_format_patch(int argc, const char
**argv, const char *prefix)
 			}
 			gen_message_id(&rev, sha1_to_hex(commit->object.sha1));
 		}
-		if (!use_stdout && reopen_stdout(numbered_files ? NULL :
-				get_oneline_for_filename(commit, keep_subject),
-				rev.nr))
+		/*
+		 * We want the subject line of the commit message which starts
+		 * after the first double newline occurence in the commit
+		 * buffer. If we're outputting numbered files we don't need a
+		 * subject line.
+		 */
+		sol = numbered_files ? NULL : strstr(commit->buffer, "\n\n")+2;
+		if (!use_stdout && reopen_stdout(get_patch_filename(sol,
+								keep_subject,
+								rev.nr)))
 			die("Failed to create output files");
 		shown = log_tree_commit(&rev, commit);
 		free(commit->buffer);
-- 
1.6.2

^ permalink raw reply related

* [PATCH 3/3] format-patch: --attach/inline uses filename instead of  sha1
From: Stephen Boyd @ 2009-03-18 19:51 UTC (permalink / raw)
  To: git

Currently when format-patch is used with --attach or --inline the patch
attachment has the sha1 of the commit for the filename. This replaces
the sha1 with the filename used by format-patch when outputting to files.

This allows users to do something like:

    git format-patch --attach --suffix=.diff --numbered-files HEAD~~

and get two patches attached to the email with filenames 1.diff and
2.diff

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---
I'm not sure if adding fmt_patch_filename to the rev_info struct is a good idea.

 builtin-log.c                                      |    6 +++---
 log-tree.c                                         |    8 ++++----
 revision.h                                         |    1 +
 ....format-patch_--attach_--stdout_initial..master |   12 ++++++------
 ...format-patch_--attach_--stdout_initial..master^ |    8 ++++----
 ...ff.format-patch_--attach_--stdout_initial..side |    4 ++--
 ...tdout_--subject-prefix=TESTCASE_initial..master |   12 ++++++------
 ....format-patch_--inline_--stdout_initial..master |   12 ++++++------
 ...format-patch_--inline_--stdout_initial..master^ |    8 ++++----
 ...ormat-patch_--inline_--stdout_initial..master^^ |    4 ++--
 ...ff.format-patch_--inline_--stdout_initial..side |    4 ++--
 11 files changed, 40 insertions(+), 39 deletions(-)

diff --git a/builtin-log.c b/builtin-log.c
index f2a687f..491cebb 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -1104,9 +1104,9 @@ int cmd_format_patch(int argc, const char
**argv, const char *prefix)
 		 * subject line.
 		 */
 		sol = numbered_files ? NULL : strstr(commit->buffer, "\n\n")+2;
-		if (!use_stdout && reopen_stdout(get_patch_filename(sol,
-								keep_subject,
-								rev.nr)))
+		rev.fmt_patch_filename = get_patch_filename(sol, keep_subject,
+								rev.nr);
+		if (!use_stdout && reopen_stdout(rev.fmt_patch_filename))
 			die("Failed to create output files");
 		shown = log_tree_commit(&rev, commit);
 		free(commit->buffer);
diff --git a/log-tree.c b/log-tree.c
index 9565c18..dc37d16 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -245,14 +245,14 @@ void log_write_email_headers(struct rev_info
*opt, const char *name,
 		snprintf(buffer, sizeof(buffer) - 1,
 			 "\n--%s%s\n"
 			 "Content-Type: text/x-patch;"
-			 " name=\"%s.diff\"\n"
+			 " name=\"%s\"\n"
 			 "Content-Transfer-Encoding: 8bit\n"
 			 "Content-Disposition: %s;"
-			 " filename=\"%s.diff\"\n\n",
+			 " filename=\"%s\"\n\n",
 			 mime_boundary_leader, opt->mime_boundary,
-			 name,
+			 opt->fmt_patch_filename,
 			 opt->no_inline ? "attachment" : "inline",
-			 name);
+			 opt->fmt_patch_filename);
 		opt->diffopt.stat_sep = buffer;
 	}
 	*subject_p = subject;
diff --git a/revision.h b/revision.h
index ad123d7..c34eac9 100644
--- a/revision.h
+++ b/revision.h
@@ -86,6 +86,7 @@ struct rev_info {
 	struct log_info *loginfo;
 	int		nr, total;
 	const char	*mime_boundary;
+	const char	*fmt_patch_filename;
 	char		*message_id;
 	struct string_list *ref_message_ids;
 	const char	*add_signoff;
diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master
b/t/t4013/diff.format-patch_--attach_--stdout_initial..master
index e5ab744..ce49bd6 100644
--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master
+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master
@@ -22,9 +22,9 @@ This is the second commit.


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Type: text/x-patch; name="0001-Second.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: attachment;
filename="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Disposition: attachment; filename="0001-Second.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..8422d40 100644
@@ -80,9 +80,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Type: text/x-patch; name="0002-Third.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: attachment;
filename="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Disposition: attachment; filename="0002-Third.patch"

 diff --git a/dir/sub b/dir/sub
 index 8422d40..cead32e 100644
@@ -129,9 +129,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Type: text/x-patch; name="0003-Side.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: attachment;
filename="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Disposition: attachment; filename="0003-Side.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..7289e35 100644
diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^
b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^
index 2c71d20..5f1b238 100644
--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^
+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^
@@ -22,9 +22,9 @@ This is the second commit.


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Type: text/x-patch; name="0001-Second.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: attachment;
filename="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Disposition: attachment; filename="0001-Second.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..8422d40 100644
@@ -80,9 +80,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Type: text/x-patch; name="0002-Third.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: attachment;
filename="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Disposition: attachment; filename="0002-Third.patch"

 diff --git a/dir/sub b/dir/sub
 index 8422d40..cead32e 100644
diff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..side
b/t/t4013/diff.format-patch_--attach_--stdout_initial..side
index 38f7902..4a2364a 100644
--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..side
+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..side
@@ -20,9 +20,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Type: text/x-patch; name="0001-Side.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: attachment;
filename="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Disposition: attachment; filename="0001-Side.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..7289e35 100644
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
index 58f8a7b..ca3f60b 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
+++ b/t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
@@ -22,9 +22,9 @@ This is the second commit.


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Type: text/x-patch; name="0001-Second.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Disposition: inline; filename="0001-Second.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..8422d40 100644
@@ -80,9 +80,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Type: text/x-patch; name="0002-Third.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Disposition: inline; filename="0002-Third.patch"

 diff --git a/dir/sub b/dir/sub
 index 8422d40..cead32e 100644
@@ -129,9 +129,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Type: text/x-patch; name="0003-Side.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Disposition: inline; filename="0003-Side.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..7289e35 100644
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master
b/t/t4013/diff.format-patch_--inline_--stdout_initial..master
index 9e7bbdf..08f2301 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master
@@ -22,9 +22,9 @@ This is the second commit.


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Type: text/x-patch; name="0001-Second.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Disposition: inline; filename="0001-Second.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..8422d40 100644
@@ -80,9 +80,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Type: text/x-patch; name="0002-Third.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Disposition: inline; filename="0002-Third.patch"

 diff --git a/dir/sub b/dir/sub
 index 8422d40..cead32e 100644
@@ -129,9 +129,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Type: text/x-patch; name="0003-Side.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Disposition: inline; filename="0003-Side.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..7289e35 100644
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
index f881f64..07f1230 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^
@@ -22,9 +22,9 @@ This is the second commit.


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Type: text/x-patch; name="0001-Second.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Disposition: inline; filename="0001-Second.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..8422d40 100644
@@ -80,9 +80,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Type: text/x-patch; name="0002-Third.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff"
+Content-Disposition: inline; filename="0002-Third.patch"

 diff --git a/dir/sub b/dir/sub
 index 8422d40..cead32e 100644
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
index 4f258b8..29e00ab 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
@@ -22,9 +22,9 @@ This is the second commit.


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Type: text/x-patch; name="0001-Second.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff"
+Content-Disposition: inline; filename="0001-Second.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..8422d40 100644
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..side
b/t/t4013/diff.format-patch_--inline_--stdout_initial..side
index e86dce6..67633d4 100644
--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..side
+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..side
@@ -20,9 +20,9 @@ Content-Transfer-Encoding: 8bit


 --------------g-i-t--v-e-r-s-i-o-n
-Content-Type: text/x-patch;
name="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Type: text/x-patch; name="0001-Side.patch"
 Content-Transfer-Encoding: 8bit
-Content-Disposition: inline;
filename="c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff"
+Content-Disposition: inline; filename="0001-Side.patch"

 diff --git a/dir/sub b/dir/sub
 index 35d242b..7289e35 100644
-- 
1.6.2

^ permalink raw reply related

* [PATCH v2] git log: avoid segfault with --all-match
From: Michele Ballabio @ 2009-03-18 20:53 UTC (permalink / raw)
  To: gitster; +Cc: git
In-Reply-To: <7vbpryfzpb.fsf@gitster.siamese.dyndns.org>

Avoid a segfault when the command

	git log --all-match

was issued, by ignoring the option.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
---
 grep.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/grep.c b/grep.c
index 062b2b6..cb4666d 100644
--- a/grep.c
+++ b/grep.c
@@ -190,7 +190,8 @@ void compile_grep_patterns(struct grep_opt *opt)
 	 * A classic recursive descent parser would do.
 	 */
 	p = opt->pattern_list;
-	opt->pattern_expression = compile_pattern_expr(&p);
+	if (p)
+		opt->pattern_expression = compile_pattern_expr(&p);
 	if (p)
 		die("incomplete pattern expression: %s", p->pattern);
 }
-- 
1.6.2.22.gc2ac

^ permalink raw reply related

* [PATCH v2 2/3] document --force-rebase
From: Michele Ballabio @ 2009-03-18 20:53 UTC (permalink / raw)
  To: gitster; +Cc: git
In-Reply-To: <7v63i6fzgc.fsf@gitster.siamese.dyndns.org>

Words by Junio.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
---
 Documentation/git-rebase.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 57bd333..276f151 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -258,6 +258,13 @@ OPTIONS
 	context exist they all must match.  By default no context is
 	ever ignored.
 
+-f::
+--force-rebase::
+	Force the rebase even if the current branch is a descendant
+	of the commit you are rebasing onto.  Normally the command will
+	exit with the message "Current branch is up to date" in such a
+	situation.
+
 --whitespace=<option>::
 	This flag is passed to the 'git-apply' program
 	(see linkgit:git-apply[1]) that applies the patch.
-- 
1.6.2.22.gc2ac

^ permalink raw reply related

* [PATCH v2 3/3] rebase: add options passed to git-am
From: Michele Ballabio @ 2009-03-18 20:53 UTC (permalink / raw)
  To: gitster; +Cc: git
In-Reply-To: <7v1vsufzbs.fsf@gitster.siamese.dyndns.org>

Add the options --committer-date-is-author-date and --ignore-date
to git-rebase. They were introduced in commit a79ec62d0 for git-am.
These options imply --force-rebase.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
---
 Documentation/git-rebase.txt |    5 +++++
 git-rebase.sh                |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 276f151..3d5a066 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -270,6 +270,11 @@ OPTIONS
 	(see linkgit:git-apply[1]) that applies the patch.
 	Incompatible with the --interactive option.
 
+--committer-date-is-author-date::
+--ignore-date::
+	These flags are passed to 'git-am' to easily change the dates
+	of the rebased commits (see linkgit:git-am[1]).
+
 -i::
 --interactive::
 	Make a list of the commits which are about to be rebased.  Let the
diff --git a/git-rebase.sh b/git-rebase.sh
index e38d68a..b83fd3f 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -309,6 +309,10 @@ do
 			;;
 		esac
 		;;
+	--committer-date-is-author-date|--ignore-date)
+		git_am_opt="$git_am_opt $1"
+		force_rebase=t
+		;;
 	-C*)
 		git_am_opt="$git_am_opt $1"
 		;;
-- 
1.6.2.22.gc2ac

^ permalink raw reply related

* Advice wanted to set up GIT repository manually sync'ed form SVN
From: Aaron Gray @ 2009-03-18 20:46 UTC (permalink / raw)
  To: Git Mailing List

Hi,

I am a realitive GIT newbie, ie I have not used GIT on a project but have 
read quite a lot of documentation on it, over the last year or so.

We are wanting to have a git and git-web repository that is synced to a main 
SVN repository, wh only want to read the SVN repository at this stage. I am 
planning on using git-svn raw, and do fetch'es by hand.

Is there any advice that I should know at this point before proceeding ?

Many thanks in advance,

Aaron

^ permalink raw reply

* Re: [PATCH] t7700-repack: repack -a now works properly, expect success from test
From: Brandon Casey @ 2009-03-18 20:59 UTC (permalink / raw)
  To: gitster; +Cc: git
In-Reply-To: <7Vazs5mFk91IKAarOd0wrBNmYj7eSJxVIcR0PEQxJl8R0aQmQDEqSJMphMrXhmVu570fijupQ34@cipher.nrlssc.navy.mil>

Brandon Casey wrote:
> Since Junio's keep-pack series was merged in at aec81306, git-repack now
> properly packs objects from alternate repositories even when the local
> repository contains packs.
> 
> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
> ---
> 
> 
> Well, I finally got some time last week to take a look at this issue, and
> what do I find, but you've already fixed it.  Did you even realize? :)
> 
> 
> I was too busy to notice the emails on the subject last month...
> 
> http://article.gmane.org/gmane.comp.version-control.git/111758
> 
> Junio C Hamano wrote:
>> I think we probably could get rid of --honor-pack-keep mechanism after
>> this series, but I didn't look very deeply into it.
> 
> This makes sense, but doesn't seem to be working.  Possibly the way
>  --kept-pack-only is implemented, it only deals with commits.  So if the
> commit object is _not_ in a kept pack, but the trees and/or blobs that it
> references _are_, then both the commit and the trees/blobs will be added to
> the list of objects to pack even though the trees/blobs should not be.
> 
> The test in t7700 is contrived, and creates two pack files; one marked with
> .keep which contains a single blob object that is missing from the other.
> Then the test repacks and checks whether the blob object was placed into the
> new pack.  The --honor-pack-keep mechanism handles this case since it works
> on the back end and checks whether each object that is added to the objects
> list exists in a kept pack, and skips it if so.
> 
> Disclaimer: I have not taken the time to fully understand revision.c

Hmm, I think there are a couple of new issues.

  1) The --kept-pack-only mechanism does not operate solely on "local"
     packs now.  This means that objects residing in an alternate pack
     which has a .keep file will not be repacked with repack -a.  My
     current opinion is that .keep files in an alternate object database
     should not be honored since the user may not have any control over
     them.  This seems to be in line with your statement about this feature
     affecting locally existing packs from the Release Notes:

       git-gc spent excessive amount of time to decide if an object appears
       in a locally existing pack

  2) The 'repack unpacked objects' and 'loosen unpacked objects' mechanisms
     now do not operate solely on local packs.  I think this means that
     objects residing in alternate not-kept packs will be repacked when
     '-A -d' is used, and will be loosened when '-a -d' is used.


I have a test for #1 above. I'll think about a test for #2.

I wonder if we'll ever be interested in non-local keep files?  If not, then
why not set pack_keep _only_ for local packs?

diff --git a/sha1_file.c b/sha1_file.c
index 4563173..a595eac 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -881,9 +881,11 @@ struct packed_git *add_packed_git(const char *path, int pat
        }
        memcpy(p->pack_name, path, path_len);
 
-       strcpy(p->pack_name + path_len, ".keep");
-       if (!access(p->pack_name, F_OK))
-               p->pack_keep = 1;
+       if (local) {
+               strcpy(p->pack_name + path_len, ".keep");
+               if (!access(p->pack_name, F_OK))
+                       p->pack_keep = 1;
+       }
 
        strcpy(p->pack_name + path_len, ".pack");
        if (stat(p->pack_name, &st) || !S_ISREG(st.st_mode)) {


I'd also change the name from pack_keep to something that identivies it as local.

The alternative would require that find_pack_ent() differentiate between
local kept packs and alternate kept packs.

-brandon

^ permalink raw reply related

* Google Summer of Code 2009 - Accepted!
From: Shawn O. Pearce @ 2009-03-18 20:59 UTC (permalink / raw)
  To: git

Google has announced the selected organizations for GSoC 2009:

  http://socghop.appspot.com/program/accepted_orgs/google/gsoc2009

Students interested in applying should look at Git's ideas list,
or any other accepted org's ideas list:

  http://git.or.cz/gitwiki/SoC2009Ideas


Mentors for Git are really needed.  I'm going to be too busy this
summer to mentor a student myself.  If we have no mentors, we'll
have to pull out late, upsetting everyone, including my boss,
and worse, LH.

-- 
Shawn.

^ permalink raw reply

* [PATCH] git-gui: various French translation fixes
From: Sam Hocevar @ 2009-03-18 20:54 UTC (permalink / raw)
  To: Git List; +Cc: Christian Couder, Alexandre Bourget

Mostly grammar, spelling and typography fixes, but also a few wording
enhancements here and there.

Signed-off-by: Sam Hocevar <sam@zoy.org>
---
 po/fr.po |  196 +++++++++++++++++++++++++++++++-------------------------------
 1 files changed, 98 insertions(+), 98 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index 45773ab..eb5f68e 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -62,7 +62,7 @@ msgstr ""
 "\n"
 "%s nécessite au moins Git 1.5.0.\n"
 "\n"
-"Peut'on considérer que '%s' est en version 1.5.0 ?\n"
+"Peut-on considérer que '%s' est en version 1.5.0 ?\n"
 
 #: git-gui.sh:1062
 msgid "Git directory not found:"
@@ -82,7 +82,7 @@ msgstr "Aucun répertoire de travail"
 
 #: git-gui.sh:1247 lib/checkout_op.tcl:305
 msgid "Refreshing file status..."
-msgstr "Rafraichissement du status des fichiers..."
+msgstr "Rafraîchissement du statut des fichiers..."
 
 #: git-gui.sh:1303
 msgid "Scanning for modified files ..."
@@ -163,7 +163,7 @@ msgstr "Dépôt"
 
 #: git-gui.sh:2281
 msgid "Edit"
-msgstr "Edition"
+msgstr "Édition"
 
 #: git-gui.sh:2283 lib/choose_rev.tcl:561
 msgid "Branch"
@@ -199,7 +199,7 @@ msgstr "Naviguer dans la branche..."
 
 #: git-gui.sh:2316
 msgid "Visualize Current Branch's History"
-msgstr "Visualiser historique branche courante"
+msgstr "Visualiser l'historique de la branche courante"
 
 #: git-gui.sh:2320
 msgid "Visualize All Branch History"
@@ -208,12 +208,12 @@ msgstr "Voir l'historique de toutes les branches"
 #: git-gui.sh:2327
 #, tcl-format
 msgid "Browse %s's Files"
-msgstr "Naviguer l'arborescence de %s"
+msgstr "Parcourir l'arborescence de %s"
 
 #: git-gui.sh:2329
 #, tcl-format
 msgid "Visualize %s's History"
-msgstr "Voir l'historique de la branche: %s"
+msgstr "Voir l'historique de la branche : %s"
 
 #: git-gui.sh:2334 lib/database.tcl:27 lib/database.tcl:67
 msgid "Database Statistics"
@@ -230,7 +230,7 @@ msgstr "Vérifier le dépôt"
 #: git-gui.sh:2347 git-gui.sh:2351 git-gui.sh:2355 lib/shortcut.tcl:7
 #: lib/shortcut.tcl:39 lib/shortcut.tcl:71
 msgid "Create Desktop Icon"
-msgstr "Créer icône sur bureau"
+msgstr "Créer une icône sur le bureau"
 
 #: git-gui.sh:2363 lib/choose_repository.tcl:183 lib/choose_repository.tcl:191
 msgid "Quit"
@@ -320,7 +320,7 @@ msgstr "Désindexer"
 
 #: git-gui.sh:2484 lib/index.tcl:410
 msgid "Revert Changes"
-msgstr "Annuler les modifications (revert)"
+msgstr "Révoquer les modifications"
 
 #: git-gui.sh:2491 git-gui.sh:3069
 msgid "Show Less Context"
@@ -382,7 +382,7 @@ msgstr "Documentation en ligne"
 
 #: git-gui.sh:2614 lib/choose_repository.tcl:47 lib/choose_repository.tcl:56
 msgid "Show SSH Key"
-msgstr "Montrer clé SSH"
+msgstr "Montrer la clé SSH"
 
 #: git-gui.sh:2707
 #, tcl-format
@@ -445,7 +445,7 @@ msgstr "Fichier :"
 
 #: git-gui.sh:3078
 msgid "Refresh"
-msgstr "Rafraichir"
+msgstr "Rafraîchir"
 
 #: git-gui.sh:3099
 msgid "Decrease Font Size"
@@ -457,7 +457,7 @@ msgstr "Agrandir la police"
 
 #: git-gui.sh:3111 lib/blame.tcl:281
 msgid "Encoding"
-msgstr "Encodage"
+msgstr "Codage des caractères"
 
 #: git-gui.sh:3122
 msgid "Apply/Reverse Hunk"
@@ -469,7 +469,7 @@ msgstr "Appliquer/Inverser la ligne"
 
 #: git-gui.sh:3137
 msgid "Run Merge Tool"
-msgstr "Lancer outil de merge"
+msgstr "Lancer l'outil de fusion"
 
 #: git-gui.sh:3142
 msgid "Use Remote Version"
@@ -527,7 +527,7 @@ msgid ""
 "Tcl binary distributed by Cygwin."
 msgstr ""
 "\n"
-"Ceci est du à un problème connu avec\n"
+"Ceci est dû à un problème connu avec\n"
 "le binaire Tcl distribué par Cygwin."
 
 #: git-gui.sh:3336
@@ -630,11 +630,11 @@ msgstr "Fichier original :"
 
 #: lib/blame.tcl:1021
 msgid "Cannot find HEAD commit:"
-msgstr "Impossible de trouver le commit HEAD:"
+msgstr "Impossible de trouver le commit HEAD :"
 
 #: lib/blame.tcl:1076
 msgid "Cannot find parent commit:"
-msgstr "Impossible de trouver le commit parent:"
+msgstr "Impossible de trouver le commit parent :"
 
 #: lib/blame.tcl:1091
 msgid "Unable to display parent"
@@ -646,7 +646,7 @@ msgstr "Erreur lors du chargement des différences :"
 
 #: lib/blame.tcl:1232
 msgid "Originally By:"
-msgstr "A l'origine par :"
+msgstr "À l'origine par :"
 
 #: lib/blame.tcl:1238
 msgid "In File:"
@@ -691,11 +691,11 @@ msgstr "Détacher de la branche locale"
 
 #: lib/branch_create.tcl:22
 msgid "Create Branch"
-msgstr "Créer branche"
+msgstr "Créer une branche"
 
 #: lib/branch_create.tcl:27
 msgid "Create New Branch"
-msgstr "Créer nouvelle branche"
+msgstr "Créer une nouvelle branche"
 
 #: lib/branch_create.tcl:31 lib/choose_repository.tcl:377
 msgid "Create"
@@ -719,7 +719,7 @@ msgstr "Révision initiale"
 
 #: lib/branch_create.tcl:72
 msgid "Update Existing Branch:"
-msgstr "Mettre à jour branche existante :"
+msgstr "Mettre à jour une branche existante :"
 
 #: lib/branch_create.tcl:75
 msgid "No"
@@ -727,7 +727,7 @@ msgstr "Non"
 
 #: lib/branch_create.tcl:80
 msgid "Fast Forward Only"
-msgstr "Mise-à-jour rectiligne seulement (fast-forward)"
+msgstr "Mise à jour rectiligne seulement (fast-forward)"
 
 #: lib/branch_create.tcl:85 lib/checkout_op.tcl:536
 msgid "Reset"
@@ -769,7 +769,7 @@ msgstr "Branches locales"
 
 #: lib/branch_delete.tcl:52
 msgid "Delete Only If Merged Into"
-msgstr "Supprimer seulement si fusionnée dans:"
+msgstr "Supprimer seulement si fusionnée dans :"
 
 #: lib/branch_delete.tcl:54
 msgid "Always (Do not perform merge test.)"
@@ -786,7 +786,7 @@ msgid ""
 "\n"
 " Delete the selected branches?"
 msgstr ""
-"Récupérer des branches supprimées est difficile.\n"
+"Il est difficile de récupérer des branches supprimées.\n"
 "\n"
 "Supprimer les branches sélectionnées ?"
 
@@ -796,7 +796,7 @@ msgid ""
 "Failed to delete branches:\n"
 "%s"
 msgstr ""
-"La suppression des branches suivantes a échouée :\n"
+"La suppression des branches suivantes a échoué :\n"
 "%s"
 
 #: lib/branch_rename.tcl:14 lib/branch_rename.tcl:22
@@ -902,11 +902,11 @@ msgstr "La stratégie de fusion '%s' n'est pas supportée."
 #: lib/checkout_op.tcl:261
 #, tcl-format
 msgid "Failed to update '%s'."
-msgstr "La mise à jour de '%s' a échouée."
+msgstr "La mise à jour de '%s' a échoué."
 
 #: lib/checkout_op.tcl:273
 msgid "Staging area (index) is already locked."
-msgstr "L'index (staging area) est déjà vérouillé"
+msgstr "L'index (staging area) est déjà verrouillé."
 
 #: lib/checkout_op.tcl:288
 msgid ""
@@ -918,7 +918,7 @@ msgid ""
 "The rescan will be automatically started now.\n"
 msgstr ""
 "L'état lors de la dernière synchronisation ne correspond plus à l'état du "
-"dépôt\n"
+"dépôt.\n"
 "\n"
 "Un autre programme Git a modifié ce dépôt depuis la dernière "
 "synchronisation. Une resynchronisation doit être effectuée avant de pouvoir "
@@ -956,9 +956,9 @@ msgid ""
 "If you wanted to be on a branch, create one now starting from 'This Detached "
 "Checkout'."
 msgstr ""
-"Vous n'êtes plus ur une branche locale.\n"
+"Vous n'êtes plus sur une branche locale.\n"
 "\n"
-"Si vous vouliez être sur une branche, créez en une maintenant en partant de "
+"Si vous vouliez être sur une branche, créez-en une maintenant en partant de "
 "'Cet emprunt détaché'."
 
 #: lib/checkout_op.tcl:468 lib/checkout_op.tcl:472
@@ -1000,7 +1000,7 @@ msgstr ""
 "mis à jour avec succès, mais la mise à jour d'un fichier interne à Git a "
 "échouée.\n"
 "\n"
-"Cela n'aurait pas du se produire. %s va abandonner et se terminer."
+"Cela n'aurait pas dû se produire. %s va abandonner et se terminer."
 
 #: lib/choose_font.tcl:39
 msgid "Select"
@@ -1023,8 +1023,8 @@ msgid ""
 "This is example text.\n"
 "If you like this text, it can be your font."
 msgstr ""
-"C'est un texte d'exemple.\n"
-"Si vous aimez ce texte, vous pouvez choisir cette police"
+"Ceci est un texte d'exemple.\n"
+"Si vous aimez ce texte, vous pouvez choisir cette police."
 
 #: lib/choose_repository.tcl:28
 msgid "Git Gui"
@@ -1040,7 +1040,7 @@ msgstr "Nouveau..."
 
 #: lib/choose_repository.tcl:100 lib/choose_repository.tcl:465
 msgid "Clone Existing Repository"
-msgstr "Cloner dépôt existant"
+msgstr "Cloner un dépôt existant"
 
 #: lib/choose_repository.tcl:106
 msgid "Clone..."
@@ -1048,7 +1048,7 @@ msgstr "Cloner..."
 
 #: lib/choose_repository.tcl:113 lib/choose_repository.tcl:983
 msgid "Open Existing Repository"
-msgstr "Ouvrir dépôt existant"
+msgstr "Ouvrir un dépôt existant"
 
 #: lib/choose_repository.tcl:119
 msgid "Open..."
@@ -1056,17 +1056,17 @@ msgstr "Ouvrir..."
 
 #: lib/choose_repository.tcl:132
 msgid "Recent Repositories"
-msgstr "Dépôt récemment utilisés"
+msgstr "Dépôts récemment utilisés"
 
 #: lib/choose_repository.tcl:138
 msgid "Open Recent Repository:"
-msgstr "Ouvrir dépôt récent :"
+msgstr "Ouvrir un dépôt récent :"
 
 #: lib/choose_repository.tcl:302 lib/choose_repository.tcl:309
 #: lib/choose_repository.tcl:316
 #, tcl-format
 msgid "Failed to create repository %s:"
-msgstr "La création du dépôt %s a échouée :"
+msgstr "La création du dépôt %s a échoué :"
 
 #: lib/choose_repository.tcl:387
 msgid "Directory:"
@@ -1093,11 +1093,11 @@ msgstr "Cloner"
 
 #: lib/choose_repository.tcl:473
 msgid "Source Location:"
-msgstr "Emplacement source:"
+msgstr "Emplacement source :"
 
 #: lib/choose_repository.tcl:484
 msgid "Target Directory:"
-msgstr "Répertoire cible:"
+msgstr "Répertoire cible :"
 
 #: lib/choose_repository.tcl:496
 msgid "Clone Type:"
@@ -1137,7 +1137,7 @@ msgstr "L'emplacement %s existe déjà."
 
 #: lib/choose_repository.tcl:622
 msgid "Failed to configure origin"
-msgstr "La configuration de l'origine a échouée."
+msgstr "La configuration de l'origine a échoué."
 
 #: lib/choose_repository.tcl:634
 msgid "Counting objects"
@@ -1242,7 +1242,7 @@ msgstr "fichiers"
 
 #: lib/choose_repository.tcl:962
 msgid "Initial file checkout failed."
-msgstr "Chargement initial du fichier échoué."
+msgstr "Le chargement initial du fichier a échoué."
 
 #: lib/choose_repository.tcl:978
 msgid "Open"
@@ -1292,7 +1292,7 @@ msgstr "L'expression de révision est vide."
 
 #: lib/choose_rev.tcl:531
 msgid "Updated"
-msgstr "Mise-à-jour:"
+msgstr "Mise à jour:"
 
 #: lib/choose_rev.tcl:559
 msgid "URL"
@@ -1320,8 +1320,8 @@ msgid ""
 msgstr ""
 "Impossible de corriger pendant une fusion.\n"
 "\n"
-"Vous êtes actuellement au milieu d'une fusion qui n'a pas été completement "
-"terminée. Vous ne pouvez pas corriger le commit précédant sauf si vous "
+"Vous êtes actuellement au milieu d'une fusion qui n'a pas été complètement "
+"terminée. Vous ne pouvez pas corriger le commit précédent sauf si vous "
 "abandonnez la fusion courante.\n"
 
 #: lib/commit.tcl:49
@@ -1409,7 +1409,7 @@ msgstr ""
 #: lib/commit.tcl:211
 #, tcl-format
 msgid "warning: Tcl does not support encoding '%s'."
-msgstr "attention : Tcl ne supporte pas l'encodage '%s'."
+msgstr "attention : Tcl ne supporte pas le codage '%s'."
 
 #: lib/commit.tcl:227
 msgid "Calling pre-commit hook..."
@@ -1469,12 +1469,12 @@ msgstr "commit-tree a échoué :"
 
 #: lib/commit.tcl:373
 msgid "update-ref failed:"
-msgstr "update-ref a échoué"
+msgstr "update-ref a échoué :"
 
 #: lib/commit.tcl:461
 #, tcl-format
 msgid "Created commit %s: %s"
-msgstr "Commit créé %s : %s"
+msgstr "Commit %s créé : %s"
 
 #: lib/console.tcl:59
 msgid "Working... please wait..."
@@ -1581,24 +1581,24 @@ msgid ""
 "LOCAL: deleted\n"
 "REMOTE:\n"
 msgstr ""
-"LOCAL: supprimé\n"
-"DISTANT:\n"
+"LOCAL : supprimé\n"
+"DISTANT :\n"
 
 #: lib/diff.tcl:125
 msgid ""
 "REMOTE: deleted\n"
 "LOCAL:\n"
 msgstr ""
-"DISTANT: supprimé\n"
-"LOCAL:\n"
+"DISTANT : supprimé\n"
+"LOCAL :\n"
 
 #: lib/diff.tcl:132
 msgid "LOCAL:\n"
-msgstr "LOCAL:\n"
+msgstr "LOCAL :\n"
 
 #: lib/diff.tcl:135
 msgid "REMOTE:\n"
-msgstr "DISTANT:\n"
+msgstr "DISTANT :\n"
 
 #: lib/diff.tcl:197 lib/diff.tcl:296
 #, tcl-format
@@ -1624,7 +1624,7 @@ msgid ""
 "* Showing only first %d bytes.\n"
 msgstr ""
 "* Le fichier non suivi fait %d octets.\n"
-"* On montre seulement les premiers %d octets.\n"
+"* Seuls les %d premiers octets sont montrés.\n"
 
 #: lib/diff.tcl:228
 #, tcl-format
@@ -1635,7 +1635,7 @@ msgid ""
 msgstr ""
 "\n"
 "* Fichier suivi raccourcis ici de %s.\n"
-"* Pour voir le fichier entier, utiliser un éditeur externe.\n"
+"* Pour voir le fichier entier, utilisez un éditeur externe.\n"
 
 #: lib/diff.tcl:436
 msgid "Failed to unstage selected hunk."
@@ -1680,7 +1680,7 @@ msgstr "Vous devez corriger les erreurs suivantes avant de pouvoir commiter."
 
 #: lib/index.tcl:6
 msgid "Unable to unlock the index."
-msgstr "Impossible de dévérouiller l'index."
+msgstr "Impossible de déverrouiller l'index."
 
 #: lib/index.tcl:15
 msgid "Index Error"
@@ -1700,12 +1700,12 @@ msgstr "Continuer"
 
 #: lib/index.tcl:31
 msgid "Unlock Index"
-msgstr "Déverouiller l'index"
+msgstr "Déverrouiller l'index"
 
 #: lib/index.tcl:287
 #, tcl-format
 msgid "Unstaging %s from commit"
-msgstr "Désindexation de: %s"
+msgstr "Désindexation de : %s"
 
 #: lib/index.tcl:326
 msgid "Ready to commit."
@@ -1719,18 +1719,18 @@ msgstr "Ajout de %s"
 #: lib/index.tcl:396
 #, tcl-format
 msgid "Revert changes in file %s?"
-msgstr "Annuler les modifications dans le fichier %s ? "
+msgstr "Révoquer les modifications dans le fichier %s ? "
 
 #: lib/index.tcl:398
 #, tcl-format
 msgid "Revert changes in these %i files?"
-msgstr "Annuler les modifications dans ces %i fichiers ?"
+msgstr "Révoquer les modifications dans ces %i fichiers ?"
 
 #: lib/index.tcl:406
 msgid "Any unstaged changes will be permanently lost by the revert."
 msgstr ""
 "Toutes les modifications non-indexées seront définitivement perdues par "
-"l'annulation."
+"la révocation."
 
 #: lib/index.tcl:409
 msgid "Do Nothing"
@@ -1738,12 +1738,12 @@ msgstr "Ne rien faire"
 
 #: lib/index.tcl:427
 msgid "Reverting selected files"
-msgstr "Annuler modifications dans fichiers selectionnés"
+msgstr "Révocation en cours des fichiers selectionnés"
 
 #: lib/index.tcl:431
 #, tcl-format
 msgid "Reverting %s"
-msgstr "Annulation des modifications dans %s"
+msgstr "Révocation en cours de %s"
 
 #: lib/merge.tcl:13
 msgid ""
@@ -1804,11 +1804,11 @@ msgid ""
 msgstr ""
 "Vous êtes au milieu d'une modification.\n"
 "\n"
-"Le fichier %s est modifié.\n"
+"Le fichier %s a été modifié.\n"
 "\n"
 "Vous devriez terminer le commit courant avant de lancer une fusion. En "
 "faisait comme cela, vous éviterez de devoir éventuellement abandonner une "
-"fusion ayant échouée.\n"
+"fusion ayant échoué.\n"
 
 #: lib/merge.tcl:107
 #, tcl-format
@@ -1826,7 +1826,7 @@ msgstr "La fusion s'est faite avec succès."
 
 #: lib/merge.tcl:133
 msgid "Merge failed.  Conflict resolution is required."
-msgstr "La fusion a echouée. Il est nécessaire de résoudre les conflicts."
+msgstr "La fusion a echoué. Il est nécessaire de résoudre les conflits."
 
 #: lib/merge.tcl:158
 #, tcl-format
@@ -1914,16 +1914,16 @@ msgid ""
 "\n"
 "This operation can be undone only by restarting the merge."
 msgstr ""
-"Noter que le diff ne montre que les modifications en conflict.\n"
+"Noter que le diff ne montre que les modifications en conflit.\n"
 "\n"
 "%s sera écrasé.\n"
 "\n"
-"Cette opération ne peut être défaite qu'en relançant la fusion."
+"Cette opération ne peut être inversée qu'en relançant la fusion."
 
 #: lib/mergetool.tcl:45
 #, tcl-format
 msgid "File %s seems to have unresolved conflicts, still stage?"
-msgstr "Le fichier %s semble avoir des conflicts non résolus, indéxer quand même ?"
+msgstr "Le fichier %s semble avoir des conflits non résolus, indexer quand même ?"
 
 #: lib/mergetool.tcl:60
 #, tcl-format
@@ -1932,11 +1932,11 @@ msgstr "Ajouter une résolution pour %s"
 
 #: lib/mergetool.tcl:141
 msgid "Cannot resolve deletion or link conflicts using a tool"
-msgstr "Impossible de résoudre la suppression ou de relier des conflicts en utilisant un outil"
+msgstr "Impossible de résoudre la suppression ou de relier des conflits en utilisant un outil"
 
 #: lib/mergetool.tcl:146
 msgid "Conflict file does not exist"
-msgstr "Le fichier en conflict n'existe pas."
+msgstr "Le fichier en conflit n'existe pas."
 
 #: lib/mergetool.tcl:264
 #, tcl-format
@@ -1958,7 +1958,7 @@ msgid ""
 "Error retrieving versions:\n"
 "%s"
 msgstr ""
-"Erreur lors de la récupération des versions:\n"
+"Erreur lors de la récupération des versions :\n"
 "%s"
 
 #: lib/mergetool.tcl:343
@@ -1968,7 +1968,7 @@ msgid ""
 "\n"
 "%s"
 msgstr ""
-"Impossible de lancer l'outil de fusion:\n"
+"Impossible de lancer l'outil de fusion :\n"
 "\n"
 "%s"
 
@@ -1983,12 +1983,12 @@ msgstr "L'outil de fusion a échoué."
 #: lib/option.tcl:11
 #, tcl-format
 msgid "Invalid global encoding '%s'"
-msgstr "Encodage global invalide '%s'"
+msgstr "Codage global '%s' invalide"
 
 #: lib/option.tcl:19
 #, tcl-format
 msgid "Invalid repo encoding '%s'"
-msgstr "Encodage de dépôt invalide '%s'"
+msgstr "Codage de dépôt '%s' invalide"
 
 #: lib/option.tcl:117
 msgid "Restore Defaults"
@@ -2001,7 +2001,7 @@ msgstr "Sauvegarder"
 #: lib/option.tcl:131
 #, tcl-format
 msgid "%s Repository"
-msgstr "Dépôt: %s"
+msgstr "Dépôt : %s"
 
 #: lib/option.tcl:132
 msgid "Global (All Repositories)"
@@ -2069,7 +2069,7 @@ msgstr "Nouveau modèle de nom de branche"
 
 #: lib/option.tcl:155
 msgid "Default File Contents Encoding"
-msgstr "Encodage du contenu des fichiers par défaut"
+msgstr "Codage du contenu des fichiers par défaut"
 
 #: lib/option.tcl:203
 msgid "Change"
@@ -2098,11 +2098,11 @@ msgstr "Préférences"
 
 #: lib/option.tcl:314
 msgid "Failed to completely save options:"
-msgstr "La sauvegarde complète des options a échouée :"
+msgstr "La sauvegarde complète des options a échoué :"
 
 #: lib/remote.tcl:163
 msgid "Remove Remote"
-msgstr "Supprimer dépôt distant"
+msgstr "Supprimer un dépôt distant"
 
 #: lib/remote.tcl:168
 msgid "Prune from"
@@ -2118,11 +2118,11 @@ msgstr "Pousser vers"
 
 #: lib/remote_add.tcl:19
 msgid "Add Remote"
-msgstr "Ajouter dépôt distant"
+msgstr "Ajouter un dépôt distant"
 
 #: lib/remote_add.tcl:24
 msgid "Add New Remote"
-msgstr "Ajouter nouveau dépôt distant"
+msgstr "Ajouter un nouveau dépôt distant"
 
 #: lib/remote_add.tcl:28 lib/tools_dlg.tcl:36
 msgid "Add"
@@ -2134,7 +2134,7 @@ msgstr "Détails des dépôts distants"
 
 #: lib/remote_add.tcl:50
 msgid "Location:"
-msgstr "Emplacement:"
+msgstr "Emplacement :"
 
 #: lib/remote_add.tcl:62
 msgid "Further Action"
@@ -2146,7 +2146,7 @@ msgstr "Récupérer immédiatement"
 
 #: lib/remote_add.tcl:71
 msgid "Initialize Remote Repository and Push"
-msgstr "Initialiser dépôt distant et pousser"
+msgstr "Initialiser un dépôt distant et pousser"
 
 #: lib/remote_add.tcl:77
 msgid "Do Nothing Else Now"
@@ -2193,7 +2193,7 @@ msgstr "Mise en place de %s (à %s)"
 
 #: lib/remote_branch_delete.tcl:29 lib/remote_branch_delete.tcl:34
 msgid "Delete Branch Remotely"
-msgstr "Supprimer branche à distance"
+msgstr "Supprimer une branche à distance"
 
 #: lib/remote_branch_delete.tcl:47
 msgid "From Repository"
@@ -2244,7 +2244,7 @@ msgid ""
 "One or more of the merge tests failed because you have not fetched the "
 "necessary commits.  Try fetching from %s first."
 msgstr ""
-"Une ou plusieurs des tests de fusion ont échoués parce que vous n'avez pas "
+"Un ou plusieurs des tests de fusion ont échoué parce que vous n'avez pas "
 "récupéré les commits nécessaires. Essayez de récupéré à partir de %s d'abord."
 
 #: lib/remote_branch_delete.tcl:207
@@ -2257,14 +2257,14 @@ msgid ""
 "\n"
 "Delete the selected branches?"
 msgstr ""
-"Récupérer des branches supprimées est difficile.\n"
+"Il est difficile de récupérer des branches supprimées.\n"
 "\n"
-"Souhaitez vous supprimer les branches sélectionnées ?"
+"Supprimer les branches sélectionnées ?"
 
 #: lib/remote_branch_delete.tcl:226
 #, tcl-format
 msgid "Deleting branches from %s"
-msgstr "Supprimer les branches de %s"
+msgstr "Suppression des branches de %s"
 
 #: lib/remote_branch_delete.tcl:286
 msgid "No repository selected."
@@ -2285,7 +2285,7 @@ msgstr "Suivant"
 
 #: lib/search.tcl:24
 msgid "Prev"
-msgstr "Précédant"
+msgstr "Précédent"
 
 #: lib/search.tcl:25
 msgid "Case-Sensitive"
@@ -2293,7 +2293,7 @@ msgstr "Sensible à la casse"
 
 #: lib/shortcut.tcl:20 lib/shortcut.tcl:61
 msgid "Cannot write shortcut:"
-msgstr "Impossible d'écrire le raccourcis :"
+msgstr "Impossible d'écrire le raccourci :"
 
 #: lib/shortcut.tcl:136
 msgid "Cannot write icon:"
@@ -2318,7 +2318,7 @@ msgstr "Réinitialisation du dictionnaire à %s."
 
 #: lib/spellcheck.tcl:73
 msgid "Spell checker silently failed on startup"
-msgstr "La vérification d'orthographe a échouée silentieusement au démarrage"
+msgstr "La vérification d'orthographe a échoué silencieusement au démarrage"
 
 #: lib/spellcheck.tcl:80
 msgid "Unrecognized spell checker"
@@ -2351,11 +2351,11 @@ msgstr "Générer une clé"
 
 #: lib/sshkey.tcl:56
 msgid "Copy To Clipboard"
-msgstr "Copier dans le presse papier"
+msgstr "Copier dans le presse-papier"
 
 #: lib/sshkey.tcl:70
 msgid "Your OpenSSH Public Key"
-msgstr "Votre clé publique Open SSH"
+msgstr "Votre clé publique OpenSSH"
 
 #: lib/sshkey.tcl:78
 msgid "Generating..."
@@ -2368,7 +2368,7 @@ msgid ""
 "\n"
 "%s"
 msgstr ""
-"Impossible de lancer ssh-keygen:\n"
+"Impossible de lancer ssh-keygen :\n"
 "\n"
 "%s"
 
@@ -2398,7 +2398,7 @@ msgstr "Lancer %s nécessite qu'un fichier soit sélectionné."
 #: lib/tools.tcl:90
 #, tcl-format
 msgid "Are you sure you want to run %s?"
-msgstr "Êtes vous sûr de vouloir lancer %s ?"
+msgstr "Êtes-vous sûr de vouloir lancer %s ?"
 
 #: lib/tools.tcl:110
 #, tcl-format
@@ -2422,11 +2422,11 @@ msgstr "L'outil a échoué : %s"
 
 #: lib/tools_dlg.tcl:22
 msgid "Add Tool"
-msgstr "Ajouter outil"
+msgstr "Ajouter un outil"
 
 #: lib/tools_dlg.tcl:28
 msgid "Add New Tool Command"
-msgstr "Ajouter nouvelle commande d'outil"
+msgstr "Ajouter une nouvelle commande d'outil"
 
 #: lib/tools_dlg.tcl:33
 msgid "Add globally"
@@ -2438,7 +2438,7 @@ msgstr "Détails sur l'outil"
 
 #: lib/tools_dlg.tcl:48
 msgid "Use '/' separators to create a submenu tree:"
-msgstr "Utiliser les séparateurs '/' pour créer un arbre de sous menus :"
+msgstr "Utiliser les séparateurs '/' pour créer un arbre de sous-menus :"
 
 #: lib/tools_dlg.tcl:61
 msgid "Command:"
@@ -2479,7 +2479,7 @@ msgid ""
 "Could not add tool:\n"
 "%s"
 msgstr ""
-"Impossible d'ajouter l'outil:\n"
+"Impossible d'ajouter l'outil :\n"
 "%s"
 
 #: lib/tools_dlg.tcl:190
-- 
1.6.2

^ permalink raw reply related

* Re: Ability to edit message from git rebase --interactive.
From: Marcel M. Cary @ 2009-03-18 21:02 UTC (permalink / raw)
  To: Michael J Gruber
  Cc: Marcel M. Cary, Sverre Rabbelier, Junio C Hamano, Jeff King,
	Johannes Schindelin, Olivier Goffart, git@vger.kernel.org
In-Reply-To: <49C10A97.6060201@oak.homeunix.org>

Marcel M. Cary wrote:
> Michael J Gruber wrote:
>> Sverre Rabbelier venit, vidit, dixit 18.03.2009 06:42:
>>> Heya,
>>>
>>> On Wed, Mar 18, 2009 at 02:06, Junio C Hamano <gitster@pobox.com> wrote:
>>>> Jeff King <peff@peff.net> writes:
>>>> I am not quite sure what rephrase is buying us.  Do we also want to
>>>> introduce retree that allows you to muck with the tree object recorded
>>>> without giving you a chance to clobber the commit log message?
>>> Is that a common operation? Rephrase is, at least to me...
>>>
>> Rephrase for sure is common, and for sure can be done currently... It's
>> only that "commit --amend, save&quit, continue" could be shortened.
>>
>> OTOH: Most commonly one would want to rephrase a commit message or two
>> without actually rebasing anything. And the proposed change doesn't help
>> as much as it could, in two respects:
>>
>> 1) I want to be able to say "rephrase HEAD~2" without having to edit a
>> rebase action script. (That would be useful for rewriting a single
>> commit as well, and could be added easily.)
>>
>> 2) Currently, all rebasing operations have trouble with merges. But if
>> all I want to do is rephrasing a log message then no diff/apply is
>> necessary, no rewriting of trees, no change in the DAG structure (i.e.
>> connectivity; sha1s change, of course). So there should be a special
>> mode for DAG-preserving rewrites, where one can be sure that merges are
>> fully preserved.
>>
>> 2) seems to be the most important point to make rephrasing safe and
>> convenient.
> 
> Interesting points about skipping the action script and preserving
> structure.  I just tried to do something like that with filter-branch:
> 
> git filter-branch --msg-filter 'cat > tmp;  $EDITOR tmp < '$(tty)' >
> '$(tty)' 2>&1; cat tmp' ^HEAD^ HEAD
> 
> And discovered that it will neither accept "HEAD^^..HEAD^" nor "HEAD^"
> as a shortcut for a rev-list containing a single commit.  But if you're
> content to save and quit each message through the branch tip and specify
> the range, it seems to work.
> 
> I have no idea what it would take to make filter-branch support the
> additional kinds of rev and rev list specifications, or if that would be
> undesirable.
> 
> I'm assuming it accomplishes (2) because of the nature of filter-branch.

Ok, so I guess you have to explicity tell filter-branch all the commits 
that reach the ones you want to rewrite so it will know to fixup their 
parents.  Below is a rough way of doing that, but sometimes it will find 
too many commits, and it's rather slow, even on a git.git.

git-rephrase:
#!/bin/sh

if [ -z "$EDITOR" ]; then
     export EDITOR=vim
fi
# Does change tags
refs=$(git for-each-ref --format='%(refname)' 'refs/heads/*' |
     while read ref; do
         # This is the slow part
         if git rev-list $ref | grep -q $(git rev-parse --verify $1); then
             echo $ref
         else
             echo ^$ref
         fi;
     done
)
parents=$(git rev-list --max-count=1 --parents $1 | {
     read hash parents
     for hash in $parents; do
         echo ^$hash
     done
})
git filter-branch --msg-filter "
     if [ \$GIT_COMMIT = $(git rev-parse $1) ]; then
         cat > tmp
         \$EDITOR tmp < $(tty) > $(tty) 2>&1
         cat tmp
     else
         cat
     fi
" $refs $parents

^ permalink raw reply

* Re: [EGIT RFC PATCH(was Re: egit problem with sym linked eclipse project dirs)] Add some support for symlinked projects.
From: Robin Rosenberg @ 2009-03-18 21:09 UTC (permalink / raw)
  To: Stephen Bannasch; +Cc: Shawn O. Pearce, git
In-Reply-To: <p06240820c5e6c6a7d62a@[63.138.152.192]>

onsdag 18 mars 2009 17:02:15 skrev Stephen Bannasch <stephen.bannasch@deanbrook.org>:
> At 7:56 AM +0100 3/12/09, Robin Rosenberg wrote:
> >torsdag 12 mars 2009 03:57:09 skrev Stephen Bannasch 
> ><stephen.bannasch@deanbrook.org>:
> >>  OK ... I'm a bit confused now because I no longer have Git listed as
> >>  a repository type for Team Sharing.
> >>
> >  > I deleted the existing org.spearce.* eclipse plugins
> 
> ...
> 
> >  > The new plugins are there:
> >>
> >>     [eclipse]$ ls plugins/org.spearce.*
> >>     plugins/org.spearce.egit.core.test_0.4.0.200903112237.jar
> >>     plugins/org.spearce.egit_0.4.0.200903112237.jar
> >>     plugins/org.spearce.egit.core_0.4.0.200903112237.jar
> >>     plugins/org.spearce.jgit_0.4.0.200903112237.jar
> >>     plugins/org.spearce.egit.ui_0.4.0.200903112237.jar
> >>
> >>  Quit and restarted Eclipse.
> >>
> >>  When I select a project with an existing git repository and try to
> >>  enable team/sharing only CVS and SVN are listed.
> >
> >You don't have the a matching feature. That could be it, but I'm not sure.
> >You can also try starting eclipse witth the -clean switch. Looking at the
> ><workspace>/.metadata/.log could also give you some hints.
> 
> I figured out the problem I had when testing the patched egit plugin. 
> If I had installed egit from the update site I had to do more than 
> just delete the jars -- I had to delete the whole feature from within 
> Eclipse -- and then install the new plugin built from source.
> 
> In figuring this out I ended up testing the original problem with the 
> master branch from earlier today and didn't see the issue I 
> originally reported.
> 
> Did you already integrate the experimental patch?
> 
> Here's a documentation patch:
> 
>  From feb1ae0ccf7f671506853f4f49e9041950404b3d Mon Sep 17 00:00:00 2001
> From: Stephen Bannasch <stephen.bannasch@gmail.com>
> Date: Wed, 18 Mar 2009 11:51:56 -0400
> Subject: [PATCH] clarify how to delete egit plugin when installing new build

Thanks. Deleteing from the update manager deletes the feature from the features
directory plus configuration data.

> >For debugging/testing in general it is often easier to launch Eclipse from
> >eclipse (Run As) without reinstalling.
> 
> As part of this test I need to switch to another workspace and I 
> couldn't get that working with "Run As".

I do it all the time. Come to think of it, just selecting Run As requires that an appropriate
plugin project is selected in the package explorer. Select the org.spearce.egit.ui project
and then Run As > Eclipse Application. You can modify which workspace to open in
the launch configuration. If you want to work on an existing workspace you have to 
modify the launch configuration since the launched eclipse won't let you (maybe it
does, but not by default).

-- robin

^ permalink raw reply

* [PATCH] Introduce %<branch> as shortcut to the tracked branch
From: Johannes Schindelin @ 2009-03-18 21:12 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Andreas Gruenbacher, git
In-Reply-To: <20090318182603.GM8940@machine.or.cz>


Suggested by Pasky.

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

	On Wed, 18 Mar 2009, Petr Baudis wrote:

	> On Wed, Mar 18, 2009 at 02:48:50PM +0100, Andreas Gruenbacher wrote:
	> > I often want to see what the differences are between a local 
	> > branch and the branch it tracks (if it tracks a branch). I
	> > currently do something like "git log master..origin/master". 
	> > This is a lot of unnecessary typing though compared to something
	> > like "git log -t master", or even "git log -t" when on the 
	> > master branch.
	> 
	> sorry, I think Git can't do anything like this either. :-(
	> 
	> However, I think something like this would be useful and 
	> probably easy to do? Maybe someone on the list will get inspired to 
	> implement a special refspec character to represent the "tracked
	> branch" relationship, so e.g. %master would expand to 
	> %origin/master. Then you should be able to do something like:
	> 
	> 	git log %..

	Great idea!

 sha1_name.c |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/sha1_name.c b/sha1_name.c
index a96ca8b..1a77b20 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -6,6 +6,7 @@
 #include "tree-walk.h"
 #include "refs.h"
 #include "cache-tree.h"
+#include "remote.h"
 
 static int find_short_object_filename(int len, const char *name, unsigned char *sha1)
 {
@@ -241,9 +242,10 @@ static int ambiguous_path(const char *path, int len)
 
 /*
  * *string and *len will only be substituted, and *string returned (for
- * later free()ing) if the string passed in is of the form @{-<n>}.
+ * later free()ing) if the string passed in is of the form @{-<n>} or
+ * of the form %<branch>.
  */
-static char *substitute_nth_last_branch(const char **string, int *len)
+static char *substitute_branch(const char **string, int *len)
 {
 	struct strbuf buf = STRBUF_INIT;
 	int ret = interpret_nth_last_branch(*string, &buf);
@@ -255,12 +257,24 @@ static char *substitute_nth_last_branch(const char **string, int *len)
 		return (char *)*string;
 	}
 
+	if (**string == '%') {
+		int ours, theirs;
+		struct branch *tracking = branch_get((*string)[1] ?
+			(*string) + 1 : NULL);
+
+		if (tracking->merge && tracking->merge[0]->dst) {
+			*string = xstrdup(tracking->merge[0]->dst);
+			*len = strlen(*string);
+			return (char *)*string;
+		}
+	}
+
 	return NULL;
 }
 
 int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref)
 {
-	char *last_branch = substitute_nth_last_branch(&str, &len);
+	char *last_branch = substitute_branch(&str, &len);
 	const char **p, *r;
 	int refs_found = 0;
 
@@ -289,7 +303,7 @@ int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref)
 
 int dwim_log(const char *str, int len, unsigned char *sha1, char **log)
 {
-	char *last_branch = substitute_nth_last_branch(&str, &len);
+	char *last_branch = substitute_branch(&str, &len);
 	const char **p;
 	int logs_found = 0;
 
-- 
1.6.2.1.422.g885ce.dirty

^ permalink raw reply related

* Re: [EGIT RFC PATCH(was Re: egit problem with sym linked eclipse project dirs)] Add some support for symlinked projects.
From: Robin Rosenberg @ 2009-03-18 21:10 UTC (permalink / raw)
  To: Stephen Bannasch; +Cc: Shawn O. Pearce, git
In-Reply-To: <p06240820c5e6c6a7d62a@[63.138.152.192]>

onsdag 18 mars 2009 17:02:15 skrev Stephen Bannasch <stephen.bannasch@deanbrook.org>:
> In figuring this out I ended up testing the original problem with the 
> master branch from earlier today and didn't see the issue I 
> originally reported.
> 
> Did you already integrate the experimental patch?

No, so maybe you are running the plugin + the experimental patch
anyway.

-- robim

^ permalink raw reply

* Re: Local clone checks out wrong branch based on remote HEAD
From: Jay Soffian @ 2009-03-18 21:11 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Jeff King, Tom Preston-Werner, git
In-Reply-To: <49C0C769.8020401@drmicha.warpmail.net>

On Wed, Mar 18, 2009 at 6:05 AM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> One might even argue that in case of ambiguities, checking out a
> detached head would be most appropriate. Really, why impose creation of
> certain local branches on a user at all, unless asked for? Detached
> heads are natural in git! But I don't really expect positive consensus
> on that one...

Shirley, you must be joking. :-)

I think there are two reasonable paths forward:

1) Address Jeff's concerns above so that the symref can be sent.
2) In lieu of (1), have clone at least warn that multiple branches
match and that it just picked one.

j.

^ permalink raw reply

* Re: [PATCH v2 2/3] document --force-rebase
From: Johannes Schindelin @ 2009-03-18 21:15 UTC (permalink / raw)
  To: Michele Ballabio; +Cc: gitster, git
In-Reply-To: <1237409619-4229-1-git-send-email-barra_cuda@katamail.com>

Hi,

On Wed, 18 Mar 2009, Michele Ballabio wrote:

> Words by Junio.

Okay, but who arranged it?  And who wrote the melody in the first place?

Ciao,
Dscho

P.S.: :-)

^ permalink raw reply

* Re: Google Summer of Code 2009 - Accepted!
From: Johannes Schindelin @ 2009-03-18 21:21 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20090318205935.GH23521@spearce.org>

Hi,

On Wed, 18 Mar 2009, Shawn O. Pearce wrote:

> Google has announced the selected organizations for GSoC 2009:
> 
>   http://socghop.appspot.com/program/accepted_orgs/google/gsoc2009
> 
> Students interested in applying should look at Git's ideas list,
> or any other accepted org's ideas list:
> 
>   http://git.or.cz/gitwiki/SoC2009Ideas
> 
> 
> Mentors for Git are really needed.  I'm going to be too busy this
> summer to mentor a student myself.  If we have no mentors, we'll
> have to pull out late, upsetting everyone, including my boss,
> and worse, LH.

I think you need not be scared of a mentor shortage.  In any case, I am 
available.

Ciao,
Dscho

^ permalink raw reply

* Missing trailing newline with git log --pretty=format
From: Andreas Gruenbacher @ 2009-03-18 21:23 UTC (permalink / raw)
  To: git

Hello,

with the latest version of git from right now (e986ceb):

While trying to get a reverse list of commit ids, I noticed that git log 
prints newlines between commits, but not at the end. This results in two 
joined lines with:

	$ git log --pretty=format:%h HEAD^^..HEAD | tac
	aab3b9a7d4e3a7
	e986ceb

Any chance of getting this fixed?

Thanks,
Andreas

^ 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