Git development
 help / color / mirror / Atom feed
* Re: [PATCH] Add new git-rm command with documentation
From: Shawn Pearce @ 2006-02-21 22:32 UTC (permalink / raw)
  To: Krzysiek Pawlik; +Cc: cworth, git
In-Reply-To: <43FB9455.6010402@people.pl>

Krzysiek Pawlik <krzysiek.pawlik@people.pl> wrote:
[...]
> +while : ; do
> +  case "$1" in
> +    -n)
> +	show_only=true
> +	;;
> +    -v)
> +	verbose=--verbose
> +	;;
> +    -f)
> +	remove_files=true
> +	;;
> +    --)
> +	break
> +	;;
> +    -*)
> +	usage
> +	;;
> +    *)
> +	break
> +	;;
> +  esac
> +  shift
> +done
[...]

You are leaving -- in $@ for processing later, which means we'll
try to delete the file '--'.  :-)

I think a shift before the break in the -- case would fix this.

-- 
Shawn.

^ permalink raw reply

* Re: [PATCH] Add new git-rm command with documentation
From: Krzysiek Pawlik @ 2006-02-21 22:29 UTC (permalink / raw)
  To: Shawn Pearce; +Cc: cworth, git
In-Reply-To: <20060221221446.GA20744@spearce.org>


[-- Attachment #1.1: Type: text/plain, Size: 408 bytes --]

Shawn Pearce wrote:
> How about supporting -- to break out of the option loop?  The rest
> of the script will support files named --help just fine but the
> option parser will just spit out usage information.

Yeah... forgot to add this.

> Also I don't think the -f option's whitespace matches the others...

Thanks, fixed :)

-- 
Krzysiek Pawlik (Nelchael)
RLU #322999 GPG Key ID: 0xBC555551

[-- Attachment #1.2: git-rm.patch --]
[-- Type: text/plain, Size: 4279 bytes --]

diff -Nru git-1.2.2/.gitignore git-1.2.2.patched/.gitignore
--- git-1.2.2/.gitignore	2006-02-19 01:19:00.000000000 +0100
+++ git-1.2.2.patched/.gitignore	2006-02-21 22:56:23.000000000 +0100
@@ -84,6 +84,7 @@
 git-rev-list
 git-rev-parse
 git-revert
+git-rm
 git-send-email
 git-send-pack
 git-sh-setup
diff -Nru git-1.2.2/Documentation/git-rm.txt git-1.2.2.patched/Documentation/git-rm.txt
--- git-1.2.2/Documentation/git-rm.txt	1970-01-01 01:00:00.000000000 +0100
+++ git-1.2.2.patched/Documentation/git-rm.txt	2006-02-21 23:00:13.000000000 +0100
@@ -0,0 +1,80 @@
+git-rm(1)
+=========
+
+NAME
+----
+git-rm - Remove files from the index.
+
+SYNOPSIS
+--------
+'git-rm' [-n|-f] [-v] <file>...
+
+DESCRIPTION
+-----------
+A convenience wrapper for rm and git-update-index --remove. For those
+coming from cvs, git-rm provides an operation similar to "cvs rm -f".
+
+
+OPTIONS
+-------
+<file>...::
+	Files to remove from the working tree and the index.
+
+-n::
+        Don't actually remove the file(s), just show if they exist in
+        the index.
+
+-f::
+        Delete the file(s) before removing it.
+
+-v::
+        Be verbose.
+
+
+DISCUSSION
+----------
+
+The list of <file> given to the command is fed to `git-ls-files`
+command to list files that are registered in the index and
+are not ignored/excluded by `$GIT_DIR/info/exclude` file or
+`.gitignore` file in each directory.  This means two things:
+
+. You can put the name of a directory on the command line, and the
+  command will remove all files in it and its subdirectories (the
+  directories themselves are not removed);
+
+. Giving the name of a file that is not in the index does not
+  remove that file.
+
+
+EXAMPLES
+--------
+git-rm Documentation/\\*.txt::
+
+	Removes all `\*.txt` files that are in the index under
+	`Documentation` directory and its subdirectories.
++
+Note that the asterisk `\*` is quoted from the shell in this
+example; this lets the command include the files from
+subdirectories of `Documentation/` directory.
+
+git-rm git-*.sh::
+
+	Remove all git-*.sh scripts that are in the index.
+	Because this example lets the shell expand the asterisk
+	(i.e. you are listing the files explicitly), it does not
+	remove `subdir/git-foo.sh`.
+
+
+Author
+------
+Written by Linus Torvalds <torvalds@osdl.org>
+
+Documentation
+--------------
+Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
+
+GIT
+---
+Part of the gitlink:git[7] suite
+
diff -Nru git-1.2.2/Makefile git-1.2.2.patched/Makefile
--- git-1.2.2/Makefile	2006-02-19 01:19:00.000000000 +0100
+++ git-1.2.2.patched/Makefile	2006-02-21 22:56:23.000000000 +0100
@@ -107,7 +107,7 @@
 	git-merge-one-file.sh git-parse-remote.sh \
 	git-prune.sh git-pull.sh git-push.sh git-rebase.sh \
 	git-repack.sh git-request-pull.sh git-reset.sh \
-	git-resolve.sh git-revert.sh git-sh-setup.sh \
+	git-resolve.sh git-revert.sh git-rm.sh git-sh-setup.sh \
 	git-tag.sh git-verify-tag.sh git-whatchanged.sh \
 	git-applymbox.sh git-applypatch.sh git-am.sh \
 	git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
diff -Nru git-1.2.2/git-rm.sh git-1.2.2.patched/git-rm.sh
--- git-1.2.2/git-rm.sh	1970-01-01 01:00:00.000000000 +0100
+++ git-1.2.2.patched/git-rm.sh	2006-02-21 23:25:47.000000000 +0100
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+USAGE='<file>...'
+SUBDIRECTORY_OK='Yes'
+. git-sh-setup
+
+show_only=
+verbose=
+remove_files=
+while : ; do
+  case "$1" in
+    -n)
+	show_only=true
+	;;
+    -v)
+	verbose=--verbose
+	;;
+    -f)
+	remove_files=true
+	;;
+    --)
+	break
+	;;
+    -*)
+	usage
+	;;
+    *)
+	break
+	;;
+  esac
+  shift
+done
+
+# This is typo-proofing. If some paths match and some do not, we want
+# to do nothing.
+case "$#" in
+0)	;;
+*)
+	git-ls-files --error-unmatch -- "$@" >/dev/null || {
+		echo >&2 "Maybe you misspelled it?"
+		exit 1
+	}
+	;;
+esac
+
+files=$(
+    if test -f "$GIT_DIR/info/exclude" ; then
+	git-ls-files \
+	    --exclude-from="$GIT_DIR/info/exclude" \
+	    --exclude-per-directory=.gitignore -- "$@"
+    else
+	git-ls-files \
+	--exclude-per-directory=.gitignore -- "$@"
+    fi | sort | uniq
+)
+
+case "$show_only" in
+true)
+	echo $files
+	;;
+*)
+	[[ "$remove_files" = "true" ]] && rm -f -- $files
+	git-update-index --remove $verbose $files
+	;;
+esac

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply

* Re: [PATCH] fmt-merge-msg: avoid open "-|" list form for Perl 5.6
From: Johannes Schindelin @ 2006-02-21 22:19 UTC (permalink / raw)
  To: Alex Riesen; +Cc: Sam Vilain, Junio C Hamano, Eric Wong, git
In-Reply-To: <20060221215742.GA5948@steel.home>

Hi,

On Tue, 21 Feb 2006, Alex Riesen wrote:

> Sam Vilain, Tue, Feb 21, 2006 21:36:50 +0100:
> > >
> > >>* Eric, thanks for the hint.  I have this four-patch series.
> > >>  Could people with perl 5.6 please check them?
> > >
> > >
> > >Does not work here (ActiveState Build 811, Perl 5.8.6):
> > >
> > >$ perl -e 'open(F, "-|")'
> > >'-' is not recognized as an internal or external command,
> > >operable program or batch file.
> > 
> > Portability, Ease of Coding, Few CPAN Module Dependencies.  Pick any two.
> > 
> 
> Sometimes an upgrade is just out of question. Besides, that'd mean an
> upgrade to another operating system, because very important scripts
> over here a just not portable to anything else but
>     "ActiveState Perl on Windows (TM)"
> I just have no choice.

Maybe I am stating the obvious, but it seems that

	open (F, "git-blabla -option |");

