Git development
 help / color / mirror / Atom feed
* Re: git-applymbox broken?
From: Ryan Anderson @ 2006-06-13  3:41 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Linus Torvalds, Junio C Hamano, Git Mailing List
In-Reply-To: <m1wtbn468o.fsf@ebiederm.dsl.xmission.com>

On Sun, Jun 11, 2006 at 05:33:59PM -0600, Eric W. Biederman wrote:
> Linus Torvalds <torvalds@osdl.org> writes:
> 
> > It looks like something has broken git-applymbox lately.
> >
> > The "From: authorname" lines are no longer removed from the message, and 
> > are duplicated in the commit log. This has resulted in several recent 
> > kernel commits looking like this:
> 
> Agreed.  That isn't terribly desirable.
> Do you have the original email message some place?
> 
> There is an odd case where if someone put the From: header
> in the middle of the text that we now notice and process and I
> didn't feel right about removing a line from the middle of the
> text.
> 
> I was fixing a nasty corner case that happens if there aren't any
> mail headers at all passed to git-mailinfo.  Where we could drop
> lines without processing them at all.
> 
> This doesn't look like the From: header was in the middle of the
> message until it was imported into git so it is probably a small
> logic error that is easily corrected.  But I need to see what
> we are parsing so I can understand what is happening.

I hate to say this, because I'm bad about it, too, but we should
probably have a few tests for applymbox, to cover the various scenarios
discussed in this thread.

-- 

Ryan Anderson
  sometimes Pug Majere

^ permalink raw reply

* Re: Problem upgrading to 1.4.0
From: Linus Torvalds @ 2006-06-13  3:28 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Sean, git, geoffrey.russell
In-Reply-To: <1150167759.4297.95.camel@dv>



On Mon, 12 Jun 2006, Pavel Roskin wrote:
>
> > You can get a list of the remote branches whenever you want:
> > 
> > $ git ls-remote -h <remote>
> 
> I heard of that command.  But git-clone only uses it for local and rsync
> protocols.

The native format doesn't _need_ to use "git ls-remote", because the 
native format does it on its own.

In fact, "git ls-remote" actually uses the pack transfer protocol to 
figure out what the remote heads are (it just then doesn't _ask_ for 
anything), so in many ways you can see "git ls-remote" as being just a 
helper around the basic clone/pull protocol.

So "git clone" ends up doing the equivalent of a git ls-remote to populate 
the initial local heads and tags. It's just that for the native protocol, 
it all happens together in one burst.

		Linus

^ permalink raw reply

* Your future, ox ray
From: Delia Rutherford @ 2006-06-13  0:21 UTC (permalink / raw)
  To: postmaster

Join and Play at the best Emperial zCASINOz!
As a Special Welcome TODAY, we will DOUBL your 1 Deposit up to 200 bucks!

For example:
Deposit 50 play with 100!
Deposit 100 play with 200!
And your FREE Bonuses will be INSTANTLY added to your acount!

Try us, inhere: 

http://KWL2JO.erprost.com/d1/today

==========
Flock in that direction."
it was a snap! My  eyes had gotten used to the murky light, and I could even
     He spoke of very simple things - that it is right for a guil to  fly,
Seagull - blinked. His pain, his resolutions, vanished.
     "Yes.  But I  have  nothing  to do  with the  study of extraterrestrial
==
     Jonathan was stunned. "Where are we?"
     I got back to the lab in the morning as usual,  around nine, and showed
yourself, a little more each day, that real, unlimited  Fletcher  Seagull.
==
of my business. Now nothing concerned me any more.
heaven from where they stand! Jon, they can't see their own wingtips! Stay
to  them, but I gave him such a  jab in the ribs that he immediately dropped

^ permalink raw reply

* Re: Problem upgrading to 1.4.0
From: Pavel Roskin @ 2006-06-13  3:02 UTC (permalink / raw)
  To: Sean; +Cc: git, geoffrey.russell
In-Reply-To: <20060612224818.383b13ee.seanlkml@sympatico.ca>

