From: David Greaves <david@dgreaves.com>
To: Petr Baudis <pasky@ucw.cz>, git@vger.kernel.org
Subject: Add + Status patches
Date: Mon, 18 Apr 2005 21:39:00 +0100 [thread overview]
Message-ID: <42641AE4.9050700@dgreaves.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
Hi Petr
Thankyou for the help earlier - problem resolved.
I have a trivial patch (attached).
It allows:
find src -type f | git add -
and fixes git status not reporting added files properly (on my debian
system it only reported the first file in .git/add-queue)
Should I send this as a patch or as some kind of git object?
(I'm still trying to figure out git workflow)
David
--
[-- Attachment #2: add_status.patch --]
[-- Type: text/x-patch, Size: 2537 bytes --]
Index: README
===================================================================
--- c0aff9b98c4242ab8965c428241df1d8f7a1d4bb/README (mode:100644 sha1:798476ad292cc6edf5a2f5782e1de82f6052abe2)
+++ 1c3349b813d463ce194be06f14ccfbcc3fc2ba30/README (mode:100644 sha1:4282af1604e429dd767fe721751b5ac4a87c410e)
@@ -89,6 +89,10 @@
Of course you will want to commit. If you added any new files, do
git add newfile1 newfile2 ...
+
+or even
+
+ find src -type f | git add -
first. Then feel free to commit by
Index: git
===================================================================
--- c0aff9b98c4242ab8965c428241df1d8f7a1d4bb/git (mode:100755 sha1:b648169640025bd68d1b27a0fcc85b65d85e4440)
+++ 1c3349b813d463ce194be06f14ccfbcc3fc2ba30/git (mode:100755 sha1:5f3d4d04a0adfdc26bfc6aaef5cd29eea6e5c459)
@@ -25,7 +25,7 @@
Usage: git COMMAND [ARG]...
Available commands:
- add FILE...
+ add FILE... | - < files on stdin
addremote RNAME RSYNC_URL
apply < patch on stdin
cancel
Index: gitadd.sh
===================================================================
--- c0aff9b98c4242ab8965c428241df1d8f7a1d4bb/gitadd.sh (mode:100755 sha1:3ed93ea0fcb995673ba9ee1982e0e7abdbe35982)
+++ 1c3349b813d463ce194be06f14ccfbcc3fc2ba30/gitadd.sh (mode:100755 sha1:d010d14c0c14e0ea7a2e448b667d938fe92a3bc2)
@@ -9,10 +9,14 @@
# FIXME: Those files are omitted from show-diff output!
if [ ! "$1" ]; then
- echo "gitadd.sh: usage: git add FILE..." >&2
+ echo "gitadd.sh: usage: git add - | FILE..." >&2
exit 1;
fi
-for file in "$@"; do
- echo $file >>.git/add-queue
-done
+if [ $1 == "-" ]; then
+ cat - >> .git/add-queue
+else
+ for file in "$@"; do
+ echo $file >>.git/add-queue
+ done
+fi
Index: gitstatus.sh
===================================================================
--- c0aff9b98c4242ab8965c428241df1d8f7a1d4bb/gitstatus.sh (mode:100755 sha1:6c33f805ebc2630b14a88a07dfc891a9196d66a5)
+++ 1c3349b813d463ce194be06f14ccfbcc3fc2ba30/gitstatus.sh (mode:100755 sha1:e2c7f9d56b6967c529453de675ffffaaeeff3d1c)
@@ -5,8 +5,8 @@
{
show-files -z -t --others --deleted --unmerged
- [ -s .git/add-queue ] && cat .git/add-queue | sed 's/^/A /' | { read x; echo -ne $x'\0'; }
- [ -s .git/rm-queue ] && cat .git/rm-queue | sed 's/^/D /' | { read x; echo -ne $x'\0'; }
+ [ -s .git/add-queue ] && cat .git/add-queue | sed 's/^/A /' | tr '\n' '\0'
+ [ -s .git/rm-queue ] && cat .git/rm-queue | sed 's/^/D /' | tr '\n' '\0'
} | sort -z -k 2 | xargs -0 sh -c '
while [ "$1" ]; do
tag=$(echo "$1" | cut -d " " -f 1);
next reply other threads:[~2005-04-18 20:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-18 20:39 David Greaves [this message]
2005-04-18 20:48 ` Add + Status patches Petr Baudis
2005-04-18 22:18 ` [PATCH 1/1] add, rm + status patches David Greaves
2005-04-18 22:41 ` Petr Baudis
2005-04-18 21:00 ` Add + Status patches Junio C Hamano
2005-04-18 22:18 ` David Greaves
2005-04-18 22:25 ` Junio C Hamano
2005-04-18 22:35 ` Petr Baudis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42641AE4.9050700@dgreaves.com \
--to=david@dgreaves.com \
--cc=git@vger.kernel.org \
--cc=pasky@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.