would be more portable.

Alex, would this work on ActiveState?

Perl gurus, is the latter way to open a pipe considered awful or what?

Ciao,
Dscho

P.S.: Eric, we rely on fork() anyway. Most of git's programs just don't 
work without a fork().

^ permalink raw reply

* Re: PATCH: fix git-fmt-merge-msg on ActiveState Perl
From: Alex Riesen @ 2006-02-21 22:18 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano
In-Reply-To: <81b0412b0602210748t76d02007s316081a04ee685c8@mail.gmail.com>

Alex Riesen, Tue, Feb 21, 2006 16:48:43 +0100:
> On 2/21/06, Alex Riesen <raa.lkml@gmail.com> wrote:
> > For people who stuck with ActiveState Perl, as there seem to be
> > no chance for it to support the list form of "open" in foreseeable future.
> 
> Too late... Sorry :)

Not too late, actually. It'll work for everyone with ActiveState Perl

^ permalink raw reply

* Re: [PATCH] Add new git-rm command with documentation
From: Johannes Schindelin @ 2006-02-21 22:15 UTC (permalink / raw)
  To: Carl Worth; +Cc: Junio C Hamano, git
In-Reply-To: <87u0ass7tj.wl%cworth@cworth.org>

Hi,

On Tue, 21 Feb 2006, Carl Worth wrote:

>  PS. I didn't change the Linus and Junio attribution since all of the
>  code and documentation here is just minor changes from git-add.

If that is so, why not reuse the same binary (a la git-whatchanged and 
git-show)?

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] Add new git-rm command with documentation
From: Shawn Pearce @ 2006-02-21 22:14 UTC (permalink / raw)
  To: Krzysiek Pawlik; +Cc: Carl Worth, git
In-Reply-To: <43FB8F31.9090302@people.pl>

How about supporting -- to break out of the option loop?  The rest
of the script will support files named --help just fine but the
option parser will just spit out usage information.

[...]
> +while : ; do
> +  case "$1" in
> +    -n)
> +	show_only=true
> +	;;
> +    -v)
> +	verbose=--verbose
> +	;;
> +	-f)
> +	remove_files=true
> +	;;
> +    -*)
> +	usage
> +	;;
> +    *)
> +	break
> +	;;
> +  esac
> +  shift
> +done
[...]

Also I don't think the -f option's whitespace matches the others...

-- 
Shawn.

^ permalink raw reply

* Re: [PATCH] fmt-merge-msg: avoid open "-|" list form for Perl 5.6
From: Ron Parker @ 2006-02-21 22:13 UTC (permalink / raw)
  To: git
In-Reply-To: <1cf1c57a0602211412r1988b14ao435edd29207dc0d0@mail.gmail.com>

On 2/21/06, Alex Riesen <raa.lkml@gmail.com> wrote:

> AFAICS, it does not exist. There is emulation of it in that active-perl,
> though so this works:
>
>     if ( !fork ) { something }
>
> but not "too well" (you have to be carefule not spawn too many (which
> is around 50) processes. Perl'll crash otherwise).

IIRC this has to do with some child-process thread limits in Windows.

--
Windows, the multi-thrashing OS.

^ permalink raw reply

* Re: [PATCH] Add new git-rm command with documentation
From: Krzysiek Pawlik @ 2006-02-21 22:07 UTC (permalink / raw)
  To: Carl Worth; +Cc: Junio C Hamano, git
In-Reply-To: <87u0ass7tj.wl%cworth@cworth.org>


[-- Attachment #1.1: Type: text/plain, Size: 376 bytes --]

Carl Worth wrote:
> This adds a git-rm command which provides convenience similar to
> git-add

I've modified it a little - it has now a '-f' option to delete files
(much like cvs rm behaviour). It makes it a bit safer ;) I've fixed the
`rm` - it wouldn't work for example for file named '--help'.

-- 
Krzysiek Pawlik (Nelchael)
RLU #322999 GPG Key ID: 0xBC555551

[-- Attachment #1.2: git-rm.patch --]
[-- Type: text/plain, Size: 4254 bytes --]

diff -Nru git-1.2.2/.gitignore git-1.2.2.patched/.gitignore
--- git-1.2.2/.gitignore	2006-02-19 01:19:00.000000000 +0100
+++ git-1.2.2.patched/.gitignore	2006-02-21 22:56:23.000000000 +0100
@@ -84,6 +84,7 @@
 git-rev-list
 git-rev-parse
 git-revert
+git-rm
 git-send-email
 git-send-pack
 git-sh-setup
diff -Nru git-1.2.2/Documentation/git-rm.txt git-1.2.2.patched/Documentation/git-rm.txt
--- git-1.2.2/Documentation/git-rm.txt	1970-01-01 01:00:00.000000000 +0100
+++ git-1.2.2.patched/Documentation/git-rm.txt	2006-02-21 23:00:13.000000000 +0100
@@ -0,0 +1,80 @@
+git-rm(1)
+=========
+
+NAME
+----
+git-rm - Remove files from the index.
+
+SYNOPSIS
+--------
+'git-rm' [-n|-f] [-v] <file>...
+
+DESCRIPTION
+-----------
+A convenience wrapper for rm and git-update-index --remove. For those
+coming from cvs, git-rm provides an operation similar to "cvs rm -f".
+
+
+OPTIONS
+-------
+<file>...::
+	Files to remove from the working tree and the index.
+
+-n::
+        Don't actually remove the file(s), just show if they exist in
+        the index.
+
+-f::
+        Delete the file(s) before removing it.
+
+-v::
+        Be verbose.
+
+
+DISCUSSION
+----------
+
+The list of <file> given to the command is fed to `git-ls-files`
+command to list files that are registered in the index and
+are not ignored/excluded by `$GIT_DIR/info/exclude` file or
+`.gitignore` file in each directory.  This means two things:
+
+. You can put the name of a directory on the command line, and the
+  command will remove all files in it and its subdirectories (the
+  directories themselves are not removed);
+
+. Giving the name of a file that is not in the index does not
+  remove that file.
+
+
+EXAMPLES
+--------
+git-rm Documentation/\\*.txt::
+
+	Removes all `\*.txt` files that are in the index under
+	`Documentation` directory and its subdirectories.
++
+Note that the asterisk `\*` is quoted from the shell in this
+example; this lets the command include the files from
+subdirectories of `Documentation/` directory.
+
+git-rm git-*.sh::
+
+	Remove all git-*.sh scripts that are in the index.
+	Because this example lets the shell expand the asterisk
+	(i.e. you are listing the files explicitly), it does not
+	remove `subdir/git-foo.sh`.
+
+
+Author
+------
+Written by Linus Torvalds <torvalds@osdl.org>
+
+Documentation
+--------------
+Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
+
+GIT
+---
+Part of the gitlink:git[7] suite
+
diff -Nru git-1.2.2/Makefile git-1.2.2.patched/Makefile
--- git-1.2.2/Makefile	2006-02-19 01:19:00.000000000 +0100
+++ git-1.2.2.patched/Makefile	2006-02-21 22:56:23.000000000 +0100
@@ -107,7 +107,7 @@
 	git-merge-one-file.sh git-parse-remote.sh \
 	git-prune.sh git-pull.sh git-push.sh git-rebase.sh \
 	git-repack.sh git-request-pull.sh git-reset.sh \
-	git-resolve.sh git-revert.sh git-sh-setup.sh \
+	git-resolve.sh git-revert.sh git-rm.sh git-sh-setup.sh \
 	git-tag.sh git-verify-tag.sh git-whatchanged.sh \
 	git-applymbox.sh git-applypatch.sh git-am.sh \
 	git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
diff -Nru git-1.2.2/git-rm.sh git-1.2.2.patched/git-rm.sh
--- git-1.2.2/git-rm.sh	1970-01-01 01:00:00.000000000 +0100
+++ git-1.2.2.patched/git-rm.sh	2006-02-21 23:02:13.000000000 +0100
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+USAGE='<file>...'
+SUBDIRECTORY_OK='Yes'
+. git-sh-setup
+
+show_only=
+verbose=
+remove_files=
+while : ; do
+  case "$1" in
+    -n)
+	show_only=true
+	;;
+    -v)
+	verbose=--verbose
+	;;
+	-f)
+	remove_files=true
+	;;
+    -*)
+	usage
+	;;
+    *)
+	break
+	;;
+  esac
+  shift
+done
+
+# This is typo-proofing. If some paths match and some do not, we want
+# to do nothing.
+case "$#" in
+0)	;;
+*)
+	git-ls-files --error-unmatch -- "$@" >/dev/null || {
+		echo >&2 "Maybe you misspelled it?"
+		exit 1
+	}
+	;;
+esac
+
+files=$(
+    if test -f "$GIT_DIR/info/exclude" ; then
+	git-ls-files \
+	    --exclude-from="$GIT_DIR/info/exclude" \
+	    --exclude-per-directory=.gitignore -- "$@"
+    else
+	git-ls-files \
+	--exclude-per-directory=.gitignore -- "$@"
+    fi | sort | uniq
+)
+
+case "$show_only" in
+true)
+	echo $files
+	;;
+*)
+	[[ "$remove_files" = "true" ]] && rm -f -- $files
+	git-update-index --remove $verbose $files
+	;;
+esac

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply

* What does this error message mean?
From: Alan Chandler @ 2006-02-21 22:06 UTC (permalink / raw)
  To: git

alan@kanger usermgr[master]$ git commit -a
fatal: empty ident  <alan@chandlerfamily.org.uk> not allowed

Suddenly started happening, possibly after upgrade (via debian) to git 1.2.1



-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

^ permalink raw reply

* Re: [PATCH] fmt-merge-msg: avoid open "-|" list form for Perl 5.6
From: Alex Riesen @ 2006-02-21 22:04 UTC (permalink / raw)
  To: Eric Wong; +Cc: Junio C Hamano, Johannes Schindelin, git
In-Reply-To: <20060221205618.GA23920@localdomain>

Eric Wong, Tue, Feb 21, 2006 21:56:18 +0100:
> > >  * Eric, thanks for the hint.  I have this four-patch series.
> > >    Could people with perl 5.6 please check them?
> > 
> > Does not work here (ActiveState Build 811, Perl 5.8.6):
> > 
> > $ perl -e 'open(F, "-|")'
> > '-' is not recognized as an internal or external command,
> > operable program or batch file.
> 
> Both "-|" and "|-" forms of open() use fork() internally.  Iirc, fork()
> doesn't work too well on that platform.
> 

AFAICS, it does not exist. There is emulation of it in that active-perl,
though so this works:

    if ( !fork ) { something }

but not "too well" (you have to be carefule not spawn too many (which
is around 50) processes. Perl'll crash otherwise).

^ permalink raw reply

* Re: [PATCH] fmt-merge-msg: avoid open "-|" list form for Perl 5.6
From: Alex Riesen @ 2006-02-21 21:57 UTC (permalink / raw)
  To: Sam Vilain; +Cc: Junio C Hamano, Johannes Schindelin, Eric Wong, git
In-Reply-To: <43FB79E2.1040307@vilain.net>

Sam Vilain, Tue, Feb 21, 2006 21:36:50 +0100:
> >
> >>* Eric, thanks for the hint.  I have this four-patch series.
> >>  Could people with perl 5.6 please check them?
> >
> >
> >Does not work here (ActiveState Build 811, Perl 5.8.6):
> >
> >$ perl -e 'open(F, "-|")'
> >'-' is not recognized as an internal or external command,
> >operable program or batch file.
> 
> Portability, Ease of Coding, Few CPAN Module Dependencies.  Pick any two.
> 

Sometimes an upgrade is just out of question. Besides, that'd mean an
upgrade to another operating system, because very important scripts
over here a just not portable to anything else but
    "ActiveState Perl on Windows (TM)"
I just have no choice.

^ permalink raw reply

* [PATCH] Add new git-rm command with documentation
From: Carl Worth @ 2006-02-21 21:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

This adds a git-rm command which provides convenience similar to
git-add, (and a bit more since it takes care of the rm as well).

Like git-add, git-rm expands the given path names through
git-ls-files. This means it only acts on files listed in the
index. And it does act recursively on directories by default, (no -r
needed as in the case of rm itself). When it recurses, it does not
remove empty directories that are left behind.

---

 It wouldn't be too hard to make this act more like rm in requiring -r
 before recursing into directories. Let me know what people think
 about this.

 As before, if you'd prefer to fetch/pull this, you should be able to
 from:

	git://git.freedesktop.org/~cworth/git

 This time on the git-rm branch, (again merged into cworth for what
 that's worth).

 -Carl

 PS. I didn't change the Linus and Junio attribution since all of the
 code and documentation here is just minor changes from git-add.

 .gitignore               |    1 +
 Documentation/git-rm.txt |   77 ++++++++++++++++++++++++++++++++++++++++++++++
 Makefile                 |    2 +
 git-rm.sh                |   58 +++++++++++++++++++++++++++++++++++
 4 files changed, 137 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/git-rm.txt
 create mode 100644 git-rm.sh

cf3ff7a87defa6ced7e6a8b6d719a9f237a08314
diff --git a/.gitignore b/.gitignore
index d7e8d2a..94f66d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -84,6 +84,7 @@ git-resolve
 git-rev-list
 git-rev-parse
 git-revert
+git-rm
 git-send-email
 git-send-pack
 git-sh-setup
diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt
new file mode 100644
index 0000000..6095df8
--- /dev/null
+++ b/Documentation/git-rm.txt
@@ -0,0 +1,77 @@
+git-rm(1)
+=========
+
+NAME
+----
+git-rm - Remove files from the working tree and from the index.
+
+SYNOPSIS
+--------
+'git-rm' [-n] [-v] <file>...
+
+DESCRIPTION
+-----------
+A convenience wrapper for rm and git-update-index --remove. For those
+coming from cvs, git-rm provides an operation similar to "cvs rm -f".
+
+
+OPTIONS
+-------
+<file>...::
+	Files to remove from the working tree and the index.
+
+-n::
+        Don't actually remove the file(s), just show if they exist in
+        the index.
+
+-v::
+        Be verbose.
+
+
+DISCUSSION
+----------
+
+The list of <file> given to the command is fed to `git-ls-files`
+command to list files that are registered in the index and
+are not ignored/excluded by `$GIT_DIR/info/exclude` file or
+`.gitignore` file in each directory.  This means two things:
+
+. You can put the name of a directory on the command line, and the
+  command will remove all files in it and its subdirectories (the
+  directories themselves are not removed);
+
+. Giving the name of a file that is not in the index does not
+  remove that file.
+
+
+EXAMPLES
+--------
+git-rm Documentation/\\*.txt::
+
+	Removes all `\*.txt` files that are in the index under
+	`Documentation` directory and its subdirectories.
++
+Note that the asterisk `\*` is quoted from the shell in this
+example; this lets the command include the files from
+subdirectories of `Documentation/` directory.
+
+git-rm git-*.sh::
+
+	Remove all git-*.sh scripts that are in the index.
+	Because this example lets the shell expand the asterisk
+	(i.e. you are listing the files explicitly), it does not
+	remove `subdir/git-foo.sh`.
+
+
+Author
+------
+Written by Linus Torvalds <torvalds@osdl.org>
+
+Documentation
+--------------
+Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
+
+GIT
+---
+Part of the gitlink:git[7] suite
+
diff --git a/Makefile b/Makefile
index 317be3c..e98b056 100644
--- a/Makefile
+++ b/Makefile
@@ -109,7 +109,7 @@ SCRIPT_SH = \
 	git-merge-one-file.sh git-parse-remote.sh \
 	git-prune.sh git-pull.sh git-push.sh git-rebase.sh \
 	git-repack.sh git-request-pull.sh git-reset.sh \
-	git-resolve.sh git-revert.sh git-sh-setup.sh \
+	git-resolve.sh git-revert.sh git-rm.sh git-sh-setup.sh \
 	git-tag.sh git-verify-tag.sh git-whatchanged.sh \
 	git-applymbox.sh git-applypatch.sh git-am.sh \
 	git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
diff --git a/git-rm.sh b/git-rm.sh
new file mode 100644
index 0000000..840c458
--- /dev/null
+++ b/git-rm.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+USAGE='<file>...'
+SUBDIRECTORY_OK='Yes'
+. git-sh-setup
+
+show_only=
+verbose=
+while : ; do
+  case "$1" in
+    -n)
+	show_only=true
+	;;
+    -v)
+	verbose=--verbose
+	;;
+    -*)
+	usage
+	;;
+    *)
+	break
+	;;
+  esac
+  shift
+done
+
+# This is typo-proofing. If some paths match and some do not, we want
+# to do nothing.
+case "$#" in
+0)	;;
+*)
+	git-ls-files --error-unmatch -- "$@" >/dev/null || {
+		echo >&2 "Maybe you misspelled it?"
+		exit 1
+	}
+	;;
+esac
+
+files=$(
+    if test -f "$GIT_DIR/info/exclude" ; then
+	git-ls-files \
+	    --exclude-from="$GIT_DIR/info/exclude" \
+	    --exclude-per-directory=.gitignore -- "$@"
+    else
+	git-ls-files \
+	--exclude-per-directory=.gitignore -- "$@"
+    fi | sort | uniq
+)
+
+case "$show_only" in
+true)
+	echo $files
+	;;
+*)
+	rm $files
+	git-update-index --remove $verbose $files
+	;;
+esac
-- 
1.2.2.g73be-dirty


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