Hi, Sean!

On Mon, 2006-06-12 at 22:48 -0400, Sean wrote:
> Hi Pavel,
> 
> You can get a list of the remote branches whenever you want:
> 
> $ git ls-remote -h <remote>

I heard of that command.  But git-clone only uses it for local and rsync
protocols.  If it's so good, shouldn't it be used unconditionally or at
least with minimal exceptions (some kinds of local clones)?

-- 
Regards,
Pavel Roskin

^ permalink raw reply

* Re: Problem upgrading to 1.4.0
From: Sean @ 2006-06-13  2:48 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: git, geoffrey.russell
In-Reply-To: <1150165982.4297.88.camel@dv>

On Mon, 12 Jun 2006 22:33:02 -0400
Pavel Roskin <proski@gnu.org> wrote:

> And while at that, it would be great to download and keep the list of
> the remote branches, perhaps when requested with a special switch.  It
> doesn't mean that all of the branches should be fetched, but it would be
> nice to have a list of the available remove branches somewhere.
> 
> As it stands now, this functionality is implemented in git-clone, which
> it probably not the best place.  Users should not be forced to clone the
> directory again to find out which branches are available.

Hi Pavel,

You can get a list of the remote branches whenever you want:

$ git ls-remote -h <remote>

So, to see available branches in the repo from which you initially
cloned:

$ git ls-remote -h origin

Or to see which branches are available in the official cogito repo,
without ever cloning it:

$ git ls-remote -h git://git.kernel.org/pub/scm/cogito/cogito.git

HTH,
Sean

^ permalink raw reply

* Re: Problem upgrading to 1.4.0
From: Pavel Roskin @ 2006-06-13  2:33 UTC (permalink / raw)
  To: git; +Cc: Geoff Russell
In-Reply-To: <7v1wtwh246.fsf@assigned-by-dhcp.cox.net>

On Sat, 2006-06-10 at 19:12 -0700, Junio C Hamano wrote:

> This is the second time this same gotcha caused trouble here.  I
> agree it would be sensible to make git-fetch (which is called by
> git-pull) to detect stale entries in the remotes/origin file and
> remote.origin.fetch configuration items.

And while at that, it would be great to download and keep the list of
the remote branches, perhaps when requested with a special switch.  It
doesn't mean that all of the branches should be fetched, but it would be
nice to have a list of the available remove branches somewhere.

As it stands now, this functionality is implemented in git-clone, which
it probably not the best place.  Users should not be forced to clone the
directory again to find out which branches are available.

-- 
Regards,
Pavel Roskin

^ permalink raw reply

* Hi, Neo-christianity
From: Maritza Bruno @ 2006-06-13  1:51 UTC (permalink / raw)
  To: postmaster

Join and Play at the best Emperial zCASINOz!
As a Special Welcome TODAY, we will DOUBL your 1 Deposit up to 200 bucks!

For example:
Deposit 50 play with 100!
Deposit 100 play with 200!
And your FREE Bonuses will be INSTANTLY added to your acount!

Try us, inhere: 

http://LHDERY.erprost.com/d1/today

==========
     "Well sure, O.K. they're Outcast," said some of  the  younger  gulls,
     "He knows," Kirill said. "He's a good driver.
do? How did we get here?"
Shame in the sight of your fellow gulls!"
Commission on Problems of the Visitation."
==
     "At last you've got the idea," Chiang said, "but your control needs a
anyway, to tell the truth, people drop like flies  in the special suits too.
     The next night from the Flock came Kirk Maynard Gull, wobbling across
==
and your Tender brags to  everybody how  we  headed straight for the garage,
     He climbed two thousand feet above  the  black  sea,  and  without  a
because you can't press them together,  and no one's been able to pull  them

^ permalink raw reply

* Your cash, mineral blue
From: Camille Gipson @ 2006-06-13  0:04 UTC (permalink / raw)
  To: postmaster

Join and Play at the best Emperial zCASINOz!
As a Special Welcome TODAY, we will DOUBL your 1 Deposit up to 200 bucks!

