Git development
 help / color / mirror / Atom feed
* Re: Symbolic link documentation
From: Johannes Schindelin @ 2007-09-20 17:52 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Matt Seitz (matseitz), git
In-Reply-To: <20070920172736.GU3099@spearce.org>

Hi,

On Thu, 20 Sep 2007, Shawn O. Pearce wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > On Thu, 20 Sep 2007, Matt Seitz (matseitz) wrote:
> > 
> > > Where does the git user documentation discuss how git handles 
> > > symbolic links?
> > 
> > $ git grep symbolic Documentation/ | grep link
> > [...]
> > Documentation/config.txt:	If false, symbolic links are checked out as small plain files that
> > Documentation/config.txt:	symbolic links. True by default.
> > Documentation/git-update-index.txt:to 'false' (see gitlink:git-config[1]), symbolic links are checked out
> > Documentation/git-update-index.txt:from symbolic link to regular file.
> > Documentation/technical/racy-git.txt:files vs symbolic links) and executable bits (only for regular
> 
> These are probably what Matt was looking for.

Well, he asked where the git user documentation talks about symbolic 
links, and I provided a pointer.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] new test from the submodule chapter of the user manual
From: Joel Becker @ 2007-09-20 17:59 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: Junio C Hamano, git, Johannes Schindelin, J. Bruce Fields
In-Reply-To: <20070920170831.GQ16235@genesis.frugalware.org>

On Thu, Sep 20, 2007 at 07:08:31PM +0200, Miklos Vajna wrote:
> +test_expect_success "create the submodules" '
> +	for i in a b c d
> +	do
> +		mkdir $i &&
> +		cd $i &&
> +		git init &&
> +		echo "module $i" > $i.txt &&
> +		git add $i.txt &&
> +		git commit -m "Initial commit, submodule $i" &&
> +		cd ..
> +	done

	Silly question: why use the '&&' when you can 'set -e'?  As it
currently stands, a failure will still go back around the loop...

Joel

-- 

"Sometimes when reading Goethe I have the paralyzing suspicion
 that he is trying to be funny."
         - Guy Davenport

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

^ permalink raw reply

* RE: Symbolic link documentation
From: Matt Seitz (matseitz) @ 2007-09-20 17:52 UTC (permalink / raw)
  To: git
In-Reply-To: <20070920172736.GU3099@spearce.org>

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

From: spearce@spearce.org [mailto:spearce@spearce.org] 
> 
> > Documentation/git-update-index.txt:to 'false' (see 
> > gitlink:git-config[1]), symbolic links are checked out 
> Documentation/git-update-index.txt:from symbolic link to regular file.
> > Documentation/technical/racy-git.txt:files vs symbolic links) and 
> > executable bits (only for regular
> 
> These are probably what Matt was looking for.

The git-update-index and git-update-ref manual references are the
closest to what I was looking for.  Both are more low-level and
technical than what I was hoping for, and the discussion in
git-update-index seems targeted primarily at how symlinks are translated
on file systems that don't support symlinks.

I guess I was looking for something like the GNU "tar" documentation of
how symlinks are handled
(http://www.gnu.org/software/tar/manual/html_node/dereference.html#deref
erence).

--
Matt Seitz
Manager, File System Virtualization
Cisco Systems, Inc.
.:|:.:|:.  

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Matt Seitz.vcf --]
[-- Type: text/x-vcard; name="Matt Seitz.vcf", Size: 410 bytes --]

BEGIN:VCARD
VERSION:2.1
N:Seitz;Matt
FN:Matt Seitz
ORG:Cisco Systems, Inc
TITLE:Manager
TEL;WORK;VOICE:408-200-8000
ADR;WORK:;;3975 Freedom Circle, Floor 8;Santa Clara;CA;95054;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:3975 Freedom Circle, Floor 8=0D=0ASanta Clara, CA 95054=0D=0AUnited States o=
f America
EMAIL;PREF;INTERNET:matseitz@cisco.com
REV:20070709T234049Z
END:VCARD

^ permalink raw reply

* Re: Symbolic link documentation
From: Shawn O. Pearce @ 2007-09-20 18:11 UTC (permalink / raw)
  To: Matt Seitz (matseitz); +Cc: git