^ permalink raw reply related

* Re: How to not download objects more than needed?
From: Junio C Hamano @ 2006-02-21 21:32 UTC (permalink / raw)
  To: Radoslaw Szkodzinski; +Cc: git
In-Reply-To: <43FB6C42.5000208@gorzow.mm.pl>

Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> writes:

> I have a pecuilar, but common use case for git.
>
> I have linux-2.6 repository pulled and I'd like to download some branch
> (say, netdev-2.6), which uses many of the same objects,
> but not to get all the objects from the git server.
>
> I've already tried certain commands, but still can't do it,
> and my bandwidth isn't too happy about it.
>
> It seems to require some kind of HEAD rewinding,
> or maybe fetching to another branch, I don't know.
>
> Anyone cares to help?

It is not peculiar at all.  The tools already should do what you
want:

           o---o---o---...---o (netdev-2.6)
          /
         / < netdev forked some time ago.
        /
    ---o---o---o---o---...---o---o---o (linus tip)
               ^v2.6.16-rc3      ^v2.6.16-rc4 

Suppose the "global" ancestry graph was like the above.  And
netdev-2.6 has not been merged into Linus tree.

What you have, already pulled from Linus, is:

    ---o---o---o---o---...---o---o---o (linus tip)
               ^v2.6.16-rc3      ^v2.6.16-rc4 

And suppose what the netdev tree has is something like this:

           o---o---o---...---o (netdev-2.6)
          /
         / < netdev forked some time ago.
        /
    ---o---o---o
               ^v2.6.16-rc3

The point being that the netdev tree does not know about Linus
tip you have.

When you "git fetch git://.../netdev-2.6.git/", a program that
runs on your end (git-fetch-pack) and another program that runs
on the other end (git-upload-pack) discuss to find out what both
of you have in common.  Your side starts from Linus tip and go
backwards, telling the other end "I have this, I have that,
...".  At first, netdev side will not see what it knows about,
but after a while, it will see a commit both of you have
(i.e. where the branch forked from).  After they find that out,
your side tells the other side "I want your netdev-2.6 head".

The other side sends the objects needed to complete the chain up
to the requested head, assuming that your side has objects to
complete the common ancestor point (again, the fork point, but
it could be some revs after that if the graph looked like the
above picture).  Objects behind the fork point does not need to
be sent.

^ permalink raw reply

* Re: How to not download objects more than needed?
From: sean @ 2006-02-21 21:13 UTC (permalink / raw)
  To: Radoslaw Szkodzinski; +Cc: git
In-Reply-To: <43FB6C42.5000208@gorzow.mm.pl>

On Tue, 21 Feb 2006 20:38:42 +0100
Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> wrote:

> I have a pecuilar, but common use case for git.

It's not really that peculiar.

> I have linux-2.6 repository pulled and I'd like to download some branch
> (say, netdev-2.6), which uses many of the same objects,
> but not to get all the objects from the git server.

Just make sure you're not using the rsync protocol.   Using the
native git protocol would be best.

> I've already tried certain commands, but still can't do it,
> and my bandwidth isn't too happy about it.

For instance, make sure your current linus repository is up to date 
with a "git pull" and then:

git fetch \
   git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git \
   upstream:netdev

will take the "upstream" branch from the netdev repository and name it 
netdev in your local repository.

Sean

^ permalink raw reply

* Re: [PATCH] fmt-merge-msg: avoid open "-|" list form for Perl 5.6
From: Eric Wong @ 2006-02-21 20:56 UTC (permalink / raw)
  To: Alex Riesen; +Cc: Junio C Hamano, Johannes Schindelin, git
In-Reply-To: <81b0412b0602210930w5c1a71aage12bad2079dd515a@mail.gmail.com>

Alex Riesen <raa.lkml@gmail.com> wrote:
> On 2/20/06, Junio C Hamano <junkio@cox.net> wrote:
> >  * Eric, thanks for the hint.  I have this four-patch series.
> >    Could people with perl 5.6 please check them?
> 
> Does not work here (ActiveState Build 811, Perl 5.8.6):
> 
> $ perl -e 'open(F, "-|")'
> '-' is not recognized as an internal or external command,
> operable program or batch file.

Both "-|" and "|-" forms of open() use fork() internally.  Iirc, fork()
doesn't work too well on that platform.

-- 
Eric Wong

^ permalink raw reply

* [PATCH] Fix typo in git-rebase.sh.
From: Jason Riedy @ 2006-02-21 20:56 UTC (permalink / raw)
  To: git


s/upsteram/upstream in git-rebase.sh.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>

---

 git-rebase.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

92550b0b04236ec52d6bb573e79fa2b5fac21228
diff --git a/git-rebase.sh b/git-rebase.sh
index 21c3d83..c47aa70 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -71,7 +71,7 @@ esac
 # The upstream head must be given.  Make sure it is valid.
 upstream_name="$1"
 upstream=`git rev-parse --verify "${upstream_name}^0"` ||
-    die "invalid upsteram $upstream_name"
+    die "invalid upstream $upstream_name"
 
 # If a hook exists, give it a chance to interrupt
 if test -x "$GIT_DIR/hooks/pre-rebase"
-- 
1.2.2.g972a

^ permalink raw reply related

* Re: rewriting pathnames in history
From: Sam Vilain @ 2006-02-21 20:54 UTC (permalink / raw)
  To: Jeff King; +Cc: git
In-Reply-To: <20060221075342.GA13814@coredump.intra.peff.net>

Jeff King wrote:
> I recently ran into an interesting situation with git. I created a
> repository that consisted of several directories (and files in them).
> Later, after many commits, I realized I would prefer each directory have
> its own git repository. That is, given a repo with the files:
>   foo/bar
>   baz/bleep
> I wanted two repos, "foo" containing the file "bar" and "baz" containing
> the file "bleep".

Nice work, but I think you should be able to get it *really* fast, much 
faster than that.

Instead of replaying a checked out copy, just go through the commit 
history, and when the treeID for that subdirectory has changed, then 
that directory has a new revision.  So, make a new commit object with 
that as the treeid.  in other words, you'll be constructing a very 
lightweight branch, but with its tree IDs all corresponding to 
sub-directory treeids on the combined branch.  The history ripple script 
that was posted the other day probably has most of the pieces you need. 
  Once this is done, you can just clone that branch to "get it out".

Sam.

^ permalink raw reply

* [PATCH] git-ls-files: Fix, document, and add test for --error-unmatch option.
From: Carl Worth @ 2006-02-21 20:48 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

---

 Junio,

 I'm still not sure what the easiest way is for me to provide changes
 to you. I've been doing it here on the list, like with the current
 message. But would it be easier for me to send pull requests?

 For example, with the git-clone failure cleanup I recently did, it
 seems the new test case I wrote didn't land in your tree. And since
 we went through patches in the mail, the missing commit wasn't
 obvious to me, (I checked and noticed with git-cherry, but it seems
 it would have been much easier if we were working with the same
 commit objects).

 If it would help you for me to publish a tree, just let me know how
 best to organize it, (I didn't see any comments on that in
 Documentation/SubmittingPatches).

 For now, I've made a tree available at:

	git://git.freedesktop.org/~cworth/git

 It contains two branches of interest:

	ls-files-error-unmatch	# The patch in this mail
	clone-fail-cleanup	# The missing test case mentioned above

 as well as the version I've currently got installed and am running:

	cworth			# The merge of those two with master

 Let me know if any other organization would be more helpful, and how
 to best make pull requests if desired.

 Thanks,

 -Carl

 Documentation/git-ls-files.txt    |    5 +++++
 ls-files.c                        |    1 +
 t/t3020-ls-files-error-unmatch.sh |   27 +++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100755 t/t3020-ls-files-error-unmatch.sh

d7e8e6b2bb34db12c4fc1e4f83810db50b7ddf69
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index fe53412..28dc533 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -14,6 +14,7 @@ SYNOPSIS
 		[-x <pattern>|--exclude=<pattern>]
 		[-X <file>|--exclude-from=<file>]
 		[--exclude-per-directory=<file>] 
+		[--error-unmatch]
 		[--full-name] [--] [<file>]\*
 
 DESCRIPTION
@@ -72,6 +73,10 @@ OPTIONS
 	read additional exclude patterns that apply only to the
 	directory and its subdirectories in <file>.
 
+--error-unmatch::
+	If any <file> does not appear in the index, treat this as an
+	error (return 1).
+
 -t::
 	Identify the file status with the following tags (followed by
 	a space) at the start of each line:
diff --git a/ls-files.c b/ls-files.c
index df93cf2..27059e2 100644
--- a/ls-files.c
+++ b/ls-files.c
@@ -758,6 +758,7 @@ int main(int argc, const char **argv)
 				continue;
 			error("pathspec '%s' did not match any.",
 			      pathspec[num] + prefix_offset);
+			errors++;
 		}
 		return errors ? 1 : 0;
 	}
diff --git a/t/t3020-ls-files-error-unmatch.sh b/t/t3020-ls-files-error-unmatch.sh
new file mode 100755
index 0000000..d55559e
--- /dev/null
+++ b/t/t3020-ls-files-error-unmatch.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Carl D. Worth
+#
+
+test_description='git-ls-files test for --error-unmatch option
+
+This test runs git-ls-files --error-unmatch to ensure it correctly
+returns an error when a non-existent path is provided on the command
+line.
+'
+. ./test-lib.sh
+
+touch foo bar
+git-update-index --add foo bar
+git-commit -m "add foo bar"
+
+test_expect_failure \
+    'git-ls-files --error-unmatch should fail with unmatched path.' \
+    'git-ls-files --error-unmatch foo bar-does-not-match'
+
+test_expect_success \
+    'git-ls-files --error-unmatch should succeed eith matched paths.' \
+    'git-ls-files --error-unmatch foo bar'
+
+test_done
+1
-- 
1.2.2.g73be-dirty


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

^ permalink raw reply related

* Re: [PATCH] fmt-merge-msg: avoid open "-|" list form for Perl 5.6
From: Sam Vilain @ 2006-02-21 20:36 UTC (permalink / raw)
  To: Alex Riesen; +Cc: Junio C Hamano, Johannes Schindelin, Eric Wong, git
In-Reply-To: <81b0412b0602210930w5c1a71aage12bad2079dd515a@mail.gmail.com>

Alex Riesen wrote:
> On 2/20/06, Junio C Hamano <junkio@cox.net> wrote:
> 
>> * Eric, thanks for the hint.  I have this four-patch series.
>>   Could people with perl 5.6 please check them?
> 
> 
> Does not work here (ActiveState Build 811, Perl 5.8.6):
> 
> $ perl -e 'open(F, "-|")'
> '-' is not recognized as an internal or external command,
> operable program or batch file.

Portability, Ease of Coding, Few CPAN Module Dependencies.  Pick any two.

Sam.

^ permalink raw reply

* Re: merging problems with Linus' kernel tree.
From: Dave Jones @ 2006-02-21 20:29 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0602211153570.30245@g5.osdl.org>

On Tue, Feb 21, 2006 at 12:03:04PM -0800, Linus Torvalds wrote:

 > That, in turn, is usually due to an aborted merge.

Hmm.  (Recalls a power outage a few days ago).
I'll bet that's when it happened.

 > Do a "git checkout -f".

Fixed, thanks.

		Dave

^ permalink raw reply

* Re: merging problems with Linus' kernel tree.
From: Linus Torvalds @ 2006-02-21 20:03 UTC (permalink / raw)
  To: Dave Jones; +Cc: git
In-Reply-To: <20060221191948.GE22988@redhat.com>



On Tue, 21 Feb 2006, Dave Jones wrote:
> 
> For some reason, that shows that file being deleted.
> 
> diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
> deleted file mode 100644
> index e71bc6c..0000000
> --- a/Documentation/cpu-hotplug.txt
> +++ /dev/null
> @@ -1,373 +0,0 @@

If that file didn't exist in your index, "git diff" wouldn't even show it. 
So it exists in your index, but not in your working tree.

> Hmm, this tree is on NFS.   The server was 2-3 seconds ahead of the client
> (for some reason ntp wasn't running), but I wouldn't expect such chaos
> to ensue from this?

No, that won't matter. git shouldn't ever look at the current time (well, 
except when it creates a new commit object, of course), just the normal 
file time, which will be determined by the server.

> Hmm. git status shows a ton of modified files, that I know I've never touched.
> (arch/frv is somewhere I'd rather not venture)

Sounds like you might have had a partial merge at some point that you 
^C'd or that just failed, and you did "git reset" on it without the 
"--hard" flag?

> Spooky.  I'm seriously questioning myself whether or not I have
> done something to this tree, but I'm 99.999% sure it's unmodified
> (by me at least).
> 
> git diff on any of the modified files shows no output, which
> could be explained by your modified timestamp theory, but
> how about the deleted/new files ?

Those really are different in the working tree than the index (or the git 
tree: the difference between "git diff" and "git diff HEAD" - and "git 
status" does both - is obviously what you compare to).

Since it's in the "will commit" section, it means that it's in your index 
but not in your HEAD tree. Which in turn implies that your index seems to 
not actually match your HEAD.

That, in turn, is usually due to an aborted merge.

Do a "git checkout -f".

		Linus

^ permalink raw reply

* How to not download objects more than needed?
From: Radoslaw Szkodzinski @ 2006-02-21 19:38 UTC (permalink / raw)
  To: Git Mailing List

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

I have a pecuilar, but common use case for git.

I have linux-2.6 repository pulled and I'd like to download some branch
(say, netdev-2.6), which uses many of the same objects,
but not to get all the objects from the git server.

I've already tried certain commands, but still can't do it,
and my bandwidth isn't too happy about it.

It seems to require some kind of HEAD rewinding,
or maybe fetching to another branch, I don't know.

Anyone cares to help?

-- 
GPG Key id:  0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0  9105 9543 0453 D1F1 0BA2

AstralStorm


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

^ permalink raw reply

* Re: merging problems with Linus' kernel tree.
From: Dave Jones @ 2006-02-21 19:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0602211052360.30245@g5.osdl.org>

On Tue, Feb 21, 2006 at 10:55:15AM -0800, Linus Torvalds wrote:
 > 
 > 
 > On Tue, 21 Feb 2006, Dave Jones wrote:
 > >
 > > Documentation/cpu-hotplug.txt: needs update
 > > fatal: Entry 'Documentation/cpu-hotplug.txt' would be overwritten by merge. Cannot merge.
 > 
 > This means that it's dirty in the index, not that you've committed any 
 > changes.
 > 
 > Do a "git diff".

For some reason, that shows that file being deleted.

diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
deleted file mode 100644
index e71bc6c..0000000
--- a/Documentation/cpu-hotplug.txt
+++ /dev/null
@@ -1,373 +0,0 @@

...

 > (It may also be that the diff is empty, and only shows the filename. That 
 > means that you've changed the mtime - for example edited it, and then 
 > undone the edit

Hmm, this tree is on NFS.   The server was 2-3 seconds ahead of the client
(for some reason ntp wasn't running), but I wouldn't expect such chaos
to ensue from this?

 > - so that the file is dirty in the index, even if the 
 > _contents_ are the same. If so, do a "git-update-index --refresh" or 
 > similar, or just ask for "git status", which will do it for you as part of 
 > checking the status of all your files).

Hmm. git status shows a ton of modified files, that I know I've never touched.
(arch/frv is somewhere I'd rather not venture)

#
# Updated but not checked in:
#   (will commit)
#
#       modified: Documentation/cpu-hotplug.txt
#       new file: Documentation/fujitsu/frv/kernel-ABI.txt
#       modified: Documentation/hwmon/w83627hf
#       modified: Documentation/kernel-parameters.txt
#       modified: Documentation/kprobes.txt
#       modified: Documentation/mips/AU1xxx_IDE.README
#       modified: Documentation/powerpc/booting-without-of.txt
#       modified: Documentation/scsi/ChangeLog.megaraid_sas
#       modified: MAINTAINERS
#       modified: Makefile
#       modified: arch/arm/kernel/calls.S
#       modified: arch/arm/kernel/setup.c
#       modified: arch/arm/kernel/smp.c
#       modified: arch/arm/kernel/sys_oabi-compat.c
#       modified: arch/arm/mach-integrator/platsmp.c
#       modified: arch/arm/mach-iop3xx/iop321-setup.c
#       modified: arch/arm/mach-iop3xx/iop331-setup.c
#       modified: arch/arm/mach-ixp4xx/nslu2-setup.c
#       modified: arch/arm/mach-realview/platsmp.c
#       modified: arch/arm/mach-s3c2410/mach-h1940.c
#       new file: arch/arm/mach-s3c2410/s3c2400.h
#       modified: arch/arm/plat-omap/pm.c
#       modified: arch/frv/Kconfig
#       modified: arch/frv/Makefile
#       modified: arch/frv/kernel/break.S
#       modified: arch/frv/kernel/entry-table.S
#       modified: arch/frv/kernel/entry.S
#       modified: arch/frv/kernel/head.S
#       modified: arch/frv/kernel/irq.c
#       modified: arch/frv/mm/kmap.c
#       modified: arch/h8300/Kconfig
#       modified: arch/h8300/Kconfig.cpu
#       new file: arch/i386/boot/.gitignore
#       new file: arch/i386/boot/tools/.gitignore
#       new file: arch/i386/kernel/.gitignore
#       modified: arch/i386/kernel/cpu/transmeta.c
#       modified: arch/i386/kernel/head.S
#       modified: arch/i386/kernel/syscall_table.S
#       modified: arch/i386/kernel/timers/timer_tsc.c
#       modified: arch/i386/kernel/vsyscall-sysenter.S
#       modified: arch/i386/oprofile/backtrace.c
#       modified: arch/ia64/kernel/acpi.c
#       modified: arch/ia64/kernel/entry.S
#       modified: arch/ia64/kernel/ia64_ksyms.c
#       modified: arch/ia64/kernel/setup.c
#       modified: arch/ia64/kernel/smpboot.c
#       modified: arch/ia64/kernel/time.c
#       modified: arch/ia64/kernel/traps.c
#       modified: arch/ia64/sn/kernel/io_init.c
#       modified: arch/ia64/sn/kernel/setup.c
#       modified: arch/ia64/sn/kernel/sn2/prominfo_proc.c
#       modified: arch/ia64/sn/kernel/sn2/sn2_smp.c
#       modified: arch/ia64/sn/kernel/sn2/sn_proc_fs.c
#       modified: arch/ia64/sn/kernel/sn2/timer.c
#       modified: arch/ia64/sn/kernel/sn2/timer_interrupt.c
#       modified: arch/ia64/sn/kernel/tiocx.c
#       modified: arch/ia64/sn/kernel/xpc_channel.c
#       modified: arch/ia64/sn/kernel/xpc_main.c
#       modified: arch/ia64/sn/pci/pci_dma.c
#       modified: arch/ia64/sn/pci/pcibr/pcibr_ate.c
#       modified: arch/ia64/sn/pci/pcibr/pcibr_dma.c
#       modified: arch/ia64/sn/pci/pcibr/pcibr_provider.c
#       modified: arch/m68k/Kconfig
#       modified: arch/m68k/fpsp040/bindec.S
#       modified: arch/m68k/fpsp040/binstr.S
#       modified: arch/m68k/fpsp040/bugfix.S
#       modified: arch/m68k/fpsp040/decbin.S
#       modified: arch/m68k/fpsp040/do_func.S
#       modified: arch/m68k/fpsp040/fpsp.h
#       modified: arch/m68k/fpsp040/gen_except.S
#       modified: arch/m68k/fpsp040/get_op.S
#       modified: arch/m68k/fpsp040/kernel_ex.S
#       modified: arch/m68k/fpsp040/res_func.S
#       modified: arch/m68k/fpsp040/round.S
#       modified: arch/m68k/fpsp040/sacos.S
#       modified: arch/m68k/fpsp040/sasin.S
#       modified: arch/m68k/fpsp040/satan.S
#       modified: arch/m68k/fpsp040/satanh.S
#       modified: arch/m68k/fpsp040/scale.S
#       modified: arch/m68k/fpsp040/scosh.S
#       modified: arch/m68k/fpsp040/setox.S
#       modified: arch/m68k/fpsp040/sgetem.S
#       modified: arch/m68k/fpsp040/sint.S
#       modified: arch/m68k/fpsp040/skeleton.S
#       modified: arch/m68k/fpsp040/slog2.S
#       modified: arch/m68k/fpsp040/slogn.S
#       modified: arch/m68k/fpsp040/smovecr.S
#       modified: arch/m68k/fpsp040/srem_mod.S
#       modified: arch/m68k/fpsp040/ssin.S
#       modified: arch/m68k/fpsp040/ssinh.S
#       modified: arch/m68k/fpsp040/stan.S
#       modified: arch/m68k/fpsp040/stanh.S
#       modified: arch/m68k/fpsp040/sto_res.S
#       modified: arch/m68k/fpsp040/stwotox.S
#       modified: arch/m68k/fpsp040/tbldo.S
#       modified: arch/m68k/fpsp040/util.S
#       modified: arch/m68k/fpsp040/x_bsun.S
#       modified: arch/m68k/fpsp040/x_fline.S
#       modified: arch/m68k/fpsp040/x_operr.S
#       modified: arch/m68k/fpsp040/x_ovfl.S
#       modified: arch/m68k/fpsp040/x_snan.S
#       modified: arch/m68k/fpsp040/x_store.S
#       modified: arch/m68k/fpsp040/x_unfl.S
#       modified: arch/m68k/fpsp040/x_unimp.S
#       modified: arch/m68k/fpsp040/x_unsupp.S
#       modified: arch/m68knommu/Kconfig
#       modified: arch/mips/Makefile
#       modified: arch/mips/kernel/process.c
#       modified: arch/mips/kernel/scall32-o32.S
#       modified: arch/mips/kernel/signal-common.h
#       modified: arch/mips/kernel/signal32.c
#       modified: arch/mips/kernel/signal_n32.c
#       modified: arch/mips/kernel/smp_mt.c
#       modified: arch/mips/mm/c-r4k.c
#       modified: arch/mips/mm/c-tx39.c
#       modified: arch/parisc/Kconfig
#       modified: arch/parisc/kernel/syscall_table.S
#       modified: arch/powerpc/Kconfig
#       modified: arch/powerpc/Makefile
#       modified: arch/powerpc/kernel/Makefile
#       modified: arch/powerpc/kernel/systbl.S
#       modified: arch/ppc/kernel/misc.S
#       modified: arch/s390/Kconfig
#       modified: arch/s390/defconfig
#       modified: arch/s390/kernel/compat_linux.c
#       modified: arch/s390/kernel/compat_signal.c
#       modified: arch/s390/kernel/compat_wrapper.S
#       modified: arch/s390/kernel/machine_kexec.c
#       modified: arch/s390/kernel/process.c
#       modified: arch/s390/kernel/setup.c
#       modified: arch/s390/kernel/smp.c
#       modified: arch/s390/kernel/syscalls.S
#       modified: arch/s390/lib/delay.c
#       modified: arch/sh/Kconfig
#       modified: arch/sparc/kernel/systbls.S
#       modified: arch/sparc64/kernel/sys_sparc32.c
#       modified: arch/sparc64/kernel/systbls.S
#       modified: arch/v850/Kconfig
#       modified: arch/x86_64/defconfig
#       modified: arch/x86_64/ia32/ia32entry.S
#       modified: arch/x86_64/ia32/sys_ia32.c
#       modified: arch/x86_64/kernel/apic.c
#       modified: arch/x86_64/kernel/entry.S
#       modified: arch/x86_64/kernel/head.S
#       modified: arch/x86_64/kernel/io_apic.c
#       modified: arch/x86_64/kernel/mpparse.c
#       modified: arch/x86_64/kernel/nmi.c
#       modified: arch/x86_64/kernel/pci-gart.c
#       modified: arch/x86_64/kernel/time.c
#       modified: arch/x86_64/kernel/traps.c
#       modified: arch/x86_64/mm/k8topology.c
#       modified: arch/x86_64/mm/numa.c
#       modified: arch/x86_64/mm/srat.c
#       modified: drivers/acpi/resources/rscalc.c
#       modified: drivers/block/pktcdvd.c
#       modified: drivers/bluetooth/bt3c_cs.c
#       modified: drivers/char/drm/drm_pciids.h
#       modified: drivers/char/esp.c
#       modified: drivers/char/hpet.c
#       modified: drivers/char/tipar.c
#       modified: drivers/char/tpm/tpm_infineon.c
#       modified: drivers/char/tty_io.c
#       modified: drivers/char/watchdog/pcwd.c
#       modified: drivers/char/watchdog/sa1100_wdt.c
#       modified: drivers/cpufreq/cpufreq.c
#       modified: drivers/hwmon/it87.c
#       modified: drivers/hwmon/vt8231.c
#       modified: drivers/hwmon/w83781d.c
#       modified: drivers/i2c/busses/i2c-isa.c
#       modified: drivers/ide/ide-taskfile.c
#       modified: drivers/ide/pci/sgiioc4.c
#       modified: drivers/infiniband/core/mad.c
#       modified: drivers/infiniband/hw/mthca/mthca_cmd.c
#       modified: drivers/infiniband/hw/mthca/mthca_dev.h
#       modified: drivers/infiniband/ulp/ipoib/ipoib.h
#       modified: drivers/infiniband/ulp/ipoib/ipoib_multicast.c
#       modified: drivers/input/keyboard/Makefile
#       modified: drivers/input/misc/Makefile
#       modified: drivers/input/misc/ixp4xx-beeper.c
#       modified: drivers/input/mouse/logips2pp.c
#       modified: drivers/input/mouse/trackpoint.c
#       modified: drivers/input/mouse/trackpoint.h
#       modified: drivers/input/serio/Makefile
#       modified: drivers/input/touchscreen/ads7846.c
#       modified: drivers/isdn/i4l/isdn_tty.c
#       modified: drivers/macintosh/windfarm_smu_sat.c
#       modified: drivers/message/fusion/mptbase.c
#       modified: drivers/message/fusion/mptbase.h
#       modified: drivers/message/fusion/mptctl.c
#       modified: drivers/message/fusion/mptctl.h
#       modified: drivers/message/fusion/mptscsih.c
#       modified: drivers/mmc/mmci.c
#       modified: drivers/net/Kconfig
#       modified: drivers/net/appletalk/cops.h
#       modified: drivers/net/bonding/bond_main.c
#       modified: drivers/net/sis190.c
#       modified: drivers/net/skge.c
#       modified: drivers/net/sky2.c
#       modified: drivers/net/tokenring/smctr.h
#       modified: drivers/net/wireless/atmel.c
#       modified: drivers/net/wireless/orinoco_cs.c
#       modified: drivers/net/wireless/wavelan_cs.c
#       modified: drivers/parisc/ccio-dma.c
#       modified: drivers/parisc/sba_iommu.c
#       modified: drivers/s390/char/sclp.c
#       modified: drivers/s390/cio/chsc.c
#       modified: drivers/s390/cio/device.c
#       modified: drivers/s390/cio/device_pgid.c
#       modified: drivers/s390/cio/device_status.c
#       modified: drivers/s390/net/lcs.c
#       modified: drivers/s390/net/lcs.h
#       modified: drivers/s390/net/qeth.h
#       modified: drivers/s390/net/qeth_eddp.c
#       modified: drivers/s390/net/qeth_main.c
#       modified: drivers/s390/scsi/zfcp_dbf.c
#       modified: drivers/s390/scsi/zfcp_def.h
#       modified: drivers/s390/scsi/zfcp_erp.c
#       modified: drivers/s390/scsi/zfcp_ext.h
#       modified: drivers/s390/scsi/zfcp_fsf.c
#       modified: drivers/s390/scsi/zfcp_scsi.c
#       modified: drivers/s390/scsi/zfcp_sysfs_adapter.c
#       modified: drivers/scsi/3w-9xxx.c
#       modified: drivers/scsi/aacraid/aachba.c
#       modified: drivers/scsi/aacraid/aacraid.h
#       modified: drivers/scsi/aacraid/commctrl.c
#       modified: drivers/scsi/aacraid/comminit.c
#       modified: drivers/scsi/aacraid/commsup.c
#       modified: drivers/scsi/aacraid/dpcsup.c
#       modified: drivers/scsi/aacraid/linit.c
#       modified: drivers/scsi/gdth.c
#       modified: drivers/scsi/ipr.c
#       modified: drivers/scsi/ipr.h
#       modified: drivers/scsi/iscsi_tcp.c
#       modified: drivers/scsi/iscsi_tcp.h
#       modified: drivers/scsi/libata-core.c
#       modified: drivers/scsi/megaraid.c
#       modified: drivers/scsi/megaraid.h
#       modified: drivers/scsi/megaraid/megaraid_sas.c
#       modified: drivers/scsi/megaraid/megaraid_sas.h
#       modified: drivers/scsi/qla2xxx/qla_attr.c
#       modified: drivers/scsi/qla2xxx/qla_def.h
#       modified: drivers/scsi/qla2xxx/qla_gbl.h
#       modified: drivers/scsi/qla2xxx/qla_init.c
#       modified: drivers/scsi/qla2xxx/qla_iocb.c
#       modified: drivers/scsi/qla2xxx/qla_isr.c
#       modified: drivers/scsi/qla2xxx/qla_mbx.c
#       modified: drivers/scsi/qla2xxx/qla_os.c
#       modified: drivers/scsi/qla2xxx/qla_rscn.c
#       modified: drivers/scsi/qla2xxx/qla_sup.c
#       modified: drivers/scsi/sata_mv.c
#       modified: drivers/scsi/sata_vsc.c
#       modified: drivers/scsi/scsi_lib.c
#       modified: drivers/scsi/scsi_scan.c
#       modified: drivers/scsi/scsi_sysfs.c
#       modified: drivers/scsi/scsi_transport_iscsi.c
#       modified: drivers/scsi/sym53c8xx_2/sym_hipd.c
#       modified: drivers/serial/8250.c
#       modified: drivers/serial/Kconfig
#       modified: drivers/serial/ioc4_serial.c
#       modified: drivers/usb/host/pci-quirks.c
#       modified: drivers/usb/host/sl811_cs.c
#       modified: drivers/usb/input/hid-core.c
#       modified: drivers/usb/misc/Kconfig
#       modified: drivers/usb/misc/ldusb.c
#       modified: drivers/usb/serial/pl2303.c
#       modified: drivers/usb/serial/pl2303.h
#       modified: drivers/usb/storage/unusual_devs.h
#       modified: drivers/video/Kconfig
#       modified: drivers/video/fbmem.c
#       modified: drivers/video/gbefb.c
#       modified: drivers/video/neofb.c
#       modified: drivers/video/nvidia/nvidia.c
#       modified: drivers/video/s3c2410fb.c
#       modified: fs/cifs/file.c
#       modified: fs/compat.c
#       modified: fs/exec.c
#       modified: fs/ext2/xattr.c
#       modified: fs/fuse/dev.c
#       modified: fs/fuse/file.c
#       modified: fs/jbd/checkpoint.c
#       modified: fs/jbd/commit.c
#       modified: fs/lockd/clntlock.c
#       modified: fs/lockd/svc4proc.c
#       modified: fs/lockd/svcproc.c
#       modified: fs/ocfs2/dlm/dlmcommon.h
#       modified: fs/ocfs2/dlm/dlmconvert.c
#       modified: fs/ocfs2/dlm/dlmlock.c
#       modified: fs/ocfs2/dlm/dlmmaster.c
#       modified: fs/ocfs2/dlm/dlmrecovery.c
#       modified: fs/ocfs2/journal.c
#       modified: fs/ocfs2/journal.h
#       modified: fs/reiserfs/super.c
#       modified: fs/reiserfs/xattr_acl.c
#       modified: fs/select.c
#       modified: fs/stat.c
#       modified: include/asm-alpha/mman.h
#       new file: include/asm-arm/arch-s3c2410/h1940-latch.h
#       modified: include/asm-arm/mman.h
#       modified: include/asm-arm/smp.h
#       modified: include/asm-arm/unistd.h
#       modified: include/asm-arm26/mman.h
#       modified: include/asm-cris/mman.h
#       modified: include/asm-frv/atomic.h
#       modified: include/asm-frv/cacheflush.h
#       modified: include/asm-frv/io.h
#       modified: include/asm-frv/mman.h
#       modified: include/asm-frv/spr-regs.h
#       modified: include/asm-frv/system.h
#       modified: include/asm-frv/uaccess.h
#       modified: include/asm-frv/unistd.h
#       new file: include/asm-generic/mman.h
#       modified: include/asm-h8300/mman.h
#       modified: include/asm-i386/mman.h
#       modified: include/asm-i386/thread_info.h
#       modified: include/asm-i386/topology.h
#       modified: include/asm-i386/unistd.h
#       modified: include/asm-ia64/acpi.h
#       modified: include/asm-ia64/machvec_sn2.h
#       modified: include/asm-ia64/mman.h
#       modified: include/asm-ia64/sn/arch.h
#       modified: include/asm-ia64/sn/bte.h
#       modified: include/asm-ia64/sn/pcibr_provider.h
#       modified: include/asm-ia64/sn/sn_feature_sets.h
#       modified: include/asm-ia64/sn/xpc.h
#       modified: include/asm-ia64/timex.h
#       modified: include/asm-m32r/mman.h
#       modified: include/asm-m68k/mman.h
#       modified: include/asm-mips/cpu.h
#       deleted:  include/asm-mips/gcc/sgidefs.h
#       modified: include/asm-mips/mach-generic/timex.h
#       new file: include/asm-mips/mach-rm200/timex.h
#       modified: include/asm-mips/mman.h
#       modified: include/asm-mips/r4kcache.h
#       modified: include/asm-mips/uaccess.h
#       modified: include/asm-mips/unistd.h
#       modified: include/asm-parisc/mman.h
#       modified: include/asm-powerpc/mman.h
#       modified: include/asm-powerpc/pgalloc.h
#       modified: include/asm-powerpc/unistd.h
#       modified: include/asm-s390/bitops.h
#       modified: include/asm-s390/mman.h
#       modified: include/asm-s390/setup.h
#       modified: include/asm-s390/smp.h
#       modified: include/asm-s390/unistd.h
#       modified: include/asm-sh/mman.h
#       modified: include/asm-sparc/mman.h
#       modified: include/asm-sparc/unistd.h
#       modified: include/asm-sparc64/mman.h
#       modified: include/asm-sparc64/unistd.h
#       modified: include/asm-v850/mman.h
#       modified: include/asm-x86_64/hpet.h
#       modified: include/asm-x86_64/ia32_unistd.h
#       modified: include/asm-x86_64/mman.h
#       modified: include/asm-x86_64/proto.h
#       modified: include/asm-xtensa/mman.h
#       modified: include/linux/compat.h
#       modified: include/linux/jbd.h
#       modified: include/linux/kernel.h
#       modified: include/linux/ktime.h
#       modified: include/linux/lockd/lockd.h
#       modified: include/linux/mm.h
#       modified: include/linux/netfilter.h
#       modified: include/linux/netfilter_ipv4.h
#       modified: include/linux/pci_ids.h
#       modified: include/linux/ptrace.h
#       modified: include/linux/sched.h
#       modified: include/linux/syscalls.h
#       modified: include/linux/time.h
#       modified: include/linux/timex.h
#       modified: include/net/bluetooth/rfcomm.h
#       modified: include/net/ip.h
#       modified: include/net/irda/irda.h
#       modified: include/net/xfrm.h
#       modified: include/scsi/iscsi_if.h
#       modified: include/scsi/scsi.h
#       modified: include/scsi/scsi_transport_iscsi.h
#       modified: include/video/neomagic.h
#       modified: kernel/cpuset.c
#       modified: kernel/fork.c
#       modified: kernel/hrtimer.c
#       modified: kernel/power/snapshot.c
#       modified: kernel/power/swsusp.c
#       modified: kernel/ptrace.c
#       modified: kernel/sched.c
#       modified: kernel/sysctl.c
#       modified: kernel/timer.c
#       modified: lib/radix-tree.c
#       modified: mm/hugetlb.c
#       modified: mm/madvise.c
#       modified: mm/memory.c
#       modified: mm/mempolicy.c
#       modified: mm/page_alloc.c
#       modified: mm/swap.c
#       modified: mm/vmscan.c
#       modified: net/802/p8023.c
#       modified: net/atm/signaling.c
#       modified: net/bluetooth/hci_sock.c
#       modified: net/bluetooth/rfcomm/core.c
#       modified: net/bridge/br_netfilter.c
#       modified: net/bridge/br_stp_if.c
#       modified: net/core/datagram.c
#       modified: net/ipv4/icmp.c
#       modified: net/ipv4/ip_gre.c
#       modified: net/ipv4/ip_output.c
#       modified: net/ipv4/ipip.c
#       modified: net/ipv4/netfilter.c
#       modified: net/ipv4/netfilter/ip_nat_standalone.c
#       modified: net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
#       modified: net/ipv4/xfrm4_output.c
#       modified: net/ipv6/icmp.c
#       modified: net/ipv6/netfilter/ip6t_REJECT.c
#       modified: net/ipv6/raw.c
#       modified: net/netfilter/Kconfig
#       modified: net/netfilter/nf_conntrack_core.c
#       modified: net/netfilter/nf_conntrack_proto_tcp.c
#       modified: net/netfilter/nf_conntrack_proto_udp.c
#       modified: net/netlink/genetlink.c
#       modified: net/xfrm/xfrm_policy.c
#
#
# Changed but not updated:
#   (use git-update-index to mark for commit)
#
#       deleted:  Documentation/cpu-hotplug.txt
#


Spooky.  I'm seriously questioning myself whether or not I have
done something to this tree, but I'm 99.999% sure it's unmodified
(by me at least).

git diff on any of the modified files shows no output, which
could be explained by your modified timestamp theory, but
how about the deleted/new files ?

		Dave

^ permalink raw reply related

* Re: merging problems with Linus' kernel tree.
From: Linus Torvalds @ 2006-02-21 18:55 UTC (permalink / raw)
  To: Dave Jones; +Cc: git
In-Reply-To: <20060221183306.GC22988@redhat.com>



On Tue, 21 Feb 2006, Dave Jones wrote:
>
> Documentation/cpu-hotplug.txt: needs update
> fatal: Entry 'Documentation/cpu-hotplug.txt' would be overwritten by merge. Cannot merge.

This means that it's dirty in the index, not that you've committed any 
changes.

Do a "git diff".

(It may also be that the diff is empty, and only shows the filename. That 
means that you've changed the mtime - for example edited it, and then 
undone the edit - so that the file is dirty in the index, even if the 
_contents_ are the same. If so, do a "git-update-index --refresh" or 
similar, or just ask for "git status", which will do it for you as part of 
checking the status of all your files).

		Linus

^ permalink raw reply

* [PATCH] Don't sent objects for refs we're not going to update.
From: Stephen C. Tweedie @ 2006-02-21 18:48 UTC (permalink / raw)
  To: git mailing list; +Cc: Stephen Tweedie
In-Reply-To: <1140547568.5509.21.camel@orbit.scot.redhat.com>

send_pack() sends only those refs we've asked to be updated on the
destination---either via an explicit refspec or by matching local and
remote refs.  But rev_list() builds an object list for *all* refs it
can find.  For a tree with many tags/heads, this means that it is
impossible to push updates even to a single refspec, as exec_rev_list()
overflows its arg length limit.

Fix this by skipping refs with no peer_ref set in exec_rev_list().
send_pack() already skips it when sending refs; we need to skip it
when building the object list for the pack too.

Signed-off-by: Stephen Tweedie <sct@redhat.com>

---

 send-pack.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

4aa39c0920eea37987ca8a6b10861da7a87b5c14
diff --git a/send-pack.c b/send-pack.c
index 990be3f..d2a39d9 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -42,8 +42,10 @@ static void exec_rev_list(struct ref *re
 
 	args[i++] = "rev-list";	/* 0 */
 	args[i++] = "--objects";	/* 1 */
-	while (refs) {
+	for (; refs; refs = refs->next) {
 		char *buf = malloc(100);
+		if (!refs->peer_ref)
+			continue;
 		if (i > 900)
 			die("git-rev-list environment overflow");
 		if (!is_zero_sha1(refs->old_sha1) &&
@@ -56,7 +58,6 @@ static void exec_rev_list(struct ref *re
 			args[i++] = buf;
 			snprintf(buf, 50, "%s", sha1_to_hex(refs->new_sha1));
 		}
-		refs = refs->next;
 	}
 	args[i] = NULL;
 	execv_git_cmd(args);
-- 
1.2.2.g6643-dirty

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox