Git development
 help / color / mirror / Atom feed
* Re: How to Import a bitkeeper repo into git
From: Marco Costalba @ 2007-10-17  6:57 UTC (permalink / raw)
  To: Andreas Ericsson; +Cc: pete, Linus Torvalds, VMiklos, free cycle, git
In-Reply-To: <4714EF53.8090707@op5.se>

On 10/16/07, Andreas Ericsson <ae@op5.se> wrote:
> Marco Costalba wrote:
> > On 10/16/07, Pete/Piet Delaney <pete@bluelane.com> wrote:
> >
> >> Would it be worthwhile
> >> to install Qt4 from src and try to use qgit-2.0?
> >>
> >
> > Yes it is. There are a lot of new featrures, is almost as stable as
> > the previous and if you are interested in file history (annotations)
> > in qgit-2.0 this feature has been greatly speeded up.
> >
>
> The only thing I really, really, really don't like about qgit4 is the
> fact that it fudges up the commit-message. I've been trying for two
> days to get rid of the HTML output, but I just can't get it done
> without the signed-off-by email being enclosed in &lt;&gt; tags.
>

You mean when you commit some changes or when you brows the revisions?

If it is the highlighted title that annoy you I can try to remove the
background color, or set as plain text as an option.

> view without the colored box a lot more). The little arrows in the
> commit window are also fairly annoying, as one quite quickly understands
> that up-/down-arrows work much better for that sort of stuff anyway.
>

Little arrows should already be removable from settings->browse->'Show
smart labels' , you can also add lateral tabs with
settings->browse->'Show tabbed revisions' if you like.


Marco

^ permalink raw reply

* Re: A note from the interim Git maintainer
From: Shawn O. Pearce @ 2007-10-17  7:13 UTC (permalink / raw)
  To: Eric Wong; +Cc: git, Junio C Hamano, Benoit Sigoure, Eygene Ryabinkin
In-Reply-To: <20071017063132.GA458@soma>

Eric Wong <normalperson@yhbt.net> wrote:
> I've pushed out Benoit's and Eygene's latest git-svn changes to master
> on http://git.bogomips.org/git-svn.git  These changes are against
> spearce/master.
> 
> I've amended Benoit's commit messages a bit and fixed one bug in
> git svn propget (also amended).

Thanks.  I originally skipped over Benoit's changes as I hadn't see
anything from you on the subject.  But I have now cherry-picked them
from your bogomips git-svn tree into spearce/master.  Pushing it
out in a minute.
 
> Benoit Sigoure (5):
>       git-svn: add a generic tree traversal to fetch SVN properties
>       git-svn: implement git svn create-ignore
>       git-svn: add git svn propget
>       git-svn: add git svn proplist
>       git-svn: simplify the handling of fatal errors
> 
> Eygene Ryabinkin (2):
>       git-svn: respect Subversion's [auth] section configuration values
>       git-svn: use "no warnings 'once'" to disable false-positives

I apparently already had that first one from Eygene ("[auth]
section") in spearce/master; it went out last night.  Perhaps you
ran the shortlog above against Junio's tree and not mine?

The second one from Eygene ("no warnings once") I already had in
my master from the resend you had earlier made to the list with
your Ack and fixups.

-- 
Shawn.

^ permalink raw reply

* Re: How to Import a bitkeeper repo into git
From: Marco Costalba @ 2007-10-17  7:14 UTC (permalink / raw)
  To: pete; +Cc: Linus Torvalds, VMiklos, free cycle, git
In-Reply-To: <47159BF9.9040400@bluelane.com>

On 10/17/07, Pete/Piet Delaney <pete@bluelane.com> wrote:
>
> 't' worked fine but still can see how to diff do of the list of
> changes for a file. Viewing diffs of files based on change sets
> worked fine but I think with BitKeeper I found it helpful to be
> able to do a full 'kompare' type diff the file only; often I'm
> not interested in which change set it went into.
>

Well, open tree view ('t'), select the file you are interested of,
then click the magic wand button on the tool bar, now revisions you
see are filtered by that file, if you browse the revisions the
patch/diff you see will always point to your file (also if you can see
the whole patch).

> Something for a future version or am I lucky and you have
> it covered already?
>

Don't know, depends on how you answer to the above point ;-)

>
> Good Idea, thought it's brought up a few questions:
>
>         1. When I do the <control-minis> to Decrease the font size
>            I can't undo it with the <control-plus>. Also <control-plus>
>            doesn't seem to do anything.
>
>         2. When displaying the "Lane info" why can't I see the
>            branch names?
>

Thanks for the reports, I will investigate as soon as I have a bit of
spare time.

>
> I'll read it a few more times. I seem to sometimes get into a state
> where I'm locked onto the current change set and can't get back to
> the other change sets without starting another qgit.
>

Please, could you be so kind to better explain me the above point.
Seems interesting, but I didn't get how to reproduce.


> >
> > Yes it is. There are a lot of new featrures, is almost as stable as
> > the previous and if you are interested in file history (annotations)
> > in qgit-2.0 this feature has been greatly speeded up.
>
> Do you know if it's a lot of work to install Qt4?
>

With Mandriva you are just at an uprmi away.

Try something like

urpmi libqt4-devel

It worked for me ;-)

Marco

^ permalink raw reply

* Re: On Tabs and Spaces
From: Luke Lu @ 2007-10-17  7:17 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christer Weinigel, Tom Tobin, git
In-Reply-To: <alpine.LFD.0.999.0710161722320.26902@woody.linux-foundation.org>

I'm late in this game. But it's too classic a debate to miss the fun.

On Oct 16, 2007, at 5:45 PM, Linus Torvalds wrote:
> One issue may well be that Windows programmers also probably don't  
> work
> very much with patches, do they?
>
> One reason for *really* wanting to use hard-tabs is that it makes  
> patches
> look better, exactly because diffs contain that one extra (or two,  
> in the
> case of old-style context diffs) character at the beginning of the  
> line.
>
> Which means that while all-space indents look fine, *mixing* styles
> definitely does not. In particular, a two-character indent (which
> hopefully nobody uses, but people are crazy) will be totally  
> unreadable as
> a patch if you have the (fairly common, at least in UNIX projects)  
> style
> of using spaces for less-than-eight-character-indents and tabs for the
> full 8 characters.

Yes, all-space would look fine in patches. It'll look better than all  
tabs for tables and ascii formula and diagrams in comments, as one  
prepended character could screw up the tabs (depending on the  
content), rendering them totally unreadable. In all-space case,  
things just shift to the right by one character column.

I believe the indentation convention for ruby is 2 spaces. It looks  
tight to me :)

> (In particular, a 3-level and 4-level indent will look *identical*  
> in such
> a project, when using context diffs).
>
> And sure, you can use all-spaces-everywhere, but that just isn't  
> what any
> normal UNIX editors are set up for by default. In contrast, under  
> UNIX, I
> can pretty much guarantee that hard-tab indents look at least  
> reasonable
> in any editor.

But all-space would look perfect in any editor as the authors  
intended, including the tables and ascii arts, as long as it's using  
monospace font. It's easy to setup all space editing on all platforms  
(Windows, Mac, *nix) It's also much easier to enforce. I've used pre- 
commit hook to check for tabs in the source and reject them if a tab  
is found :)

> And if you have an editor that shows hard-tabs as 4-character indents,
> generally you can work with it. You may have odd indentation, and  
> people
> may complain about your patches not lining up, and yes, it would be  
> up to
> *you* to understand that 8-wide tabs are the normal and default.  
> But you
> can certainly work with a source base that uses a single hard-tab for
> indentation.

> In contrast, if you use spaces (or worse - mixing), things really look
> ugly as sin, to the point of actually being unworkable.
>

Well, we just established that all-space is perfect, look-wise.

> In short:
>
>  - if the project has the rule that an indentation is "one hard- 
> tab", then
>    at least everybody can *work* with that project. Different  
> people may
>    see things laid out slightly differently, but it's generally not a
>    horrible disaster, especially if you aim to use block comments  
> indented
>    with the code (like we *mostly* do both in the kernel and in git)
>
>  - all-space and all-tabs just leads to problems. Yes, I know about
>    python, but lets face it, python is different, since the spacing  
> has
>    semantic rules there. Most non-python programmers will not use  
> editors
>    where you can obviously see the difference between spaces and  
> tabs, and
>    as a result an all-space model will *turn* into a mixed-space/tab
>    model, and you get horrible end results.

As I mentioned, an all-space policy is trivial to enforce.

>  - as per above, mixing spaces and tabs is a *horrid* idea.
>
>  - as a result, a "pure tab for indents" model tends to be workable in
>    most situations. It may not be ideal for you, but it's workable.
>
>  - and at least in the UNIX world, default for pure tabs really is 8
>    characters. Even if you have an editor that shows them as four,  
> you'll
>    see different results outside the editor (eg "grep -5 file.c"), so
>    people should just consider other tab sizes to be "secondary".
>
>    And as long as 99% of all git developers are under Linux, and  
> all the
>    core ones seem to have had no problem with the current tab rules, I
>    really don't see why that should change.
>
> See? Hard-tabs are good. Maybe Windows people don't ever see patches
> (perhaps they only see them as side-by-side graphical things), and  
> maybe
> windows projects are always done inside *one* environment where  
> there is
> no "grep" and "terminal TAB size" and "fifty different editors with
> different defaults".
>
> But even in DOS/Windows, hard-tabs seem to be quite common, judging by
> what little source code I've seen from Windows projects.
>
> And I just checked. The current git model seems to work fine if you  
> have
> an editor that thinks tabs are 4 spaces:
>
> 	sed 's/	/    /g' < revision.c  | less -S
>
> (that's a hard-tab in that first regex). No, things don't  
> necessarily line
> up just like they should, but you actually have to *look* for  
> problems to
> see them (ie stuff where people have added line-breaks).
>
> And is it really so unreasonable to just say "8-character tabs are the
> gold standard"?

But I still haven't seen any compelling arguments against the "all  
space" case, other than "people will screw it up into mixed spaces",  
which is really a straw man, as many multi-platform projects enforced  
the all-space policy easily by using a pre-commit hook in  
maintainers' repository.

The only downside of all-space is a moderate space bloat in source,  
which is insignificant, all things considered.

I agree that "8-character tabs are the gold standard", only for the  
tabstop==8 part but not the indent==tab part. For me the question is:  
is it really so unreasonable to just say "all-space is the holy grail"?

__Luke

^ permalink raw reply

* Re: git-cherry-pick no longer detecting moved files in 1.5.3.4
From: Richard Quirk @ 2007-10-17  7:18 UTC (permalink / raw)
  To: Michele Ballabio; +Cc: git
In-Reply-To: <200710170035.12482.barra_cuda@katamail.com>

On 10/17/07, Michele Ballabio <barra_cuda@katamail.com> wrote:
> On Wednesday 17 October 2007, Richard Quirk wrote:
> > I tried setting diff.renamelimit to -1 but to no
> > avail.
>
> It should be
> diff.renamelimit = 0
>
> to set the "unlimited" limit.
>

This doesn't work either. Cherry picking is not triggering the loading
of this value at all.

This is because git-cherry-pick turns into a git-merge-recursive. This
calls get_renames() in merge-recursive.c, which calls diff_setup,
setting the renamelimit to -1, then calls diff_setup_done(), which
sets the renamelimit to diff_rename_limit_default since rename_limit
was < 0. diff_rename_limit_default is the hard-coded value of 100. At
no point does merge-recursive call git_diff_ui_config() in diff.c that
reads in the diff.renamelimit user defined value, so in the end the
cherry pick uses the hardcoded value of 100.

^ permalink raw reply

* Re: [PATCH 01/25] Add a simple option parser.
From: Shawn O. Pearce @ 2007-10-17  7:24 UTC (permalink / raw)
  To: Pierre Habouzit; +Cc: git
In-Reply-To: <1192523721-18985-1-git-send-email-madcoder@debian.org>

Pierre Habouzit <madcoder@debian.org> wrote:
> The option parser takes argc, argv, an array of struct option
> and a usage string. ...

OK, I've chewed down some version of this series.  ;-)

To be more specific I fetched ph/parseopt (11b83dc4da) from your
tree at git://git.madism.org/git.git and split it apart somewhat.
All of the patches were rebased onto my most recent master but I
also yanked the two that impacted the builtin-fetch series out and
layered them over a merge of db/fetch-pack and my version of your
ph/parseopt series.

Why?  Well I want to keep our options open about which series
graduates to master first.  Although builtin-fetch has been cooking
for a while there's been a number of issues with that code.
There exists a (perhaps small) chance that ph/parseopt will be
ready before db/fetch-pack.

Currently ph/parseopt is in pu.  Tomorrow I'll look at the usage
strings in more depth and see if any improvements can be easily
made.  I already made one suggested by Dscho in builtin-add.

-- 
Shawn.

^ permalink raw reply

* Re: How to Import a bitkeeper repo into git - Had a few questions on Qgit; I like the GUI.
From: Marco Costalba @ 2007-10-17  7:30 UTC (permalink / raw)
  To: pete, piet.delaney
  Cc: Linus Torvalds, VMiklos, free cycle, git, piet.delaney,
	Piet Delaney
In-Reply-To: <47159779.6010502@bluelane.com>

On 10/17/07, Pete/Piet Delaney <pete@bluelane.com> wrote:
>
> While I'm looking at the diffs for a file if I pull down External Diff
> it launches 'kcompare' but for a file with a large change it seems
> to be running extremely slow.

qgit does not intergarte Kompare functionality, it just prepares the
files and spawns a Kompare process.

So there's seem nothing qgit can do about Kompare speed. You can try
with different diff viewers, meld,...etc..


> for small files. Know of what can me done so that 'kcompare' works
> fast on large files; something like pointing it's tmp files to a
> not NFS partition.
>

Well temporary file sfor Kompare are created in the repository working
directory. If this is a problem for you you can save manually the
files corresponding to the two revisions you want to diff (open tree
view, select the file, right click to open context menu, save as...)

You need to repeat the above 'save as...' the first time selecting the
first revision you want to compare, then selecting the other revision
in main view, so that tree view is updated and you end-up saving the
correct files.

You can save the files where you want then run Kompare manually, at
least you test your assumption about slowness of NFS partition.

>
> Another problem I've noticed is that sometime while running git
> it seems to spend a large amount of time  switching from one
> change-set to the next; seems to be due to all of the tagged
> files.
>

If you can post a repository where this occurs and the step to
reproduce I can investigate further.

> > Another feature you asked, i.e. CTRL + right click to select a
> > revision (different from the parent) to diff against the current one
> > is also already implemented.
>
> It seems that while I'm in "Rev List" mode I can select the the
> two versions to compare a selected file with View->External diff...
>
> Now, if I pull down "View File" or go to the file context were
> you see the change-set for a file then I can't get the CTRL + right
> click to allow me to diff two revisions of the file.
>


Yes. This is true, is not supported this feature. Maybe could be added ;-)


>
> MY guess is that I should install a newer version of qgit,
> I'm using 1.5.3.
>

Please install 1.5.7, it has several bugs fixed.

> How difficult is it to upgrade to the Qt4. Can I just
> install it to /usr/local and not interfere with Qt3?

It does not interfere wuth Qt3 also if you install with urpmi,
directories are kept separated. I have installed both with no
problems.

> Last I recall messing with installing ethereal from src
> I needed a graphics lib and as I recall installing it in
> /usr/local/ confused some build crap. It would be interesting
> to try out your new qgit-2.0.
>

Qt4 is big and complex, I would really suggest avoid experimenting
with that library, stay safe and use urpmi.

> >
> > And of course the two above features can be integrated: you select two
> > random revisions and then call the external diff viewer to check at
> > the differences in the way you prefer.
>
> Right, but how do I do this from the file context?
>

In this case (and also in the above case of external viewer) you need
the magic wand ;-)

Select a file from tree view, go with the magic wand and you can do
everithing from main view.

>
> it seems to be pretty big. The date on 1.5.7 was very
> close to 2.0 so I thought they might be very close in
> functionality and you maintaining the same code for
> both the common Qt3 and the new Qt4 to make it easy
> for users to install.
>

Yes it is. qgit-1.5.7 should be very similar to qgit-2.0 regarding the
features you listed above.


Marco

^ permalink raw reply

* Re: git-cherry-pick no longer detecting moved files in 1.5.3.4
From: Shawn O. Pearce @ 2007-10-17  7:33 UTC (permalink / raw)
  To: Richard Quirk; +Cc: Michele Ballabio, git
In-Reply-To: <cac9e4380710170018p26ae8935xc4d3218f4db5411d@mail.gmail.com>

Richard Quirk <richard.quirk@gmail.com> wrote:
> On 10/17/07, Michele Ballabio <barra_cuda@katamail.com> wrote:
> > It should be
> > diff.renamelimit = 0
> >
> > to set the "unlimited" limit.
> >
> 
> This doesn't work either. Cherry picking is not triggering the loading
> of this value at all.
> 
> This is because git-cherry-pick turns into a git-merge-recursive. This
> calls get_renames() in merge-recursive.c, which calls diff_setup,
> setting the renamelimit to -1, then calls diff_setup_done(), which
> sets the renamelimit to diff_rename_limit_default since rename_limit
> was < 0. diff_rename_limit_default is the hard-coded value of 100. At
> no point does merge-recursive call git_diff_ui_config() in diff.c that
> reads in the diff.renamelimit user defined value, so in the end the
> cherry pick uses the hardcoded value of 100.

That's an "old" bug.  Lars Hjemli fixed this in df3a02f612 back on
Sept 25th.  You can get the fix from either Junio's or my git tree
in the master branch.

-- 
Shawn.

^ permalink raw reply

* Re: [PATCH 0/7] Bisect dunno
From: Shawn O. Pearce @ 2007-10-17  7:35 UTC (permalink / raw)
  To: Christian Couder; +Cc: Junio Hamano, Johannes Schindelin, git
In-Reply-To: <20071014142826.8caa0a9f.chriscool@tuxfamily.org>

Christian Couder <chriscool@tuxfamily.org> wrote:
> Here is my bisect dunno patch series again.
> The changes since last time are the following:

I now have this series queued in my pu branch.  It passes the tests
it comes with, and doesn't appear to break anything, but apparently
there is also still some debate about what a dunno should be called
("unknown", "void", "ugly", "dunno", "skip" ...).

-- 
Shawn.

^ permalink raw reply

* Re: [PATCH 01/25] Add a simple option parser.
From: Pierre Habouzit @ 2007-10-17  7:52 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20071017072419.GZ13801@spearce.org>

[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]

On Wed, Oct 17, 2007 at 07:24:19AM +0000, Shawn O. Pearce wrote:
> Pierre Habouzit <madcoder@debian.org> wrote:
> > The option parser takes argc, argv, an array of struct option
> > and a usage string. ...
> 
> OK, I've chewed down some version of this series.  ;-)
> 
> To be more specific I fetched ph/parseopt (11b83dc4da) from your
> tree at git://git.madism.org/git.git and split it apart somewhat.
> All of the patches were rebased onto my most recent master but I
> also yanked the two that impacted the builtin-fetch series out and
> layered them over a merge of db/fetch-pack and my version of your
> ph/parseopt series.
> 
> Why?  Well I want to keep our options open about which series
> graduates to master first.  Although builtin-fetch has been cooking
> for a while there's been a number of issues with that code.
> There exists a (perhaps small) chance that ph/parseopt will be
> ready before db/fetch-pack.

  Yes, this makes sense, otoh the migration of the fetch commands are
really independant so you can put those appart, even if I end up needing
to rewrite them it's not an issue.

> Currently ph/parseopt is in pu.  Tomorrow I'll look at the usage
> strings in more depth and see if any improvements can be easily
> made.  I already made one suggested by Dscho in builtin-add.

  wonderful, thanks.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: git-cherry-pick no longer detecting moved files in 1.5.3.4
From: Richard Quirk @ 2007-10-17  7:55 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20071017073357.GA13801@spearce.org>

On 10/17/07, Shawn O. Pearce <spearce@spearce.org> wrote:
>
> That's an "old" bug.  Lars Hjemli fixed this in df3a02f612 back on
> Sept 25th.  You can get the fix from either Junio's or my git tree
> in the master branch.

Yes, with that fix setting the diff.renamelimit config value to 0
really does work. Thanks!

^ permalink raw reply

* Re: revised: [PATCH] Color support added to git-add--interactive.
From: Dan Zwell @ 2007-10-17  7:57 UTC (permalink / raw)
  To: Shawn O. Pearce
  Cc: Jeff King, Wincent Colaiuta, Git Mailing List,
	Jonathan del Strother, Johannes Schindelin, Frank Lichtenheld
In-Reply-To: <20071017015152.GN13801@spearce.org>

On 10/16/07, Shawn O. Pearce <spearce@spearce.org> wrote:
> Dan Zwell <dzwell@gmail.com> wrote:
> > Adds color to the prompts and output of git-add--interactive.
>
> I'm probbaly going to publish this in `pu` tonight but I have some
> comments that I think need to be addressed before this graduates
> any further.
>
> First off, no Signed-off-by?  This is big enough that I refuse to
> put it in the main tree without one.  Second it would really have
> helped if the email was formatted with `git format-patch`.  Copying
> the message headers and body over for the commit message was less
> than fun.  I have better things to do with my time.

Sorry, that I didn't read the document on submitting patches before
this. I will make the other changes you mention and re-send this in
the proper formatting.

>
> > +color.interactive.<slot>::
> > +        Use customized color for add--interactive output. `<slot>`
>
> You probably should talk about `git add --interactive` as that
> is what the git-add documentation calls it.  Many end-users don't
> even know that `git add -i` is exec()'ing into another program to
> accomplish its task.  I fixed this up when I applied the patch.
>
> > +Note: these are not the same colors/attributes that the
> > +rest of git supports, but are specific to git-add--interactive.
>
> This is a problem in my opinion.  Why can't it match the same
> names that the C code recognizes?  What if we one day were to
> see git-add--interactive.perl converted to C?  How would we then
> reconcile the color handling at that point in time?
Makes sense. I am adding a bit of code to parse git color strings into
perl color strings (so the user can use the same color names as with
the rest of git). I know this is a small change, but I'm learning perl
as I go, and I have exams this week, so it will take at least a day or
two. I will fix the color issue, and send a properly formatted and
signed-off patch. (Yes, I do agree to the Developer's Certificate of
Origin wrt to this patch.)

Thanks for your patience,
Dan

>
> --
> Shawn.
>

^ permalink raw reply

* Re: revised: [PATCH] Color support added to git-add--interactive.
From: Shawn O. Pearce @ 2007-10-17  8:11 UTC (permalink / raw)
  To: Dan Zwell
  Cc: Jeff King, Wincent Colaiuta, Git Mailing List,
	Jonathan del Strother, Johannes Schindelin, Frank Lichtenheld
In-Reply-To: <cff973550710170057i7a09eff6m5bd8268498774238@mail.gmail.com>

Dan Zwell <dzwell@gmail.com> wrote:
> Sorry, that I didn't read the document on submitting patches before
> this. I will make the other changes you mention and re-send this in
> the proper formatting.

I really should have pointed you to Documentation/SubmittingPatches
when I responded to your email in the first place.  Sorry I didn't
do that.  Looks like you already found it though so good.
 
> > > +Note: these are not the same colors/attributes that the
> > > +rest of git supports, but are specific to git-add--interactive.
> >
> > This is a problem in my opinion.  Why can't it match the same
> > names that the C code recognizes?  What if we one day were to
> > see git-add--interactive.perl converted to C?  How would we then
> > reconcile the color handling at that point in time?
> 
> Makes sense. I am adding a bit of code to parse git color strings into
> perl color strings (so the user can use the same color names as with
> the rest of git). I know this is a small change, but I'm learning perl
> as I go, and I have exams this week, so it will take at least a day or
> two. I will fix the color issue, and send a properly formatted and
> signed-off patch. (Yes, I do agree to the Developer's Certificate of
> Origin wrt to this patch.)
> 
> Thanks for your patience,

Thanks for working on this.  I played around with your patch tonight
and although I use git-gui more often than `git add -i` for hunk
manipulation I really preferred your colorized version of git-add
-i over the non-colorized one.  So I'm looking forward to seeing
the final result of this and getting it into the main tree.

Of course there is also no rush to getting your change in.  We don't
have any sort of release deadlines.  So don't stress out about it
too much.  :)

-- 
Shawn.

^ permalink raw reply

* Re: [PATCH 1/6] more compact progress display
From: Karl Hasselström @ 2007-10-17  8:20 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Nicolas Pitre, git
In-Reply-To: <20071017021137.GO13801@spearce.org>

On 2007-10-16 22:11:37 -0400, Shawn O. Pearce wrote:

> Nicolas Pitre <nico@cam.org> wrote:
>
> > Each progress can be on a single line instead of two.
>
> Nice. Of course that screws with git-gui and now I have to match two
> regexs and not one. But whatever.

Maybe an env variable could cause the code to emit machine-friendly
progress information instead?

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

^ permalink raw reply

* Re: On Tabs and Spaces
From: Michael Witten @ 2007-10-17  9:09 UTC (permalink / raw)
  To: Luke Lu; +Cc: git
In-Reply-To: <3A9408D5-2667-43A6-A0CE-C0720B3A3987@vicaya.com>


On 17 Oct 2007, at 3:17:08 AM, Luke Lu wrote:

> But I still haven't seen any compelling arguments against the "all  
> space" case

Overhead!

If you use 8 spaces instead of one tab,
that's using up 7x more space!

Consider:

     # calculates the extra space required to
     # use the given number of spaces/tab.
     size()
     {
         count=`grep -RIo "\`printf \"\t\"\`" . | wc -l`;
         perl -e "print $count*$(($1-1))/1024/1024 . \" MB\n\"";
     }

     Then in in a git working tree:

         size 8; # 1.28701210021973 MB
         size 4; # 0.551576614379883 MB

     In a linux kernel working tree:

         size 8; # 61.4902725219727 MB
         size 4; # 26.3529739379883 MB

Conclusion:

     Yikes!


I hate tabs, but I can't argue with that!

Michael Witten

^ permalink raw reply

* Re: [PATCH 1/3] Fixing path quoting in git-rebase
From: Jonathan del Strother @ 2007-10-17  9:14 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git
In-Reply-To: <47136D92.8060104@viscovery.net>

On 15 Oct 2007, at 14:39, Johannes Sixt wrote:

> Jonathan del Strother schrieb:
>> -	eval GITHEAD_$hd='"$(cat $dotest/onto_name)"'
>> +	eval GITHEAD_$hd='"$(cat \"$dotest/onto_name\")"'
>
> I believe this is not correct. It should be this way:
>
> 	eval GITHEAD_$hd='$(cat "$dotest/onto_name")'
>
> You can test it with a conflicting git-rebase -m. It only affects  
> what the conflict markers look like. The test suite does not test it.

Thanks for catching that.  I'll post revised patches this morning

^ permalink raw reply

* Re: [PATCH] Teach "git reflog" a subcommand to delete single entries
From: Wincent Colaiuta @ 2007-10-17  9:24 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, spearce, gitster
In-Reply-To: <Pine.LNX.4.64.0710170249260.25221@racer.site>

El 17/10/2007, a las 3:50, Johannes Schindelin escribió:

> This commit implements the "delete" subcommand:
>
> 	git reflog delete master@{2}
>
> will delete the second reflog entry of the "master" branch.
>
> With this, it should be easy to implement "git stash pop" everybody
> seems to want these days.

Looks good to me. Thanks for taking the initiative, Johannes.

Cheers,
Wincent

^ permalink raw reply

* [PATCH] Quoting paths, take 3
From: Jonathan del Strother @ 2007-10-17  9:31 UTC (permalink / raw)
  To: git
In-Reply-To: <B495731E-C854-450B-943B-B96248B8F609@steelskies.com>


These patches attempt to fix things up for people who like to have awkward directory paths including spaces & apostrophes.  First patch fixes git-rebase (all other git tools handle these paths fine), second patch fixes up the tests so they can be run from spaced directories.
Third time lucky?

^ permalink raw reply

* [PATCH 1/2] Fixing path quoting in git-rebase
From: Jonathan del Strother @ 2007-10-17  9:31 UTC (permalink / raw)
  To: git; +Cc: Jonathan del Strother
In-Reply-To: <11926134961610-git-send-email-maillist@steelskies.com>

From: Jonathan del Strother <jon.delStrother@bestbefore.tv>

git-rebase used to fail when run from a path with a space in.

Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
---
 git-rebase.sh |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index 1583402..224cca9 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -59,7 +59,7 @@ continue_merge () {
 		die "$RESOLVEMSG"
 	fi
 
-	cmt=`cat $dotest/current`
+	cmt=`cat "$dotest/current"`
 	if ! git diff-index --quiet HEAD
 	then
 		if ! git-commit -C "$cmt"
@@ -84,14 +84,14 @@ continue_merge () {
 }
 
 call_merge () {
-	cmt="$(cat $dotest/cmt.$1)"
+	cmt="$(cat "$dotest/cmt.$1")"
 	echo "$cmt" > "$dotest/current"
 	hd=$(git rev-parse --verify HEAD)
 	cmt_name=$(git symbolic-ref HEAD)
-	msgnum=$(cat $dotest/msgnum)
-	end=$(cat $dotest/end)
+	msgnum=$(cat "$dotest/msgnum")
+	end=$(cat "$dotest/end")
 	eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"'
-	eval GITHEAD_$hd='"$(cat $dotest/onto_name)"'
+	eval GITHEAD_$hd='$(cat "$dotest/onto_name")'
 	export GITHEAD_$cmt GITHEAD_$hd
 	git-merge-$strategy "$cmt^" -- "$hd" "$cmt"
 	rv=$?
@@ -140,10 +140,10 @@ do
 		}
 		if test -d "$dotest"
 		then
-			prev_head="`cat $dotest/prev_head`"
-			end="`cat $dotest/end`"
-			msgnum="`cat $dotest/msgnum`"
-			onto="`cat $dotest/onto`"
+			prev_head=$(cat "$dotest/prev_head")
+			end=$(cat "$dotest/end")
+			msgnum=$(cat "$dotest/msgnum")
+			onto=$(cat "$dotest/onto")
 			continue_merge
 			while test "$msgnum" -le "$end"
 			do
@@ -160,11 +160,11 @@ do
 		if test -d "$dotest"
 		then
 			git rerere clear
-			prev_head="`cat $dotest/prev_head`"
-			end="`cat $dotest/end`"
-			msgnum="`cat $dotest/msgnum`"
+			prev_head=$(cat "$dotest/prev_head")
+			end=$(cat "$dotest/end")
+			msgnum=$(cat "$dotest/msgnum")
 			msgnum=$(($msgnum + 1))
-			onto="`cat $dotest/onto`"
+			onto=$(cat "$dotest/onto")
 			while test "$msgnum" -le "$end"
 			do
 				call_merge "$msgnum"
-- 
1.5.3.1

^ permalink raw reply related

* [PATCH 2/2] Quoting paths in tests
From: Jonathan del Strother @ 2007-10-17  9:31 UTC (permalink / raw)
  To: git; +Cc: Jonathan del Strother
In-Reply-To: <11926134961549-git-send-email-maillist@steelskies.com>

From: Jonathan del Strother <jon.delStrother@bestbefore.tv>

Double-quoting all paths so the tests can be run from inside directories with spaces and apostrophes

Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
---
 t/lib-git-svn.sh                         |    2 +-
 t/t1020-subdirectory.sh                  |   22 ++++++------
 t/t3050-subprojects-fetch.sh             |    2 +-
 t/t3404-rebase-interactive.sh            |    2 +-
 t/t5500-fetch-pack.sh                    |    2 +-
 t/t5700-clone-reference.sh               |    2 +-
 t/t7003-filter-branch.sh                 |    2 +-
 t/t7501-commit.sh                        |    4 +-
 t/t9100-git-svn-basic.sh                 |   54 +++++++++++++++---------------
 t/t9101-git-svn-props.sh                 |    6 ++--
 t/t9102-git-svn-deep-rmdir.sh            |    6 ++--
 t/t9104-git-svn-follow-parent.sh         |   50 ++++++++++++++--------------
 t/t9105-git-svn-commit-diff.sh           |   12 +++---
 t/t9106-git-svn-commit-diff-clobber.sh   |   14 ++++----
 t/t9107-git-svn-migrate.sh               |   40 +++++++++++-----------
 t/t9108-git-svn-glob.sh                  |    8 ++--
 t/t9110-git-svn-use-svm-props.sh         |    8 ++--
 t/t9111-git-svn-use-svnsync-props.sh     |    8 ++--
 t/t9112-git-svn-md5less-file.sh          |    4 +-
 t/t9113-git-svn-dcommit-new-file.sh      |    6 ++--
 t/t9114-git-svn-dcommit-merge.sh         |    4 +-
 t/t9115-git-svn-dcommit-funky-renames.sh |    4 +-
 t/t9116-git-svn-log.sh                   |    4 +-
 t/t9500-gitweb-standalone-no-errors.sh   |    4 +-
 t/test-lib.sh                            |    2 +-
 25 files changed, 136 insertions(+), 136 deletions(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index 8d4a447..cde3053 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -25,7 +25,7 @@ perl -w -e "
 use SVN::Core;
 use SVN::Repos;
 \$SVN::Core::VERSION gt '1.1.0' or exit(42);
-system(qw/svnadmin create --fs-type fsfs/, '$svnrepo') == 0 or exit(41);
+system(qw/svnadmin create --fs-type fsfs/, \"$svnrepo\") == 0 or exit(41);
 " >&3 2>&4
 x=$?
 if test $x -ne 0
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index b9cef34..5ed7fa4 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -21,7 +21,7 @@ LF='
 '
 
 test_expect_success 'update-index and ls-files' '
-	cd $HERE &&
+	cd "$HERE" &&
 	git update-index --add one &&
 	case "`git ls-files`" in
 	one) echo ok one ;;
@@ -41,7 +41,7 @@ test_expect_success 'update-index and ls-files' '
 '
 
 test_expect_success 'cat-file' '
-	cd $HERE &&
+	cd "$HERE" &&
 	two=`git ls-files -s dir/two` &&
 	two=`expr "$two" : "[0-7]* \\([0-9a-f]*\\)"` &&
 	echo "$two" &&
@@ -54,7 +54,7 @@ test_expect_success 'cat-file' '
 rm -f actual dir/actual
 
 test_expect_success 'diff-files' '
-	cd $HERE &&
+	cd "$HERE" &&
 	echo a >>one &&
 	echo d >>dir/two &&
 	case "`git diff-files --name-only`" in
@@ -74,7 +74,7 @@ test_expect_success 'diff-files' '
 '
 
 test_expect_success 'write-tree' '
-	cd $HERE &&
+	cd "$HERE" &&
 	top=`git write-tree` &&
 	echo $top &&
 	cd dir &&
@@ -84,7 +84,7 @@ test_expect_success 'write-tree' '
 '
 
 test_expect_success 'checkout-index' '
-	cd $HERE &&
+	cd "$HERE" &&
 	git checkout-index -f -u one &&
 	cmp one original.one &&
 	cd dir &&
@@ -93,7 +93,7 @@ test_expect_success 'checkout-index' '
 '
 
 test_expect_success 'read-tree' '
-	cd $HERE &&
+	cd "$HERE" &&
 	rm -f one dir/two &&
 	tree=`git write-tree` &&
 	git read-tree --reset -u "$tree" &&
@@ -107,27 +107,27 @@ test_expect_success 'read-tree' '
 '
 
 test_expect_success 'no file/rev ambiguity check inside .git' '
-	cd $HERE &&
+	cd "$HERE" &&
 	git commit -a -m 1 &&
-	cd $HERE/.git &&
+	cd "$HERE/.git" &&
 	git show -s HEAD
 '
 
 test_expect_success 'no file/rev ambiguity check inside a bare repo' '
-	cd $HERE &&
+	cd "$HERE" &&
 	git clone -s --bare .git foo.git &&
 	cd foo.git && GIT_DIR=. git show -s HEAD
 '
 
 # This still does not work as it should...
 : test_expect_success 'no file/rev ambiguity check inside a bare repo' '
-	cd $HERE &&
+	cd "$HERE" &&
 	git clone -s --bare .git foo.git &&
 	cd foo.git && git show -s HEAD
 '
 
 test_expect_success 'detection should not be fooled by a symlink' '
-	cd $HERE &&
+	cd "$HERE" &&
 	rm -fr foo.git &&
 	git clone -s .git another &&
 	ln -s another yetanother &&
diff --git a/t/t3050-subprojects-fetch.sh b/t/t3050-subprojects-fetch.sh
index 34f26a8..4b74cc6 100755
--- a/t/t3050-subprojects-fetch.sh
+++ b/t/t3050-subprojects-fetch.sh
@@ -20,7 +20,7 @@ test_expect_success setup '
 '
 
 test_expect_success clone '
-	git clone file://`pwd`/.git cloned &&
+	git clone "file://`pwd`/.git" cloned &&
 	(git rev-parse HEAD; git ls-files -s) >expected &&
 	(
 		cd cloned &&
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 1113904..aa86042 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -92,7 +92,7 @@ done
 EOF
 
 chmod a+x fake-editor.sh
-VISUAL="$(pwd)/fake-editor.sh"
+VISUAL="\"$(pwd)/fake-editor.sh\""
 export VISUAL
 
 test_expect_success 'no changes are a nop' '
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 7b6798d..5489ffe 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -129,7 +129,7 @@ pull_to_client 2nd "B" $((64*3))
 
 pull_to_client 3rd "A" $((1*3)) # old fails
 
-test_expect_success "clone shallow" "git-clone --depth 2 file://`pwd`/. shallow"
+test_expect_success "clone shallow" "git-clone --depth 2 \"file://`pwd`/.\" shallow"
 
 (cd shallow; git count-objects -v) > count.shallow
 
diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh
index 4e93aaa..8bb34f9 100755
--- a/t/t5700-clone-reference.sh
+++ b/t/t5700-clone-reference.sh
@@ -51,7 +51,7 @@ diff expected current'
 cd "$base_dir"
 
 test_expect_success 'cloning with reference (no -l -s)' \
-'git clone --reference B file://`pwd`/A D'
+'git clone --reference B "file://`pwd`/A" D'
 
 cd "$base_dir"
 
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index e935b20..1ab5392 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -107,7 +107,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '
 		 "git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
 	          GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
 			git update-index --index-info &&
-		  mv \$GIT_INDEX_FILE.new \$GIT_INDEX_FILE" directorymoved &&
+		  mv \"\$GIT_INDEX_FILE.new\" \"\$GIT_INDEX_FILE\"" directorymoved &&
 	test -z "$(git diff HEAD directorymoved:newsubdir)"'
 
 test_expect_success 'stops when msg filter fails' '
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index b151b51..e97e756 100644
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -69,7 +69,7 @@ test_expect_success \
 
 cat >editor <<\EOF
 #!/bin/sh
-sed -i -e "s/a file/an amend commit/g" $1
+sed -i -e "s/a file/an amend commit/g" "$1"
 EOF
 chmod 755 editor
 
@@ -88,7 +88,7 @@ test_expect_success \
 
 cat >editor <<\EOF
 #!/bin/sh
-sed -i -e "s/amend/older/g" $1
+sed -i -e "s/amend/older/g" "$1"
 EOF
 chmod 755 editor
 
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 614cf50..1d802a8 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -31,16 +31,16 @@ test_expect_success \
 	echo 'zzz' > bar/zzz &&
 	echo '#!/bin/sh' > exec.sh &&
 	chmod +x exec.sh &&
-	svn import -m 'import for git-svn' . $svnrepo >/dev/null &&
+	svn import -m 'import for git-svn' . \"$svnrepo\" >/dev/null &&
 	cd .. &&
 	rm -rf import &&
-	git-svn init $svnrepo"
+	git-svn init \"$svnrepo\""
 
 test_expect_success \
     'import an SVN revision into git' \
     'git-svn fetch'
 
-test_expect_success "checkout from svn" "svn co $svnrepo '$SVN_TREE'"
+test_expect_success "checkout from svn" "svn co \"$svnrepo\" \"$SVN_TREE\""
 
 name='try a deep --rmdir with a commit'
 test_expect_success "$name" "
@@ -51,8 +51,8 @@ test_expect_success "$name" "
 	git commit -m '$name' &&
 	git-svn set-tree --find-copies-harder --rmdir \
 		remotes/git-svn..mybranch &&
-	svn up '$SVN_TREE' &&
-	test -d '$SVN_TREE'/dir && test ! -d '$SVN_TREE'/dir/a"
+	svn up \"$SVN_TREE\" &&
+	test -d \"$SVN_TREE\"/dir && test ! -d \"$SVN_TREE\"/dir/a"
 
 
 name='detect node change from file to directory #1'
@@ -69,7 +69,7 @@ test_expect_failure "$name" "
 
 name='detect node change from directory to file #1'
 test_expect_failure "$name" "
-	rm -rf dir '$GIT_DIR'/index &&
+	rm -rf dir \"$GIT_DIR\"/index &&
 	git checkout -f -b mybranch2 remotes/git-svn &&
 	mv bar/zzz zzz &&
 	rm -rf bar &&
@@ -83,7 +83,7 @@ test_expect_failure "$name" "
 
 name='detect node change from file to directory #2'
 test_expect_failure "$name" "
-	rm -f '$GIT_DIR'/index &&
+	rm -f \"$GIT_DIR\"/index &&
 	git checkout -f -b mybranch3 remotes/git-svn &&
 	rm bar/zzz &&
 	git update-index --remove bar/zzz &&
@@ -97,7 +97,7 @@ test_expect_failure "$name" "
 
 name='detect node change from directory to file #2'
 test_expect_failure "$name" "
-	rm -f '$GIT_DIR'/index &&
+	rm -f \"$GIT_DIR\"/index &&
 	git checkout -f -b mybranch4 remotes/git-svn &&
 	rm -rf dir &&
 	git update-index --remove -- dir/file &&
@@ -111,15 +111,15 @@ test_expect_failure "$name" "
 
 name='remove executable bit from a file'
 test_expect_success "$name" "
-	rm -f '$GIT_DIR'/index &&
+	rm -f \"$GIT_DIR\"/index &&
 	git checkout -f -b mybranch5 remotes/git-svn &&
 	chmod -x exec.sh &&
 	git update-index exec.sh &&
 	git commit -m '$name' &&
 	git-svn set-tree --find-copies-harder --rmdir \
 		remotes/git-svn..mybranch5 &&
-	svn up '$SVN_TREE' &&
-	test ! -x '$SVN_TREE'/exec.sh"
+	svn up \"$SVN_TREE\" &&
+	test ! -x \"$SVN_TREE\"/exec.sh"
 
 
 name='add executable bit back file'
@@ -129,8 +129,8 @@ test_expect_success "$name" "
 	git commit -m '$name' &&
 	git-svn set-tree --find-copies-harder --rmdir \
 		remotes/git-svn..mybranch5 &&
-	svn up '$SVN_TREE' &&
-	test -x '$SVN_TREE'/exec.sh"
+	svn up \"$SVN_TREE\" &&
+	test -x \"$SVN_TREE\"/exec.sh"
 
 
 name='executable file becomes a symlink to bar/zzz (file)'
@@ -141,8 +141,8 @@ test_expect_success "$name" "
 	git commit -m '$name' &&
 	git-svn set-tree --find-copies-harder --rmdir \
 		remotes/git-svn..mybranch5 &&
-	svn up '$SVN_TREE' &&
-	test -L '$SVN_TREE'/exec.sh"
+	svn up \"$SVN_TREE\" &&
+	test -L \"$SVN_TREE\"/exec.sh"
 
 name='new symlink is added to a file that was also just made executable'
 
@@ -153,9 +153,9 @@ test_expect_success "$name" "
 	git commit -m '$name' &&
 	git-svn set-tree --find-copies-harder --rmdir \
 		remotes/git-svn..mybranch5 &&
-	svn up '$SVN_TREE' &&
-	test -x '$SVN_TREE'/bar/zzz &&
-	test -L '$SVN_TREE'/exec-2.sh"
+	svn up \"$SVN_TREE\" &&
+	test -x \"$SVN_TREE\"/bar/zzz &&
+	test -L \"$SVN_TREE\"/exec-2.sh"
 
 name='modify a symlink to become a file'
 test_expect_success "$name" "
@@ -166,10 +166,10 @@ test_expect_success "$name" "
 	git commit -m '$name' &&
 	git-svn set-tree --find-copies-harder --rmdir \
 		remotes/git-svn..mybranch5 &&
-	svn up '$SVN_TREE' &&
-	test -f '$SVN_TREE'/exec-2.sh &&
-	test ! -L '$SVN_TREE'/exec-2.sh &&
-	git diff help $SVN_TREE/exec-2.sh"
+	svn up \"$SVN_TREE\" &&
+	test -f \"$SVN_TREE\"/exec-2.sh &&
+	test ! -L \"$SVN_TREE\"/exec-2.sh &&
+	git diff help \"$SVN_TREE\"/exec-2.sh"
 
 if test "$have_utf8" = t
 then
@@ -190,7 +190,7 @@ name='test fetch functionality (svn => git) with alternate GIT_SVN_ID'
 GIT_SVN_ID=alt
 export GIT_SVN_ID
 test_expect_success "$name" \
-    "git-svn init $svnrepo && git-svn fetch &&
+    "git-svn init \"$svnrepo\" && git-svn fetch &&
      git rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&
      git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
      git diff a b"
@@ -220,16 +220,16 @@ test_expect_failure 'exit if remote refs are ambigious' "
         "
 
 test_expect_failure 'exit if init-ing a would clobber a URL' "
-        svnadmin create ${PWD}/svnrepo2 &&
-        svn mkdir -m 'mkdir bar' ${svnrepo}2/bar &&
+        svnadmin create \"${PWD}/svnrepo2\" &&
+        svn mkdir -m 'mkdir bar' \"${svnrepo}2/bar\" &&
         git config --unset svn-remote.svn.fetch \
                                 '^bar:refs/remotes/git-svn$' &&
-        git-svn init ${svnrepo}2/bar
+        git-svn init \"${svnrepo}2/bar\"
         "
 
 test_expect_success \
   'init allows us to connect to another directory in the same repo' "
-        git-svn init --minimize-url -i bar $svnrepo/bar &&
+        git-svn init --minimize-url -i bar \"$svnrepo/bar\" &&
         git config --get svn-remote.svn.fetch \
                               '^bar:refs/remotes/bar$' &&
         git config --get svn-remote.svn.fetch \
diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh
index 5aac644..e741bfe 100755
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
@@ -52,7 +52,7 @@ EOF
 cd ..
 
 rm -rf import
-test_expect_success 'checkout working copy from svn' "svn co $svnrepo test_wc"
+test_expect_success 'checkout working copy from svn' "svn co \"$svnrepo\" test_wc"
 test_expect_success 'setup some commits to svn' \
 	'cd test_wc &&
 		echo Greetings >> kw.c &&
@@ -66,7 +66,7 @@ test_expect_success 'setup some commits to svn' \
 		svn commit -m "Propset Id" &&
 	cd ..'
 
-test_expect_success 'initialize git-svn' "git-svn init $svnrepo"
+test_expect_success 'initialize git-svn' "git-svn init \"$svnrepo\""
 test_expect_success 'fetch revisions from svn' 'git-svn fetch'
 
 name='test svn:keywords ignoring'
@@ -92,7 +92,7 @@ test_expect_success "propset CR on crlf files" \
 test_expect_success 'fetch and pull latest from svn and checkout a new wc' \
 	"git-svn fetch &&
 	 git pull . remotes/git-svn &&
-	 svn co $svnrepo new_wc"
+	 svn co \"$svnrepo\" new_wc"
 
 for i in crlf ne_crlf lf ne_lf cr ne_cr empty_cr empty_lf empty empty_crlf
 do
diff --git a/t/t9102-git-svn-deep-rmdir.sh b/t/t9102-git-svn-deep-rmdir.sh
index 4e08083..e3af319 100755
--- a/t/t9102-git-svn-deep-rmdir.sh
+++ b/t/t9102-git-svn-deep-rmdir.sh
@@ -9,12 +9,12 @@ test_expect_success 'initialize repo' "
 	mkdir -p deeply/nested/directory/number/2 &&
 	echo foo > deeply/nested/directory/number/1/file &&
 	echo foo > deeply/nested/directory/number/2/another &&
-	svn import -m 'import for git-svn' . $svnrepo &&
+	svn import -m 'import for git-svn' . \"$svnrepo\" &&
 	cd ..
 	"
 
 test_expect_success 'mirror via git-svn' "
-	git-svn init $svnrepo &&
+	git-svn init \"$svnrepo\" &&
 	git-svn fetch &&
 	git checkout -f -b test-rmdir remotes/git-svn
 	"
@@ -23,7 +23,7 @@ test_expect_success 'Try a commit on rmdir' "
 	git rm -f deeply/nested/directory/number/2/another &&
 	git commit -a -m 'remove another' &&
 	git-svn set-tree --rmdir HEAD &&
-	svn ls -R $svnrepo | grep ^deeply/nested/directory/number/1
+	svn ls -R \"$svnrepo\" | grep ^deeply/nested/directory/number/1
 	"
 
 
diff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh
index 7ba7630..a422afa 100755
--- a/t/t9104-git-svn-follow-parent.sh
+++ b/t/t9104-git-svn-follow-parent.sh
@@ -11,9 +11,9 @@ test_expect_success 'initialize repo' "
 	cd import &&
 	mkdir -p trunk &&
 	echo hello > trunk/readme &&
-	svn import -m 'initial' . $svnrepo &&
+	svn import -m 'initial' . \"$svnrepo\" &&
 	cd .. &&
-	svn co $svnrepo wc &&
+	svn co \"$svnrepo\" wc &&
 	cd wc &&
 	echo world >> trunk/readme &&
 	poke trunk/readme &&
@@ -27,7 +27,7 @@ test_expect_success 'initialize repo' "
 	"
 
 test_expect_success 'init and fetch a moved directory' "
-	git-svn init --minimize-url -i thunk $svnrepo/thunk &&
+	git-svn init --minimize-url -i thunk \"$svnrepo/thunk\" &&
 	git-svn fetch -i thunk &&
 	test \"\`git rev-parse --verify refs/remotes/thunk@2\`\" \
            = \"\`git rev-parse --verify refs/remotes/thunk~1\`\" &&
@@ -38,7 +38,7 @@ test_expect_success 'init and fetch a moved directory' "
 	"
 
 test_expect_success 'init and fetch from one svn-remote' "
-        git config svn-remote.svn.url $svnrepo &&
+        git config svn-remote.svn.url \"$svnrepo\" &&
         git config --add svn-remote.svn.fetch \
           trunk:refs/remotes/svn/trunk &&
         git config --add svn-remote.svn.fetch \
@@ -52,9 +52,9 @@ test_expect_success 'init and fetch from one svn-remote' "
 
 test_expect_success 'follow deleted parent' "
         (svn cp -m 'resurrecting trunk as junk' \
-               $svnrepo/trunk@2 $svnrepo/junk ||
+               \"$svnrepo/trunk@2\" \"$svnrepo\"/junk ||
          svn cp -m 'resurrecting trunk as junk' \
-               -r2 $svnrepo/trunk $svnrepo/junk) &&
+               -r2 \"$svnrepo/trunk\" \"$svnrepo/junk\") &&
         git config --add svn-remote.svn.fetch \
           junk:refs/remotes/svn/junk &&
         git-svn fetch -i svn/thunk &&
@@ -67,10 +67,10 @@ test_expect_success 'follow deleted parent' "
 test_expect_success 'follow larger parent' "
         mkdir -p import/trunk/thunk/bump/thud &&
         echo hi > import/trunk/thunk/bump/thud/file &&
-        svn import -m 'import a larger parent' import $svnrepo/larger-parent &&
-        svn cp -m 'hi' $svnrepo/larger-parent $svnrepo/another-larger &&
+        svn import -m 'import a larger parent' import \"$svnrepo/larger-parent\" &&
+        svn cp -m 'hi' \"$svnrepo/larger-parent\" \"$svnrepo/another-larger\" &&
         git-svn init --minimize-url -i larger \
-          $svnrepo/another-larger/trunk/thunk/bump/thud &&
+          \"$svnrepo/another-larger/trunk/thunk/bump/thud\" &&
         git-svn fetch -i larger &&
         git rev-parse --verify refs/remotes/larger &&
         git rev-parse --verify \
@@ -83,23 +83,23 @@ test_expect_success 'follow larger parent' "
         "
 
 test_expect_success 'follow higher-level parent' "
-        svn mkdir -m 'follow higher-level parent' $svnrepo/blob &&
-        svn co $svnrepo/blob blob &&
+        svn mkdir -m 'follow higher-level parent' \"$svnrepo/blob\" &&
+        svn co \"$svnrepo/blob\" blob &&
         cd blob &&
                 echo hi > hi &&
                 svn add hi &&
                 svn commit -m 'hihi' &&
                 cd ..
-        svn mkdir -m 'new glob at top level' $svnrepo/glob &&
-        svn mv -m 'move blob down a level' $svnrepo/blob $svnrepo/glob/blob &&
-        git-svn init --minimize-url -i blob $svnrepo/glob/blob &&
+        svn mkdir -m 'new glob at top level' \"$svnrepo/glob\" &&
+        svn mv -m 'move blob down a level' \"$svnrepo/blob\" \"$svnrepo/glob/blob\" &&
+        git-svn init --minimize-url -i blob \"$svnrepo/glob/blob\" &&
         git-svn fetch -i blob
         "
 
 test_expect_success 'follow deleted directory' "
-	svn mv -m 'bye!' $svnrepo/glob/blob/hi $svnrepo/glob/blob/bye &&
-	svn rm -m 'remove glob' $svnrepo/glob &&
-	git-svn init --minimize-url -i glob $svnrepo/glob &&
+	svn mv -m 'bye!' \"$svnrepo/glob/blob/hi\" \"$svnrepo/glob/blob/bye\" &&
+	svn rm -m 'remove glob' \"$svnrepo/glob\" &&
+	git-svn init --minimize-url -i glob \"$svnrepo/glob\" &&
 	git-svn fetch -i glob &&
 	test \"\`git cat-file blob refs/remotes/glob:blob/bye\`\" = hi &&
 	test \"\`git ls-tree refs/remotes/glob | wc -l \`\" -eq 1
@@ -118,9 +118,9 @@ test_expect_success 'follow-parent avoids deleting relevant info' "
 	  echo 'bad delete test 2' > \
 	   import/trunk/subversion/bindings/swig/perl/another-larger &&
 	cd import &&
-	  svn import -m 'r9270 test' . $svnrepo/r9270 &&
+	  svn import -m 'r9270 test' . \"$svnrepo/r9270\" &&
 	cd .. &&
-	svn co $svnrepo/r9270/trunk/subversion/bindings/swig/perl r9270 &&
+	svn co \"$svnrepo/r9270/trunk/subversion/bindings/swig/perl\" r9270 &&
 	cd r9270 &&
 	  svn mkdir native &&
 	  svn mv t native/t &&
@@ -130,7 +130,7 @@ test_expect_success 'follow-parent avoids deleting relevant info' "
 	  svn commit -m 'reorg test' &&
 	cd .. &&
 	git-svn init --minimize-url -i r9270-t \
-	  $svnrepo/r9270/trunk/subversion/bindings/swig/perl/native/t &&
+	  \"$svnrepo/r9270/trunk/subversion/bindings/swig/perl/native/t\" &&
 	git-svn fetch -i r9270-t &&
 	test \`git rev-list r9270-t | wc -l\` -eq 2 &&
 	test \"\`git ls-tree --name-only r9270-t~1\`\" = \
@@ -138,9 +138,9 @@ test_expect_success 'follow-parent avoids deleting relevant info' "
 	"
 
 test_expect_success "track initial change if it was only made to parent" "
-	svn cp -m 'wheee!' $svnrepo/r9270/trunk $svnrepo/r9270/drunk &&
+	svn cp -m 'wheee!' \"$svnrepo/r9270/trunk\" \"$svnrepo/r9270/drunk\" &&
 	git-svn init --minimize-url -i r9270-d \
-	  $svnrepo/r9270/drunk/subversion/bindings/swig/perl/native/t &&
+	  \"$svnrepo/r9270/drunk/subversion/bindings/swig/perl/native/t\" &&
 	git-svn fetch -i r9270-d &&
 	test \`git rev-list r9270-d | wc -l\` -eq 3 &&
 	test \"\`git ls-tree --name-only r9270-t\`\" = \
@@ -150,7 +150,7 @@ test_expect_success "track initial change if it was only made to parent" "
 	"
 
 test_expect_success "track multi-parent paths" "
-	svn cp -m 'resurrect /glob' $svnrepo/r9270 $svnrepo/glob &&
+	svn cp -m 'resurrect /glob' \"$svnrepo/r9270\" \"$svnrepo/glob\" &&
 	git-svn multi-fetch &&
 	test \`git cat-file commit refs/remotes/glob | \
 	       grep '^parent ' | wc -l\` -eq 2
@@ -161,8 +161,8 @@ test_expect_success "multi-fetch continues to work" "
 	"
 
 test_expect_success "multi-fetch works off a 'clean' repository" "
-	rm -r $GIT_DIR/svn $GIT_DIR/refs/remotes $GIT_DIR/logs &&
-	mkdir $GIT_DIR/svn &&
+	rm -r \"$GIT_DIR/svn\" \"$GIT_DIR/refs/remotes\" \"$GIT_DIR/logs\" &&
+	mkdir \"$GIT_DIR/svn\" &&
 	git-svn multi-fetch
 	"
 
diff --git a/t/t9105-git-svn-commit-diff.sh b/t/t9105-git-svn-commit-diff.sh
index 318e172..9cc38d3 100755
--- a/t/t9105-git-svn-commit-diff.sh
+++ b/t/t9105-git-svn-commit-diff.sh
@@ -8,7 +8,7 @@ test_expect_success 'initialize repo' "
 	mkdir import &&
 	cd import &&
 	echo hello > readme &&
-	svn import -m 'initial' . $svnrepo &&
+	svn import -m 'initial' . \"$svnrepo\" &&
 	cd .. &&
 	echo hello > readme &&
 	git update-index --add readme &&
@@ -26,17 +26,17 @@ prev=`git rev-parse --verify HEAD^1`
 
 test_expect_success 'test the commit-diff command' "
 	test -n '$prev' && test -n '$head' &&
-	git-svn commit-diff -r1 '$prev' '$head' '$svnrepo' &&
-	svn co $svnrepo wc &&
+	git-svn commit-diff -r1 '$prev' '$head' \"$svnrepo\" &&
+	svn co \"$svnrepo\" wc &&
 	cmp readme wc/readme
 	"
 
 test_expect_success 'commit-diff to a sub-directory (with git-svn config)' "
-	svn import -m 'sub-directory' import $svnrepo/subdir &&
-	git-svn init --minimize-url $svnrepo/subdir &&
+	svn import -m 'sub-directory' import \"$svnrepo/subdir\" &&
+	git-svn init --minimize-url \"$svnrepo/subdir\" &&
 	git-svn fetch &&
 	git-svn commit-diff -r3 '$prev' '$head' &&
-	svn cat $svnrepo/subdir/readme > readme.2 &&
+	svn cat \"$svnrepo/subdir/readme\" > readme.2 &&
 	cmp readme readme.2
 	"
 
diff --git a/t/t9106-git-svn-commit-diff-clobber.sh b/t/t9106-git-svn-commit-diff-clobber.sh
index 79b7968..892ca55 100755
--- a/t/t9106-git-svn-commit-diff-clobber.sh
+++ b/t/t9106-git-svn-commit-diff-clobber.sh
@@ -8,14 +8,14 @@ test_expect_success 'initialize repo' "
 	mkdir import &&
 	cd import &&
 	echo initial > file &&
-	svn import -m 'initial' . $svnrepo &&
+	svn import -m 'initial' . \"$svnrepo\" &&
 	cd .. &&
 	echo initial > file &&
 	git update-index --add file &&
 	git commit -a -m 'initial'
 	"
 test_expect_success 'commit change from svn side' "
-	svn co $svnrepo t.svn &&
+	svn co \"$svnrepo\" t.svn &&
 	cd t.svn &&
 	echo second line from svn >> file &&
 	poke file &&
@@ -27,7 +27,7 @@ test_expect_success 'commit change from svn side' "
 test_expect_failure 'commit conflicting change from git' "
 	echo second line from git >> file &&
 	git commit -a -m 'second line from git' &&
-	git-svn commit-diff -r1 HEAD~1 HEAD $svnrepo
+	git-svn commit-diff -r1 HEAD~1 HEAD \"$svnrepo\"
 	" || true
 
 test_expect_success 'commit complementing change from git' "
@@ -36,14 +36,14 @@ test_expect_success 'commit complementing change from git' "
 	git commit -a -m 'second line from svn' &&
 	echo third line from git >> file &&
 	git commit -a -m 'third line from git' &&
-	git-svn commit-diff -r2 HEAD~1 HEAD $svnrepo
+	git-svn commit-diff -r2 HEAD~1 HEAD \"$svnrepo\"
 	"
 
 test_expect_failure 'dcommit fails to commit because of conflict' "
-	git-svn init $svnrepo &&
+	git-svn init \"$svnrepo\" &&
 	git-svn fetch &&
 	git reset --hard refs/remotes/git-svn &&
-	svn co $svnrepo t.svn &&
+	svn co \"$svnrepo\" t.svn &&
 	cd t.svn &&
 	echo fourth line from svn >> file &&
 	poke file &&
@@ -67,7 +67,7 @@ test_expect_success 'dcommit does the svn equivalent of an index merge' "
 	"
 
 test_expect_success 'commit another change from svn side' "
-	svn co $svnrepo t.svn &&
+	svn co \"$svnrepo\" t.svn &&
 	cd t.svn &&
 		echo third line from svn >> file &&
 		poke file &&
diff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh
index 67fdf70..59e8f0d 100755
--- a/t/t9107-git-svn-migrate.sh
+++ b/t/t9107-git-svn-migrate.sh
@@ -4,7 +4,7 @@ test_description='git-svn metadata migrations from previous versions'
 . ./lib-git-svn.sh
 
 test_expect_success 'setup old-looking metadata' "
-	cp $GIT_DIR/config $GIT_DIR/config-old-git-svn &&
+	cp \"$GIT_DIR/config\" \"$GIT_DIR/config-old-git-svn\" &&
 	mkdir import &&
 	cd import &&
 		for i in trunk branches/a branches/b \
@@ -12,13 +12,13 @@ test_expect_success 'setup old-looking metadata' "
 			mkdir -p \$i && \
 			echo hello >> \$i/README || exit 1
 		done && \
-		svn import -m test . $svnrepo
+		svn import -m test . \"$svnrepo\"
 		cd .. &&
-	git-svn init $svnrepo &&
+	git-svn init \"$svnrepo\" &&
 	git-svn fetch &&
-	mv $GIT_DIR/svn/* $GIT_DIR/ &&
-	mv $GIT_DIR/svn/.metadata $GIT_DIR/ &&
-	rmdir $GIT_DIR/svn &&
+	mv \"$GIT_DIR\"/svn/* \"$GIT_DIR/\" &&
+	mv \"$GIT_DIR/svn/.metadata\" \"$GIT_DIR/\" &&
+	rmdir \"$GIT_DIR/svn\" &&
 	git update-ref refs/heads/git-svn-HEAD refs/remotes/git-svn &&
 	git update-ref refs/heads/svn-HEAD refs/remotes/git-svn &&
 	git update-ref -d refs/remotes/git-svn refs/remotes/git-svn
@@ -28,20 +28,20 @@ head=`git rev-parse --verify refs/heads/git-svn-HEAD^0`
 test_expect_success 'git-svn-HEAD is a real HEAD' "test -n '$head'"
 
 test_expect_success 'initialize old-style (v0) git-svn layout' "
-	mkdir -p $GIT_DIR/git-svn/info $GIT_DIR/svn/info &&
-	echo $svnrepo > $GIT_DIR/git-svn/info/url &&
-	echo $svnrepo > $GIT_DIR/svn/info/url &&
+	mkdir -p \"$GIT_DIR/git-svn/info\" \"$GIT_DIR/svn/info\" &&
+	echo \"$svnrepo\" > \"$GIT_DIR/git-svn/info/url\" &&
+	echo \"$svnrepo\" > \"$GIT_DIR/svn/info/url\" &&
 	git-svn migrate &&
-	! test -d $GIT_DIR/git-svn &&
+	! test -d \"$GIT_DIR/git-svn\" &&
 	git rev-parse --verify refs/remotes/git-svn^0 &&
 	git rev-parse --verify refs/remotes/svn^0 &&
-	test \`git config --get svn-remote.svn.url\` = '$svnrepo' &&
+	test \"\`git config --get svn-remote.svn.url\`\" = \"$svnrepo\" &&
 	test \`git config --get svn-remote.svn.fetch\` = \
              ':refs/remotes/git-svn'
 	"
 
 test_expect_success 'initialize a multi-repository repo' "
-	git-svn init $svnrepo -T trunk -t tags -b branches &&
+	git-svn init \"$svnrepo\" -T trunk -t tags -b branches &&
 	git config --get-all svn-remote.svn.fetch > fetch.out &&
 	grep '^trunk:refs/remotes/trunk$' fetch.out &&
 	test -n \"\`git config --get svn-remote.svn.branches \
@@ -76,14 +76,14 @@ test_expect_success 'multi-fetch works on partial urls + paths' "
 test_expect_success 'migrate --minimize on old inited layout' "
 	git config --unset-all svn-remote.svn.fetch &&
 	git config --unset-all svn-remote.svn.url &&
-	rm -rf $GIT_DIR/svn &&
+	rm -rf \"$GIT_DIR/svn\" &&
 	for i in \`cat fetch.out\`; do
 		path=\`expr \$i : '\\([^:]*\\):.*$'\`
 		ref=\`expr \$i : '[^:]*:refs/remotes/\\(.*\\)$'\`
 		if test -z \"\$ref\"; then continue; fi
 		if test -n \"\$path\"; then path=\"/\$path\"; fi
-		( mkdir -p $GIT_DIR/svn/\$ref/info/ &&
-		echo $svnrepo\$path > $GIT_DIR/svn/\$ref/info/url ) || exit 1;
+		( mkdir -p \"$GIT_DIR\"/svn/\$ref/info/ &&
+		echo \"$svnrepo\"\$path > \"$GIT_DIR\"/svn/\$ref/info/url ) || exit 1;
 	done &&
 	git-svn migrate --minimize &&
 	test -z \"\`git config -l |grep -v '^svn-remote\.git-svn\.'\`\" &&
@@ -99,13 +99,13 @@ test_expect_success 'migrate --minimize on old inited layout' "
 
 test_expect_success  ".rev_db auto-converted to .rev_db.UUID" "
 	git-svn fetch -i trunk &&
-	expect=$GIT_DIR/svn/trunk/.rev_db.* &&
+	expect=\"\`find \"\$GIT_DIR\"/svn/trunk/ -name '.rev_db.*'\`\" &&
 	test -n \"\$expect\" &&
-	mv \$expect $GIT_DIR/svn/trunk/.rev_db &&
+	mv \"\$expect\" \"\$GIT_DIR\"/svn/trunk/.rev_db &&
 	git-svn fetch -i trunk &&
-	test -L $GIT_DIR/svn/trunk/.rev_db &&
-	test -f \$expect &&
-	cmp \$expect $GIT_DIR/svn/trunk/.rev_db
+	test -L \"\$GIT_DIR\"/svn/trunk/.rev_db &&
+	test -f \"\$expect\" &&
+	cmp \"\$expect\" \"\$GIT_DIR\"/svn/trunk/.rev_db
 	"
 
 test_done
diff --git a/t/t9108-git-svn-glob.sh b/t/t9108-git-svn-glob.sh
index db4344c..eb039ef 100755
--- a/t/t9108-git-svn-glob.sh
+++ b/t/t9108-git-svn-glob.sh
@@ -14,8 +14,8 @@ test_expect_success 'test refspec globbing' "
 	mkdir -p trunk/src/a trunk/src/b trunk/doc &&
 	echo 'hello world' > trunk/src/a/readme &&
 	echo 'goodbye world' > trunk/src/b/readme &&
-	svn import -m 'initial' trunk $svnrepo/trunk &&
-	svn co $svnrepo tmp &&
+	svn import -m 'initial' trunk \"$svnrepo/trunk\" &&
+	svn co \"$svnrepo\" tmp &&
 	cd tmp &&
 		mkdir branches tags &&
 		svn add branches tags &&
@@ -38,7 +38,7 @@ test_expect_success 'test refspec globbing' "
 		poke tags/end/src/b/readme &&
 		svn commit -m 'nothing to see here'
 		cd .. &&
-	git config --add svn-remote.svn.url $svnrepo &&
+	git config --add svn-remote.svn.url \"$svnrepo\" &&
 	git config --add svn-remote.svn.fetch \
 	                 'trunk/src/a:refs/remotes/trunk' &&
 	git config --add svn-remote.svn.branches \
@@ -60,7 +60,7 @@ echo nothing to see here >> expect.two
 cat expect.end >> expect.two
 
 test_expect_success 'test left-hand-side only globbing' "
-	git config --add svn-remote.two.url $svnrepo &&
+	git config --add svn-remote.two.url \"$svnrepo\" &&
 	git config --add svn-remote.two.fetch trunk:refs/remotes/two/trunk &&
 	git config --add svn-remote.two.branches \
 	                 'branches/*:refs/remotes/two/branches/*' &&
diff --git a/t/t9110-git-svn-use-svm-props.sh b/t/t9110-git-svn-use-svm-props.sh
index 6235af4..9df60ba 100755
--- a/t/t9110-git-svn-use-svm-props.sh
+++ b/t/t9110-git-svn-use-svm-props.sh
@@ -8,11 +8,11 @@ test_description='git-svn useSvmProps test'
 . ./lib-git-svn.sh
 
 test_expect_success 'load svm repo' "
-	svnadmin load -q $rawsvnrepo < ../t9110/svm.dump &&
-	git-svn init --minimize-url -R arr -i bar $svnrepo/mirror/arr &&
-	git-svn init --minimize-url -R argh -i dir $svnrepo/mirror/argh &&
+	svnadmin load -q \"$rawsvnrepo\" < ../t9110/svm.dump &&
+	git-svn init --minimize-url -R arr -i bar \"$svnrepo/mirror/arr\" &&
+	git-svn init --minimize-url -R argh -i dir \"$svnrepo/mirror/argh\" &&
 	git-svn init --minimize-url -R argh -i e \
-	  $svnrepo/mirror/argh/a/b/c/d/e &&
+	  \"$svnrepo/mirror/argh/a/b/c/d/e\" &&
 	git config svn.useSvmProps true &&
 	git-svn fetch --all
 	"
diff --git a/t/t9111-git-svn-use-svnsync-props.sh b/t/t9111-git-svn-use-svnsync-props.sh
index ec7dedd..e3693eb 100755
--- a/t/t9111-git-svn-use-svnsync-props.sh
+++ b/t/t9111-git-svn-use-svnsync-props.sh
@@ -8,10 +8,10 @@ test_description='git-svn useSvnsyncProps test'
 . ./lib-git-svn.sh
 
 test_expect_success 'load svnsync repo' "
-	svnadmin load -q $rawsvnrepo < ../t9111/svnsync.dump &&
-	git-svn init --minimize-url -R arr -i bar $svnrepo/bar &&
-	git-svn init --minimize-url -R argh -i dir $svnrepo/dir &&
-	git-svn init --minimize-url -R argh -i e $svnrepo/dir/a/b/c/d/e &&
+	svnadmin load -q \"$rawsvnrepo\" < ../t9111/svnsync.dump &&
+	git-svn init --minimize-url -R arr -i bar \"$svnrepo/bar\" &&
+	git-svn init --minimize-url -R argh -i dir \"$svnrepo/dir\" &&
+	git-svn init --minimize-url -R argh -i e \"$svnrepo/dir/a/b/c/d/e\" &&
 	git config svn.useSvnsyncProps true &&
 	git-svn fetch --all
 	"
diff --git a/t/t9112-git-svn-md5less-file.sh b/t/t9112-git-svn-md5less-file.sh
index 08313bb..124120c 100755
--- a/t/t9112-git-svn-md5less-file.sh
+++ b/t/t9112-git-svn-md5less-file.sh
@@ -38,8 +38,8 @@ PROPS-END
 
 EOF
 
-test_expect_success 'load svn dumpfile' "svnadmin load $rawsvnrepo < dumpfile.svn"
+test_expect_success 'load svn dumpfile' "svnadmin load \"$rawsvnrepo\" < dumpfile.svn"
 
-test_expect_success 'initialize git-svn' "git-svn init $svnrepo"
+test_expect_success 'initialize git-svn' "git-svn init \"$svnrepo\""
 test_expect_success 'fetch revisions from svn' 'git-svn fetch'
 test_done
diff --git a/t/t9113-git-svn-dcommit-new-file.sh b/t/t9113-git-svn-dcommit-new-file.sh
index 9ef0db9..150d7f0 100755
--- a/t/t9113-git-svn-dcommit-new-file.sh
+++ b/t/t9113-git-svn-dcommit-new-file.sh
@@ -15,14 +15,14 @@ test_description='git-svn dcommit new files over svn:// test'
 
 start_svnserve () {
 	svnserve --listen-port $SVNSERVE_PORT \
-	         --root $rawsvnrepo \
+	         --root "$rawsvnrepo" \
 	         --listen-once \
 	         --listen-host 127.0.0.1 &
 }
 
 test_expect_success 'start tracking an empty repo' "
-	svn mkdir -m 'empty dir' $svnrepo/empty-dir &&
-	echo anon-access = write >> $rawsvnrepo/conf/svnserve.conf &&
+	svn mkdir -m 'empty dir' \"$svnrepo/empty-dir\" &&
+	echo anon-access = write >> \"$rawsvnrepo/conf/svnserve.conf\" &&
 	start_svnserve &&
 	git svn init svn://127.0.0.1:$SVNSERVE_PORT &&
 	git svn fetch
diff --git a/t/t9114-git-svn-dcommit-merge.sh b/t/t9114-git-svn-dcommit-merge.sh
index d6ca955..ffe8859 100755
--- a/t/t9114-git-svn-dcommit-merge.sh
+++ b/t/t9114-git-svn-dcommit-merge.sh
@@ -35,7 +35,7 @@ EOF
 }
 
 test_expect_success 'setup svn repository' "
-	svn co $svnrepo mysvnwork &&
+	svn co \"$svnrepo\" mysvnwork &&
 	mkdir -p mysvnwork/trunk &&
 	cd mysvnwork &&
 		big_text_block >> trunk/README &&
@@ -45,7 +45,7 @@ test_expect_success 'setup svn repository' "
 	"
 
 test_expect_success 'setup git mirror and merge' "
-	git svn init $svnrepo -t tags -T trunk -b branches &&
+	git svn init \"$svnrepo\" -t tags -T trunk -b branches &&
 	git svn fetch &&
 	git checkout --track -b svn remotes/trunk &&
 	git checkout -b merge &&
diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh
index 182299c..0681ffa 100755
--- a/t/t9115-git-svn-dcommit-funky-renames.sh
+++ b/t/t9115-git-svn-dcommit-funky-renames.sh
@@ -8,12 +8,12 @@ test_description='git-svn dcommit can commit renames of files with ugly names'
 . ./lib-git-svn.sh
 
 test_expect_success 'load repository with strange names' "
-	svnadmin load -q $rawsvnrepo < ../t9115/funky-names.dump &&
+	svnadmin load -q \"$rawsvnrepo\" < ../t9115/funky-names.dump &&
 	start_httpd
 	"
 
 test_expect_success 'init and fetch repository' "
-	git svn init $svnrepo &&
+	git svn init \"$svnrepo\" &&
 	git svn fetch &&
 	git reset --hard git-svn
 	"
diff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh
index 0d4e6b3..890b5f1 100755
--- a/t/t9116-git-svn-log.sh
+++ b/t/t9116-git-svn-log.sh
@@ -14,9 +14,9 @@ test_expect_success 'setup repository and import' "
 			mkdir -p \$i && \
 			echo hello >> \$i/README || exit 1
 		done && \
-		svn import -m test . $svnrepo
+		svn import -m test . \"$svnrepo\"
 		cd .. &&
-	git-svn init $svnrepo -T trunk -b branches -t tags &&
+	git-svn init \"$svnrepo\" -T trunk -b branches -t tags &&
 	git-svn fetch &&
 	git reset --hard trunk &&
 	echo bye >> README &&
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 642b836..b90e78c 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -45,13 +45,13 @@ gitweb_run () {
 	export QUERY_STRING=""$1""
 	export PATH_INFO=""$2""
 
-	export GITWEB_CONFIG=$(pwd)/gitweb_config.perl
+	export GITWEB_CONFIG="$(pwd)/gitweb_config.perl"
 
 	# some of git commands write to STDERR on error, but this is not
 	# written to web server logs, so we are not interested in that:
 	# we are interested only in properly formatted errors/warnings
 	rm -f gitweb.log &&
-	perl -- $(pwd)/../../gitweb/gitweb.perl \
+	perl -- "$(pwd)/../../gitweb/gitweb.perl" \
 		>/dev/null 2>gitweb.log &&
 	if grep -q -s "^[[]" gitweb.log >/dev/null; then false; else true; fi
 
diff --git a/t/test-lib.sh b/t/test-lib.sh
index cc1253c..a68415f 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -229,7 +229,7 @@ test_create_repo () {
 	repo="$1"
 	mkdir "$repo"
 	cd "$repo" || error "Cannot setup test environment"
-	"$GIT_EXEC_PATH/git" init --template=$GIT_EXEC_PATH/templates/blt/ >/dev/null 2>&1 ||
+	"$GIT_EXEC_PATH/git" init --template="$GIT_EXEC_PATH/templates/blt/" >/dev/null 2>&1 ||
 	error "cannot run git init -- have you built things yet?"
 	mv .git/hooks .git/hooks-disabled
 	cd "$owd"
-- 
1.5.3.1

^ permalink raw reply related

* git-apply segfault
From: Andy Parkins @ 2007-10-17 10:00 UTC (permalink / raw)
  To: git

Hello,

I've not got time to investigate this further just now, I'll try later.  In 
case anyone else wants to though; I just got this core dump when running git 
rebase using current git master (1.5.3.4.206.g58ba4):

Core was generated by `git 
apply --allow-binary-replacement --index .dotest/patch'.
Program terminated with signal 11, Segmentation fault.
#0  0xb7cd42a0 in memchr () from /lib/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7cd42a0 in memchr () from /lib/i686/cmov/libc.so.6
#1  0x080c0931 in convert_to_git (path=0x8129a88 "ui/dmswindow.cc", 
src=0xb7c3d008 <Address 0xb7c3d008 out of bounds>, len=88306, dst=0xbfb689bc)
    at convert.c:428
#2  0x0804ecfd in check_patch_list (patch=0x81299d0) at builtin-apply.c:1434
#3  0x080510fa in apply_patch (fd=1, filename=0xffffffff <Address 0xffffffff 
out of bounds>, inaccurate_eof=1) at builtin-apply.c:2686
#4  0x0805233e in cmd_apply (argc=4, argv=0xbfb69d18, unused_prefix=0x0) at 
builtin-apply.c:2853
#5  0x0804ab3b in handle_internal_command (argc=4, argv=0xbfb69d18) at 
git.c:284
#6  0x0804b19f in main (argc=2037149808, argv=0x612d2d00) at git.c:467

It was (unfortunately) on a private repository so I can't share it for 
testing, but am happy to do tests if wanted.



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

^ permalink raw reply

* Re: On Tabs and Spaces
From: Luke Lu @ 2007-10-17 10:03 UTC (permalink / raw)
  To: Michael Witten; +Cc: git
In-Reply-To: <E29971BA-7306-4570-8383-26D0C9C0B814@mit.edu>


On Oct 17, 2007, at 2:09 AM, Michael Witten wrote:
>
> On 17 Oct 2007, at 3:17:08 AM, Luke Lu wrote:
>
>> But I still haven't seen any compelling arguments against the "all  
>> space" case
>
> Overhead!
>
> If you use 8 spaces instead of one tab,
> that's using up 7x more space!
>
> Consider:
>
>     # calculates the extra space required to
>     # use the given number of spaces/tab.
>     size()
>     {
>         count=`grep -RIo "\`printf \"\t\"\`" . | wc -l`;
>         perl -e "print $count*$(($1-1))/1024/1024 . \" MB\n\"";
>     }
>
>     Then in in a git working tree:
>
>         size 8; # 1.28701210021973 MB
>         size 4; # 0.551576614379883 MB

First, the overhead is not a simple x4 or x8 conversion in size, but  
it's the upper bound. Given that, let's look at the percentage of the  
overhead: my git working tree is 56MB after gc, so the overhead is  
2.3% max for size 8 and 0.98% for size 4. That's not significant at all.

>
>     In a linux kernel working tree:
>
>         size 8; # 61.4902725219727 MB
>         size 4; # 26.3529739379883 MB
>
> Conclusion:
>
>     Yikes!

Now, compile the kernel, do a du in the tree and report back  
percentages of the overhead.

Disk is cheap (1GB costs less than half a dollar), people's  
productivity/time is not. The overhead argument is compelling, not!

__Luke
  

^ permalink raw reply

* Re: On Tabs and Spaces
From: Nikolai Weibull @ 2007-10-17 10:21 UTC (permalink / raw)
  To: Michael Witten; +Cc: Luke Lu, git
In-Reply-To: <E29971BA-7306-4570-8383-26D0C9C0B814@mit.edu>

On 10/17/07, Michael Witten <mfwitten@mit.edu> wrote:
>
> On 17 Oct 2007, at 3:17:08 AM, Luke Lu wrote:
>
> > But I still haven't seen any compelling arguments against the "all
> > space" case
>
> Overhead!
>
> If you use 8 spaces instead of one tab,
> that's using up 7x more space!
>
> Consider:
>
>      # calculates the extra space required to
>      # use the given number of spaces/tab.
>      size()
>      {
>          count=`grep -RIo "\`printf \"\t\"\`" . | wc -l`;
>          perl -e "print $count*$(($1-1))/1024/1024 . \" MB\n\"";
>      }
>
>      Then in in a git working tree:
>
>          size 8; # 1.28701210021973 MB
>          size 4; # 0.551576614379883 MB
>
>      In a linux kernel working tree:
>
>          size 8; # 61.4902725219727 MB
>          size 4; # 26.3529739379883 MB

As already pointed out, this isn't the true waste.  Run the following
Ruby script to determine the true waste:

------------ cut here -----------
TabWidth = 8

actual_size = 0
expanded_size = 0
ARGF.each_line do |line|
  width = 0
  line.each_byte do |byte|
    width += (byte == ?\t) ? (TabWidth - (width % TabWidth)) : 1
  end
  actual_size += line.length
  expanded_size += width
end
puts (expanded_size - actual_size).to_s
------------ cut here -----------

This will give you the actual space waste.  Run it like so:

% ruby space-waste.rb /usr/src/linux/**/*.[ch]

(or in a similar manner that doesn't fail due to going over the
maximum command-line limit).

According to this calculation the waste is 47808782 bytes, or about
45.6 MiB, for 8-spaces-wide tabs.

^ permalink raw reply

* Re: [PATCH] When renaming config sections delete conflicting sections
From: Jonas Fonseca @ 2007-10-17 10:37 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20071017005517.GJ13801@spearce.org>

Shawn O. Pearce <spearce@spearce.org> wrote Tue, Oct 16, 2007:
> Jonas Fonseca <fonseca@diku.dk> wrote:
> > The old behavior of keeping config sections matching the new name caused
> > problems leading to warnings being emitted by git-remote when renaming
> > branches where information about tracked remote branches differed. To
> > fix this any config sections that will conflict with the new name are
> > removed from the config file. Update test to check for this.
> ...
> >  This command sequence was causing problems for me:
> > 
> > 	git checkout -b test madcoder/next
> > 	git checkout -b test2 spearce/next
> > 	git branch -M test
> 
> Ouch.  But this may cause the user to lose what they might consider
> important settings relative to the old section named branch.test.

True, but to me the meaning of -M is "I know what I am doing".

> I think in the case you mention above where you are doing a
> `branch -M` the user really does want the basic branch properties
> to be forced over (branch.$name.remote, branch.$name.merge) but
> they probably do not want other branch properties to be removed
> or deleted.  Or maybe they do.

You never know, and sure if there is an option to gracefully avoid
lossing this information that is the right approach, but I don't see how
this can be done in this situation. Besides currently only
branch.$name.mergoptions will be lost, hardly a problem.

> Its really hard to second guess the user's intent here.  I think
> its too broad to whack an entire section when renaming. [...]
>
> So we don't blindly replace multi-valued keys just because the
> user asked us to.  I don't really see a section as being that much
> different to warrant a potentially lossy behavior by default.

Because it makes sense in this situation and erroring out is a good
choice, but we are running out of git-branch options based on the letter
'm'. And to me, -m is the default for renaming branches, and -M is a
shortcut for doing a lot of other stuff with well-defined implications.

Perhaps we can enable only this "lossy behavior" only for git-branch by
adding an extra argument to git_config_rename_section? Then we can later
add a new option to git-config along the lines of --overwrite-section.

-- 
Jonas Fonseca

^ permalink raw reply

* Re: [PATCH 1/2] Fixing path quoting in git-rebase
From: Johannes Sixt @ 2007-10-17 10:41 UTC (permalink / raw)
  To: Jonathan del Strother; +Cc: git, Jonathan del Strother
In-Reply-To: <11926134961549-git-send-email-maillist@steelskies.com>

Jonathan del Strother schrieb:
> git-rebase used to fail when run from a path with a space in.
> 
> Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
> ---
>  git-rebase.sh |   26 +++++++++++++-------------
>  1 files changed, 13 insertions(+), 13 deletions(-)

Looks good and works. Thanks.

-- Hannes

^ 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