In-Reply-To: <70952A932255A2489522275A628B97C3052E993B@xmb-sjc-233.amer.cisco.com>

"Matt Seitz (matseitz)" <matseitz@cisco.com> wrote:
> The git-update-index and git-update-ref manual references are the
> closest to what I was looking for.  Both are more low-level and
> technical than what I was hoping for, and the discussion in
> git-update-index seems targeted primarily at how symlinks are translated
> on file systems that don't support symlinks.
> 
> I guess I was looking for something like the GNU "tar" documentation of
> how symlinks are handled
> (http://www.gnu.org/software/tar/manual/html_node/dereference.html#deref
> erence).

Git never dereferences a symlink that are stored as part of the
revision data.  The only time we dereference a symlink is when it
is used inside of .git/refs, or as .git/HEAD, which is what the
git-update-ref manpage was talking about.

So Git handles symlinks in the working tree *without* dereferencing
them.  Internally we store the target of the symlink, much as
tar would store the target of the symlink.  There is no way to
activate a dereference behavior (--dereference / -h in GNU tar)
as typically you want to preseve the symlink as a symlink to the
target; its part of your source code.

Maybe this is a good hint that the user manual should have a section
on symbolic links.  Its obvious to old Git hands that a symlink is
nothing more than a file with a slightly different mode, but that
may not be obvious to people who are new to Git.

-- 
Shawn.

^ permalink raw reply

* Re: [PATCH] new test from the submodule chapter of the user manual
From: Johannes Schindelin @ 2007-09-20 18:47 UTC (permalink / raw)
  To: Joel Becker; +Cc: Miklos Vajna, Junio C Hamano, git, J. Bruce Fields
In-Reply-To: <20070920175952.GC30391@tasint.org>

Hi,

On Thu, 20 Sep 2007, Joel Becker wrote:

> On Thu, Sep 20, 2007 at 07:08:31PM +0200, Miklos Vajna wrote:
> > +test_expect_success "create the submodules" '
> > +	for i in a b c d
> > +	do
> > +		mkdir $i &&
> > +		cd $i &&
> > +		git init &&
> > +		echo "module $i" > $i.txt &&
> > +		git add $i.txt &&
> > +		git commit -m "Initial commit, submodule $i" &&
> > +		cd ..
> > +	done
> 
> 	Silly question: why use the '&&' when you can 'set -e'?  As it
> currently stands, a failure will still go back around the loop...

A "set -e" will make the script exit AFAIR.  That's not what we want.  A 
simple "|| break" after the "cd .." will work, though.

Ciao,
Dscho

^ permalink raw reply

* Re: Symbolic link documentation
From: Matt Seitz @ 2007-09-20 18:50 UTC (permalink / raw)
  To: git
In-Reply-To: <Pine.LNX.4.64.0709201851190.28395@racer.site>

"Johannes Schindelin" <Johannes.Schindelin@gmx.de> wrote in message 
news:Pine.LNX.4.64.0709201851190.28395@racer.site...
>
> Well, he asked where the git user documentation talks about symbolic
> links, and I provided a pointer.

Thanks, I appreciated the pointers. 

^ permalink raw reply

* RE: Symbolic link documentation
From: Matt Seitz (matseitz) @ 2007-09-20 19:11 UTC (permalink / raw)
  To: git
In-Reply-To: <20070920181100.GV3099@spearce.org>

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

From: spearce@spearce.org [mailto:spearce@spearce.org] 
> 
> So Git handles symlinks in the working tree *without* 
> dereferencing them.  

Thanks.  Is there a recommended procedure for tracking changes when the
symlink target is outside the working tree?

--
Matt Seitz
Manager, File System Virtualization
Cisco Systems, Inc.
.:|:.:|:.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Matt Seitz.vcf --]
[-- Type: text/x-vcard; name="Matt Seitz.vcf", Size: 410 bytes --]

BEGIN:VCARD
VERSION:2.1
N:Seitz;Matt
FN:Matt Seitz
ORG:Cisco Systems, Inc
TITLE:Manager
TEL;WORK;VOICE:408-200-8000
ADR;WORK:;;3975 Freedom Circle, Floor 8;Santa Clara;CA;95054;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:3975 Freedom Circle, Floor 8=0D=0ASanta Clara, CA 95054=0D=0AUnited States o=
f America
EMAIL;PREF;INTERNET:matseitz@cisco.com
REV:20070709T234049Z
END:VCARD

^ permalink raw reply

* Re: Symbolic link documentation
From: Shawn O. Pearce @ 2007-09-20 19:16 UTC (permalink / raw)
  To: Matt Seitz (matseitz); +Cc: git
In-Reply-To: <70952A932255A2489522275A628B97C3052E99F9@xmb-sjc-233.amer.cisco.com>

"Matt Seitz (matseitz)" <matseitz@cisco.com> wrote:
> From: spearce@spearce.org [mailto:spearce@spearce.org] 
> > 
> > So Git handles symlinks in the working tree *without* 
> > dereferencing them.  
> 
> Thanks.  Is there a recommended procedure for tracking changes when the
> symlink target is outside the working tree?

Move the link target so its inside the working tree?

Git won't step outside of the working tree to look for or to record
changes.  Its outside.  We don't track things outside of the part
of the world you've asked us to track.

-- 
Shawn.

^ permalink raw reply

* Typo in git-svnimport
From: Mikael Magnusson @ 2007-09-20 19:16 UTC (permalink / raw)
  To: git

Hi,

Found a typoe in the manpage for git-svnimport, says mote instead of more 
in a place.

This is perhaps a bit silly, but if you want you can
git pull git://mikachu.ath.cx/git.git typo

--
Mikael Magnusson

^ permalink raw reply

* Re: [PATCH] git-svnimport: Use separate arguments in the pipe for git-rev-parse
From: Dan Libby @ 2007-09-20 19:07 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: git
In-Reply-To: <20070918074753.GQ31176@kiste.smurf.noris.de>

Hi, it worked for the small test case.  I am trying it on the large repo now, 
and will let you know how it turns out.  thanks!

