* Re: Problem with git-cvsimport
From: Aidan Van Dyk @ 2007-10-31 12:40 UTC (permalink / raw)
To: dev; +Cc: git
In-Reply-To: <200710302244.50034.robin.rosenberg.lists@dewire.com>
Robin Rosenberg wrote:
> I use fromcvs which is *very* fast, and quite memory conservative compared
> to the others and seems reliable so far (six months). It probably breaks
> on exotic variants of branches though, but I don't have those / don't care
> about them.
I actually use fromcvs for a few repositories, and actually started using it
on repositories where cvsps (and git-cvsimport) fail.
> Drawbacks, more dependencies and access to the rcs files is required and
> tags are not converted.
Most projects have "rsyncs" or "tarballs" of their CVS repository available,
making fromcvs possible on most of them. And CVS tags, well they are about
as good as CVS $Keywords$.
^ permalink raw reply
* cpio command not found
From: Bill Lear @ 2007-10-31 12:51 UTC (permalink / raw)
To: git
I just cloned the latest git and it builds ok, but fails when I clone:
% uname -a
Linux gronk.zopyra.com 2.4.9-21 #1 Thu Jan 17 14:16:30 EST 2002 i686 unknown
% git --version
git version gitgui.0.8.4.g9c514
% git clone --bare ~/my_repo
Initialized empty Git repository in /repos/git/my_repo/
/opt/git/bin/git-clone: line 297: cpio: command not found
So, should git not check this when it is building? I don't remember
this dependence from earlier versions of git. I have been running git
1.4.xx on this machine for a while...
Bill
^ permalink raw reply
* Re: Recording merges after repo conversion
From: Johan Herland @ 2007-10-31 12:43 UTC (permalink / raw)
To: git; +Cc: Johannes Schindelin, Peter Karlsson, Lars Hjemli, Benoit SIGOURE
In-Reply-To: <Pine.LNX.4.64.0710311059020.4362@racer.site>
[-- Attachment #1: Type: text/plain, Size: 2531 bytes --]
On Wednesday 31 October 2007, Johannes Schindelin wrote:
> Hi,
>
> On Wed, 31 Oct 2007, Peter Karlsson wrote:
>
> > Johannes Schindelin:
> >
> > > Why should it? This would contradict the whole "a commit sha1 hashes
> > > the commit, and by inference the _whole_ history" principle.
> >
> > Does it?
>
> Yes! Of course! If what you want becomes possible, I could make an evil
> change in history long gone, and slip it by you. You could not even see
> the history which changed.
Well, technically, if the grafts file was part of the repo, you wouldn't be
able to change the (in-tree) grafts file without affecting the SHA1 of HEAD.
In other words, given a commit SHA1 sum, you can be sure that someone else
who checks out the same commit (and has no local modification to their grafts
file) will see exactly the same history as you do.
To a certain degree, this is actually "safer" than today's (out-of-tree)
solution, where one can change the grafts file _without_ affecting the
current HEAD (SHA1 sum), and thus will not see the same history as someone
else who checks out the same HEAD. This is of course _intended_ to a certain
degree by the current implementation, but can easily cause confusion if
people lose track of what's in their respective grafts files.
Of course, this is both a blessing and a curse: Say, for example, we have
three commits:
... --> A --> B --> C
and commit B changes the (in-tree) grafts file. Now if I have HEAD @ A, I will
see a different history than if I have HEAD @ C. Worse: If one person has
HEAD @ A, and another person has HEAD @ C, and neither is aware of the grafts
file change in B, there is _plenty_ of room for getting confused if the two
persons start discussing the repo history. Note, however, that similar
confusement can be achieved today if one of the persons forgets having
changed his out-of-tree grafts file
The grafts file concept is very powerful, but can also be extremely confusing.
Adding in-tree versioning of the grafts file will make it more powerful
(since we can now easily share and update "errata" to the repo history), but
it might also make things _orders_of_magnitude_ more confusing (as
demonstrated in the above example, although to be fair, similar confusement
can be had in today's out-of-tree solution). At some point things may become
so confusing that we'd rather drop the feature instead.
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: Recording merges after repo conversion
From: Johannes Schindelin @ 2007-10-31 12:32 UTC (permalink / raw)
To: Peter Karlsson; +Cc: Lars Hjemli, Benoit SIGOURE, git
In-Reply-To: <Pine.LNX.4.64.0710311305290.16298@ds9.cixit.se>
Hi,
On Wed, 31 Oct 2007, Peter Karlsson wrote:
> > Yes! Of course! If what you want becomes possible, I could make an
> > evil change in history long gone, and slip it by you. You could not
> > even see the history which changed.
>
> I would see the grafts file being changed, which would alert me (the
> problem I have with graft is that it *replaces* history information for
> an element, not just *add* to it, which threw me off at my first attempt
> at creating one).
The thing is: it is too easy to overlook a tiny change like this. And it
is very, very difficult to see what it _really_ changed.
Therefore I am _strongly_ opposed to changing the current behaviour.
> > You can do that already. But you have to ask the people at the other
> > end to actually apply the graft.
>
> Last time I tried, git would not add files that was in the ".git"
> subdirectory to version control. I might have done something
> incorrectly, though, so I'll see if it works now.
Well, I was not explicit enough. You can check in the grafts file _under
a different name_. Outside of .git/.
Hth,
Dscho
^ permalink raw reply
* Re: How to remove a specific hunk
From: Pascal Obry @ 2007-10-31 12:24 UTC (permalink / raw)
To: Florian Weimer; +Cc: Johannes Schindelin, Benoit SIGOURE, Alex Riesen, git list
In-Reply-To: <82zlxzsdkf.fsf@mid.bfk.de>
Florian Weimer a écrit :
> I think Benoit wants to remove it from the working copy (and,
> presumably, the index too). "Revert hunk" and "Move hunk to stash"
> might indeed be useful additions to citool.
That was not Benoit but me who asked this question. I want indeed the
hunk to be reverted/removed on the working copy. I had many answers to
do this but I still think a "git reset --interactive" with the
possibility to revert some hunks would be easier.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
^ permalink raw reply
* Re: Recording merges after repo conversion
From: Peter Karlsson @ 2007-10-31 12:17 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Benoit SIGOURE, git
In-Reply-To: <Pine.LNX.4.64.0710301504270.4362@racer.site>
Johannes Schindelin:
> No. Use filter-branch, and publish the cleaned up history (possibly as a
> new branch/repo).
I'm considering doing this, and just replace the published repository
with the "fixed" one (and fix-up all my clonings of it). I'm having
some problems digesting the git-filter-branch manual page though--is
there an easy way of automating the process, given that I now have a
"grafts" file that expresses what I would like git-filter-branch to do
(I guess it would have to work backwards changing the merge points, to
be able to find all the revisions under the names I've used in the
grafts file)?
--
\\// Peter - http://www.softwolves.pp.se/
^ permalink raw reply
* Re: Recording merges after repo conversion
From: Peter Karlsson @ 2007-10-31 12:07 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Lars Hjemli, Benoit SIGOURE, git
In-Reply-To: <Pine.LNX.4.64.0710311059020.4362@racer.site>
> Yes! Of course! If what you want becomes possible, I could make an
> evil change in history long gone, and slip it by you. You could not
> even see the history which changed.
I would see the grafts file being changed, which would alert me (the
problem I have with graft is that it *replaces* history information for
an element, not just *add* to it, which threw me off at my first
attempt at creating one).
> You can do that already. But you have to ask the people at the other
> end to actually apply the graft.
Last time I tried, git would not add files that was in the ".git"
subdirectory to version control. I might have done something
incorrectly, though, so I'll see if it works now.
> If you really think that, I doubt you understood the issues at hand.
I have, I'm just thinking of the issues that are created by solving the
issues it does solve.
--
\\// Peter - http://www.softwolves.pp.se/
^ permalink raw reply
* Re: How to remove a specific hunk
From: Peter Baumann @ 2007-10-31 12:00 UTC (permalink / raw)
To: Johannes Schindelin
Cc: Benoit SIGOURE, Alex Riesen, Shawn O. Pearce, git list
In-Reply-To: <Pine.LNX.4.64.0710311104450.4362@racer.site>
spearce Cc'ed, because this seems like a nice feature to add to git-gui
In no way should this imply that YOU have to implement this!
On Wed, Oct 31, 2007 at 11:06:18AM +0000, Johannes Schindelin wrote:
> Hi,
>
> On Wed, 31 Oct 2007, Benoit SIGOURE wrote:
>
> > On Oct 26, 2007, at 9:20 PM, Alex Riesen wrote:
> >
> > > Pascal Obry, Fri, Oct 26, 2007 17:10:38 +0200:
> > > >
> > > > Before committing sometimes I want to remove a specific hunk. Say in
> > > > file a.txt I have in the diff 3 hunks, I want to revert/delete/remove
> > > > the second one. Is there a way to do that ?
> > >
> > > Take a look at git-gui. Try right-clicking in the diff pane at the
> > > bottom.
> >
> > This only allows you to stage a given hunk, not to remove one. Right
> > now I'm in a situation where I need to remove a specific hunk to compile
> > and it's sad that git-gui doesn't provide an option so that you can
> > right-click -> revert hunk.
>
> You have seen that there are two different file lists, "staged changes"
> and "unstaged changes", right? AFAIK if you click on the file in "staged
> changes", you can find the staged hunk and then remove it from the staged
> area.
>
> "Revert hunk" would not make any sense, since the hunk disappears once you
> staged/unstaged it.
>
On the other hand, something like this would allow you to remove bogus
hunks like debug statements you want to lose, because you tested it and
all works now.
Now you first have to stage all the things you want to keep, and then
select "Commit->Revert Changes" in the menu to remove a hunk forever which
is a little clumsy if you have many hunks and just want to remove one of
them. Seems like a nice feature to add to git gui if you throw in an extra
Yes-No question for the user IFF he realy wants to remove the hunk forever.
-Peter
^ permalink raw reply
* Re: How to remove a specific hunk
From: Florian Weimer @ 2007-10-31 11:56 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Benoit SIGOURE, Alex Riesen, git list
In-Reply-To: <Pine.LNX.4.64.0710311104450.4362@racer.site>
* Johannes Schindelin:
> You have seen that there are two different file lists, "staged
> changes" and "unstaged changes", right? AFAIK if you click on the
> file in "staged changes", you can find the staged hunk and then
> remove it from the staged area.
>
> "Revert hunk" would not make any sense, since the hunk disappears
> once you staged/unstaged it.
I think Benoit wants to remove it from the working copy (and,
presumably, the index too). "Revert hunk" and "Move hunk to stash"
might indeed be useful additions to citool.
--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
^ permalink raw reply
* Re: How to remove a specific hunk
From: Johannes Schindelin @ 2007-10-31 11:06 UTC (permalink / raw)
To: Benoit SIGOURE; +Cc: Alex Riesen, git list
In-Reply-To: <13D08D3F-3647-4E20-AF80-8EC6FD14E66A@lrde.epita.fr>
Hi,
On Wed, 31 Oct 2007, Benoit SIGOURE wrote:
> On Oct 26, 2007, at 9:20 PM, Alex Riesen wrote:
>
> > Pascal Obry, Fri, Oct 26, 2007 17:10:38 +0200:
> > >
> > > I'm very new to Git... but start to love it :)
> > >
> > > Before committing sometimes I want to remove a specific hunk. Say in
> > > file a.txt I have in the diff 3 hunks, I want to revert/delete/remove
> > > the second one. Is there a way to do that ?
> >
> > Take a look at git-gui. Try right-clicking in the diff pane at the
> > bottom.
>
> This only allows you to stage a given hunk, not to remove one. Right
> now I'm in a situation where I need to remove a specific hunk to compile
> and it's sad that git-gui doesn't provide an option so that you can
> right-click -> revert hunk.
You have seen that there are two different file lists, "staged changes"
and "unstaged changes", right? AFAIK if you click on the file in "staged
changes", you can find the staged hunk and then remove it from the staged
area.
"Revert hunk" would not make any sense, since the hunk disappears once you
staged/unstaged it.
Ciao,
Dscho
^ permalink raw reply
* Re: Recording merges after repo conversion
From: Johannes Schindelin @ 2007-10-31 11:01 UTC (permalink / raw)
To: Peter Karlsson; +Cc: Lars Hjemli, Benoit SIGOURE, git
In-Reply-To: <Pine.LNX.4.62.0710311048450.13264@perkele.intern.softwolves.pp.se>
Hi,
On Wed, 31 Oct 2007, Peter Karlsson wrote:
> Johannes Schindelin:
>
> > Why should it? This would contradict the whole "a commit sha1 hashes
> > the commit, and by inference the _whole_ history" principle.
>
> Does it?
Yes! Of course! If what you want becomes possible, I could make an evil
change in history long gone, and slip it by you. You could not even see
the history which changed.
> Why can't the grafts file itself be committed to the repository and live
> in the history?
You can do that already. But you have to ask the people at the other end
to actually apply the graft.
> Well, yeah, the SHA1 hashing is one of Git's main strengths, but it also
> opens up some weaknesses.
If you really think that, I doubt you understood the issues at hand.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH 10/10] push: teach push to be quiet if local ref is strict subset of remote ref
From: Steffen Prohaska @ 2007-10-31 10:50 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v8x5jiseh.fsf@gitster.siamese.dyndns.org>
On Oct 31, 2007, at 9:45 AM, Junio C Hamano wrote:
>> - git push can be configuration to push only the current
>> branch, as outlined below. This would certainly work. What
>> I do not like is that you first need to do some configuration
>> before you get a safe working environment.
>
> I would not doubt it would be safer for _your_ workflow, but you
> should consider the risk of making things more cumbersome for
> workflows of others by enforcing that policy.
Together with the '--create' flag it would be safer in all
cases, because it would always do _less_ than what git push
currently does. The safest choice would be if "git push"
refused to do anything until configured appropriately.
"safer" is independent of the workflow.
But I see that it may be more cumbersome depending on the
workflow.
I'm mainly interested in using git against a shared repo,
and make it as simple and as safe as possible to use in
such a setup. I suspect that git is more optimized for the
workflow used for the Linux kernel and for developing git,
which heavily rely on sending patches to mailing lists and
pulling fro read-only repos.
> In other words, don't change anything unless you have a very
> good reason to convince everybody else that it is universally
> a good change to the default.
What I can imagine would not be universally better, but it
would be universally safer. You'd need to either explicitly
tell git push how to act (e.g. '--current' or '--matching'
flags), or you could explicitly configure git to always act in
a specific way. But it would only start to act this way _after_
being configured appropriately.
Steffen
^ permalink raw reply
* Re: Possible bug: git-svn leaves broken tree in case of error
From: Karl Hasselström @ 2007-10-31 10:23 UTC (permalink / raw)
To: Eric Wong; +Cc: Anton Korobeynikov, git
In-Reply-To: <20071031084257.GA2911@mayonaise>
On 2007-10-31 01:42:57 -0700, Eric Wong wrote:
> Warning instead of die-ing here is not a good option, because it can
> lead to inconsistent author data inside populating history. I
> believe it's better to error out immediately so the user can fix
> their authors file.
Yes, that seems to be the only sensible opition.
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle
^ permalink raw reply
* Re: How to remove a specific hunk
From: Benoit SIGOURE @ 2007-10-31 10:10 UTC (permalink / raw)
To: Alex Riesen; +Cc: git list
In-Reply-To: <20071026192034.GA3062@steel.home>
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
On Oct 26, 2007, at 9:20 PM, Alex Riesen wrote:
> Pascal Obry, Fri, Oct 26, 2007 17:10:38 +0200:
>>
>> I'm very new to Git... but start to love it :)
>>
>> Before committing sometimes I want to remove a specific hunk. Say in
>> file a.txt I have in the diff 3 hunks, I want to revert/delete/remove
>> the second one. Is there a way to do that ?
>
> Take a look at git-gui. Try right-clicking in the diff pane at the
> bottom.
This only allows you to stage a given hunk, not to remove one. Right
now I'm in a situation where I need to remove a specific hunk to
compile and it's sad that git-gui doesn't provide an option so that
you can right-click -> revert hunk.
--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]
^ permalink raw reply
* Re: Recording merges after repo conversion
From: Peter Karlsson @ 2007-10-31 9:50 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Lars Hjemli, Benoit SIGOURE, git
In-Reply-To: <Pine.LNX.4.64.0710310227340.4362@racer.site>
Johannes Schindelin:
> Why should it? This would contradict the whole "a commit sha1 hashes the
> commit, and by inference the _whole_ history" principle.
Does it? Why can't the grafts file itself be committed to the repository and
live in the history?
Well, yeah, the SHA1 hashing is one of Git's main strengths, but it also
opens up some weaknesses.
--
\\// Peter - http://www.softwolves.pp.se/
^ permalink raw reply
* Re: remote#branch
From: Pascal Obry @ 2007-10-31 9:34 UTC (permalink / raw)
To: David Kastrup
Cc: Jeff King, Linus Torvalds, Matthieu Moy, Tom Prince, Theodore Tso,
Junio C Hamano, Jan Hudec, Johannes Schindelin, Petr Baudis,
Paolo Ciarrocchi, git
In-Reply-To: <85pryvzt1h.fsf@lola.goethe.zz>
David Kastrup a écrit :
> You just write <URL:http://host/git repo with spaces in the path> and
> have a good chance it will work.
Well "good chance" is not an option for reliable software :)
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
^ permalink raw reply
* Re: remote#branch
From: Pascal Obry @ 2007-10-31 9:33 UTC (permalink / raw)
To: Jeff King; +Cc: Jakub Narebski, git
In-Reply-To: <20071031015708.GA24403@coredump.intra.peff.net>
Jeff King a écrit :
> 'http://foo.tld/url with a space'
>
> rather than:
>
> http://foo.tld/url+with+a+space
>
> ?
>
> I think the latter is much more common, if only because of the fact that
> copy and paste from most browsers' location bars gives the encoded
> version.
I agree 100%. It is the more common as it follows the standard encoding.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
^ permalink raw reply
* Re: remote#branch
From: Mike Hommey @ 2007-10-31 9:15 UTC (permalink / raw)
To: Andreas Ericsson; +Cc: Jeff King, Jakub Narebski, git
In-Reply-To: <472844D4.8050306@op5.se>
On Wed, Oct 31, 2007 at 10:03:16AM +0100, Andreas Ericsson <ae@op5.se> wrote:
> >Or copied from gitweb.
> >
>
> Perhaps, but I've never seen that done. Partly because you can't be sure
> the HTTP url is the same as the git address (perhaps people are used to
> this from CVS and the likes), and partly because you'd, for most cases,
> want to use git:// or ssh transport instead of http.
>
> It might be nifty to have gitweb print some git-valid locator for a repo
> though, or even a full copy-pastable "git clone git://host/path/to/repo.git"
> command-line thingie. I'll look into it when I have leisure.
Hum... it already does print http and git "Mirror URL"s which are ready to
be copy/pasted to feed git clone arguments.
Mike
^ permalink raw reply
* Re: [PATCH 10/10] push: teach push to be quiet if local ref is strict subset of remote ref
From: Junio C Hamano @ 2007-10-31 9:14 UTC (permalink / raw)
To: Steffen Prohaska; +Cc: git
In-Reply-To: <7v8x5jiseh.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> 1. Error on the sending side. The ref parameters given to
> git-push were bogus, or they were good commits but they were
> not fully connected to the commits the other side has
> (i.e. local repository corruption). pack-objects will abort
> and no remote (nor local tracking ref that tracks what we
> pushed to the remote) would be updated. This should be
> "most severe" in _any_ workflow, so I do not mind calling
> this "fatal".
By the way, as git-push allows an arbitrary SHA-1 on the left
hand side of a refspec, you can have the above error without a
corrupted repository. Here is how.
* You run git-fetch from elsewhere. It is a small fetch and we
decide not to keep the pack (iow, run unpack-objects instead
of index-pack on the local side). Or the fetch is over dumb
transport that walks commits one-by-one.
This git-fetch is interrupted. We do _not_ update any refs
in such a case, but we do not eradicate loose objects that
were downloaded. They stay dangling.
* You push one of the commits downloaded above. I.e. it is
not connected to any of your ref.
^ permalink raw reply
* Re: remote#branch
From: Andreas Ericsson @ 2007-10-31 9:03 UTC (permalink / raw)
To: Mike Hommey; +Cc: Jeff King, Jakub Narebski, git
In-Reply-To: <20071031083506.GA23316@glandium.org>
Mike Hommey wrote:
> On Wed, Oct 31, 2007 at 08:09:01AM +0100, Andreas Ericsson <ae@op5.se> wrote:
>> Jeff King wrote:
>>> On Wed, Oct 31, 2007 at 02:49:16AM +0100, Jakub Narebski wrote:
>>>
>>>>> ...which is a quoting mechanism, and it's not even one commonly used in
>>>>> emails (i.e., people have written "parse a URL from this text" scripts
>>>>> for RFC-encoded URLs, but _not_ for shell quoting).
>>>> I don't think RFC-encoding is quoting mechanism used in emails, either.
>>> That's funny, because I have hundreds of mails where that is the case,
>>> and none where people used shell-quoting. Most URLs don't _need_ any
>>> encoding, so we don't notice either way. But are you honestly telling me
>>> that if you needed to communicate a URL with a space via email, you
>>> would write:
>>>
>>> 'http://foo.tld/url with a space'
>>>
>>> rather than:
>>>
>>> http://foo.tld/url+with+a+space
>>>
>>> ?
>>>
>> I think 99% of all URL's communicated via email are copy-pasted from a
>> webbrowsers location bar. I believe most git urls (or grls, or whatever
>> you wanna call them) communicated via email are copy-pasted from ones
>> config, or written out manually.
>
> Or copied from gitweb.
>
Perhaps, but I've never seen that done. Partly because you can't be sure
the HTTP url is the same as the git address (perhaps people are used to
this from CVS and the likes), and partly because you'd, for most cases,
want to use git:// or ssh transport instead of http.
It might be nifty to have gitweb print some git-valid locator for a repo
though, or even a full copy-pastable "git clone git://host/path/to/repo.git"
command-line thingie. I'll look into it when I have leisure.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: [PATCH 10/10] push: teach push to be quiet if local ref is strict subset of remote ref
From: Junio C Hamano @ 2007-10-31 8:45 UTC (permalink / raw)
To: Steffen Prohaska; +Cc: git
In-Reply-To: <F5F68690-68A3-4AFC-A79C-FF02910F0359@zib.de>
Steffen Prohaska <prohaska@zib.de> writes:
> Would it be acceptable if the error was less severe in the
> case of local being a strict subset of remote?
> Daniel proposed
> "%s: nothing to push to %s, but you are not up-to-date and
> may want to pull"
> It would still be an error, but a less severe one.
I am not convinced there is one true total order of "error
severity" that applies uniformly across different workflows, so
I would not immediately agree if you are suggesting to introduce
"severity levels". But it certainly makes a lot of sense to be
able to _differentiate_ kinds of errors, and to have the calling
scripts and the push command itself react to them.
What are the possible error conditions?
1. Error on the sending side. The ref parameters given to
git-push were bogus, or they were good commits but they were
not fully connected to the commits the other side has
(i.e. local repository corruption). pack-objects will abort
and no remote (nor local tracking ref that tracks what we
pushed to the remote) would be updated. This should be
"most severe" in _any_ workflow, so I do not mind calling
this "fatal".
2. Push to a ref does fast forward, but the update hook on the
remote side declines. The ref on the remote nor the
corresponding local tracking ref would not be updated, and
the command would fail.
For all the other classes of errors, the ref on the remote nor
the corresponding local tracking ref would not be updated, and
by default, an error on any ref causes the command to error out.
For each of these classes of errors, we _could_ have an option
to let you tell the command not to error out because of it.
3. Push to a ref does not fast forward and --force is not
given, but you can prove the remote is strict subset of
local (what your 10/10 wants to do).
4. Same as #3 but you cannot prove the remote is strict subset
of local.
Any other classes?
It might be a good idea to generalize 3 & 4, by the way. The
remote being a strict descendant of what is being pushed might
be something you happened to want today, but somebody else may
come up with a different rule tomorrow. So,
3'. Push to a ref does not fast forward and --force is not
given, but there is a configuration (would this be per
remote?, per remote branch?, or per local branch?) that
tells git-push to call a hook on the local side that takes
<ref being pushed, ref on the remote> as its parameter.
The result from the hook does not change the fact that this
is still an error, but it can instruct git-push not to
error out due to this condition.
In some other workflows, it might make sense to maybe even
making 2. not to cause the error from git-push. I dunno.
> It could also be a good idea to teach git push transactional
> behaviour.
That is certainly true. I am not sure about other transports,
but it should be a relatively straightforward protocol extension
for the git native transport.
> - git push can be configuration to push only the current
> branch, as outlined below. This would certainly work. What
> I do not like is that you first need to do some configuration
> before you get a safe working environment.
I would not doubt it would be safer for _your_ workflow, but you
should consider the risk of making things more cumbersome for
workflows of others by enforcing that policy.
In other words, don't change anything unless you have a very
good reason to convince everybody else that it is universally
a good change to the default.
^ permalink raw reply
* Re: Possible bug: git-svn leaves broken tree in case of error
From: Eric Wong @ 2007-10-31 8:42 UTC (permalink / raw)
To: Anton Korobeynikov; +Cc: git
In-Reply-To: <20071031075524.GB7798@muzzle>
Eric Wong <normalperson@yhbt.net> wrote:
> Anton Korobeynikov <asl@math.spbu.ru> wrote:
> > Hello, Everyone.
> >
> > I noticed this bug several times. Consider the following conditions are
> > met:
> > - We're syncing from svn using git-svn :)
> > - We have authors file provided
> > - We have a changeset with author unlisted in the authors file.
> >
> > git-svn dies due to the following code:
> > sub check_author {
> > my ($author) = @_;
> > if (!defined $author || length $author == 0) {
> > $author = '(no author)';
> > }
> > if (defined $::_authors && ! defined $::users{$author}) {
> > die "Author: $author not defined in $::_authors file\n";
> > }
> > $author;
> > }
> >
> > Unfortunately it leaves repository in some middle state: git-svn itself
> > thinks, that it synced with everything, but git itself doesn't "see" any
> > changesets anymore. I found no way to repair tree after such situation,
> > so I had to repull from scratch.
> >
> > I found myself, that this should be warning (and fix in this case is
> > trivial), not error (maybe some commandline switch to control behaviour,
> > etc). It can be even error, but breaking tree is definitely bug in this
> > case.
>
> You should be able to change the numbers in *-maxRev back to
> an old revision in .git/svn/.metadata. Does that fix things for you
> so you can resume synching again?
>
> I'll have to investigate the die()-ing of check_authors since
> that should cause git-svn to quit before the maxRev numbers
> get incremented.
With the following test case, I'm not able to reproduce what you're
describing.
But yes, die-ing here and not being able to gracefully recover is a
nasty bug...
Warning instead of die-ing here is not a good option, because it can
lead to inconsistent author data inside populating history. I believe
it's better to error out immediately so the user can fix their authors
file.
diff --git a/t/t9117-git-svn-authors-file.sh b/t/t9117-git-svn-authors-file.sh
new file mode 100755
index 0000000..4566307
--- /dev/null
+++ b/t/t9117-git-svn-authors-file.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Eric Wong
+#
+
+test_description='git-svn authors file tests'
+
+. ./lib-git-svn.sh
+
+cat > svn-authors <<EOF
+aa = AAAAAAA AAAAAAA <aa@example.com>
+bb = BBBBBBB BBBBBBB <bb@example.com>
+EOF
+
+test_expect_success 'setup svnrepo' "
+ svn mkdir -m aa --username aa $svnrepo/aa &&
+ svn mkdir -m bb --username bb $svnrepo/bb &&
+ svn mkdir -m cc --username cc $svnrepo/cc &&
+ svn mkdir -m dd --username dd $svnrepo/dd
+ "
+
+test_expect_failure 'start import with incomplete authors file' "
+ git-svn clone --authors-file=svn-authors $svnrepo x
+ "
+
+test_expect_success 'imported 2 revisions successfully' "
+ cd x &&
+ test \`git rev-list refs/remotes/git-svn | wc -l\` -eq 2 &&
+ git rev-list -1 --pretty=raw refs/remotes/git-svn | \
+ grep '^author BBBBBBB BBBBBBB <bb@example\.com> ' &&
+ git rev-list -1 --pretty=raw refs/remotes/git-svn~1 | \
+ grep '^author AAAAAAA AAAAAAA <aa@example\.com> ' &&
+ cd ..
+ "
+
+cat >> svn-authors <<EOF
+cc = CCCCCCC CCCCCCC <cc@example.com>
+dd = DDDDDDD DDDDDDD <dd@example.com>
+EOF
+
+test_expect_success 'continues to import once authors have been added' "
+ cd x &&
+ git-svn fetch --authors-file=../svn-authors &&
+ test \`git rev-list refs/remotes/git-svn | wc -l\` -eq 4 &&
+ git rev-list -1 --pretty=raw refs/remotes/git-svn | \
+ grep '^author DDDDDDD DDDDDDD <dd@example\.com> ' &&
+ git rev-list -1 --pretty=raw refs/remotes/git-svn~1 | \
+ grep '^author CCCCCCC CCCCCCC <cc@example\.com> ' &&
+ cd ..
+ "
+
+test_expect_success 'authors-file against globs' "
+ svn mkdir -m globs --username aa \
+ $svnrepo/aa/trunk $svnrepo/aa/branches $svnrepo/aa/tags &&
+ git-svn clone --authors-file=svn-authors -s $svnrepo/aa aa-work &&
+ svn mkdir -m aa/branches/bb --username bb $svnrepo/aa/branches/bb &&
+ svn mkdir -m aa/branches/ee --username ee $svnrepo/aa/branches/ee &&
+ svn mkdir -m aa/branches/cc --username cc $svnrepo/aa/branches/cc
+ "
+
+test_expect_failure 'fetch fails on ee' "
+ cd aa-work &&
+ git-svn fetch --authors-file=../svn-authors
+ "
+
+tmp_config_get () {
+ GIT_CONFIG=.git/svn/.metadata git config --get "$1"
+}
+
+test_expect_success 'failure happened without negative side effects' "
+ test 6 -eq \"\`tmp_config_get svn-remote.svn.branches-maxRev\`\" &&
+ test 6 -eq \"\`tmp_config_get svn-remote.svn.tags-maxRev\`\"
+ "
+
+cat >> ../svn-authors <<EOF
+ee = EEEEEEE EEEEEEE <ee@example.com>
+EOF
+
+test_expect_success 'fetch continues after authors-file is fixed' "
+ git-svn fetch --authors-file=../svn-authors &&
+ test 8 -eq \"\`tmp_config_get svn-remote.svn.branches-maxRev\`\" &&
+ test 8 -eq \"\`tmp_config_get svn-remote.svn.tags-maxRev\`\"
+ "
+
+test_done
--
Eric Wong
^ permalink raw reply related
* Re: remote#branch
From: Mike Hommey @ 2007-10-31 8:35 UTC (permalink / raw)
To: Andreas Ericsson; +Cc: Jeff King, Jakub Narebski, git
In-Reply-To: <47282A0D.9010400@op5.se>
On Wed, Oct 31, 2007 at 08:09:01AM +0100, Andreas Ericsson <ae@op5.se> wrote:
> Jeff King wrote:
> >On Wed, Oct 31, 2007 at 02:49:16AM +0100, Jakub Narebski wrote:
> >
> >>>...which is a quoting mechanism, and it's not even one commonly used in
> >>>emails (i.e., people have written "parse a URL from this text" scripts
> >>>for RFC-encoded URLs, but _not_ for shell quoting).
> >>I don't think RFC-encoding is quoting mechanism used in emails, either.
> >
> >That's funny, because I have hundreds of mails where that is the case,
> >and none where people used shell-quoting. Most URLs don't _need_ any
> >encoding, so we don't notice either way. But are you honestly telling me
> >that if you needed to communicate a URL with a space via email, you
> >would write:
> >
> > 'http://foo.tld/url with a space'
> >
> >rather than:
> >
> > http://foo.tld/url+with+a+space
> >
> >?
> >
>
> I think 99% of all URL's communicated via email are copy-pasted from a
> webbrowsers location bar. I believe most git urls (or grls, or whatever
> you wanna call them) communicated via email are copy-pasted from ones
> config, or written out manually.
Or copied from gitweb.
Mike
^ permalink raw reply
* Re: [PATCH 1/1] Add --first-parent support to interactive rebase.
From: Wincent Colaiuta @ 2007-10-31 8:24 UTC (permalink / raw)
To: Björn Steinbrink; +Cc: Johannes Schindelin, git
In-Reply-To: <20071031041751.GA3326@atjola.homenet>
El 31/10/2007, a las 5:17, Björn Steinbrink escribió:
> How about:
> \--first-parent::
> When this option is given and --preserve-merges is not, then
> merge commits are completely ignored and only commits from the
> first parent ancestry are rebased. This allows to pretend that
> merges never happened.
>
> If --preserve-merges is also given, the merge commits are
> preserved, but only their first parent is rebased as opposed to
> the default behaviour which would rebase all parents.
Minor nitpick:
- first parent ancestry are rebased. This allows to pretend that
+ first parent ancestry are rebased. This allows you to pretend that
Cheers,
Wincent
^ permalink raw reply
* Re: remote#branch
From: Robin Rosenberg @ 2007-10-31 8:25 UTC (permalink / raw)
To: David Kastrup
Cc: Jeff King, Linus Torvalds, Pascal Obry, Matthieu Moy, Tom Prince,
Theodore Tso, Junio C Hamano, Jan Hudec, Johannes Schindelin,
Petr Baudis, Paolo Ciarrocchi, git
In-Reply-To: <85pryvzt1h.fsf@lola.goethe.zz>
onsdag 31 oktober 2007 skrev David Kastrup:
> Jeff King <peff@peff.net> writes:
>
> > On Tue, Oct 30, 2007 at 12:38:27PM -0700, Linus Torvalds wrote:
> >
> >> So if you want to follow the RFC, you'd better give a real reason. And no,
> >> the existence of an RFC, and the fact that people use the same name for
> >> things that superficially _look_ the same is not a reason in itself.
> >>
> >> So hands up, people. Anybody who asked for RFC quoting. Give a damn
> >> *reason* already!
> >
> > I didn't ask for RFC quoting, but a nice side effect of URL syntax is
> > that they are machine parseable. If you wanted to write a tool to pick
> > the URLs out of this email and clone them as git repos, then how do you
> > find the end of:
> >
> > http://host/git repo with spaces in the path
> >
> > compared to:
> >
> > http://host/git+repo+with+spaces+in+the+path
>
> You just write <URL:http://host/git repo with spaces in the path> and
> have a good chance it will work.
It doesn't with KMail.
-- robin
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox