Git development
 help / color / mirror / Atom feed
* Re: [PATCH v5 15/15] fast-export: don't handle uninteresting refs
From: Jonathan Nieder @ 2012-11-21  4:17 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Felipe Contreras, git, Johannes Schindelin, Max Horn, Jeff King,
	Sverre Rabbelier, Brandon Casey, Brandon Casey, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <7vd2z7rj3y.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:

>> Of course, transport-helper shouldn't even be specifying the negative
>> (^) refs, but that's another story.
>
> Hrm, I am not sure I understand what you mean by this.
>
> How should it be telling the fast-export up to what commit the
> receiving end should already have the history for (hence they do not
> need to be sent)?  Or are you advocating to re-send the entire
> history down to the root commit every time?

I think Felipe has mentioned before that he considers it the remote
helper's responsibility to keep track of what commits have already
been imported, for example using a marks file.

Never mind that others have said that that's not the current interface
(I don't yet see why it would be a good interface after a transition,
but maybe it would be).  Still, hopefully that clarifies the intended
meaning.

Hope that helps,
Jonathan

^ permalink raw reply

* Re: [PATCH v5 15/15] fast-export: don't handle uninteresting refs
From: Felipe Contreras @ 2012-11-21  4:22 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: Junio C Hamano, git, Johannes Schindelin, Max Horn, Jeff King,
	Sverre Rabbelier, Brandon Casey, Brandon Casey, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <20121121041735.GE4634@elie.Belkin>

On Wed, Nov 21, 2012 at 5:17 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Junio C Hamano wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>>> Of course, transport-helper shouldn't even be specifying the negative
>>> (^) refs, but that's another story.
>>
>> Hrm, I am not sure I understand what you mean by this.
>>
>> How should it be telling the fast-export up to what commit the
>> receiving end should already have the history for (hence they do not
>> need to be sent)?  Or are you advocating to re-send the entire
>> history down to the root commit every time?
>
> I think Felipe has mentioned before that he considers it the remote
> helper's responsibility to keep track of what commits have already
> been imported, for example using a marks file.

It's not the remote helper, fast-export does that.

> Never mind that others have said that that's not the current interface
> (I don't yet see why it would be a good interface after a transition,
> but maybe it would be).  Still, hopefully that clarifies the intended
> meaning.

The current interface is broken.

not ok 16 - pulling without marks # TODO known breakage
not ok 17 - pushing without marks # TODO known breakage

See? A remote helper without marks doesn't work.

-- 
Felipe Contreras

^ permalink raw reply

* RE: [BUG] git clean does not remove certain directories
From: Soren Brinkmann @ 2012-11-21  5:02 UTC (permalink / raw)
  To: git@vger.kernel.org
In-Reply-To: <933d806a-abce-4baf-8c3b-9b6742cb8ac7@VA3EHSMHS004.ehs.local>

> Hi,
>
> this use case may be a little awkward but this is the behavior I see:
>
> I have a repository which has a couple of untracked directories which can also
> include git repositories. No submodules, though.
> I used 'git clean -xdf' on the top level of this repo to remove everything
> untracked in it - including the git repositories in sub-directories.
>
> Since using git 1.8.0 the clean operation seems to be 'broken', as output
> indicates all those questionable sub directories are removed - just as in prior
> git versions - but in fact they remain untouched and are _not_ removed.
>
> I attached a shell script creating a hierarchy to reproduce the issue.
> Executing the script creates the git repo 'repo.git' with a couple of tracked
> and untracked dirs/files and two more git repositories within the first one.
>
> If you cd into repo.git and execute 'git clean -xdf' I see the following output:
>       Removing repo2.git/
>       Removing untracked_dir/
>
> But the directories remain intact when using git 1.8.0.
> With git 1.6.3.2 it works as I expected and removes the
> directories. I'm pretty
> sure the 1.7.x versions did the same, but it's no longer
> installed here.

As additional data point: With git 1.7.9.5 the 'untracked_dir' is deleted, while
'repo2.git' is kept. Output is the same as always, indicating both were deleted.

So, three different git versions gain three different results...

        Soren


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

^ permalink raw reply

* Re: [PATCH v5 15/15] fast-export: don't handle uninteresting refs
From: Junio C Hamano @ 2012-11-21  5:08 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: Felipe Contreras, git, Johannes Schindelin, Max Horn, Jeff King,
	Sverre Rabbelier, Brandon Casey, Brandon Casey, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <20121121041735.GE4634@elie.Belkin>

Jonathan Nieder <jrnieder@gmail.com> writes:

> Never mind that others have said that that's not the current interface
> (I don't yet see why it would be a good interface after a transition,
> but maybe it would be).  Still, hopefully that clarifies the intended
> meaning.

Care to explain how the current interface is supposed to work, how
fast-export and transport-helper should interact with remote helpers
that adhere to the current interface, and how well/correctly the
current implementation of these pieces work?

What I am trying to get at is to see where the problem lies.  Felipe
sees bugs in the aggregated whole.  Is the root cause of the problems
he sees some breakages in the current interface?  Is the interface
designed right but the problem is that the implementation of the
transport-helper is buggy and driving fast-export incorrectly?  Or is
the implementation of the fast-export buggy and emitting wrong results,
even though the transport-helper is driving fast-export correctly?
Something else?

I see Felipe keeps repeating that there are bugs, and keeps posting
patches to change fast-export, but I haven't seen a concrete "No,
the reason why you see these problems is because you are not using
the interface correctly; the currrent interface is fine.  Here is
how you can fix your program" from "others".

With such a one-sided discussion, I've been having a hard time
convincing myself if Felipe's effort is making the interface better,
or just breaking it even more for existing remote helpers, only to
fit his world model better.

Help?

^ permalink raw reply

* [PATCH 14/13] test-wildmatch: avoid Windows path mangling
From: Johannes Sixt @ 2012-11-21  6:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Jeff King, Nguyễn Thái Ngọc Duy
In-Reply-To: <7vd2z8rq4y.fsf@alter.siamese.dyndns.org>

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

The MSYS bash mangles arguments that begin with a forward slash
when they are passed to test-wildmatch. This causes tests to fail.
Avoid mangling by prepending "XXX", which is removed by
test-wildmatch before further processing.

[J6t: reworded commit message]

Reported-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
Am 11/20/2012 21:11, schrieb Junio C Hamano:
> Thanks, but you need to fix your format-patch somehow.

No, it was Thunderbird. It ate the blank lines when I said "Edit as new"
to forward the patch directly from the mailbox.

Sorry for the inconvenience.

 t/t3070-wildmatch.sh | 10 +++++-----
 test-wildmatch.c     |  8 ++++++++
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh
index e6ad6f4..3155eab 100755
--- a/t/t3070-wildmatch.sh
+++ b/t/t3070-wildmatch.sh
@@ -74,7 +74,7 @@ match 0 0 'foo/bar' 'foo[/]bar'
 match 0 0 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
 match 1 1 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
 match 1 0 'foo' '**/foo'
-match 1 x '/foo' '**/foo'
+match 1 x 'XXX/foo' '**/foo'
 match 1 0 'bar/baz/foo' '**/foo'
 match 0 0 'bar/baz/foo' '*/foo'
 match 0 0 'foo/bar/baz' '**/bar*'
@@ -95,8 +95,8 @@ match 0 0 ']' '[!]-]'
 match 1 x 'a' '[!]-]'
 match 0 0 '' '\'
 match 0 x '\' '\'
-match 0 x '/\' '*/\'
-match 1 x '/\' '*/\\'
+match 0 x 'XXX/\' '*/\'
+match 1 x 'XXX/\' '*/\\'
 match 1 1 'foo' 'foo'
 match 1 1 '@foo' '@foo'
 match 0 0 'foo' '@foo'
@@ -187,8 +187,8 @@ match 0 0 '-' '[[-\]]'
 match 1 1 '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
 match 0 0 '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
 match 0 0 '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
-match 1 1 '/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' '/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
-match 0 0 '/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' '/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
+match 1 1 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
+match 0 0 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
 match 1 0 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
 match 0 0 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
 
diff --git a/test-wildmatch.c b/test-wildmatch.c
index 74c0864..e384c8e 100644
--- a/test-wildmatch.c
+++ b/test-wildmatch.c
@@ -3,6 +3,14 @@
 
 int main(int argc, char **argv)
 {
+	int i;
+	for (i = 2; i < argc; i++) {
+		if (argv[i][0] == '/')
+			die("Forward slash is not allowed at the beginning of the\n"
+			    "pattern because Windows does not like it. Use `XXX/' instead.");
+		else if (!strncmp(argv[i], "XXX/", 4))
+			argv[i] += 3;
+	}
 	if (!strcmp(argv[1], "wildmatch"))
 		return !!wildmatch(argv[3], argv[2], 0);
 	else if (!strcmp(argv[1], "iwildmatch"))
-- 
1.8.0.1417.gf6038d8

^ permalink raw reply related

* Re: [wishlist] support git flow-like view
From: Johannes Sixt @ 2012-11-21  7:01 UTC (permalink / raw)
  To: Lisandro Damián Nicanor Pérez Meyer
  Cc: Andrew Ardill, git@vger.kernel.org
In-Reply-To: <201211202113.44459.perezmeyer@gmail.com>

Am 11/21/2012 1:13, schrieb Lisandro Damián Nicanor Pérez Meyer:
> I think the best mock-up would be:
> 
> <http://nvie.com/img/2009/12/Screen-shot-2009-12-24-at-11.32.03.png>
> 
> Yes, I'm referring to "swim-lanes" like view. Which may be already there and 
> I'm miserably failing to see :-/
Maybe you are just looking for gitk --date-order --branches?

-- Hannes

^ permalink raw reply

* Re: [PATCH v5 15/15] fast-export: don't handle uninteresting refs
From: Felipe Contreras @ 2012-11-21  7:11 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Jonathan Nieder, git, Johannes Schindelin, Max Horn, Jeff King,
	Sverre Rabbelier, Brandon Casey, Brandon Casey, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <7vfw43pmp7.fsf@alter.siamese.dyndns.org>

On Wed, Nov 21, 2012 at 6:08 AM, Junio C Hamano <gitster@pobox.com> wrote:

> I see Felipe keeps repeating that there are bugs, and keeps posting
> patches to change fast-export, but I haven't seen a concrete "No,
> the reason why you see these problems is because you are not using
> the interface correctly; the currrent interface is fine.  Here is
> how you can fix your program" from "others".
>
> With such a one-sided discussion, I've been having a hard time
> convincing myself if Felipe's effort is making the interface better,
> or just breaking it even more for existing remote helpers, only to
> fit his world model better.

IIRC you mentioned something about this mailing list being focused on
*technical* merit. I've explained as much as I could, but at the end
of the talk, talk is cheap, the code speaks for itself. I added a new
very very very simple testgit remote helper, so anybody can see what's
going on, and figure out how the interface could be used wrong.

Anybody can modify the bash version of git-remote-testgit and say 'no,
the interface is not broken, here is how you push and pull without
marks'. How hard is it to hack 82 lines of bash code?

But lets assume my testgit is fatally broken, would you, Junio, accept
these patches if I show the same broken behavior with the python
git-remote-testgit?

I'm afraid I have to point out the hard truth; the reason why nobody
is doing that is because a) the interface is truly broken b) if they
try, they most likely would fail, and that would prove they were wrong
in previous discussion, or c) not enough familiarity with the code. I
don't want to point fingers, nor do I intend to offend anybody, but I
cannot find any other explanation of why this patch series, which is
obviously correct (to me), doesn't receive any feedback, even though
in theory, it should be very very very easy to show what's wrong with
the series.