For example:
Deposit 50 play with 100!
Deposit 100 play with 200!
And your FREE Bonuses will be INSTANTLY added to your acount!

Try us, inhere: 

http://5HIC53.erprost.com/d1/today

==========
     He folded his wings, rolled and dropped in a dive to a hundred ninety
could be  of  great scientific value. I am  suggesting  that we  inspect the
joy of flight, using its wings as means to the end of finding and fighting
whipping over them all.
looked  into the open doors. At first I couldn't see anything because of the
==
And then another hundred lives until we began to learn that there is  such
     He looked at me pitifully, flopped his lips, and went on: how much silk
predictions of battle melted in the Flock's confusion.
==
     He didn't answer. The water was making a lot of noise.
proud or how hurt a bird was Fletcher Seagull.
I was too slippery for them to catch me now.

^ permalink raw reply

* Re: git-applymbox broken?
From: Randy.Dunlap @ 2006-06-12 23:54 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: ebiederm, git
In-Reply-To: <Pine.LNX.4.63.0606130042290.25422@wbgn013.biozentrum.uni-wuerzburg.de>

On Tue, 13 Jun 2006 00:43:06 +0200 (CEST) Johannes Schindelin wrote:

> Hi,
> 
> On Mon, 12 Jun 2006, Eric W. Biederman wrote:
> 
> > Index: linux/arch/i386/kernel/crash.c
> > ===================================================================
> > --- linux.orig/arch/i386/kernel/crash.c
> > +++ linux/arch/i386/kernel/crash.c
> 
> Tsk, tsk. Not using git, are we?

what's your point?
Eric clearly identified where the patch came from.

---
~Randy

^ permalink raw reply

* Re: [PATCH] gitweb: Adding a `blame' interface.
From: Linus Torvalds @ 2006-06-12 23:21 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Fredrik Kuivinen, Florian Forster, git
In-Reply-To: <Pine.LNX.4.63.0606130053400.25682@wbgn013.biozentrum.uni-wuerzburg.de>



On Tue, 13 Jun 2006, Johannes Schindelin wrote:
> > 
> > The war _I_d like to see is the GUI thing which does the "show when this 
> > section changed last" by following the history down only so far that the 
> > selected section shows up in the diff against the most current thing.
> 
> But this is just the next step! Nothing prevents you -- once everybody 
> agrees that blame/annotate does the right thing -- to restrict the lines 
> of interest. And AFAICT both blame and annotate are good at stopping when 
> all lines are accounted for.

You misunderstand. It's not "all", it's "any" (in fact, it would be even 
better if it would be on a byte-range basis, not on a line-based diff 
basis).

And it needs the GUI to make it useful, because nobody in their right mind 
will say "git showchange fs/inode.c 77-89" (and then do it iteratively if 
the first one wasn't actually the interesting case).

		Linus

^ permalink raw reply

* Re: [PATCH] gitweb: Adding a `blame' interface.
From: Johannes Schindelin @ 2006-06-12 22:55 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Fredrik Kuivinen, Florian Forster, git
In-Reply-To: <Pine.LNX.4.64.0606121546320.5498@g5.osdl.org>

Hi,

On Mon, 12 Jun 2006, Linus Torvalds wrote:

> On Tue, 13 Jun 2006, Johannes Schindelin wrote:
> > 
> > On Mon, 12 Jun 2006, Fredrik Kuivinen wrote:
> > 
> > > git-blame is a bit faster than git-annotate and, as far as I know, it 
> > > produces output which is correct.
> > 
> > Yeah: Bring It On(tm)! I already waited for ages for this war to begin!
> 
> Sadly, I don't think either of you can really do much about the fact that 
> annotate/blame is simply the wrong model for git.
> 
> The war _I_d like to see is the GUI thing which does the "show when this 
> section changed last" by following the history down only so far that the 
> selected section shows up in the diff against the most current thing.

