Git development
 help / color / mirror / Atom feed
* Never-seen But without any   results… Delight in
From: Gabriela @ 2006-07-19 18:50 UTC (permalink / raw)
  To: godard

Hello!

Have more success with women and impress them with your power and stamina in bed 
You are just a couple of clicks away from our great prices and handy shipment

 Most trusted brands of the world, join the thousands of happy customers
 Come on in: http://www.hanchbi.com 

 The quality is realt high and the prices are the cheapest on the market!

^ permalink raw reply

* [PATCH] git-am: Don't accept an mbox on stdin of we already have a .dotest directory
From: Lukas Sandström @ 2006-07-19 20:28 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
---

It makes no sense to accept an mbox via stdin when we
won't accept it on the commandline.

The patch helps the following scenario:

# git init-db
"add file1 with content"
# git checkout -b apply
"edit file1 && commit"

# git checkout -b conflict master
"edit file1 && commit"

# git checkout -b ok master
"add file2"

# git checkout apply
# git format-patch -k -3 master..conflict | git am -k -3
=> git-am fails with a conflict message
# git reset --hard

# git format-patch -k -3 master..ok | git am -k -3
=> git am fails with the same conflict message as above,
=> since it's trying to apply the old .dotest directory

With the patch it complains about an old .dotest
directory instead.

 git-am.sh |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 3a129e0..04f0119 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -156,8 +156,10 @@ fi
 
 if test -d "$dotest"
 then
-	test ",$#," = ",0," ||
-	die "previous dotest directory $dotest still exists but mbox given."
+	if test ",$#," != ",0," || ! tty -s
+	then
+		die "previous dotest directory $dotest still exists but mbox given."
+	fi
 	resume=yes
 else
 	# Make sure we are not given --skip nor --resolved
-- 
1.4.1.g59817

^ permalink raw reply related

* [PATCH] tar-tree: add the "tar.applyUmask" config option
From: Willy Tarreau @ 2006-07-19 21:40 UTC (permalink / raw)
  To: Junio C Hamano, Rene Scharfe; +Cc: git, torvalds

Hi Junio, Hi Rene,

While I agreed with Linus that the very permissive file modes set in tar
archives were not particularly a problem for kernel users, I'm finding
that for some other projects it sometimes becomes really annoying, to
the point that I finally considered using a plain tar instead. This is a
shame because tar-tree is really fast an powerful, and I like its ability
to enforce permissions when those of the local dir might be wrong for
various reasons.

So I added a config option to tell tar-tree to respect the user's umask
to the files and dirs listed in the output tar file. By default, this
option is not set, of course, but once set to true, the files look somewhat
better :

$ cat .git/config
[core]
        repositoryformatversion = 0
        filemode = true

[tar]
        applyUmask = true

$ ./git-tar-tree HEAD | tar tvf -|head
-rw-r--r-- git/git        1887 2006-07-19 23:23:00 .gitignore
-rw-r--r-- git/git       18787 2006-07-19 23:23:00 COPYING
drwxr-xr-x git/git           0 2006-07-19 23:23:00 Documentation/
-rw-r--r-- git/git          52 2006-07-19 23:23:00 Documentation/.gitignore
-rw-r--r-- git/git        2463 2006-07-19 23:23:00 Documentation/Makefile
-rw-r--r-- git/git       11550 2006-07-19 23:23:00 Documentation/SubmittingPatches
-rw-r--r-- git/git         822 2006-07-19 23:23:00 Documentation/asciidoc.conf
-rwxr-xr-x git/git        1049 2006-07-19 23:23:00 Documentation/build-docdep.perl
-rw-r--r-- git/git         596 2006-07-19 23:23:00 Documentation/callouts.xsl


Let me insist on the fact that the default behaviour is unchanged.
Would you consider this for inclusion ? I've made the patch below
against <master>. Please check on your side that the doc generates
valid output, as I've never managed to install the asciidoc/xmlto
toolchain.

Please keep me CCed in replies as I'm not subscribed to the git list.

Regards,
Willy

--

>From dcc976d83c3b9c85460329932ce22547b7f5f3f9 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Wed, 19 Jul 2006 23:23:00 +0200
Subject: tar-tree: add the "tar.applyUmask" config option

For some projects, producing tar files with world-writable files
can be problematic. This change introduces a the "tar.applyUmask"
config option to make tar-tree apply the umask to the permissions
set in the tar file.

Signed-off-by: Willy Tarreau <w@1wt.eu>
---
 Documentation/config.txt |    9 +++++++++
 builtin-tar-tree.c       |   19 ++++++++++++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 0b434c1..32519a9 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -208,6 +208,15 @@ showbranch.default::
 	The default set of branches for gitlink:git-show-branch[1].
 	See gitlink:git-show-branch[1].
 
+tar.applyUmask::
+	By default, git-link:git-tar-tree[1] sets file and directories modes
+	to 0666 or 0777. While this is both useful and acceptable for projects
+	such as the Linux Kernel, it might be excessive for other projects.
+	Setting this variable to true makes git-link:git-tar-tree[1] apply the
+	umask to the modes above. This should be enough for most projects, as
+	it will lead to the same permissions as git-link:git-checkout[1] would
+	use. The default is false.
+
 user.email::
 	Your email address to be recorded in any newly created commits.
 	Can be overridden by the 'GIT_AUTHOR_EMAIL' and 'GIT_COMMITTER_EMAIL'
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index f2e48aa..f66f6ad 100644
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
@@ -20,6 +20,7 @@ static char block[BLOCKSIZE];
 static unsigned long offset;
 
 static time_t archive_time;
+static int tar_umask;
 
 /* tries hard to write, either succeeds or dies in the attempt */
 static void reliable_write(const void *data, unsigned long size)
@@ -188,13 +189,13 @@ static void write_entry(const unsigned c
 	} else {
 		if (S_ISDIR(mode)) {
 			*header.typeflag = TYPEFLAG_DIR;
-			mode |= 0777;
+			mode |= 0777 & ~tar_umask;
 		} else if (S_ISLNK(mode)) {
 			*header.typeflag = TYPEFLAG_LNK;
 			mode |= 0777;
 		} else if (S_ISREG(mode)) {
 			*header.typeflag = TYPEFLAG_REG;
-			mode |= (mode & 0100) ? 0777 : 0666;
+			mode |= ((mode & 0100) ? 0777 : 0666) &	~tar_umask;
 		} else {
 			error("unsupported file mode: 0%o (SHA1: %s)",
 			      mode, sha1_to_hex(sha1));
@@ -293,6 +294,18 @@ static void traverse_tree(struct tree_de
 	}
 }
 
+int git_tar_config(const char *var, const char *value)
+{
+	if (!strcmp(var, "tar.applyumask")) {
+		if (git_config_bool(var, value)) {
+			tar_umask = umask(0);
+			umask(tar_umask);
+		}
+		return 0;
+	}
+	return git_default_config(var, value);
+}
+
 static int generate_tar(int argc, const char **argv, char** envp)
 {
 	unsigned char sha1[20], tree_sha1[20];
@@ -305,7 +318,7 @@ static int generate_tar(int argc, const 
 	current_path.len = current_path.eof = 0;
 
 	setup_git_directory();
-	git_config(git_default_config);
+	git_config(git_tar_config);
 
 	switch (argc) {
 	case 3:
-- 
1.4.1

^ permalink raw reply related

* Re: [PATCH] tar-tree: add the "tar.applyUmask" config option
From: Junio C Hamano @ 2006-07-19 22:33 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: git
In-Reply-To: <20060719214025.GA10997@1wt.eu>

Willy Tarreau <w@1wt.eu> writes:

> While I agreed with Linus that the very permissive file modes set in tar
> archives were not particularly a problem for kernel users, I'm finding
> that for some other projects it sometimes becomes really annoying, to
> the point that I finally considered using a plain tar instead. This is a
> shame because tar-tree is really fast an powerful, and I like its ability
> to enforce permissions when those of the local dir might be wrong for
> various reasons.

I do not have problem with an option to allow a non-default
behaviour in this area.  Maybe we might want to be able to set
the mask in the configuration file as well, perhaps like...

	tar.umask = user ;# use from the current process'
        tar.umask = 0    ;# same as default
        tar.umask = 002  ;# group friendly

^ permalink raw reply

* Re: [PATCH] tar-tree: add the "tar.applyUmask" config option
From: Johannes Schindelin @ 2006-07-19 22:39 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Junio C Hamano, Rene Scharfe, git, torvalds
In-Reply-To: <20060719214025.GA10997@1wt.eu>

Hi,

while at it, you could ask an explicit "--umask=<n>" flag, no?

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] tar-tree: add the "tar.applyUmask" config option
From: Willy Tarreau @ 2006-07-19 22:50 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vd5c1jkc3.fsf@assigned-by-dhcp.cox.net>

On Wed, Jul 19, 2006 at 03:33:48PM -0700, Junio C Hamano wrote:
> Willy Tarreau <w@1wt.eu> writes:
> 
> > While I agreed with Linus that the very permissive file modes set in tar
> > archives were not particularly a problem for kernel users, I'm finding
> > that for some other projects it sometimes becomes really annoying, to
> > the point that I finally considered using a plain tar instead. This is a
> > shame because tar-tree is really fast an powerful, and I like its ability
> > to enforce permissions when those of the local dir might be wrong for
> > various reasons.
> 
> I do not have problem with an option to allow a non-default
> behaviour in this area.  Maybe we might want to be able to set
> the mask in the configuration file as well, perhaps like...
> 
> 	tar.umask = user ;# use from the current process'
>         tar.umask = 0    ;# same as default
>         tar.umask = 002  ;# group friendly

This is an excellent idea. I will try to find some spare time tomorrow
to implement it. I've also seen the proposal about the --umask= option.
I don't think it's absolutely necessary since the umask has little reason
to change during the repo's life, but if the implementation is obvious,
I will do it too.

Thanks for your suggestion,
Willy

^ permalink raw reply

* Git BOF notes
From: Petr Baudis @ 2006-07-19 23:01 UTC (permalink / raw)
  To: git

  Hi,

  a short summary of the Git BOF on OLS which finished just a short
while ago. We got to hear how Len Brown is doing things and where Git
gets in the way for him as well as interesting questions and comments
from several other people. The main highlights as I feel them (mixed
randomly with my personal blabbering) are that:

  (i) We should somehow separate the lowlevel Git commands from the
highlevel ones meant for user consumption. There's too many of them
and it is confusing for the users. Similarity with BitKeeper was pointed
out (and I refrained from mentioning GNU Arch).

  (ii) We should document the workflows better. Currently there is a
huge variety of workflows spread accross the Git user community,
probably stemming from the fact that the UI evolved so fast while
already "on the fly". Of course it shows that the Git tools are
really flxible and versatile, but it might also mean that we are not
abstracting some operations enough, or not selling the easier user
interface better. Anyway, new users might find the current mix of
workflows used across the community somewhat intimidating. This also
means that....

  (iii) ...we should spread the word about StGIT more (because StGIT
is cool and often does just what people want to do with Git and it's
clumsy), more so because...

  (iv) ...we should support mutating history better (I think this is the
most important point). There is a kind of conflict here:

	* Fundamentally, Git considers history to be immutable,
	  especially if you publish it.
	* The kernel workflow encourages the opposite - the subsystem
	  maintainers are rebasing all the time as well as just
	  generally retouching their history (typos, fixing bugs in
	  the patches etc).

  This problem can be separated to two areas:

	* Support for the history mutation. We have some nice tools
	  in Git for rebasing, but it would be nice to support the
	  other modifications easier as well. I suggested having
	  a tool you just tell a commit id and it will let you modify
	  the author info, the associated patch or fold another patch
	  in... Also, using StGIT obviously hlps a lot here.

	* Support for distributing and following the mutated history.
	  I'm actually not sure about the level of Git support for
	  this, Cogito supports cg-updating to a mutated history
	  if you have no local changes.

  Please feel free to add things if I have missed anything.

  Happy hacking,

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam

^ permalink raw reply

* git-svn: Missing files
From: Ben Williamson @ 2006-07-20  2:02 UTC (permalink / raw)
  To: git

Hi all,

I'm probably confused, but it seems like git-svn has missed some files
while importing the buildroot sources. I did this:

  git-svn init svn://uclibc.org/trunk/buildroot
  git-svn fetch

Then I used gitk to find the revision corresponding to svn's r15711,
and checked that out:

  git-checkout -b test c84f9463b67bdb57c93bec571b1118b37cb597ce

commit c84f9463b67bdb57c93bec571b1118b37cb597ce
Author: vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Date:   Mon Jul 17 03:53:12 2006 +0000

    fix whitespace

    git-svn-id: svn://uclibc.org/trunk/buildroot@15711
69ca8d6d-28ef-0310-b511-8ec308f3f277

The resulting tree is missing a bunch of files, compared to what I
checked out with svn:

  svn export -r15711 svn://uclibc.org/trunk/buildroot buildroot

Also, if I use git-svn to only fetch r15711 then I get what I expect,
with no missing files. The tree is the same as the 'svn export' minus
a few empty directories:

  git-svn init svn://uclibc.org/trunk/buildroot
  git-svn fetch -r15711

I've listed the missing files below. There are no other differences -
all the files that did turn up are identical in all three trees ("svn
export", "git-svn fetch" and "git-svn fetch -r15711").

Disclaimer: I'm no subversion expert, and I'm fairly new to git. But
git rocks, and I'd love somewhere to locally commit my hacks to
subversion projects like buildroot.

Thanks!

- Ben.


diff -ur --exclude .git svn-export/buildroot git-svn-fetch-all/buildroot
Only in svn-export/buildroot/package: linux
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
003_kbuild_fixes.diff.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
004_386_emu.diff.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
005_modularize_vesafb.diff.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
006_init_unshare.diff.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
008-ieee1394-fix.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
009-always-inline.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
010-optimize-for-size.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
012-x86-check_gcc.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
015_cramfs_initrd.diff.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
017-printk.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
018-slab-loop-init.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
041-changeloop.patch.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
042-loopfixes.patch.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
062-silence-blk-queue.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
063-silence.kbd.patch.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
064-shutup-md.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
076-nmap-freak.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
077-orinoco-0.13e.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
078-hostap.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
079-jiffies64.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
089-no-touch-makedep.bz2
Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
100_VERSION.bz2
Only in svn-export/buildroot/target/generic: access_point
Only in svn-export/buildroot/target/generic: firewall
Only in svn-export/buildroot/target/generic/target_skeleton/etc: fstab
Only in svn-export/buildroot/target/generic/target_skeleton/etc: hostname
Only in svn-export/buildroot/target/generic/target_skeleton/etc: hosts
Only in svn-export/buildroot/target/generic/target_skeleton/etc/init.d: rcS
Only in svn-export/buildroot/target/generic/target_skeleton/etc/init.d:
S40network
Only in svn-export/buildroot/target/generic/target_skeleton/etc: inittab
Only in svn-export/buildroot/target/generic/target_skeleton/etc: inputrc
Only in svn-export/buildroot/target/generic/target_skeleton/etc: issue
Only in svn-export/buildroot/target/generic/target_skeleton/etc: network
Only in svn-export/buildroot/target/generic/target_skeleton/etc: passwd
Only in svn-export/buildroot/target/generic/target_skeleton/etc: profile
Only in svn-export/buildroot/target/generic/target_skeleton/etc: protocols
Only in svn-export/buildroot/target/generic/target_skeleton/etc: random-seed
Only in svn-export/buildroot/target/generic/target_skeleton/etc: securetty
Only in svn-export/buildroot/target/generic/target_skeleton/etc: services
Only in svn-export/buildroot/target/generic/target_skeleton/etc: shadow
Only in svn-export/buildroot/target/generic/target_skeleton/etc: TZ
Only in svn-export/buildroot/target/generic/target_skeleton: root
Only in svn-export/buildroot/target/generic/target_skeleton: usr
Only in svn-export/buildroot/toolchain/binutils: 2.16.91.0.6
Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
300-001_ld_makefile_patch.patch
Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
300-006_better_file_error.patch
Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
300-012_check_ldrunpath_length.patch
Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
400-mips-ELF_MAXPAGESIZE-4K.patch
Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
702-binutils-skip-comments.patch
Only in svn-export/buildroot/toolchain/binutils: 2.17
Only in svn-export/buildroot/toolchain/binutils: 2.17.50.0.2
Only in svn-export/buildroot/toolchain/binutils: 2.17.50.0.3
Only in svn-export/buildroot/toolchain/gcc/3.4.6: 100-uclibc-conf.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6: 200-uclibc-locale.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6: 300-libstdc++-pic.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6:
600-gcc34-arm-ldm-peephole.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6: 601-gcc34-arm-ldm.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6:
601-gcc34-arm-ldm-peephole2.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6:
602-sdk-libstdc++-includes.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6: 700-pr15068-fix.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6: 71_all_sh-pr16665-fix.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6:
72_all_sh-no-reorder-blocks.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6: 73_all_sh-pr20617.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6:
800-powerpc-libc_stack_end-uclibc.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6: 900-nios2.patch
Only in svn-export/buildroot/toolchain/gcc/3.4.6:
arm-softfloat.patch.conditional
Only in svn-export/buildroot/toolchain/gcc/4.0.3: 100-uclibc-conf.patch
Only in svn-export/buildroot/toolchain/gcc/4.0.3: 200-uclibc-locale.patch
Only in svn-export/buildroot/toolchain/gcc/4.0.3: 300-libstdc++-pic.patch
Only in svn-export/buildroot/toolchain/gcc/4.0.3: 301-missing-execinfo_h.patch
Only in svn-export/buildroot/toolchain/gcc/4.0.3: 302-c99-snprintf.patch
Only in svn-export/buildroot/toolchain/gcc/4.0.3:
303-c99-complex-ugly-hack.patch
Only in svn-export/buildroot/toolchain/gcc/4.0.3:
602-sdk-libstdc++-includes.patch
Only in svn-export/buildroot/toolchain/gcc/4.1.1: 100-uclibc-conf.patch
Only in svn-export/buildroot/toolchain/gcc/4.1.1: 301-missing-execinfo_h.patch
Only in svn-export/buildroot/toolchain/gcc/4.1.1: 302-c99-snprintf.patch
Only in svn-export/buildroot/toolchain/gcc/4.1.1:
303-c99-complex-ugly-hack.patch
Only in svn-export/buildroot/toolchain/gcc/4.1.1: 304-index_macro.patch
Only in svn-export/buildroot/toolchain/gcc/4.1.1: 740-sh-pr24836.patch
Only in svn-export/buildroot/toolchain/gcc/4.1.1: 800-arm-bigendian.patch
Only in svn-export/buildroot/toolchain/gcc/4.2: 103-uclibc-conf-noupstream.patch
Only in svn-export/buildroot/toolchain/gcc/4.2: 203-uclibc-locale-no__x.patch
Only in svn-export/buildroot/toolchain/gcc/4.2:
204-uclibc-locale-wchar_fix.patch
Only in svn-export/buildroot/toolchain/gcc/4.2: 301-missing-execinfo_h.patch
Only in svn-export/buildroot/toolchain/gcc/4.2: 302-c99-snprintf.patch
Only in svn-export/buildroot/toolchain/gcc/4.2: 303-c99-complex-ugly-hack.patch
Only in svn-export/buildroot/toolchain/gdb: 6.5

^ permalink raw reply

* Re: git-svn: Missing files
From: Ben Williamson @ 2006-07-20  2:09 UTC (permalink / raw)
  To: git
In-Reply-To: <b6327a230607191902n47b81993x8caea2df3955d8c0@mail.gmail.com>

Oh. I just looked in git-svn and found this:

$VERSION = '1.1.1-broken';

Fair enough. So far I haven't explored other branches in git.git, I've
no idea what "pu" stands for. Can someone point me in the right
direction?

Thanks,

- Ben.


On 7/20/06, Ben Williamson <benw@pobox.com> wrote:
> Hi all,
>
> I'm probably confused, but it seems like git-svn has missed some files
> while importing the buildroot sources. I did this:
>
>   git-svn init svn://uclibc.org/trunk/buildroot
>   git-svn fetch
>
> Then I used gitk to find the revision corresponding to svn's r15711,
> and checked that out:
>
>   git-checkout -b test c84f9463b67bdb57c93bec571b1118b37cb597ce
>
> commit c84f9463b67bdb57c93bec571b1118b37cb597ce
> Author: vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>
> Date:   Mon Jul 17 03:53:12 2006 +0000
>
>     fix whitespace
>
>     git-svn-id: svn://uclibc.org/trunk/buildroot@15711
> 69ca8d6d-28ef-0310-b511-8ec308f3f277
>
> The resulting tree is missing a bunch of files, compared to what I
> checked out with svn:
>
>   svn export -r15711 svn://uclibc.org/trunk/buildroot buildroot
>
> Also, if I use git-svn to only fetch r15711 then I get what I expect,
> with no missing files. The tree is the same as the 'svn export' minus
> a few empty directories:
>
>   git-svn init svn://uclibc.org/trunk/buildroot
>   git-svn fetch -r15711
>
> I've listed the missing files below. There are no other differences -
> all the files that did turn up are identical in all three trees ("svn
> export", "git-svn fetch" and "git-svn fetch -r15711").
>
> Disclaimer: I'm no subversion expert, and I'm fairly new to git. But
> git rocks, and I'd love somewhere to locally commit my hacks to
> subversion projects like buildroot.
>
> Thanks!
>
> - Ben.
>
>
> diff -ur --exclude .git svn-export/buildroot git-svn-fetch-all/buildroot
> Only in svn-export/buildroot/package: linux
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 003_kbuild_fixes.diff.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 004_386_emu.diff.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 005_modularize_vesafb.diff.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 006_init_unshare.diff.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 008-ieee1394-fix.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 009-always-inline.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 010-optimize-for-size.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 012-x86-check_gcc.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 015_cramfs_initrd.diff.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 017-printk.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 018-slab-loop-init.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 041-changeloop.patch.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 042-loopfixes.patch.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 062-silence-blk-queue.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 063-silence.kbd.patch.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 064-shutup-md.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 076-nmap-freak.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 077-orinoco-0.13e.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 078-hostap.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 079-jiffies64.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 089-no-touch-makedep.bz2
> Only in svn-export/buildroot/target/device/Soekris/net4521/kernel-patches:
> 100_VERSION.bz2
> Only in svn-export/buildroot/target/generic: access_point
> Only in svn-export/buildroot/target/generic: firewall
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: fstab
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: hostname
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: hosts
> Only in svn-export/buildroot/target/generic/target_skeleton/etc/init.d: rcS
> Only in svn-export/buildroot/target/generic/target_skeleton/etc/init.d:
> S40network
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: inittab
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: inputrc
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: issue
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: network
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: passwd
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: profile
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: protocols
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: random-seed
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: securetty
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: services
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: shadow
> Only in svn-export/buildroot/target/generic/target_skeleton/etc: TZ
> Only in svn-export/buildroot/target/generic/target_skeleton: root
> Only in svn-export/buildroot/target/generic/target_skeleton: usr
> Only in svn-export/buildroot/toolchain/binutils: 2.16.91.0.6
> Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
> 300-001_ld_makefile_patch.patch
> Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
> 300-006_better_file_error.patch
> Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
> 300-012_check_ldrunpath_length.patch
> Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
> 400-mips-ELF_MAXPAGESIZE-4K.patch
> Only in svn-export/buildroot/toolchain/binutils/2.16.91.0.7:
> 702-binutils-skip-comments.patch
> Only in svn-export/buildroot/toolchain/binutils: 2.17
> Only in svn-export/buildroot/toolchain/binutils: 2.17.50.0.2
> Only in svn-export/buildroot/toolchain/binutils: 2.17.50.0.3
> Only in svn-export/buildroot/toolchain/gcc/3.4.6: 100-uclibc-conf.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6: 200-uclibc-locale.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6: 300-libstdc++-pic.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6:
> 600-gcc34-arm-ldm-peephole.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6: 601-gcc34-arm-ldm.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6:
> 601-gcc34-arm-ldm-peephole2.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6:
> 602-sdk-libstdc++-includes.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6: 700-pr15068-fix.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6: 71_all_sh-pr16665-fix.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6:
> 72_all_sh-no-reorder-blocks.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6: 73_all_sh-pr20617.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6:
> 800-powerpc-libc_stack_end-uclibc.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6: 900-nios2.patch
> Only in svn-export/buildroot/toolchain/gcc/3.4.6:
> arm-softfloat.patch.conditional
> Only in svn-export/buildroot/toolchain/gcc/4.0.3: 100-uclibc-conf.patch
> Only in svn-export/buildroot/toolchain/gcc/4.0.3: 200-uclibc-locale.patch
> Only in svn-export/buildroot/toolchain/gcc/4.0.3: 300-libstdc++-pic.patch
> Only in svn-export/buildroot/toolchain/gcc/4.0.3: 301-missing-execinfo_h.patch
> Only in svn-export/buildroot/toolchain/gcc/4.0.3: 302-c99-snprintf.patch
> Only in svn-export/buildroot/toolchain/gcc/4.0.3:
> 303-c99-complex-ugly-hack.patch
> Only in svn-export/buildroot/toolchain/gcc/4.0.3:
> 602-sdk-libstdc++-includes.patch
> Only in svn-export/buildroot/toolchain/gcc/4.1.1: 100-uclibc-conf.patch
> Only in svn-export/buildroot/toolchain/gcc/4.1.1: 301-missing-execinfo_h.patch
> Only in svn-export/buildroot/toolchain/gcc/4.1.1: 302-c99-snprintf.patch
> Only in svn-export/buildroot/toolchain/gcc/4.1.1:
> 303-c99-complex-ugly-hack.patch
> Only in svn-export/buildroot/toolchain/gcc/4.1.1: 304-index_macro.patch
> Only in svn-export/buildroot/toolchain/gcc/4.1.1: 740-sh-pr24836.patch
> Only in svn-export/buildroot/toolchain/gcc/4.1.1: 800-arm-bigendian.patch
> Only in svn-export/buildroot/toolchain/gcc/4.2: 103-uclibc-conf-noupstream.patch
> Only in svn-export/buildroot/toolchain/gcc/4.2: 203-uclibc-locale-no__x.patch
> Only in svn-export/buildroot/toolchain/gcc/4.2:
> 204-uclibc-locale-wchar_fix.patch
> Only in svn-export/buildroot/toolchain/gcc/4.2: 301-missing-execinfo_h.patch
> Only in svn-export/buildroot/toolchain/gcc/4.2: 302-c99-snprintf.patch
> Only in svn-export/buildroot/toolchain/gcc/4.2: 303-c99-complex-ugly-hack.patch
> Only in svn-export/buildroot/toolchain/gdb: 6.5
>

^ permalink raw reply

* Re: git-svn: Missing files
From: Eric Wong @ 2006-07-20  2:48 UTC (permalink / raw)
  To: Ben Williamson; +Cc: git
In-Reply-To: <b6327a230607191909tf48c4f8nc551b732523cca3e@mail.gmail.com>

Ben Williamson <benw@pobox.com> wrote:
> Oh. I just looked in git-svn and found this:
> 
> $VERSION = '1.1.1-broken';

I removed the version tag and started using GIT_VERSION when git-svn
moved out of contrib/ a few weeks ago.

As far as I remember, I don't remember git-svn having problems with
missing files.  There has been a bug where it got extra files from other
places in the repository, but that's fixed.

May I ask if you have the Perl SVN:: library bindings installed?  If so
1.1.1-broken (and all versions afterwards) will automatically. use them
(if the SVN library version is >= 1.1).

Nevertheless, I'm running an import right now (with the SVN:: libraries enabled)
and will make another run with them disabled (which is kind of slow).
I'll keep you posted...

I've actually been getting a lot of real-world git-svn usage in the past
few weeks (and hence the lack of git-related work) and haven't noticed
any major problems.

> Fair enough. So far I haven't explored other branches in git.git, I've
> no idea what "pu" stands for. Can someone point me in the right
> direction?

pu is "potential updates", it's very bleeding edge.  next is a few steps
ahead of master, which should be the safest of the three.

-- 
Eric Wong

^ permalink raw reply

* Re: git-svn: Missing files
From: Eric Wong @ 2006-07-20  3:06 UTC (permalink / raw)
  To: Ben Williamson; +Cc: git
In-Reply-To: <20060720024815.GC31763@localdomain>

Eric Wong <normalperson@yhbt.net> wrote:
> Ben Williamson <benw@pobox.com> wrote:
> > Oh. I just looked in git-svn and found this:
> > 
> > $VERSION = '1.1.1-broken';
> 
> Nevertheless, I'm running an import right now (with the SVN:: libraries enabled)
> and will make another run with them disabled (which is kind of slow).
> I'll keep you posted...

Ok, I think I've found the problem.  This problem only happens if you're
using the SVN:: libraries, right?

-- 
Eric Wong

^ permalink raw reply

* [PATCH] Re: git-svn: Missing files
From: Eric Wong @ 2006-07-20  3:48 UTC (permalink / raw)
  To: Ben Williamson; +Cc: git, Junio C Hamano
In-Reply-To: <b6327a230607191902n47b81993x8caea2df3955d8c0@mail.gmail.com>

Ben, can you please try this patch against the git-svn.perl file in
master?  You can also find the full patched file here:

	http://git-svn.bogomips.org/git-svn.perl

From: Eric Wong <normalperson@yhbt.net>
Date: Wed, 19 Jul 2006 20:42:35 -0700
Subject: [PATCH] git-svn: fix fetching new directories copies when using SVN:: libs

Log output from SVN doesn't list all the new files that were
added if a new directory was copied from an existing place in
the repository.  This means we'll have to do some extra work and
traverse new directories ourselves.

Thanks to Ben Williamson for the excellent bug report.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 89ad840..577a284 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2692,6 +2692,7 @@ sub libsvn_fetch {
 	my ($last_commit, $paths, $rev, $author, $date, $msg) = @_;
 	open my $gui, '| git-update-index -z --index-info' or croak $!;
 	my @amr;
+	my %fetched = ();
 	foreach my $f (keys %$paths) {
 		my $m = $paths->{$f}->action();
 		$f =~ s#^/+##;
@@ -2709,10 +2710,13 @@ sub libsvn_fetch {
 			} else {
 				die "Unrecognized action: $m, ($f r$rev)\n";
 			}
+		} elsif ($t == $SVN::Node::dir && $m =~ /^[AR]$/) {
+			libsvn_traverse($gui, '', $f, $rev, \%fetched);
 		}
 		$pool->clear;
 	}
 	foreach (@amr) {
+		next if $fetched{$_->[1]};
 		print "\t$_->[0]\t$_->[1]\n" unless $_q;
 		libsvn_get_file($gui, $_->[1], $rev)
 	}
@@ -2778,7 +2782,7 @@ sub libsvn_parse_revision {
 }
 
 sub libsvn_traverse {
-	my ($gui, $pfx, $path, $rev) = @_;
+	my ($gui, $pfx, $path, $rev, $files) = @_;
 	my $cwd = "$pfx/$path";
 	my $pool = SVN::Pool->new;
 	$cwd =~ s#^/+##g;
@@ -2786,10 +2790,12 @@ sub libsvn_traverse {
 	foreach my $d (keys %$dirent) {
 		my $t = $dirent->{$d}->kind;
 		if ($t == $SVN::Node::dir) {
-			libsvn_traverse($gui, $cwd, $d, $rev);
+			libsvn_traverse($gui, $cwd, $d, $rev, $files);
 		} elsif ($t == $SVN::Node::file) {
-			print "\tA\t$cwd/$d\n" unless $_q;
-			libsvn_get_file($gui, "$cwd/$d", $rev);
+			my $file = "$cwd/$d";
+			print "\tA\t$file\n" unless $_q;
+			libsvn_get_file($gui, $file, $rev);
+			$files->{$file} = 1 if defined $files;
 		}
 	}
 	$pool->clear;
@@ -2913,9 +2919,7 @@ sub libsvn_new_tree {
 	}
 	my ($paths, $rev, $author, $date, $msg) = @_;
 	open my $gui, '| git-update-index -z --index-info' or croak $!;
-	my $pool = SVN::Pool->new;
-	libsvn_traverse($gui, '', $SVN_PATH, $rev, $pool);
-	$pool->clear;
+	libsvn_traverse($gui, '', $SVN_PATH, $rev);
 	close $gui or croak $?;
 	return libsvn_log_entry($rev, $author, $date, $msg);
 }
-- 
1.4.1.g9d8f

^ permalink raw reply related

* Re: git-svn: Missing files
From: Ben Williamson @ 2006-07-20  4:31 UTC (permalink / raw)
  To: Eric Wong; +Cc: git
In-Reply-To: <20060720024815.GC31763@localdomain>

Wow, I just got back from lunch to three replies and a patch! I'll try
to keep up here...

On 7/20/06, Eric Wong <normalperson@yhbt.net> wrote:
> May I ask if you have the Perl SVN:: library bindings installed?  If so
> 1.1.1-broken (and all versions afterwards) will automatically. use them
> (if the SVN library version is >= 1.1).

Yes I have Perl SVN:: installed, because I started off trying
git-svnimport. (Most of my attempts there resulted in lots of commits
of the same empty tree, until someone else on this list mentioned that
"trunk/projectname" should be removed from the url. Then it started
working, but it seems to be a large repo and was taking forever, so I
tried git-svn.) I didn't realise git-svn didn't need the Perl stuff.

$ rpm -qa | grep subversion
subversion-1.2.1-0.1.1.fc3.rf
subversion-perl-1.2.1-0.1.1.fc3.rf

> Nevertheless, I'm running an import right now (with the SVN:: libraries enabled)
> and will make another run with them disabled (which is kind of slow).
> I'll keep you posted...

Me too, with your latest script - will let you know. Thanks!

- Ben.

^ permalink raw reply

* Re: [PATCH] Re: git-svn: Missing files
From: Ben Williamson @ 2006-07-20  5:51 UTC (permalink / raw)
  To: Eric Wong; +Cc: git
In-Reply-To: <20060720034841.GA28298@localdomain>

On 7/20/06, Eric Wong <normalperson@yhbt.net> wrote:
> Ben, can you please try this patch against the git-svn.perl file in
> master?  You can also find the full patched file here:
>
>         http://git-svn.bogomips.org/git-svn.perl

Just finished, and the results were heaps better, but it seems
package/dhcp/Config.in was still missed. (The others below are empty
directories.)

$ diff -ur --exclude=.git --exclude=.svn svn-export/buildroot
git-svn-fetch-fixed/buildroot
Only in svn-export/buildroot/package/dhcp: Config.in
Only in svn-export/buildroot/package: linux
Only in svn-export/buildroot/target/generic: access_point
Only in svn-export/buildroot/target/generic: firewall

Hey, good enough for me, but then I'm not using dhcp...  ;)

- Ben.

^ permalink raw reply

* Re[3]:  hi from Mary B.
From: Marinka B. @ 2006-07-20  7:59 UTC (permalink / raw)
  To: Jens

Hello, Jens

I think we had correspondence a long time ago if it was not you I am sorry.
If it was I could not answer you because my Mozilla mail manager was down for a 
long time and I could not fix it only with my friend's help I got the emails 
address out for me ..:)
I hope it was whom we were corresponded with you are still interested, as I am, 
though I realize much time has passed since then...
I really don't know where to start ....
Maybe you could tell me a little about yourself since I lost our early letters, 
your appearance,age , hobbies, and are you still in the search?
If it was you I wrote to and you are interested to get to know me better, I have 
a profile at :
http://iamsearching-forlove.com/

Don't really know what else to say for now I hope this is the right address

Let me know if you are interested, And I hope
you won't run when you see my picture :-)

ta-ta!!

Marinka B.

If you think that you were subscribed by mistake for this mail
delivery or if your email has been added without your permission,
please, visit http://iamsearching-forlove.com/ and unsubscribe from our mails.

^ permalink raw reply

* Re: [PATCH] tar-tree: add the "tar.applyUmask" config option
From: Rene Scharfe @ 2006-07-20  8:14 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Junio C Hamano, git, torvalds
In-Reply-To: <20060719214025.GA10997@1wt.eu>

Hi Willy,

I kind of like the change, because it gives the user more control.
Theoretically this would not be needed, because tar can apply the
umask at extract time just fine.  In practice I can't see why we
should forbid users from creating the archives just the way they
like them, no matter what their reasoning might be.

Willy Tarreau schrieb:
> +tar.applyUmask::
> +	By default, git-link:git-tar-tree[1] sets file and directories modes
> +	to 0666 or 0777. While this is both useful and acceptable for projects
> +	such as the Linux Kernel, it might be excessive for other projects.
> +	Setting this variable to true makes git-link:git-tar-tree[1] apply the
> +	umask to the modes above. This should be enough for most projects, as
> +	it will lead to the same permissions as git-link:git-checkout[1] would
> +	use. The default is false.

Comments about why this change is needed and that it is sufficient
should go into the commit message.  For the rest of the patch:

Acked-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>

^ permalink raw reply

* [PATCH] git-svn: fix fetching new directories copies when using SVN:: libs
From: Eric Wong @ 2006-07-20  8:43 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Ben Williamson, git
In-Reply-To: <20060720034841.GA28298@localdomain>

Log output from SVN doesn't list all the new files that were
added if a new directory was copied from an existing place in
the repository.  This means we'll have to do some extra work and
traverse new directories ourselves.

This has been updated from the original patch to defer traversed
adds until all removals have been done.  Please disregard the
original.

Thanks to Ben Williamson for the excellent bug report and
testing.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 89ad840..6453771 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2709,6 +2709,12 @@ sub libsvn_fetch {
 			} else {
 				die "Unrecognized action: $m, ($f r$rev)\n";
 			}
+		} elsif ($t == $SVN::Node::dir && $m =~ /^[AR]$/) {
+			my @traversed = ();
+			libsvn_traverse($gui, '', $f, $rev, \@traversed);
+			foreach (@traversed) {
+				push @amr, [ $m, $_ ]
+			}
 		}
 		$pool->clear;
 	}
@@ -2778,7 +2784,7 @@ sub libsvn_parse_revision {
 }
 
 sub libsvn_traverse {
-	my ($gui, $pfx, $path, $rev) = @_;
+	my ($gui, $pfx, $path, $rev, $files) = @_;
 	my $cwd = "$pfx/$path";
 	my $pool = SVN::Pool->new;
 	$cwd =~ s#^/+##g;
@@ -2786,10 +2792,15 @@ sub libsvn_traverse {
 	foreach my $d (keys %$dirent) {
 		my $t = $dirent->{$d}->kind;
 		if ($t == $SVN::Node::dir) {
-			libsvn_traverse($gui, $cwd, $d, $rev);
+			libsvn_traverse($gui, $cwd, $d, $rev, $files);
 		} elsif ($t == $SVN::Node::file) {
-			print "\tA\t$cwd/$d\n" unless $_q;
-			libsvn_get_file($gui, "$cwd/$d", $rev);
+			my $file = "$cwd/$d";
+			if (defined $files) {
+				push @$files, $file;
+			} else {
+				print "\tA\t$file\n" unless $_q;
+				libsvn_get_file($gui, $file, $rev);
+			}
 		}
 	}
 	$pool->clear;
@@ -2913,9 +2924,7 @@ sub libsvn_new_tree {
 	}
 	my ($paths, $rev, $author, $date, $msg) = @_;
 	open my $gui, '| git-update-index -z --index-info' or croak $!;
-	my $pool = SVN::Pool->new;
-	libsvn_traverse($gui, '', $SVN_PATH, $rev, $pool);
-	$pool->clear;
+	libsvn_traverse($gui, '', $SVN_PATH, $rev);
 	close $gui or croak $?;
 	return libsvn_log_entry($rev, $author, $date, $msg);
 }
-- 
1.4.1.g9d8f

^ permalink raw reply related

* Re: [PATCH] tar-tree: add the "tar.applyUmask" config option
From: Willy Tarreau @ 2006-07-20  9:30 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vd5c1jkc3.fsf@assigned-by-dhcp.cox.net>

Hi Junio,

On Wed, Jul 19, 2006 at 03:33:48PM -0700, Junio C Hamano wrote:
> Willy Tarreau <w@1wt.eu> writes:
> 
> > While I agreed with Linus that the very permissive file modes set in tar
> > archives were not particularly a problem for kernel users, I'm finding
> > that for some other projects it sometimes becomes really annoying, to
> > the point that I finally considered using a plain tar instead. This is a
> > shame because tar-tree is really fast an powerful, and I like its ability
> > to enforce permissions when those of the local dir might be wrong for
> > various reasons.
> 
> I do not have problem with an option to allow a non-default
> behaviour in this area.  Maybe we might want to be able to set
> the mask in the configuration file as well, perhaps like...
> 
> 	tar.umask = user ;# use from the current process'
>         tar.umask = 0    ;# same as default
>         tar.umask = 002  ;# group friendly

Here's the new version following your suggestion above. I really liked it.
I've also added a configuration example in the doc. Once again, please
ensure that the doc generates correctly.

Thanks,
Willy


>From d8a0d2bbd2365b719a7f68edd78c77a0fd903cab Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Thu, 20 Jul 2006 11:23:40 +0200
Subject: tar-tree: add the "tar.umask" config option

By default, git-tar-tree(1) sets file and directories modes to 0666
or 0777. While this is both useful and acceptable for projects such
as the Linux Kernel, it might be excessive for other projects. With
this variable, it becomes possible to tell git-tar-tree(1) to apply
a specific umask to the modes above. The special value "user"
indicates that the user's current umask will be used. This should be
enough for most projects, as it will lead to the same permissions as
git-checkout(1) would use. The default value remains 0, which means
world read-write.

Signed-off-by: Willy Tarreau <w@1wt.eu>
---
 Documentation/config.txt       |   11 +++++++++++
 Documentation/git-tar-tree.txt |   15 ++++++++++++++-
 builtin-tar-tree.c             |   21 ++++++++++++++++++---
 3 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 0b434c1..f4985d4 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -208,6 +208,17 @@ showbranch.default::
 	The default set of branches for gitlink:git-show-branch[1].
 	See gitlink:git-show-branch[1].
 
+tar.umask::
+	By default, git-link:git-tar-tree[1] sets file and directories modes
+	to 0666 or 0777. While this is both useful and acceptable for projects
+	such as the Linux Kernel, it might be excessive for other projects.
+	With this variable, it becomes possible to tell
+	git-link:git-tar-tree[1] to apply a specific umask to the modes above.
+	The special value "user" indicates that the user's current umask will
+	be used. This should be enough for most projects, as it will lead to
+	the same permissions as git-link:git-checkout[1] would use. The default
+	value remains 0, which means world read-write.
+
 user.email::
 	Your email address to be recorded in any newly created commits.
 	Can be overridden by the 'GIT_AUTHOR_EMAIL' and 'GIT_COMMITTER_EMAIL'
diff --git a/Documentation/git-tar-tree.txt b/Documentation/git-tar-tree.txt
index f2675c4..7a99acf 100644
--- a/Documentation/git-tar-tree.txt
+++ b/Documentation/git-tar-tree.txt
@@ -37,7 +37,20 @@ OPTIONS
 	Instead of making a tar archive from local repository,
 	retrieve a tar archive from a remote repository.
 
-Examples
+CONFIGURATION
+-------------
+By default, file and directories modes are set to 0666 or 0777. It is
+possible to change this by setting the "umask" variable in the
+repository configuration as follows :
+
+[tar]
+        umask = 002	;# group friendly
+
+The special umask value "user" indicates that the user's current umask
+will be used instead. The default value remains 0, which means world
+readable/writable files and directories.
+
+EXAMPLES
 --------
 git tar-tree HEAD junk | (cd /var/tmp/ && tar xf -)::
 
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index f2e48aa..e5aaded 100644
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
@@ -20,6 +20,7 @@ static char block[BLOCKSIZE];
 static unsigned long offset;
 
 static time_t archive_time;
+static int tar_umask;
 
 /* tries hard to write, either succeeds or dies in the attempt */
 static void reliable_write(const void *data, unsigned long size)
@@ -188,13 +189,13 @@ static void write_entry(const unsigned c
 	} else {
 		if (S_ISDIR(mode)) {
 			*header.typeflag = TYPEFLAG_DIR;
-			mode |= 0777;
+			mode = (mode | 0777) & ~tar_umask;
 		} else if (S_ISLNK(mode)) {
 			*header.typeflag = TYPEFLAG_LNK;
 			mode |= 0777;
 		} else if (S_ISREG(mode)) {
 			*header.typeflag = TYPEFLAG_REG;
-			mode |= (mode & 0100) ? 0777 : 0666;
+			mode = (mode | ((mode & 0100) ? 0777 : 0666)) & ~tar_umask;
 		} else {
 			error("unsupported file mode: 0%o (SHA1: %s)",
 			      mode, sha1_to_hex(sha1));
@@ -293,6 +294,20 @@ static void traverse_tree(struct tree_de
 	}
 }
 
+int git_tar_config(const char *var, const char *value)
+{
+	if (!strcmp(var, "tar.umask")) {
+		if (!strcmp(value, "user")) {
+			tar_umask = umask(0);
+			umask(tar_umask);
+		} else {
+			tar_umask = git_config_int(var, value);
+		}
+		return 0;
+	}
+	return git_default_config(var, value);
+}
+
 static int generate_tar(int argc, const char **argv, char** envp)
 {
 	unsigned char sha1[20], tree_sha1[20];
@@ -305,7 +320,7 @@ static int generate_tar(int argc, const 
 	current_path.len = current_path.eof = 0;
 
 	setup_git_directory();
-	git_config(git_default_config);
+	git_config(git_tar_config);
 
 	switch (argc) {
 	case 3:
-- 
1.4.1

^ permalink raw reply related

* Re: [PATCH] tar-tree: add the "tar.applyUmask" config option
From: Rogan Dawes @ 2006-07-20  9:44 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: git
In-Reply-To: <20060720093044.GA10824@1wt.eu>

Willy Tarreau wrote:
> +int git_tar_config(const char *var, const char *value)
> +{
> +	if (!strcmp(var, "tar.umask")) {
> +		if (!strcmp(value, "user")) {
> +			tar_umask = umask(0);
> +			umask(tar_umask);
> +		} else {
> +			tar_umask = git_config_int(var, value);

Looks like you forgot:
    			umask(tar_umask);

> +		}
> +		return 0;
> +	}
> +	return git_default_config(var, value);
> +}

Or else move it to just before the "return 0;" line.

Rogan

^ permalink raw reply

* Re: [PATCH] tar-tree: add the "tar.applyUmask" config option
From: Willy Tarreau @ 2006-07-20  9:55 UTC (permalink / raw)
  To: Rogan Dawes; +Cc: git
In-Reply-To: <44BF507A.4080801@dawes.za.net>

On Thu, Jul 20, 2006 at 11:44:26AM +0200, Rogan Dawes wrote:
> Willy Tarreau wrote:
> >+int git_tar_config(const char *var, const char *value)
> >+{
> >+	if (!strcmp(var, "tar.umask")) {
> >+		if (!strcmp(value, "user")) {
> >+			tar_umask = umask(0);
> >+			umask(tar_umask);
> >+		} else {
> >+			tar_umask = git_config_int(var, value);
> 
> Looks like you forgot:
>    			umask(tar_umask);

not at all : we don't want to change the process's umask, but set the
mask that will be used to position file modes in the output archive.

The reason for umask(tar_umask) above is because you cannot read the
process umask without changing it, so you have to do it twice with a
dummy value first.

> >+		}
> >+		return 0;
> >+	}
> >+	return git_default_config(var, value);
> >+}
> 
> Or else move it to just before the "return 0;" line.
> 
> Rogan

Regards,
Willy

^ permalink raw reply

* [PATCH] Display "gitweb/test/file with spaces" in gitk
From: Thomas Kolejka @ 2006-07-20 10:12 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git, Junio C Hamano

Hello,

with this patch files with spaces in their names are displayed
in the treeview of gitk.

I use git to make a "backup"/"dump" of a DOS-FS .. and there are 
those filenames ;-).

Take care .. it's my first tcl hack!

Thomas

--
diff --git a/gitk b/gitk
index ba4644f..93af19c 100755
--- a/gitk
+++ b/gitk
@@ -3938,7 +3938,7 @@ proc gettreeline {gtf id} {
     while {[gets $gtf line] >= 0} {
        if {[lindex $line 1] ne "blob"} continue
        set sha1 [lindex $line 2]
-       set fname [lindex $line 3]
+       set fname [join [lrange $line 3 end]]
        lappend treefilelist($id) $fname
        lappend treeidlist($id) $sha1
     }
@@ -4147,7 +4147,7 @@ proc gettreediffline {gdtf ids} {
        }
        return
     }
-    set file [lindex $line 5]
+    set file [join [lrange $line 5 end]]
     lappend treediff $file
 }



-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

^ permalink raw reply related

* remote diff
From: Yakov Lerner @ 2006-07-20 11:54 UTC (permalink / raw)
  To: Git Mailing List

I have local repo, and remote repo ssh://x/y/.git.

I tried to diff local repo against remote, with naive
'git-diff ssh://x/y/.git.' But this did not work. How do I
diff with remote repo ?

Yakov

^ permalink raw reply

* Re: remote diff
From: Andreas Ericsson @ 2006-07-20 12:06 UTC (permalink / raw)
  To: Yakov Lerner; +Cc: Git Mailing List
In-Reply-To: <f36b08ee0607200454k7aa98454rd2a8a566b0ea4582@mail.gmail.com>

Yakov Lerner wrote:
> I have local repo, and remote repo ssh://x/y/.git.
> 
> I tried to diff local repo against remote, with naive
> 'git-diff ssh://x/y/.git.' But this did not work. How do I
> diff with remote repo ?
> 

Pull it to a new branch and diff the two branches. This should be a 
pretty cheap operation unless either of the two repos has seen a lot of 
development since you forked the code.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

^ permalink raw reply

* git-rerere during git-rebase
From: Ilpo Järvinen @ 2006-07-20 14:14 UTC (permalink / raw)
  To: git

Hi,

I discovered that "git-am --resolved --3way" (in 1.3.1) and "git-rebase 
--continue" (in 1.4.2.rc1.ge7a0) do not correctly capture hand resolved 
files into .git/rr-cache. In worst case I got (with 1.3.1), afaict, the 
postimage was incorrect including also all patches successfully applied 
after the git-am --resolved --3way up to until the point where next 
conflict occurred. To circumvent this, I can use git-rerere directly but I 
remember that its manpage states that one should never have to do so. I'm 
I missing something or is this a problem in git-rebase (or possibly in 
git-am)?


-- 
 i.

ps. I'm not subscribed, so please cc me.

^ permalink raw reply

* Re: [PATCH] git-am: Don't accept an mbox on stdin of we already have a .dotest directory
From: Petr Baudis @ 2006-07-20 14:33 UTC (permalink / raw)
  To: Lukas Sandström; +Cc: Junio C Hamano, Git Mailing List
In-Reply-To: <44BE95D0.9090708@etek.chalmers.se>

Dear diary, on Wed, Jul 19, 2006 at 10:28:00PM CEST, I got a letter
where Lukas Sandström <lukass@etek.chalmers.se> said that...
> Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
> ---

Please don't be afraid of putting stuff to commit message. It can only
improve things. :-)

> # git format-patch -k -3 master..conflict | git am -k -3
> => git-am fails with a conflict message
> # git reset --hard
> 
> # git format-patch -k -3 master..ok | git am -k -3
> => git am fails with the same conflict message as above,
> => since it's trying to apply the old .dotest directory
> 
> With the patch it complains about an old .dotest
> directory instead.

I think this rather means that git reset --hard should clear the .dotest
directory, or something (perhaps just warn)...

> -	test ",$#," = ",0," ||
> +	if test ",$#," != ",0," || ! tty -s

...but this looks like a horrible idea. Does this mean that git-am can't
be now ran without a terminal? (E.g. in a cron/at job, inside a procmail
rule etc.) That's bad.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam

^ 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