The tests are there, and the remote helper is as simple as it gets.
There's nothing else but fast-export and transport-helper to blame for
the issues. It's that simple.

Cheers.

-- 
Felipe Contreras

^ permalink raw reply

* Re: [PATCH v5 15/15] fast-export: don't handle uninteresting refs
From: Felipe Contreras @ 2012-11-21  8:37 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Jonathan Nieder, git, Johannes Schindelin, Max Horn, Jeff King,
	Sverre Rabbelier, Brandon Casey, Brandon Casey, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <7vfw43pmp7.fsf@alter.siamese.dyndns.org>

On Wed, Nov 21, 2012 at 6:08 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>> Never mind that others have said that that's not the current interface
>> (I don't yet see why it would be a good interface after a transition,
>> but maybe it would be).  Still, hopefully that clarifies the intended
>> meaning.
>
> Care to explain how the current interface is supposed to work, how
> fast-export and transport-helper should interact with remote helpers
> that adhere to the current interface, and how well/correctly the
> current implementation of these pieces work?
>
> What I am trying to get at is to see where the problem lies.  Felipe
> sees bugs in the aggregated whole.  Is the root cause of the problems
> he sees some breakages in the current interface?  Is the interface
> designed right but the problem is that the implementation of the
> transport-helper is buggy and driving fast-export incorrectly?  Or is
> the implementation of the fast-export buggy and emitting wrong results,
> even though the transport-helper is driving fast-export correctly?
> Something else?

Let me give it a shot at explaining the case for remote helpers that
use export/import.

== listing ==

All operations begin with the transport helper requesting a list of
refs. Basically 'git show-ref'.

== fetching ==

In fetch mode the transport helper will initiate the process by
requesting refs to the remote helper, like 'master', or 'devel', and
so on. These refs were previously provided by the remote helper itself
in the "listing" step.

It is the total responsibility of the remote helper to decide what to
do: nothing, only update the ref pointers, retrieve the whole
repository, retrieve only the listed refs, etc. It's also the
responsibility of the remote helper to keep track of marks, last known
commits the refs pointed to, update local transitory repositories,
etc.

It's also the responsibility of the remote helper to throw the right
'feature' commands to fast-import for everything, including where to
store the marks.

Note that there are two sets of marks; the marks of the remote helper,
which could be anything: JSON, text files, binary, etc. and don't
contain git SHA-1's, and the git marks, which do contain git SHA-1's
and are exported/imported by fast-import, but *both* are totally under
control of the remote helper.

At this point, git (transport helper), has absolutely no idea what's
going on, the communication is completely between the remote helper
and fast-import. After this process has finished, control goes back to
the transport helper, which proceeds to check what fast-import did.

Then, the result is shown to the user as the typical fetch that
updated certain refs.

== pushing ==

In this mode the roles are reversed, now git (transport helper) is in
control, and everything that happens depends on what commands are
passed to fast-export. Now the remote helper is a passive receiver of
data, and has two options, receive it or die.

Which refs get updated and how, is the total responsibility of transport helper.

The only control the remote helper has, is before the export begins,
in the configuration (capabilities command) that happens at the very
beginning (before listing), and where it specifies features to
support, which are then used to pass the relevant arguments to
fast-export.

And these capabilities are very limited:
* import-marks
* export-marks
* refspec

After the push has finished, the remote helper then proceeds to report
which refs were actually updated, and the user gets notified.

== details ==

As it should be obvious by now, there's not many ways in which a
remote helper can screw things up (other than the parsing and
generation of data for fast-import/export). The only tricky part is
the refspec.

To function properly, a remote helper should specify a refspec such as
'refs/heads/*:refs/test/heads/*', this way, all the changes a remote
helper does are isolated in a specific refspec namespace, and the
update to normal git happens in a controlled way.

However, the refspec only makes sense in the *fetching* mode; the
remote-helper is supposed to throw updates in the form of 'commit
refs/test/heads/master', not 'commit refs/heads/master' (although in
some case that might work, but I'm not sure which).

But when pushing the remote helper will receive the refs in the normal
form 'refs/heads/master'. Also, the namespaced refs are only updated
when fetching, not when pushing.

Marks are very straightforward; the same import and export marks
should be specified for both importing and exporting.

Everything works mostly fine as long as the remote helper follows
this. Things break in all sorts of ways when it doesn't.

But I want to emphasize again that there's not many ways in which a
remote helper can screw things: marks, or refspec, that's it.
*Specially* when pushing.

== no marks ==

Let's imagine a very simple repository with 3 commits, which gets
pushed to a remote one:

4e891f6 :3
d9d17c3 :2
e1aef7b :1

I'm obviously simplifying the marks, but essentially that's what
fast-export would do when pushing commits to a remote helper; it the
parent of :2 is :1, and the parent of :3 is :2, but the remote side
*never* sees any git SHA-1, because they are not interesting in any
way, there's nothing useful that can be done with them.

The remote side would generate commits such as:

:3 103
:2 102
:1 100

Again, for simplification purposes (you can picture them as mercurial revs).

Now the push has finished. The marks are gone (no marks).

What happens when you fetch? You might think that we will get only the
commits after :3, but that's not the case, the transport helper would
use 'refs/test/heads/master' to find out the last commit, but that
doesn't get updated when pushing, only when fetching, so we would
start from the top.

4e891f6 :3
d9d17c3 :2
e1aef7b :1

:3 103
:2 102
:1 100

The same will happen if you push, because push also uses
'refs/test/heads/master'.

But *now* that we are doing a fetch, the 'refs/test/heads/master'
pointer is updated to 4e891f6. But don't think that those marks are
the same as the previous ones: they happen to be the same because they
were generated the same way, but they are completely independent.

What happens when you push now? Now the 'refs/test/heads/master' is
pointing to 4e891f6, and suppose we have two new commits:

88764ee
4607106
4e891f6 :3 <- I'm putting these for reference, but in reality they are gone
d9d17c3 :2
e1aef7b :1

The transport helper would do an export of '^refs/test/heads/master
refs/heads/master', or '^4e891f6 88764ee'. And here comes the
interesting part:

What is the parent of 4607106? It's not :3, because that mark is gone,
and in fact, even if we sent :3; things would break down because the
other side has no idea what :3 means; it's gone, caput. What really
happens is:

88764ee :2
4607106 :1

This is a new tree. That's exactly what you would expect if you do
'git fast-export ^v1.8.0^ master'; export all the commits as if v1.8.0
was the root.

But in the context of remote helpers, that's not what we want.

What can we do to fix this? Let's suppose that through some magic we
get the parent of 4607106 to be 4e891f6; is that helpful? No. To the
remote helper 4e891f6 is useless. What we need is 103, but without
marks, we can't find that out.

Maybe if we stored it in the last run? We need to parse the git marks,
and then match our marks with those, and we could get a mapping like
'4e891f6 -> 103', but what if the parent is 102? So, we need a mapping
for all the marks, and then we have to store such mapping anyway. And
guess what? We are back to using marks again! Except that instead of
using the standard git way, we are using a custom hacky way.

Are there other solutions? Maybe we can store the information in refs:

4e891f6 refs/test/ids/103
d9d17c3 refs/test/ids/102
e1aef7b refs/test/ids/100

But that also would require parsing the git marks, and going outside
of the intended fast-export tool would kind of defeat the purpose of
being fast an efficient, and still very hacky.

And lets not even go as to what would be needed for 'git fast-export'
to actually generate 4e891f6 in the first place, as that would
probably require changes that would break other things.

So no, you can't do it without marks.

And why are we even discussing about this? Why would anybody want to
avoid marks? Not only there's no other ways to achieve the same, marks
are cheap and efficient, as efficient as any other solution could be,
and then some. And do we have any real remote helpers that try to do
export/import without marks? No, heck, we don't even have fake ones.

It just doesn't work. Seriously.

And my patches actually make it work: if there are no marks, then
_everything_ is pushed. I don't see the point of supporting the
functionality of no marks, clearly nobody is using that because it
just doesn't work. Nobody has shown a shred of evidence to the
contrary. With my patches, at least we try to do something without
failing too miserably.

Cheers.

-- 
Felipe Contreras

^ permalink raw reply

* Re: Topics currently in the Stalled category
From: Krzysztof Mazur @ 2012-11-21  9:27 UTC (permalink / raw)
  To: Paul Fox; +Cc: Junio C Hamano, git, Jeff King
In-Reply-To: <20121121024647.BBCC82E9301@grass.foxharp.boston.ma.us>

On Tue, Nov 20, 2012 at 09:46:47PM -0500, Paul Fox wrote:
> junio c hamano wrote:
>  > Here is a list of stalled topics I am having trouble deciding what
>  > to do (the default is to dismiss them around feature freeze).
> ...
>  > * pf/editor-ignore-sigint (2012-11-11) 5 commits
>  > 
>  >  Avoid confusing cases where the user hits Ctrl-C while in the editor
>  >  session, not realizing git will receive the signal. Since most editors
>  >  will take over the terminal and will block SIGINT, this is not likely
>  >  to confuse anyone.
>  > 
>  >  Some people raised issues with emacsclient, which are addressed by this
>  >  re-roll. It should probably also handle SIGQUIT, and there were a
>  >  handful of other review comments.
>  > 
>  >  Anybody interested in moving this forward?
> 
> i started this, but then jeff took it and ran with it and made it
> right.  i think the remaining changes are small -- if jeff would
> prefer, i can probably finish it.  (but i won't guarantee not to
> mess up the "From:" lines.  :-)
> 

I'm also interested. I sometimes use ":r !command" in vim, so far I never
needed to use Ctrl-C, but maybe in future.

The SIGINT part seems to be finished, we need to decide what about SIGQUIT.

Krzysiek

^ permalink raw reply

* Re: [PATCH v5 00/15] fast-export and remote-testgit improvements
From: Felipe Contreras @ 2012-11-21  9:46 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Johannes Schindelin, Max Horn, Jeff King,
	Sverre Rabbelier, Brandon Casey, Brandon Casey, Jonathan Nieder,
	Ilari Liusvaara, Pete Wyckoff, Ben Walton, Matthieu Moy,
	Julian Phillips, Felipe Contreras
In-Reply-To: <1352642392-28387-1-git-send-email-felipe.contreras@gmail.com>

On Sun, Nov 11, 2012 at 2:59 PM, Felipe Contreras
<felipe.contreras@gmail.com> wrote:

Since these are having some problems getting in, let me point out
which I think are important, and which not.

> Felipe Contreras (15):
>   fast-export: avoid importing blob marks

This fixes a bug, but it's probably not hitting many people.

>   remote-testgit: fix direction of marks
>   remote-helpers: fix failure message

I don't care.

>   Rename git-remote-testgit to git-remote-testpy
>   Add new simplified git-remote-testgit

These I think are good.

>   remote-testgit: get rid of non-local functionality
>   remote-testgit: remove irrelevant test
>   remote-testgit: cleanup tests

Just cleanups.

>   remote-testgit: exercise more features

I think it's good to catch more issues, but I don't care much.

>   remote-testgit: report success after an import
>   remote-testgit: make clear the 'done' feature

These are good, but I could drop them.

>   fast-export: trivial cleanup
>   fast-export: fix comparison in tests

Obvious and correct, but I don't care.

>   fast-export: make sure updated refs get updated

This is the important one. It fixes real issues quite visible on remote helpers.

>   fast-export: don't handle uninteresting refs

This is nice, but can be dropped.


I don't see what are the chances of any of them getting merged, but at
least 'fast-export: make sure updated refs get updated' should
definitely go in. Please advice at which level I should drop the
patches, because at this point it doesn't look like any of them are
going in.

Cheers.

-- 
Felipe Contreras

^ permalink raw reply

* Re: [wishlist] support git flow-like view
From: Holger Hellmuth (IKS) @ 2012-11-21 14:52 UTC (permalink / raw)
  To: Lisandro Damián Nicanor Pérez Meyer
  Cc: Andrew Ardill, git@vger.kernel.org
In-Reply-To: <201211202113.44459.perezmeyer@gmail.com>

Am 21.11.2012 01:13, schrieb Lisandro Damián Nicanor Pérez Meyer:
> Well, two ideas come to my mind:
>
> - detect when using git flow (.git/config contains [gitflow "some_branch"]
> entries).

Shouldn't it be part of the gitflow package then?

> - Show "swim-lane"-like graphs, including branches that may not be present,
> but where there (release branches often are created and merged back, for
> example)

As a general feature there could be a config option gitk reads with an 
ordered list of branch names (with wildcards). Those branches would 
always be printed in gitk as the leftmost branches (i.e. have their own 
lane on the left side). All other branches would be shown normally.

This would give you part of what you want, a special lane at least for 
master and develop and for branches you can group under wildcard branch 
names (for example if you prefix all release branches with "rel-").

And it would give others the ability to make special branches in gitk 
more visible.

(Yes I know, I'm talking again of stuff I won't have time or ability to 
implement ;-). Sigh)

^ permalink raw reply

* Re: Topics currently in the Stalled category
From: Marc Branchaud @ 2012-11-21 14:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vobirq0q2.fsf_-_@alter.siamese.dyndns.org>

On 12-11-20 07:05 PM, Junio C Hamano wrote:
> Here is a list of stalled topics I am having trouble deciding what
> to do (the default is to dismiss them around feature freeze).
> 

[ snip ]

> 
> * mb/remote-default-nn-origin (2012-07-11) 6 commits
>  - Teach get_default_remote to respect remote.default.
>  - Test that plain "git fetch" uses remote.default when on a detached HEAD.
>  - Teach clone to set remote.default.
>  - Teach "git remote" about remote.default.
>  - Teach remote.c about the remote.default configuration setting.
>  - Rename remote.c's default_remote_name static variables.
> 
>  When the user does not specify what remote to interact with, we
>  often attempt to use 'origin'.  This can now be customized via a
>  configuration variable.
> 
>  Expecting a re-roll.
> 
>  "The first remote becomes the default" bit is better done as a
>  separate step.

This is still on my list of things to do soon.  Unfortunately "soon" seems to
be rather perpetual these days.

If you're tired of carrying the branch feel free to dismiss it and I'll
resurrect the topic when "soon" finally comes around.

		M.

^ permalink raw reply

* Re: [wishlist] support git flow-like view
From: Lisandro Damián Nicanor Pérez Meyer @ 2012-11-21 16:43 UTC (permalink / raw)
  To: Holger Hellmuth (IKS); +Cc: Andrew Ardill, git@vger.kernel.org
In-Reply-To: <50ACEA95.9020909@ira.uka.de>

[-- Attachment #1: Type: Text/Plain, Size: 1442 bytes --]

On Wed 21 Nov 2012 11:52:05 Holger Hellmuth (IKS) escribió:
> Am 21.11.2012 01:13, schrieb Lisandro Damián Nicanor Pérez Meyer:
> > Well, two ideas come to my mind:
> > 
> > - detect when using git flow (.git/config contains [gitflow
> > "some_branch"] entries).
> 
> Shouldn't it be part of the gitflow package then?
> 
> > - Show "swim-lane"-like graphs, including branches that may not be
> > present, but where there (release branches often are created and merged
> > back, for example)
> 
> As a general feature there could be a config option gitk reads with an
> ordered list of branch names (with wildcards). Those branches would
> always be printed in gitk as the leftmost branches (i.e. have their own
> lane on the left side). All other branches would be shown normally.
> 
> This would give you part of what you want, a special lane at least for
> master and develop and for branches you can group under wildcard branch
> names (for example if you prefix all release branches with "rel-").
> 
> And it would give others the ability to make special branches in gitk
> more visible.
> 
> (Yes I know, I'm talking again of stuff I won't have time or ability to
> implement ;-). Sigh)

That seems an interesting idea, indeed. Thanks!

-- 
Either he's dead or my watch has stopped.
 -- Groucho Marx

Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH v5 11/15] remote-testgit: make clear the 'done' feature
From: Junio C Hamano @ 2012-11-21 18:11 UTC (permalink / raw)
  To: Max Horn
  Cc: Felipe Contreras, git, Johannes Schindelin, Jeff King,
	Sverre Rabbelier, Brandon Casey, Brandon Casey, Jonathan Nieder,
	Ilari Liusvaara, Pete Wyckoff, Ben Walton, Matthieu Moy,
	Julian Phillips
In-Reply-To: <EA56F0CC-7C93-491F-A076-4A1AA9593ED0@quendi.de>

Max Horn <max@quendi.de> writes:

> Aha, now I understand what this patch is about. So I would suggest this alternate commit message:
>
>   remote-testgit: make it explicit clear that we use the 'done' feature
>
>   Previously we relied on passing '--use-done-feature ' to git fast-export, which is
>   easy to miss when looking at this script. Since remote-testgit is also a reference
>   implementation, we now explicitly output 'feature done' / 'done' to make it
>   crystal clear that we implement this feature.

I'd state it like this, but I may have guessed what Felipe intended
incorrectly.

    remote-testgit: advertise "done" feature and write "done" ourselves
    
    Instead of letting "fast-export" advertise the feature and ending
    its stream with "done", do it ourselves.  This way, it would make it
    more clear to people who want to write their own remote-helper to
    produce fast-export streams without using "fast-export
    --use-done-feature" that they are supposed to end their stream with
    "done".

^ permalink raw reply

* Re: [PATCH v5 15/15] fast-export: don't handle uninteresting refs
From: Junio C Hamano @ 2012-11-21 18:14 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: git, Johannes Schindelin, Max Horn, Jeff King, Sverre Rabbelier,
	Brandon Casey, Brandon Casey, Jonathan Nieder, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <1352642392-28387-16-git-send-email-felipe.contreras@gmail.com>

Felipe Contreras <felipe.contreras@gmail.com> writes:

> They have been marked as UNINTERESTING for a reason, lets respect that.
> ...
> The current behavior is most certainly not what we want. After this
> patch, nothing gets exported, because nothing was selected (everything
> is UNINTERESTING).

The old behaviour was an incorrect "workaround" that has been
superseded by your 14/15 "make sure updated refs get updated", no?
Mentioning that would help people realize that this patch would not
cause regression on them, I would think.

^ permalink raw reply

* Re: [PATCH v5 14/15] fast-export: make sure updated refs get updated
From: Junio C Hamano @ 2012-11-21 18:12 UTC (permalink / raw)
  To: Max Horn
  Cc: Felipe Contreras, git, Johannes Schindelin, Jeff King,
	Sverre Rabbelier, Brandon Casey, Brandon Casey, Jonathan Nieder,
	Ilari Liusvaara, Pete Wyckoff, Ben Walton, Matthieu Moy,
	Julian Phillips
In-Reply-To: <D39D26A9-16B4-4A9F-9102-BD2C92FA10AF@quendi.de>

Max Horn <max@quendi.de> writes:

> On 11.11.2012, at 14:59, Felipe Contreras wrote:
>
>> When an object has already been exported (and thus is in the marks) it's
>> flagged as SHOWN, so it will not be exported again, even if in a later
>> time it's exported through a different ref.
>> 
>> We don't need the object to be exported again, but we want the ref
>> updated, which doesn't happen.
>> 
>> Since we can't know if a ref was exported or not, let's just assume that
>> if the commit was marked (flags & SHOWN), the user still wants the ref
>> updated.
>> 
>> IOW: If it's specified in the command line, it will get updated,
>> regardless of wihether or not the object was marked.
>
> Typo: wihether => whether
>
>> 
>> So:
>> 
>> % git branch test master
>> % git fast-export $mark_flags master
>> % git fast-export $mark_flags test
>> 
>> Would export 'test' properly.
>> 
>> Additionally, this fixes issues with remote helpers; now they can push
>> refs wich objects have already been exported, and a few other issues as
>
> Typo: wich => which

I'd rather use "whose" there.

^ permalink raw reply

* Re: [PATCH v5 05/15] Add new simplified git-remote-testgit
From: Junio C Hamano @ 2012-11-21 18:26 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: git, Johannes Schindelin, Max Horn, Jeff King, Sverre Rabbelier,
	Brandon Casey, Brandon Casey, Jonathan Nieder, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <1352642392-28387-6-git-send-email-felipe.contreras@gmail.com>

Felipe Contreras <felipe.contreras@gmail.com> writes:

> It's way simpler. It exerceises the same features of remote helpers.
> It's easy to read and understand. It doesn't depend on python.
>
> It does _not_ exercise the python remote helper framework; there's
> another tool and another test for that.

You mention why you _think_ it is better, and what it is _not_, but
with your excitement, end up failing to mention what it is.  I'll
try to reword the commit with this sentence:

	This script is to test the remote-helper interface.

somewhere.  Please check what I'll push out on 'pu' after I'm done
for the day (probably in 8 hours).

>  git-remote-testgit                   |  62 ++++++++++++++++
>  t/t5801-remote-helpers.sh            | 139 +++++++++++++++++++++++++++++++++++
>  3 files changed, 202 insertions(+), 1 deletion(-)
>  create mode 100755 git-remote-testgit

I hinted at this in an earlier message, but creating this file as a
tracked file at this point in the history is a bit irritating for
bisectability.  After you build and test an earlier commit, this
path is a generated and ignored, and then checking out this commit
or a later one will fail without "make clean".  It is only a minor
irritation, but still noticeable.

Thanks.

^ permalink raw reply

* Re: [PATCH v5 09/15] remote-testgit: exercise more features
From: Junio C Hamano @ 2012-11-21 18:26 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: git, Johannes Schindelin, Max Horn, Jeff King, Sverre Rabbelier,
	Brandon Casey, Brandon Casey, Jonathan Nieder, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <1352642392-28387-10-git-send-email-felipe.contreras@gmail.com>

Felipe Contreras <felipe.contreras@gmail.com> writes:

> Unfortunately they do not work.

As far as I can tell, "more features" simply mean one, no?  Perhaps

    remote-testgit: exercise non-default refspec feature

or something.

> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  git-remote-testgit        | 18 +++++++++++++----
>  t/t5801-remote-helpers.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 63 insertions(+), 4 deletions(-)
>  mode change 100755 => 100644 t/t5801-remote-helpers.sh

Oops.

Again, please check the fixup! interspersed in the result I'll queue
on 'pu'.

Thanks.

^ permalink raw reply

* Re: [PATCH v5 06/15] remote-testgit: get rid of non-local functionality
From: Junio C Hamano @ 2012-11-21 18:26 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: git, Johannes Schindelin, Max Horn, Jeff King, Sverre Rabbelier,
	Brandon Casey, Brandon Casey, Jonathan Nieder, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <1352642392-28387-7-git-send-email-felipe.contreras@gmail.com>

Felipe Contreras <felipe.contreras@gmail.com> writes:

> This only makes sense for the python remote helpers framework.

A better explanation is sorely needed for this.  If the test were
feeding python snippet to be sourced by python remote helper to be
tested, the new remote-testgit.bash would not have any hope (nor
need) to grok it, and "this only makes sense for python" makes
perfect sense and clear enough, but that is not the case.

If the justification were like this:

    remote-testgit: remove non-local tests
    
    The simplified remote-testgit does not talk with any remote
    repository and incapable of running non-local tests.  Remove
    them.

I would understand it, and I wouldn't say it is a regression in the
test not to test "non-local", as that is not essential aspect of
these tests (we are only interested in testing the object/ref
transfer over remote-helper interface and do not care what the
"other side" really is).

But I am not quite sure what you really mean by "non-local"
functionality in the first place.  The original test weren't opening
network port to emulate multi-host remote transfer, were it?

Thanks.

^ permalink raw reply

* Re: [PATCH v5 08/15] remote-testgit: cleanup tests
From: Junio C Hamano @ 2012-11-21 18:28 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: git, Johannes Schindelin, Max Horn, Jeff King, Sverre Rabbelier,
	Brandon Casey, Brandon Casey, Jonathan Nieder, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <1352642392-28387-9-git-send-email-felipe.contreras@gmail.com>

Felipe Contreras <felipe.contreras@gmail.com> writes:

> We don't need a bare 'server' and an intermediary 'public'. The repos
> can talk to each other directly; that's what we want to exercise.

The previous patch to remove the test (the one that covered a case
where a bug was fixed in an older git-remote-testpy and tried to
catch the bug when it resurfaced) made sense even with its
ultra-short justification "irrelevant".

But I am not sure if this one is so cut-and-dried.  The repos can
talk to each other directly, but at the same time the tests were
exercising interactions between bare and non-bare repositories,
weren't they?  Talking to each other may be one of the things we
want to exercise, but that does not necessarily be the only thing.

If it were explained like this (note that I am *guessing* what you
meant to achieve by this patch, which may be wrong, in which case
the log message needs further clarification):

	Going through an intermediary 'public' may have exercised
	interactions among combinations of bare and non-bare
	repositories a bit more, but that is not an issue specific
	to the remote-helper transfer that we want to be testing in
	this script.  Simplify the tests to let two repositories
	talk directly with each other.

I think the changes themselves make sense.

^ permalink raw reply

* Re: [PATCH v5 00/15] fast-export and remote-testgit improvements
From: Junio C Hamano @ 2012-11-21 19:05 UTC (permalink / raw)
  To: Felipe Contreras
  Cc: git, Johannes Schindelin, Max Horn, Jeff King, Sverre Rabbelier,
	Brandon Casey, Brandon Casey, Jonathan Nieder, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <CAMP44s3h5+KS3ixoLkJeiS+n_neBV-Dyj=Cww0ZrU6UKsNxphQ@mail.gmail.com>

Felipe Contreras <felipe.contreras@gmail.com> writes:

> On Sun, Nov 11, 2012 at 2:59 PM, Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
>
> Since these are having some problems getting in, let me point out
> which I think are important, and which not.

I finished reading the series, and found them mostly sensible.

I'll send out comments on individual patches, and will push them
out, interspersed with "fixup!" commits, later on 'pu' when I am
done for the day, perhaps in 7 hours or so.

There is one thing I am not sure about with this series, though.

I can agree that the updates to fast-export will make remote-testgit
script work better, but I cannot tell how big an impact the changes
will have to people's existing use of fast-export.  Some of them may
be relying on the current behaviour (in other words, they may be
relying on "existing bugs"), which may mean that this series will
bring regression to them.  I am still open to reasonable objections
along the lines of "This script X uses fast-export and is broken
when used with the updated behaviour." if there is any.

^ permalink raw reply

* [PATCH] remote-curl.c: Fix a compiler warning
From: Ramsay Jones @ 2012-11-21 19:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jeff King, GIT Mailing-list

In particular, gcc issues an "'gzip_size' might be used uninitialized"
warning (-Wuninitialized). However, this warning is a false positive,
since the 'gzip_size' variable would not, in fact, be used uninitialized.
In order to suppress the warning, we simply initialise the variable to
zero in it's declaration.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

Hi Junio,

This is on top of next. (commit df126e108: "remote-curl: hoist gzip
buffer size to top of post_rpc", 31-10-2012).

Thanks!

ATB,
Ramsay Jones

 remote-curl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/remote-curl.c b/remote-curl.c
index d8b3600..9a8b123 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -400,7 +400,7 @@ static int post_rpc(struct rpc_state *rpc)
 	struct curl_slist *headers = NULL;
 	int use_gzip = rpc->gzip_request;
 	char *gzip_body = NULL;
-	size_t gzip_size;
+	size_t gzip_size = 0;
 	int err, large_request = 0;
 
 	/* Try to load the entire request, if we can fit it into the
-- 
1.8.0

^ permalink raw reply related

* Duplicate test numbers in pu.
From: Ramsay Jones @ 2012-11-21 19:14 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jeff King, git, GIT Mailing-list, felipe.contreras


Hi Junio,

I noticed that the pu branch has two tests with number t0007, viz:

    $ cd t
    $ make test-lint-duplicates
    duplicate test numbers: t0007
    make: *** [test-lint-duplicates] Error 1
    $ 

In particular, t/t0007-git-var.sh is added by branch 'jk/send-email-\
sender-prompt', while t/t0007-ignores.sh is added by branch 'as/check-ignore'.

Also:

    $ make test-lint-executable
    non-executable tests: t5801-remote-helpers.sh
    make: *** [test-lint-executable] Error 1
    $

(added in branch 'fc/fast-export-fixes').

HTH

ATB,
Ramsay Jones

^ permalink raw reply

* Re: [regression] Newer gits cannot clone any remote repos
From: Douglas Mencken @ 2012-11-21 19:20 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Torsten Bögershausen, git
In-Reply-To: <50A53FAC.8020401@ramsay1.demon.co.uk>

> The threaded index-pack code did not fail for
> me on cygwin at all during development, including tests, but failed
> immediately I installed v1.7.11. On real repositories, it failed
> intermittently. On some repos it always failed, on some it never
> failed and on some others it would sometimes fail, sometimes not.

Then why did you commit it? If it has so high random failure rate.

^ permalink raw reply

* Re: [PATCH v5 11/15] remote-testgit: make clear the 'done' feature
From: Sverre Rabbelier @ 2012-11-21 19:20 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Max Horn, Felipe Contreras, git, Johannes Schindelin, Jeff King,
	Brandon Casey, Brandon Casey, Jonathan Nieder, Ilari Liusvaara,
	Pete Wyckoff, Ben Walton, Matthieu Moy, Julian Phillips
In-Reply-To: <7vy5hu3h11.fsf@alter.siamese.dyndns.org>

On Wed, Nov 21, 2012 at 10:11 AM, Junio C Hamano <gitster@pobox.com> wrote:
> I'd state it like this, but I may have guessed what Felipe intended
> incorrectly.
>
>     remote-testgit: advertise "done" feature and write "done" ourselves
>
>     Instead of letting "fast-export" advertise the feature and ending
>     its stream with "done", do it ourselves.  This way, it would make it
>     more clear to people who want to write their own remote-helper to
>     produce fast-export streams without using "fast-export
>     --use-done-feature" that they are supposed to end their stream with
>     "done".

With that commit message:

Acked-by: Sverre Rabbelier <srabbelier@gmail.com>

-- 
Cheers,

Sverre Rabbelier

^ 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