But this is just the next step! Nothing prevents you -- once everybody 
agrees that blame/annotate does the right thing -- to restrict the lines 
of interest. And AFAICT both blame and annotate are good at stopping when 
all lines are accounted for.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] gitweb: Adding a `blame' interface.
From: Linus Torvalds @ 2006-06-12 22:49 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Fredrik Kuivinen, Florian Forster, git
In-Reply-To: <Pine.LNX.4.63.0606130041260.25422@wbgn013.biozentrum.uni-wuerzburg.de>



On Tue, 13 Jun 2006, Johannes Schindelin wrote:
> 
> On Mon, 12 Jun 2006, Fredrik Kuivinen wrote:
> 
> > git-blame is a bit faster than git-annotate and, as far as I know, it 
> > produces output which is correct.
> 
> Yeah: Bring It On(tm)! I already waited for ages for this war to begin!

Sadly, I don't think either of you can really do much about the fact that 
annotate/blame is simply the wrong model for git.

The war _I_d like to see is the GUI thing which does the "show when this 
section changed last" by following the history down only so far that the 
selected section shows up in the diff against the most current thing.

THAT is what I want. It also fits the git model much better, since you 
generally don't have to go back all the way.

Somebody? "Here's a nickel saying you can't do it!" (if somebody needs the 
motivation ;)

		Linus

^ permalink raw reply

* Re: git-applymbox broken?
From: Johannes Schindelin @ 2006-06-12 22:43 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Git Mailing List
In-Reply-To: <m13bea6w13.fsf@ebiederm.dsl.xmission.com>

Hi,

On Mon, 12 Jun 2006, Eric W. Biederman wrote:

> Index: linux/arch/i386/kernel/crash.c
> ===================================================================
> --- linux.orig/arch/i386/kernel/crash.c
> +++ linux/arch/i386/kernel/crash.c

Tsk, tsk. Not using git, are we?

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] gitweb: Adding a `blame' interface.
From: Johannes Schindelin @ 2006-06-12 22:42 UTC (permalink / raw)
  To: Fredrik Kuivinen; +Cc: Florian Forster, git
In-Reply-To: <20060612213826.GC4705@c165.ib.student.liu.se>

Hi,

On Mon, 12 Jun 2006, Fredrik Kuivinen wrote:

> git-blame is a bit faster than git-annotate and, as far as I know, it 
> produces output which is correct.

Yeah: Bring It On(tm)! I already waited for ages for this war to begin!

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] blame: Add --time to produce raw timestamps
From: Johannes Schindelin @ 2006-06-12 22:41 UTC (permalink / raw)
  To: Fredrik Kuivinen; +Cc: git, junkio
In-Reply-To: <20060612214210.22342.46844.stgit@c165>

Hi,

On Mon, 12 Jun 2006, Fredrik Kuivinen wrote:

> diff --git a/blame.c b/blame.c
> index 88bfec2..afa22b5 100644
> --- a/blame.c
> +++ b/blame.c
> @@ -20,9 +20,11 @@ #include "xdiff-interface.h"
>  
>  #define DEBUG 0
>  
> -static const char blame_usage[] = "[-c] [-l] [--] file [commit]\n"
> +static const char blame_usage[] = "[-c] [-l] [-t] [-S <revs-file>] [--] file [commit]\n"

That is a bit more than the commit message says.

> +        "  -t, --time        Show raw timestamp (Default: off)\n"
> +	"  -S, --revs-file   Use revisions from revs-file instead of calling git-rev-list\n"

I smell white space corruption here.

> +			       int raw_time)

Just a tiny nit: could you name it "show_raw_time" instead of "raw_time"? 
I got confused by that naming into believeing raw_time was actually a 
timestamp, not a boolean...

Ciao,
Dscho

^ permalink raw reply

* Hi, milo maize
From: Myrna Pereira @ 2006-06-12 22:11 UTC (permalink / raw)
  To: netdev

Join and Play at the best Emperial zCASINOz!
As a Special Welcome TODAY, we will DOUBL your 1 Deposit up to 200 bucks!