On Tuesday 18 September 2007 01:47, Matthias Urlichs wrote:
> Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
> ---
> Please tell me whether that works for you.
>
> Somebody else, preferably its author, can fix git-svn. ;-)
>
> diff --git a/git-svnimport.perl b/git-svnimport.perl
> index d3ad5b9..aa5b3b2 100755
> --- a/git-svnimport.perl
> +++ b/git-svnimport.perl
> @@ -633,7 +633,7 @@ sub commit {
>
>  	my $rev;
>  	if($revision > $opt_s and defined $parent) {
> -		open(H,"git-rev-parse --verify $parent |");
> +		open(H,'-|',"git-rev-parse","--verify",$parent);
>  		$rev = <H>;
>  		close(H) or do {
>  			print STDERR "$revision: cannot find commit '$parent'!\n";
> --
> 1.5.2.5

-- 
Dan Libby

Open Source Consulting
San Jose, Costa Rica
http://osc.co.cr
phone: 011 506 223 7382
Fax: 011 506 223 7359

^ permalink raw reply

* Re: [PATCH] git-svnimport: Use separate arguments in the pipe for git-rev-parse
From: Dan Libby @ 2007-09-20 19:40 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: Junio C Hamano, git
In-Reply-To: <20070918092909.GU31176@kiste.smurf.noris.de>

Hi Matthias,

So the svnimport (with your patch) chugged along for quite a while, but now 
I've run into a new (related?) problem.  Here's the output:

--
Merge parent branch: 57b2ce794c20e71efa9c7bd0cc71df72e01f5d39
Commit ID 37f501fd2fd0d309b4d3fdce77bac13c84646423
Writing to refs/heads/Verny
DONE: 2385 Verny 37f501fd2fd0d309b4d3fdce77bac13c84646423
Switching from 37f501fd2fd0d309b4d3fdce77bac13c84646423 to 
0e1b0bb88f077b66c6cf537899ab6c0a69d5ec30 (/Cristian new code)
we do not like 'Cristian new code' as a tag name.
Cannot create tag Cristian new code: Bad file descriptor
--

This is a fatal error that stops the import.

regards,

On Tuesday 18 September 2007 03:29, Matthias Urlichs wrote:
> Some people seem to create SVN branch names with spaces
> or other shell metacharacters.
>
> Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
> ---
>
> Junio C Hamano:
> > > -		open(H,"git-rev-parse --verify $parent |");
> > > +		open(H,'-|',"git-rev-parse","--verify",$parent);
> >
> > I seem to be missing the context, but please describe what
> > problem this fixes in the commit log message.  I guess some
> > people use shell metacharacters and/or SP in their branch names
> > and this is about that problem?
>
> Exactly. Sorry; it seems that the original question hasn't been posted
> to the mailing list.
>
> diff --git a/git-svnimport.perl b/git-svnimport.perl
> index d3ad5b9..aa5b3b2 100755
> --- a/git-svnimport.perl
> +++ b/git-svnimport.perl
> @@ -633,7 +633,7 @@ sub commit {
>
>  	my $rev;
>  	if($revision > $opt_s and defined $parent) {
> -		open(H,"git-rev-parse --verify $parent |");
> +		open(H,'-|',"git-rev-parse","--verify",$parent);
>  		$rev = <H>;
>  		close(H) or do {
>  			print STDERR "$revision: cannot find commit '$parent'!\n";

-- 
Dan Libby

Open Source Consulting
San Jose, Costa Rica
http://osc.co.cr
phone: 011 506 223 7382
Fax: 011 506 223 7359

^ permalink raw reply

* [PATCH] more dependencies in doc generation
From: Alexey Mahotkin @ 2007-09-20 20:43 UTC (permalink / raw)
  To: git

Hi,

I'm trying to solve the problem with `man git-diff' (unescaped troff
sequences in manpage), and the first thing that will obviously help is
the following patch:

diff --git a/Documentation/Makefile b/Documentation/Makefile
index fbefe9a..310d6a5 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -135,11 +135,11 @@ clean:
                $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $<
        mv $@+ $@

-%.1 %.5 %.7 : %.xml
+%.1 %.5 %.7 : %.xml callouts.xsl
        $(RM) $@
        xmlto -m callouts.xsl man $<

-%.xml : %.txt
+%.xml : %.txt asciidoc.conf
        $(RM) $@+ $@
        $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
                $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $<

It helps to regenerate things correctly when the stylesheets change.
Please apply.

Thank you,

-- 
Alexey Mahotkin
http://www.versioncontrolblog.com/

^ permalink raw reply related

* [PATCH] alphabetize LIB_OBJS
From: Alexey Mahotkin @ 2007-09-20 21:09 UTC (permalink / raw)
  To: git

I often have to build new Gits on slow machines.  Alphabetized list of
objects allows to estimate time to build completion.

Please apply.

Thank you,

diff --git a/Makefile b/Makefile
index 0055eef..4d3eef0 100644
--- a/Makefile
+++ b/Makefile
@@ -299,21 +299,27 @@ DIFF_OBJS = \
 	diffcore-delta.o log-tree.o

 LIB_OBJS = \
-	blob.o commit.o connect.o csum-file.o cache-tree.o base85.o \
-	date.o diff-delta.o entry.o exec_cmd.o ident.o \
-	interpolate.o \
-	lockfile.o \
-	patch-ids.o \
-	object.o pack-check.o pack-write.o patch-delta.o path.o pkt-line.o \
-	sideband.o reachable.o reflog-walk.o \
-	quote.o read-cache.o refs.o run-command.o dir.o object-refs.o \
-	server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
-	tag.o tree.o usage.o config.o environment.o ctype.o copy.o \
-	revision.o pager.o tree-walk.o xdiff-interface.o \
-	write_or_die.o trace.o list-objects.o grep.o match-trees.o \
-	alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \
-	color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \
-	convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o
+	alloc.o archive-zip.o archive-tar.o attr.o \
+	base85.o blob.o \
+	cache-tree.o color.o commit.o config.o connect.o convert.o
csum-file.o ctype.o copy.o \
+	date.o decorate.o diff-delta.o dir.o \
+	entry.o environment.o exec_cmd.o \
+	grep.o \
+	help.o \
+	ident.o interpolate.o \
+	list-objects.o lockfile.o \
+	mailmap.o match-trees.o merge-file.o \
+	object.o object-refs.o \
+	pack-check.o pack-write.o pager.o patch-delta.o patch-ids.o path.o
path-list.o pkt-line.o progress.o \
+	quote.o \
+	reachable.o read-cache.o reflog-walk.o refs.o remote.o revision.o
run-command.o \
+	server-info.o setup.o sha1_file.o sha1_name.o shallow.o sideband.o
strbuf.o symlinks.o \
+	tag.o trace.o tree.o tree-walk.o \
+	usage.o \
+	write_or_die.o wt-status.o \
+	xdiff-interface.o \
+	unpack-trees.o utf8.o \
+	$(DIFF_OBJS)

 BUILTIN_OBJS = \
 	builtin-add.o \
@@ -328,6 +334,7 @@ BUILTIN_OBJS = \
 	builtin-checkout-index.o \
 	builtin-check-ref-format.o \
 	builtin-commit-tree.o \
+	builtin-config.o \
 	builtin-count-objects.o \
 	builtin-describe.o \
 	builtin-diff.o \
@@ -351,12 +358,12 @@ BUILTIN_OBJS = \
 	builtin-mv.o \
 	builtin-name-rev.o \
 	builtin-pack-objects.o \
+	builtin-pack-refs.o \
 	builtin-prune.o \
 	builtin-prune-packed.o \
 	builtin-push.o \
 	builtin-read-tree.o \
 	builtin-reflog.o \
-	builtin-config.o \
 	builtin-rerere.o \
 	builtin-reset.o \
 	builtin-rev-list.o \
@@ -366,6 +373,7 @@ BUILTIN_OBJS = \
 	builtin-runstatus.o \
 	builtin-shortlog.o \
 	builtin-show-branch.o \
+	builtin-show-ref.o \
 	builtin-stripspace.o \
 	builtin-symbolic-ref.o \
 	builtin-tag.o \
@@ -376,9 +384,7 @@ BUILTIN_OBJS = \
 	builtin-upload-archive.o \
 	builtin-verify-pack.o \
 	builtin-verify-tag.o \
-	builtin-write-tree.o \
-	builtin-show-ref.o \
-	builtin-pack-refs.o
+	builtin-write-tree.o

 GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
 EXTLIBS =


-- 
Alexey Mahotkin
http://www.versioncontrolblog.com/

^ permalink raw reply related

* [PATCH] handle Docbook XSL 1.72 (incompletely)
From: Alexey Mahotkin @ 2007-09-20 21:26 UTC (permalink / raw)
  To: git

hi,

Fedora Core 7 has docbook-style-xsl-1.72.0-2.fc7

git-diff manpage (and couple of more, using callouts) is broken here:

EXAMPLES
       Various ways to check your working tree

               $ git diff            \fB(1)\fR
               $ git diff --cached   \fB(2)\fR
               $ git diff HEAD       \fB(3)\fR

           .sp \fB1. \fRChanges in the working tree not yet staged for
the next commit.


I have fixed this for 1.72 (and probably 1.7x in general), but it does
not work under older Docbook XSL, e.g. 1.6x. I guess we could check
for version number during build, but cannot provide complete patch, so
here is the interim solution:


diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index af5b155..ec9060c 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -28,11 +28,11 @@ ifdef::backend-docbook[]
 <example><title>{title}</title>
 <literallayout>
 ifdef::doctype-manpage[]
-&#10;.ft C&#10;
+&#x2302;ft C&#10;
 endif::doctype-manpage[]
 |
 ifdef::doctype-manpage[]
-&#10;.ft&#10;
+&#10;&#x2302;ft &#10;
 endif::doctype-manpage[]
 </literallayout>
 {title#}</example>
diff --git a/Documentation/callouts.xsl b/Documentation/callouts.xsl
index 6a361a2..b1b6882 100644
--- a/Documentation/callouts.xsl
+++ b/Documentation/callouts.xsl
@@ -1,17 +1,17 @@
 <!-- callout.xsl: converts asciidoc callouts to man page format -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 <xsl:template match="co">
-       <xsl:value-of select="concat('\fB(',substring-after(@id,'-'),')\fR')"/>
+       <xsl:value-of
select="concat('&#x2593;fB(',substring-after(@id,'-'),')&#x2593;fR')"/>
 </xsl:template>
 <xsl:template match="calloutlist">
-       <xsl:text>.sp&#10;</xsl:text>
+       <xsl:text>&#10;.sp&#10;</xsl:text>
        <xsl:apply-templates/>
        <xsl:text>&#10;</xsl:text>
 </xsl:template>
 <xsl:template match="callout">
-       <xsl:value-of
select="concat('\fB',substring-after(@arearefs,'-'),'. \fR')"/>
+       <xsl:value-of
select="concat('&#x2593;fB',substring-after(@arearefs,'-'),'.
&#x2593;fR')"/>
        <xsl:apply-templates/>
-       <xsl:text>.br&#10;</xsl:text>
+       <xsl:text>&#x2302;br&#10;</xsl:text>
 </xsl:template>

 <!-- sorry, this is not about callouts, but attempts to work around

Someone more knowledgeable in this area should step in :)


Thank you,

-- 
Alexey Mahotkin
http://www.versioncontrolblog.com/

^ permalink raw reply related

* Re: [PATCH] new test from the submodule chapter of the user manual
From: Junio C Hamano @ 2007-09-20 21:35 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: git, Johannes Schindelin, J. Bruce Fields
In-Reply-To: <20070920170831.GQ16235@genesis.frugalware.org>

Miklos Vajna <vmiklos@frugalware.org> writes:

> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>
> On Thu, Sep 20, 2007 at 11:34:25AM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>> On Wed, 19 Sep 2007, Junio C Hamano wrote:
>> > Looks Ok to me, although I didn't verify the examples by
>> > actually running them myself this time (last round I did).
>>
>> So maybe we should do the same as with the tutorial: stick the examples
>> into a test script?
>
> what about this?

Far too inadequate.  You test if "commit" reports success, but
do not check if what is committed is what you wanted to commit,
for example.

^ permalink raw reply

* Re: [PATCH 0/3] the return of the strbuf
From: Junio C Hamano @ 2007-09-20 21:41 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Shawn O. Pearce, Pierre Habouzit, git
In-Reply-To: <Pine.LNX.4.64.0709201248400.28395@racer.site>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Mon, 17 Sep 2007, Shawn O. Pearce wrote:
>
>>  $ git log --pretty=format:%an --since=6.months.ago -- fast-import.c \
>>       | sort | uniq -c | sort -nr
>>   14 Shawn O. Pearce
>>    3 Pierre Habouzit
>>    3 Junio C Hamano
>>    2 Simon Hausmann
>>    2 Alex Riesen
>>    1 Theodore Ts'o
>>    1 Sven Verdoolaege
>>    1 Sami Farin
>>    1 Nicolas Pitre
>>    1 Luiz Fernando N. Capitulino
>>    1 Dana L. How
>
> FWIW I'd do
>
> git shortlog -n --since=6.months.ago HEAD -- fast-import.c|grep "^[A-Z]"
>
> instead...

I am sure you certainly meant a single command without grep, like:

	$ git shortlog -n -s --since=6.months.ago HEAD -- fast-import.c

^ permalink raw reply

* Re: [PATCH] more dependencies in doc generation
From: Alexey Mahotkin @ 2007-09-20 21:42 UTC (permalink / raw)
  To: git
In-Reply-To: <bb5b640b0709201343j5a04a554ib91785b43464d4d2@mail.gmail.com>

On 9/21/07, Alexey Mahotkin <squadette@gmail.com> wrote:
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -135,11 +135,11 @@ clean:
> -%.xml : %.txt
> +%.xml : %.txt asciidoc.conf

This change is not needed, sorry.

-- 
Alexey Mahotkin
http://www.versioncontrolblog.com/

^ permalink raw reply

* Re: [PATCH] new test from the submodule chapter of the user manual
From: Miklos Vajna @ 2007-09-20 21:46 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Joel Becker, Junio C Hamano, git, J. Bruce Fields
In-Reply-To: <Pine.LNX.4.64.0709201946410.28395@racer.site>

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

On Thu, Sep 20, 2007 at 07:47:32PM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > > +test_expect_success "create the submodules" '
> > > +	for i in a b c d
> > > +	do
> > > +		mkdir $i &&
> > > +		cd $i &&
> > > +		git init &&
> > > +		echo "module $i" > $i.txt &&
> > > +		git add $i.txt &&
> > > +		git commit -m "Initial commit, submodule $i" &&
> > > +		cd ..
> > > +	done
> > 
> > 	Silly question: why use the '&&' when you can 'set -e'?  As it
> > currently stands, a failure will still go back around the loop...
> 
> A "set -e" will make the script exit AFAIR.  That's not what we want.  A 
> simple "|| break" after the "cd .." will work, though.

i know i asked this on irc, but i still a bit confused. the target would
be to jump out from the loop and return 'false' if any of the items
fails

if i understand correctly then this is what Dscho proposes:

$ for i in a b; do echo $i && false || break; done
a
$ echo $?
0

this jumps out from the loop but does not return false

here is my version:

$ for i in a b; do echo $i && false; done
a
b

$ echo $?
1

this one detects the error but does not jump out from the loop. none of
them is perfect, but at least my version fails as long as the last cycle
fails (which is not problem as i think in most cases all or none of the
cycles will fail)

anyway, if you really want, i can change it, but i think it is not the
right thing to do

- VMiklos

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

^ permalink raw reply

* Re: [PATCH] Add git-rev-list --invert-match
From: Junio C Hamano @ 2007-09-20 21:49 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Bart Trojanowski, git
In-Reply-To: <Pine.LNX.4.64.0709201403540.28395@racer.site>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Further, it probably makes sense to have the option to say _both_: "Find 
> me a commit that contains Bart in one line, but not Simpson, and that 
> does not contain the word "Sverdoolaege" at all."

Yeah.  And I think we would also want to have that at the
underlying "grep" layer wouldn't we?

^ permalink raw reply

* Re: [PATCH 0/3] the return of the strbuf
From: Johannes Schindelin @ 2007-09-20 21:52 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Shawn O. Pearce, Pierre Habouzit, git
In-Reply-To: <7v1wctkoao.fsf@gitster.siamese.dyndns.org>

Hi,

On Thu, 20 Sep 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > On Mon, 17 Sep 2007, Shawn O. Pearce wrote:
> >
> >>  $ git log --pretty=format:%an --since=6.months.ago -- fast-import.c \
> >>       | sort | uniq -c | sort -nr
> >>   14 Shawn O. Pearce
> >>    3 Pierre Habouzit
> >>    3 Junio C Hamano
> >>    2 Simon Hausmann
> >>    2 Alex Riesen
> >>    1 Theodore Ts'o
> >>    1 Sven Verdoolaege
> >>    1 Sami Farin
> >>    1 Nicolas Pitre
> >>    1 Luiz Fernando N. Capitulino
> >>    1 Dana L. How
> >
> > FWIW I'd do
> >
> > git shortlog -n --since=6.months.ago HEAD -- fast-import.c|grep "^[A-Z]"
> >
> > instead...
> 
> I am sure you certainly meant a single command without grep, like:
> 
> 	$ git shortlog -n -s --since=6.months.ago HEAD -- fast-import.c

Hehe.  I said "I'd do" ;-)

Thanks,
Dscho

^ permalink raw reply

* Re: [PATCH] Add git-rev-list --invert-match
From: Johannes Schindelin @ 2007-09-20 21:54 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Bart Trojanowski, git
In-Reply-To: <7vtzppj9d1.fsf@gitster.siamese.dyndns.org>

Hi,

On Thu, 20 Sep 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > Further, it probably makes sense to have the option to say _both_: 
> > "Find me a commit that contains Bart in one line, but not Simpson, and 
> > that does not contain the word "Sverdoolaege" at all."
> 
> Yeah.  And I think we would also want to have that at the
> underlying "grep" layer wouldn't we?

That's what I tried to get at...  Already on IRC, I tried to direct the 
attention to that thread on the list...  There I had an ugly patch, which 
was incomplete, mainly because I did not sort out the semantics first.

But the idea was to put this into grep.c so that both git-log and git-grep 
could benefit from that feature.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] User Manual: add a chapter for submodules
From: Miklos Vajna @ 2007-09-20 22:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, J. Bruce Fields
In-Reply-To: <7v1wcum0ox.fsf@gitster.siamese.dyndns.org>

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

On Wed, Sep 19, 2007 at 09:15:58PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> Looks Ok to me, although I didn't verify the examples by
> actually running them myself this time (last round I did).

just wanted to mention that i did verify them before sending the patch.

- VMiklos

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

^ permalink raw reply

* Re: [PATCH 7/7] Avoid duplicating memory, and use xmemdupz instead of xstrdup.
From: Pierre Habouzit @ 2007-09-20 22:05 UTC (permalink / raw)
  To: gitster; +Cc: git
In-Reply-To: <1190241736-30449-8-git-send-email-madcoder@debian.org>

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

On mer, sep 19, 2007 at 10:42:16 +0000, Pierre Habouzit wrote:
> Signed-off-by: Pierre Habouzit <madcoder@debian.org>
> ---
>  walker.c |   23 +++++++++--------------
>  1 files changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/walker.c b/walker.c
> index 397b80d..0abdd64 100644
> --- a/walker.c
> +++ b/walker.c
> @@ -213,24 +213,19 @@ int walker_targets_stdin(char ***target, const char ***write_ref)
>  	struct strbuf buf;
>  	*target = NULL; *write_ref = NULL;
>  	strbuf_init(&buf, 0);
> -	while (1) {
> -		char *rf_one = NULL;
> -		char *tg_one;
> -
> -		if (strbuf_getline(&buf, stdin, '\n') == EOF)
> -			break;
> -		tg_one = buf.buf;
> -		rf_one = strchr(tg_one, '\t');
> -		if (rf_one)
> -			*rf_one++ = 0;
> +	while (strbuf_getline(&buf, stdin, '\n') != EOF) {
> +		char *rf_one = memchr(buf.buf, '\t', buf.len);
>  
>  		if (targets >= targets_alloc) {
> -			targets_alloc = targets_alloc ? targets_alloc * 2 : 64;
> -			*target = xrealloc(*target, targets_alloc * sizeof(**target));
> +			ALLOC_GROW(target, targets, targets_alloc);
>  			*write_ref = xrealloc(*write_ref, targets_alloc * sizeof(**write_ref));
>  		}
> -		(*target)[targets] = xstrdup(tg_one);
> -		(*write_ref)[targets] = rf_one ? xstrdup(rf_one) : NULL;
> +		if (rf_one) {
> +			(*write_ref)[targets] = xmemdupz(rf_one, buf.len - (rf_one - buf.buf));
> +		} else {

  As someone pointed to me off-list the above should be:
  +		if (rf_one) {
  +			(*write_ref)[targets] = xmemdupz(rf_one + 1, buf.len - (rf_one + 1 - buf.buf));
  +		} else {

  Or better:
  +		if (rf_one) {
  +			rf_one++; /* skip \t */
  +			(*write_ref)[targets] = xmemdupz(rf_one, buf.buf + buf.len - rf_one);
  +		} else {

  Which is definitely more readable.
-- 
·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: [PATCH] [git-p4] Detect exec bit in more cases.
From: Junio C Hamano @ 2007-09-20 22:53 UTC (permalink / raw)
  To: David Brown; +Cc: git, Simon Hausmann
In-Reply-To: <20070920151637.GA26873@old.davidb.org>

David Brown <git@davidb.org> writes:

> On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
>>On Wednesday 19 September 2007 20:15:03 David Brown wrote:
>
>>> git-p4 was missing the execute bit setting if the file had other attribute
>>> bits set.
>>> ---
>
>>I'm fine with this, so unless you find a better way:
>>
>>Acked-By: Simon Hausmann <simon@lst.de>
>
> I sent out an improved version of this patch yesterday
> <1190232768445-git-send-email-git@davidb.org> that I'd like to get
> approved.  I guess I'm not quite sure what happens at this point with a
> patch.

I still have that *768445* message as "the last one proposed as
better than previous ones" in my mbox.

Simon?

^ permalink raw reply

* Re: [PATCH] new test from the submodule chapter of the user manual
From: Joel Becker @ 2007-09-20 22:56 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Miklos Vajna, Junio C Hamano, git, J. Bruce Fields
In-Reply-To: <Pine.LNX.4.64.0709201946410.28395@racer.site>

On Thu, Sep 20, 2007 at 07:47:32PM +0100, Johannes Schindelin wrote:
> > 	Silly question: why use the '&&' when you can 'set -e'?  As it
> > currently stands, a failure will still go back around the loop...
> 
> A "set -e" will make the script exit AFAIR.  That's not what we want.  A 
> simple "|| break" after the "cd .." will work, though.

	Oh, drat.  It's run in eval, not a subshell.

Joel

-- 

Life's Little Instruction Book #94

	"Make it a habit to do nice things for people who 
	 will never find out."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

^ 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