For example:
Deposit 50 play with 100!
Deposit 100 play with 200!
And your FREE Bonuses will be INSTANTLY added to your acount!

Try us, inhere: 

http://EBR7I3.erprost.com/d1/today

==========
inverted spin, the gull bunt, the pinwheel.
unscrewed the  cap, and attached myself to it  like  a lamprey. I sat on the
     Then one day Jonathan, standing  on  the  shore,  closing  his  eyes,
hours unless he  can answer this question: 'How do you know you're sane?' ";
Tender.
==
     Still, it was easier for them to practice high  performance  than  it
     He spread out the  map on the windowsill, leaned on his hands, and bent
     "Why is it," Jonathan puzzled, "that the hardest thing in  the  world
==
     "Not bad. And  you?" He didn't answer. He hugged my neck, pressed me to
     The squawks and grockles of everyday life in the Flock were  cut  off
     I kicked him in  his bare  can and dove  into my  stall and locked  the

^ permalink raw reply

* [PATCH] blame: Add --time to produce raw timestamps
From: Fredrik Kuivinen @ 2006-06-12 21:42 UTC (permalink / raw)
  To: git; +Cc: junkio




Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>

---

 Documentation/git-blame.txt |    5 ++++-
 blame.c                     |   24 ++++++++++++++++++++----
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
index 0a1fa00..bfed945 100644
--- a/Documentation/git-blame.txt
+++ b/Documentation/git-blame.txt
@@ -20,7 +20,10 @@ OPTIONS
 	Use the same output mode as git-annotate (Default: off).
 
 -l, --long::
-	Show long rev (Defaults off).
+	Show long rev (Default: off).
+
+-t, --time::
+	Show raw timestamp (Default: off).
 
 -S, --rev-file <revs-file>::
 	Use revs from revs-file instead of calling git-rev-list.
diff --git a/blame.c b/blame.c
index 88bfec2..afa22b5 100644
--- a/blame.c
+++ b/blame.c
@@ -20,9 +20,11 @@ #include "xdiff-interface.h"
 
 #define DEBUG 0
 
-static const char blame_usage[] = "[-c] [-l] [--] file [commit]\n"
+static const char blame_usage[] = "[-c] [-l] [-t] [-S <revs-file>] [--] file [commit]\n"
 	"  -c, --compability Use the same output mode as git-annotate (Default: off)\n"
 	"  -l, --long        Show long commit SHA1 (Default: off)\n"
+        "  -t, --time        Show raw timestamp (Default: off)\n"
+	"  -S, --revs-file   Use revisions from revs-file instead of calling git-rev-list\n"
 	"  -h, --help        This message";
 
 static struct commit **blame_lines;
@@ -680,13 +682,19 @@ static void get_commit_info(struct commi
 	*tmp = 0;
 }
 
-static const char* format_time(unsigned long time, const char* tz_str)
+static const char* format_time(unsigned long time, const char* tz_str,
+			       int raw_time)
 {
 	static char time_buf[128];
 	time_t t = time;
 	int minutes, tz;
 	struct tm *tm;
 
+	if (raw_time) {
+		sprintf(time_buf, "%lu %s", time, tz_str);
+		return time_buf;
+	}
+
 	tz = atoi(tz_str);
 	minutes = tz < 0 ? -tz : tz;
 	minutes = (minutes / 100)*60 + (minutes % 100);
@@ -740,6 +748,7 @@ int main(int argc, const char **argv)
 	char filename_buf[256];
 	int sha1_len = 8;
 	int compability = 0;
+	int raw_time = 0;
 	int options = 1;
 	struct commit* start_commit;
 
@@ -768,6 +777,10 @@ int main(int argc, const char **argv)
 				  !strcmp(argv[i], "--compability")) {
 				compability = 1;
 				continue;
+			} else if(!strcmp(argv[i], "-t") ||
+				  !strcmp(argv[i], "--time")) {
+				raw_time = 1;
+				continue;
 			} else if(!strcmp(argv[i], "-S")) {
 				if (i + 1 < argc &&
 				    !read_ancestry(argv[i + 1], &sha1_p)) {
@@ -873,14 +886,17 @@ int main(int argc, const char **argv)
 		fwrite(sha1_to_hex(c->object.sha1), sha1_len, 1, stdout);
 		if(compability) {
 			printf("\t(%10s\t%10s\t%d)", ci.author,
-			       format_time(ci.author_time, ci.author_tz), i+1);
+			       format_time(ci.author_time, ci.author_tz,
+					   raw_time),
+			       i+1);
 		} else {
 			if (found_rename)
 				printf(" %-*.*s", longest_file, longest_file,
 				       u->pathname);
 			printf(" (%-*.*s %10s %*d) ",
 			       longest_author, longest_author, ci.author,
-			       format_time(ci.author_time, ci.author_tz),
+			       format_time(ci.author_time, ci.author_tz,
+					   raw_time),
 			       max_digits, i+1);
 		}
 

^ permalink raw reply related

* Re: [PATCH] gitweb: Adding a `blame' interface.
From: Fredrik Kuivinen @ 2006-06-12 21:38 UTC (permalink / raw)
  To: Florian Forster; +Cc: git
In-Reply-To: <11500407193506-git-send-email-octo@verplant.org>

On Sun, Jun 11, 2006 at 05:45:19PM +0200, Florian Forster wrote:
> This patch adds an interface for `git-blame' to `gitweb.cgi'. Links to it are
> place in `git_blob'.
> Internally the code uses `git-annotate' because `git-blame's output differs for
> files that have been renamed in the past. However, I like the term `blame'
> better.
> 

You can pass "--compatibility" to git-blame to get output which is
identical to git-annotates output. However, "--time" is not
implemented in git-blame yet. I will send a patch in a separate mail.

git-blame is a bit faster than git-annotate and, as far as I know, it
produces output which is correct.

- Fredrik

^ permalink raw reply

* Re: [PATCH] gitweb: Adding a `blame' interface.
From: Jon Loeliger @ 2006-06-12 21:29 UTC (permalink / raw)
  To: Florian Forster; +Cc: Martin Langhoff, Git List
In-Reply-To: <20060612082448.GA11857@verplant.org>

On Mon, 2006-06-12 at 03:24, Florian Forster wrote:

> I have two more points regarding gitweb's configuration:
> - IMHO it would make sense to move the general gitweb-configuration
>   (where are the repositories, where are the binaries, etc) out of the
>   script.  As far as I know the Debian maintainer of the `gitweb'
>   package has asked for this before but was refused for some reason..
>   Possibly a file `gitweb.conf' in the same directory as the script
>   could be read and overwrite the builtin defaults..?

I already submitted a patch down this line on 22-Mar-2006:

    http://marc.theaimsgroup.com/?l=git&m=114308224922372&w=2

Thanks,
jdl

^ permalink raw reply

* Re: cvsps wierdness
From: Linus Torvalds @ 2006-06-12 21:30 UTC (permalink / raw)
  To: Robin Rosenberg (list subscriber); +Cc: git
In-Reply-To: <Pine.LNX.4.64.0606121406200.5498@g5.osdl.org>



On Mon, 12 Jun 2006, Linus Torvalds wrote:
> 
> I don't think this is strictly correct, btw. I suspect you can still get 
> into strange situations where the changeset merging has resulted in one 
> file ordering one way, and another file ordering the other way. 

Btw, I also fear that this could make cvsps noticeably slower, since the 
patchset comparison code is pretty expensive (O(n*m) in files in each 
patch-set).

		Linus

^ permalink raw reply

* Re: cvsps wierdness
From: Linus Torvalds @ 2006-06-12 21:27 UTC (permalink / raw)
  To: Robin Rosenberg (list subscriber); +Cc: git
In-Reply-To: <200606122247.02727.robin.rosenberg.lists@dewire.com>



On Mon, 12 Jun 2006, Robin Rosenberg (list subscriber) wrote:
> 
> The script creates a small CVS repo with three commits on two files. What's 
> odd is that cvsps lists revision 1.2 of the file v.txt *before* version 1.1, 
> like this:

What seems to happen is that the two changes to v.txt are broken up into 
separate changesets (because they touch the same file), but then the 
_first_ one is merged with the changeset that contains the k.txt change 
(because they have the same log message, and roughly the same date).

Then, because it has the earlier date, that combined changeset ends up 
being considered to be "before" the later one, even though it contains a 
version of v.txt that is newer.

Does this patch fix it for you (untested - it could result in tons of 
other trouble, but it basically just says that time ordering is less 
important than member revision ordering).

I don't think this is strictly correct, btw. I suspect you can still get 
into strange situations where the changeset merging has resulted in one 
file ordering one way, and another file ordering the other way. 

I really don't think cvsps is really very good about this.

		Linus

---
diff --git a/cvsps.c b/cvsps.c
index 2695a0f..daa93a3 100644
--- a/cvsps.c
+++ b/cvsps.c
@@ -1662,14 +1662,14 @@ static int compare_patch_sets_bytime(con
      * know that insertions are unique at this point.
      */
 
-    diff = ps1->date - ps2->date;
-    if (diff)
-	return (diff < 0) ? -1 : 1;
-
     ret = compare_patch_sets_by_members(ps1, ps2);
     if (ret)
 	return ret;
 
+    diff = ps1->date - ps2->date;
+    if (diff)
+	return (diff < 0) ? -1 : 1;
+
     ret = strcmp(ps1->author, ps2->author);
     if (ret)
 	return ret;

^ permalink raw reply related

* cvsps wierdness
From: Robin Rosenberg (list subscriber) @ 2006-06-12 20:47 UTC (permalink / raw)
  To: git


I sometimes get out-of-order imports with git-cvsimport when consecutive 
commits have the same message. I narrowed it down to a small demo:

#!/bin/bash -x
mkdir demo
cd demo
export CVSROOT=$(pwd)/cvsrepo
mkdir $CVSROOT
cvs init
mkdir $CVSROOT/x
cvs co -d sandbox x
cd sandbox
echo X >k.txt
cvs add k.txtsometimes 
cvs commit -m "A commit"
sleep 1
echo a >v.txt
cvs add v.txt
cvs commit -m "A commit"
sleep 1
echo b >v.txt
cvs commit -m "A commit"
cvsps -x --norc

-- end --

The script creates a small CVS repo with three commits on two files. What's 
odd is that cvsps lists revision 1.2 of the file v.txt *before* version 1.1, 
like this:

---------------------
PatchSet 1
Date: 2006/06/13 00:34:15
Author: roro
Branch: HEAD
Tag: (none)
Log:
A commit

Members:
        k.txt:INITIAL->1.1
        v.txt:1.1->1.2

---------------------
PatchSet 2
Date: 2006/06/13 00:34:17
Author: roro
Branch: HEAD
Tag: (none)
Log:
A commit

Members:
        v.txt:INITIAL->1.1

Maybe someone with cvsps insight can spot the error? If you don't get the
same error I wouldn't be surprised because I had a similar example that would
not repeat itself on both of the machines I tried it. This one however "works" 
every time (on my machines).

-- robin

^ permalink raw reply

* Re: git-applymbox broken?
From: Eric W. Biederman @ 2006-06-12 20:10 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <Pine.LNX.4.64.0606121204220.5498@g5.osdl.org>

Linus Torvalds <torvalds@osdl.org> writes:

> On Mon, 12 Jun 2006, Eric W. Biederman wrote:
>> 
>> Below is an example of the kind of patch that inspired me to relax the
>> rules on parsing in body headers (this comes from Andi Kleen quilt tree).
>
> And this is wrong.
>
> We should _not_ accept crappy patches, and then start guessing at what the 
> person meant.
>
>>From the very beginning of git, I tried to make it extremely clear that 
> there is never any guessing going on. We don't use "heuristics" except as 
> a pure optimization: ie a heuristic can have a _performance_ impact, but 
> it must never EVER have semantic impact.
>
> SCM's are not about guessing. They are about saving the _exact_ state that 
> the user asked for. No "let's try to be nice", no gray areas.
>
> If the new git-applymbox just takes random lines from the body of the 
> email, and decides that they may be authorship information, then that is a 
> BUG. The "From: " line in the middle of an email may well be about 
> somebody having _discovered_ the bug, and we're quoting him as part of the 
> explanation. It does NOT mean that it's about authorship.
>
> So we should ONLY check for "From:" (and perhaps "Subject:" and "Date:") 
> at the very top of the email body. NOWHERE ELSE.
>
> The fact that somebody has a crappy quilt tree, and the fact that quilt is 
> very much a "anything goes" kind of laissez faire system does not mean, 
> and should NEVER mean that git becomes the same kind of mess of "let's do 
> a best effort and try to guess what somebody means" kind of thing.

Ok. A reasonable position.  It would have been nice if you had squawked 
when I made that change: 2dec02b1ecafc47d4031d0a68a94c775a6a9ff9e

I thought I was explicit when I did it, oh well.

As for quilt being imperfect that among other things is why I
am slowly trying to make the tools play together better.  So people
can use the best tool for the job, which if the integration is tight
enough becomes a single tool.

> I check and edit my emails before I apply them, and I try to teach the 
> people who send them manners and what the rules are. THAT is the way to 
> handle this, not by having the tool itself become unreliable and random

What are the rules?

This looks like something that needs to be Documented by
more than just the source of git-mailinfo.

The need to skip extra blank lines was a surprise to me.
In looking for documentation the best I could quickly
find was SubmittingPatches and it only Documents the From: and ---
lines.

Eric

^ permalink raw reply

* Your money, open-spaced
From: Joanne Garcia @ 2006-06-12 20:10 UTC (permalink / raw)
  To: postmaster

Even if you have no erectin problems SOFT CIAzLIS 
would help you to make BETTER SE  X MORE OFTEN!
and to bring  unimagnable plesure to her.

Just disolve half a pil under your tongue 
and get ready for action in 15 minutes. 

The tests showed that the majority of men 
after taking this medic ation were able to have 
PERFECT ER ECTI ON during 36 hours!

VISIT US, AND GET OUR SPECIAL 70% DISC OUNT OFER!

http://ejlgkg.mistnear.net/?23869344

=====
over the Council Beach and for the first time began pressing his  students
wanted to sec Guta right then and there. just like that. To look  at her and
     Fletcher still blinked from the change of scene. "What did  you  just
scattered, and I thought I heard something.
learn about flight in this place as there had been in the life behind him.
if you're dead or alive. And then you finish up  the second night and get to

sounded in a voice of highest ceremony. Stand to Center meant  only  great
didn't shine  in any special way, just a  little bit  and in a  calm, even a

^ permalink raw reply

* [PATCH] Don't parse any headers in the real body of an email message.
From: Eric W. Biederman @ 2006-06-12 19:48 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Linus Torvalds, Git Mailing List
In-Reply-To: <Pine.LNX.4.64.0606121204220.5498@g5.osdl.org>


It was pointed out that the current behaviour might mispart a patch comment
so remove this behaviour for now.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 mailinfo.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mailinfo.c b/mailinfo.c
index 3696d61..325c3b2 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -254,6 +254,8 @@ #define SEEN_PREFIX  020
 /* First lines of body can have From:, Date:, and Subject: or be blank */
 static void handle_inbody_header(int *seen, char *line)
 {
+	if (*seen & SEEN_PREFIX)
+		return;
 	if (!memcmp(">From", line, 5) && isspace(line[5])) {
 		if (!(*seen & SEEN_BOGUS_UNIX_FROM)) {
 			*seen |= SEEN_BOGUS_UNIX_FROM;
-- 
1.4.0.g25f48-dirty

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox