Re: [PATCH] git-diff-*: Allow "--name-only -z" as alias for "--name-only-z"
Linus Torvalds <[EMAIL PROTECTED]> writes: > On Thu, 14 Jul 2005, Junio C Hamano wrote: >> >> That said, I have been hating that diff options parsing for >> quite a while, and I've been thinking about cleaning it up along >> the lines I'll outline here, but have not done anything about >> it. Care to help me out? > > I didn't do what you suggested, but I _did_ split the "format" up into > "format + line_termination", which in my opinion cleaned up part of it a > _lot_. Agreed 100%. Regardless of the further cleanup I suggested, what you did was something I should have done in the first place. Thanks for the cleanup. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] git-diff-*: Allow "--name-only -z" as alias for "--name-only-z"
On Thu, 14 Jul 2005, Junio C Hamano wrote: > > That said, I have been hating that diff options parsing for > quite a while, and I've been thinking about cleaning it up along > the lines I'll outline here, but have not done anything about > it. Care to help me out? I didn't do what you suggested, but I _did_ split the "format" up into "format + line_termination", which in my opinion cleaned up part of it a _lot_. So now "-z" only sets "line_termination" to NUL. "format" starts out as "DIFF_FORMAT_RAW" (which is the old HUMAN/MACHINE format - the difference between those two are now the line termination) but can be "PATCH" and "NAME". Now, DIFF_FORMAT_PATCH + -z wouldn't seem to make any sense at all, but you can actually do so, and it actually makes some amount of sense for the case of git-diff-tree -v -p -z HEAD where the "-z" means that the commit _message_ will be terminated by a NUL character, while the "-v" obviously means that the commit message will be printed at all, and the "-p" means that the diff gets printed as a patch. But the diff obviously gets printed with newlines (as does any newlines _within_ the commit message), not with lines terminated by NUL's. So "--name-only-z" no longer exists. It's "-z --name-only" (in any order, quite naturally). Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: cg update failing
Well, it wasn't as Ok as I first thought. There were several .rej and backup files as left behind by patch(1). cg update HEAD says: Branch already fully merged but Makefile still says 2.6.12. I'm cloning now to a remote uml and will try and rsync from there to the laptop. Perhaps *that* will get me a working repo. [SIGH] -JimC - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] Add git-var a tool for reading interesting git variables.
Wonderful. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Is cogito really this inefficient
Linus Torvalds <[EMAIL PROTECTED]> writes: > On Thu, 14 Jul 2005, Linus Torvalds wrote: >> >> I'll look into making diff-cache be more efficient. I normally don't use >> it myself, so I didn't bother (I use git-diff-files, which is way more >> efficient, but doesn't show the difference against the _tree_, it shows >> the difference against the index. Since cogito tries to hide the index >> from you, cogito can't very well use that). > > Ok, done. Wonderful. > Junio - I think this makes gitcore-pathspec pretty pointless, but I didn't > actually remove it. I guess "git-diff-helper" still uses it. And probably it shouldn't; diff-helper should be raw-to-patch converter, nothing more. Usually I'd volunteer to clean up the remaining mess (which was originally my mess anyway) myself, but since I'd already asked smurf to help cleaning up the diff option parsing, and recently I've suddenly got quite busy in the day job, so ... - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Complain about sysadmins in the present tense.
Junio C Hamano <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (Eric W. Biederman) writes: > >> Actually I could not see something the system administrator >> had bone being anything but present tense. If you have to type >> 500+ characters just to login, I think you would have noticed >> and complained to your sysadmin earlier... > > I think "must have hate you" is simply an incorrect grammar, not > present tense. You mean "must hate you", perhaps? Yes. It looks like I failed to delete the have :( Somethings you just can't see when you know what you meant. Here is a patch to fix it up. Eric Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> --- Documentation/git-commit-tree.txt |2 +- Documentation/git-var.txt |2 +- ident.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 554595e307653e90e5945bcef739fde935d7bcef diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt --- a/Documentation/git-commit-tree.txt +++ b/Documentation/git-commit-tree.txt @@ -70,7 +70,7 @@ You don't exist. Go away!:: The passwd(5) gecos field couldn't be read Your parents must have hated you!:: The password(5) gecos field is longer than a giant static buffer. -Your sysadmin must have hate you!:: +Your sysadmin must hate you!:: The password(5) name field is longer than a giant static buffer. See Also diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt --- a/Documentation/git-var.txt +++ b/Documentation/git-var.txt @@ -38,7 +38,7 @@ You don't exist. Go away!:: The passwd(5) gecos field couldn't be read Your parents must have hated you!:: The password(5) gecos field is longer than a giant static buffer. -Your sysadmin must have hate you!:: +Your sysadmin must hate you!:: The password(5) name field is longer than a giant static buffer. See Also diff --git a/ident.c b/ident.c --- a/ident.c +++ b/ident.c @@ -32,7 +32,7 @@ int setup_ident(void) /* Make up a fake email address (name + '@' + hostname [+ '.' + domainname]) */ len = strlen(pw->pw_name); if (len > sizeof(real_email)/2) - die("Your sysadmin must have hate you!"); + die("Your sysadmin must hate you!"); memcpy(real_email, pw->pw_name, len); real_email[len++] = '@'; gethostname(real_email + len, sizeof(real_email) - len); - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Initial support for building a debian package (.deb)
It's not any harder to include debian package support than to include a spec file so here is the setup to build the equivalent debian package. Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> --- debian/changelog |5 +++ debian/control | 17 ++ debian/copyright |3 ++ debian/docs |3 ++ debian/git-core.doc-base | 12 +++ debian/rules | 81 ++ 6 files changed, 121 insertions(+), 0 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/git-core.doc-base create mode 100644 debian/rules a1f78e1ec9e95720b8d349d5095ed66b0137f862 diff --git a/debian/changelog b/debian/changelog new file mode 100644 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +git-core (0.99-0) unstable; urgency=low + + * Initial deb package support + + -- Eric Biederman <[EMAIL PROTECTED]> Tue, 12 Jul 2005 10:57:51 -0600 diff --git a/debian/control b/debian/control new file mode 100644 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: git-core +Section: devel +Priority: optional +Maintainer: Linus Torvalds <[EMAIL PROTECTED]> +Build-Depends-Indep: libz-dev, libssl-dev, libcurl3-dev, asciidoc > 6.0.3, xmlto, debhelper (>= 4.0.0) +Standards-Version: 3.6.1 + +Package: git-core +Architecture: any +Depends: ${shlibs:Depends}, shellutils, diff, rysnc, rcs +Description: The git content addressable filesystem + GIT comes in two layers. The bottom layer is merely an extremely fast + and flexible filesystem-based database designed to store directory trees + with regard to their history. The top layer is a SCM-like tool which + enables human beings to work with the database in a manner to a degree + similar to other SCM tools (like CVS, BitKeeper or Monotone). + diff --git a/debian/copyright b/debian/copyright new file mode 100644 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,3 @@ +License: + +GPL v2 (see COPYING for details) diff --git a/debian/docs b/debian/docs new file mode 100644 --- /dev/null +++ b/debian/docs @@ -0,0 +1,3 @@ +README +COPYING + diff --git a/debian/git-core.doc-base b/debian/git-core.doc-base new file mode 100644 --- /dev/null +++ b/debian/git-core.doc-base @@ -0,0 +1,12 @@ +Document: git-core +Title: git-core +Author: +Abstract: This manual describes git +Section: Devel + +Format: HTML +Index: /usr/share/doc/git-core/html/git.html +Files: /usr/share/doc/git-core/html/*.html + +Format: text +Files: /usr/share/doc/git-core/git-core.txt diff --git a/debian/rules b/debian/rules new file mode 100644 --- /dev/null +++ b/debian/rules @@ -0,0 +1,81 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CFLAGS = -g -Wall +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +export CFLAGS + +PREFIX := /usr +MANDIR := /usr/share/man/ + +SRC:= ./ +DOC:= Documentation/ +DESTDIR := $(CURDIR)/debian/tmp +DOC_DESTDIR := $(DESTDIR)/usr/share/doc/git-core/ +MAN_DESTDIR := $(DESTDIR)/$(MANDIR) + +build: build-stamp +build-stamp: + dh_testdir + $(MAKE) all doc + touch debian/build-stamp + +debian-clean: + dh_testdir + dh_testroot + rm -f debian/build-stamp + dh_clean + +clean: debian-clean + $(MAKE) clean + +install: debian/build-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + make dest=$(DESTDIR) prefix=$(PREFIX) mandir=$(MANDIR) install install-doc + + mkdir -p $(DOC_DESTDIR) + find $(DOC) '(' -name '*.txt' -o -name '*.html' ')' -exec install {} $(DOC_DESTDIR) ';' + + dh_install --sourcedir=$(DESTDIR) + +binary: + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: build clean binary install clean debian-clean - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Update the spec file so it can build and install the documentation
If you don't want the documentation simply build with make RPMBUILD="rpmbuild --without docs" Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> --- git-core.spec.in | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) 18d85dbab2fca214bfb625e65733d5fa52502111 diff --git a/git-core.spec.in b/git-core.spec.in --- a/git-core.spec.in +++ b/git-core.spec.in @@ -1,3 +1,4 @@ +# Pass --without docs to rpmbuild if you don't want the documetnation Name: git-core Version: @@VERSION@@ Release: 1 @@ -7,7 +8,7 @@ License:GPL Group: Development/Tools URL: http://kernel.org/pub/software/scm/git/ Source:http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz -BuildRequires: zlib-devel, openssl-devel, curl-devel +BuildRequires: zlib-devel, openssl-devel, curl-devel %{!?_without_docs:, xmlto, asciidoc > 6.0.3} BuildRoot: %{_tmppath}/%{name}-%{version}-root Prereq:sh-utils, diffutils, rsync, rcs, mktemp >= 1.5 @@ -23,11 +24,11 @@ similar to other SCM tools (like CVS, Bi %build -make +make all %{!?_without_docs: doc} %install rm -rf $RPM_BUILD_ROOT -make dest=$RPM_BUILD_ROOT prefix=%{_prefix} install +make dest=$RPM_BUILD_ROOT prefix=%{_prefix} mandir=%{_mandir} install %{!?_without_docs: install-doc} %clean rm -rf $RPM_BUILD_ROOT @@ -35,8 +36,13 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_bindir}/* -%doc README COPYING Documentation/* +%doc README COPYING Documentation/*.txt +%{!?_without_docs: %doc Documentation/*.html } +%{!?_without_docs: %{_mandir}/man1/*.1.gz} +%{!?_without_docs: %{_mandir}/man7/*.7.gz} %changelog +* Thu Jul 14 2005 Eric Biederman <[EMAIL PROTECTED]> +- Add the man pages, and the --without docs build option * Wed Jul 7 2005 Chris Wright <[EMAIL PROTECTED]> - initial git spec file - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Add doc and install-doc targets to the Makefile
This makes it straight forward for people wanting to build and install the git man pages and the rest of the documentation to do so. Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> --- Documentation/Makefile | 13 + Makefile |6 ++ 2 files changed, 19 insertions(+), 0 deletions(-) 81c744189071d241dbb43b55b8694365a769e08d diff --git a/Documentation/Makefile b/Documentation/Makefile --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -6,6 +6,14 @@ DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT)) DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) +prefix=$(HOME) +bin=$(prefix)/bin +mandir=$(prefix)/man +man1=$(mandir)/man1 +man7=$(mandir)/man7 + +INSTALL=install + # # Please note that there is a minor bug in asciidoc. # The version after 6.0.3 _will_ include the patch found here: @@ -24,6 +32,11 @@ man: man1 man7 man1: $(DOC_MAN1) man7: $(DOC_MAN7) +install: + $(INSTALL) -m755 -d $(dest)/$(man1) $(dest)/$(man7) + $(INSTALL) $(DOC_MAN1) $(dest)/$(man1) + $(INSTALL) $(DOC_MAN7) $(dest)/$(man7) + # 'include' dependencies git-diff-%.txt: diff-format.txt diff-options.txt touch $@ diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -191,6 +191,12 @@ rpm: dist test: all $(MAKE) -C t/ all +doc: + $(MAKE) -C Documentation all + +install-doc: + $(MAKE) -C Documentation install + clean: rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE) rm -f git-core-*.tar.gz git-core.spec - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Use gzip -f when building the git-core tarball
This allows rebuilding the tarball when it is already present without having to answer annoying questions from gzip Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) d7c4e5ae707a6ad3028c48d800d568c554cc10af diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -183,7 +183,7 @@ dist: git-core.spec git-tar-tree @cp git-core.spec $(GIT_TARNAME) tar rf $(GIT_TARNAME).tar $(GIT_TARNAME)/git-core.spec @rm -rf $(GIT_TARNAME) - gzip -9 $(GIT_TARNAME).tar + gzip -f -9 $(GIT_TARNAME).tar rpm: dist $(RPMBUILD) -ta git-core-$(GIT_VERSION).tar.gz - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Add a RPMBUILD make variable
This allows RPMBUILD to be overridden for people with old versions of rpm or people who want to pass rpmbuild extra options. Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> --- Makefile |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 50c6a0b3b5d461b81bd5ceb0808206bfa20a8bfa diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ bin=$(prefix)/bin CC=gcc AR=ar INSTALL=install +RPMBUILD=rpmbuild # # sparse is architecture-neutral, which means that we need to tell it @@ -185,7 +186,7 @@ dist: git-core.spec git-tar-tree gzip -9 $(GIT_TARNAME).tar rpm: dist - rpmbuild -ta git-core-$(GIT_VERSION).tar.gz + $(RPMBUILD) -ta git-core-$(GIT_VERSION).tar.gz test: all $(MAKE) -C t/ all - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/6] Update tags to record who made them
And finally what all of this has been leading up to. The 2 line code change to record who made a tag, and the 8 line code change to check that we recorded the tag. Gosh the error checking is always so much bigger than the code :) --- git-tag-script |3 ++- mktag.c| 10 -- 2 files changed, 10 insertions(+), 3 deletions(-) 6ba7a00f34b28cf6761b517a2ad377c80780186b diff --git a/git-tag-script b/git-tag-script --- a/git-tag-script +++ b/git-tag-script @@ -7,6 +7,7 @@ name="$1" object=${2:-$(cat "$GIT_DIR"/HEAD)} type=$(git-cat-file -t $object) || exit 1 +tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1 ( echo "#" echo "# Write a tag message" @@ -17,7 +18,7 @@ grep -v '^#' < .editmsg | git-stripspace [ -s .tagmsg ] || exit -( echo -e "object $object\ntype $type\ntag $name\n"; cat .tagmsg ) > .tmp-tag +( echo -e "object $object\ntype $type\ntag $name\ntagger $tagger\n"; cat .tagmsg ) > .tmp-tag rm -f .tmp-tag.asc .tagmsg gpg -bsa .tmp-tag && cat .tmp-tag.asc >> .tmp-tag mkdir -p "$GIT_DIR/refs/tags" diff --git a/mktag.c b/mktag.c --- a/mktag.c +++ b/mktag.c @@ -42,7 +42,7 @@ static int verify_tag(char *buffer, unsi int typelen; char type[20]; unsigned char sha1[20]; - const char *object, *type_line, *tag_line; + const char *object, *type_line, *tag_line, *tagger_line; if (size < 64 || size > MAXSIZE-1) return -1; @@ -92,6 +92,12 @@ static int verify_tag(char *buffer, unsi return -1; } + /* Verify the tagger line */ + tagger_line = tag_line; + + if (memcmp(tagger_line, "tagger", 6) || (tagger_line[6] == '\n')) + return -1; + /* The actual stuff afterwards we don't care about.. */ return 0; } @@ -119,7 +125,7 @@ int main(int argc, char **argv) size += ret; } - // Verify it for some basic sanity: it needs to start with "object \ntype " + // Verify it for some basic sanity: it needs to start with "object \ntype\ntagger " if (verify_tag(buffer, size) < 0) die("invalid tag signature file"); - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/6] Update git-tag-script to create the .git/refs/tags if it does not already exist
When testing tags I ran into an interesting problem. git-tag-script dies if .git/refs/tags/ does not exist. And that directory didn't get created when I build my repository, so we need to create it if it doesn't exist. Signed-of-by: Eric W. Biederman <[EMAIL PROTECTED]> --- git-tag-script |1 + 1 files changed, 1 insertions(+), 0 deletions(-) 362c96f2a2959b648c8313d3530ea1e6df17e96c diff --git a/git-tag-script b/git-tag-script --- a/git-tag-script +++ b/git-tag-script @@ -20,5 +20,6 @@ grep -v '^#' < .editmsg | git-stripspace ( echo -e "object $object\ntype $type\ntag $name\n"; cat .tagmsg ) > .tmp-tag rm -f .tmp-tag.asc .tagmsg gpg -bsa .tmp-tag && cat .tmp-tag.asc >> .tmp-tag +mkdir -p "$GIT_DIR/refs/tags" git-mktag < .tmp-tag > "$GIT_DIR/refs/tags/$name" #rm .tmp-tag .tmp-tag.sig - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/6] Update the list of diagnostics for git-commit-tree
With the recent work on setup_ident() there are a few more possible diagnostic messages form git-commit-tree Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> --- Documentation/git-commit-tree.txt |4 1 files changed, 4 insertions(+), 0 deletions(-) 3dccd7f0c9e3cbc8bc17d3af01f9f1d273090082 diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt --- a/Documentation/git-commit-tree.txt +++ b/Documentation/git-commit-tree.txt @@ -68,6 +68,10 @@ Diagnostics --- You don't exist. Go away!:: The passwd(5) gecos field couldn't be read +Your parents must have hated you!:: +The password(5) gecos field is longer than a giant static buffer. +Your sysadmin must have hate you!:: +The password(5) name field is longer than a giant static buffer. See Also - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/6] Add git-var a tool for reading interesting git variables.
Sharing code between shell scripts and C is a challenge. The program git-var allows us to have a set of named values that a shell script can interrogate and a normal C program can simply call the functions that compute them.Allowing sharing when computing plain test values. --- Documentation/git-var.txt | 60 ++ Documentation/git.txt |3 ++ Makefile |3 +- var.c | 65 + 4 files changed, 130 insertions(+), 1 deletions(-) create mode 100644 Documentation/git-var.txt create mode 100644 var.c 2c929de1b5444fadda13becb6df3d852277e6e27 diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt new file mode 100644 --- /dev/null +++ b/Documentation/git-var.txt @@ -0,0 +1,60 @@ +git-var(1) +== +v0.1, July 2005 + +NAME + +git-var - Print the git users identity + + +SYNOPSIS + +git-var [ -l | ] + +DESCRIPTION +--- +Prints a git logical variable. + +-l causes the logical variables to be listed. + +EXAMPLE + +$git-var GIT_AUTHOR_IDENT + +Eric W. Biederman <[EMAIL PROTECTED]> 1121223278 -0600 + + +VARIABLES +-- +GIT_AUTHOR_IDENT +The author of a piece of code. + +GIT_COMMITTER_IDENT +The person who put a piece of code into git. + +Diagnostics +--- +You don't exist. Go away!:: +The passwd(5) gecos field couldn't be read +Your parents must have hated you!:: +The password(5) gecos field is longer than a giant static buffer. +Your sysadmin must have hate you!:: +The password(5) name field is longer than a giant static buffer. + +See Also + +link:git-commit-tree.html[git-commit-tree] +link:git-tag-script.html[git-tag-script] + +Author +-- +Written by Eric Biederman <[EMAIL PROTECTED]> + +Documentation +-- +Documentation by Eric Biederman and the git-list . + +GIT +--- +Part of the link:git.html[git] suite + diff --git a/Documentation/git.txt b/Documentation/git.txt --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -111,6 +111,9 @@ link:git-tar-tree.html[git-tar-tree]:: link:git-unpack-file.html[git-unpack-file]:: Creates a temporary file with a blob's contents +link:git-var.html[git-var]:: + Displays a git logical variable + link:git-verify-pack.html[git-verify-pack]:: Validates packed GIT archive files diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ PROG= git-update-cache git-diff-files git-diff-stages git-rev-parse git-patch-id git-pack-objects \ git-unpack-objects git-verify-pack git-receive-pack git-send-pack \ git-prune-packed git-fetch-pack git-upload-pack git-clone-pack \ - git-show-index git-daemon + git-show-index git-daemon git-var all: $(PROG) @@ -148,6 +148,7 @@ git-receive-pack: receive-pack.c git-send-pack: send-pack.c git-prune-packed: prune-packed.c git-fetch-pack: fetch-pack.c +git-var: var.c git-http-pull: LIBS += -lcurl git-rev-list: LIBS += -lssl diff --git a/var.c b/var.c new file mode 100644 --- /dev/null +++ b/var.c @@ -0,0 +1,65 @@ +/* + * GIT - The information manager from hell + * + * Copyright (C) Eric Biederman, 2005 + */ +#include "cache.h" +#include +#include +#include + +static char *var_usage = "git-var [-l | ]"; + +struct git_var { + const char *name; + char *(*read)(void); +}; +static struct git_var git_vars[] = { + { "GIT_COMMITTER_IDENT", git_committer_info }, + { "GIT_AUTHOR_IDENT", git_author_info }, + { "", NULL }, +}; + +static void list_vars(void) +{ + struct git_var *ptr; + for(ptr = git_vars; ptr->read; ptr++) { + printf("%s=%s\n", ptr->name, ptr->read()); + } +} + +static const char *read_var(const char *var) +{ + struct git_var *ptr; + const char *val; + val = NULL; + for(ptr = git_vars; ptr->read; ptr++) { + if (strcmp(var, ptr->name) == 0) { + val = ptr->read(); + break; + } + } + return val; +} + +int main(int argc, char **argv) +{ + const char *val; + if (argc != 2) { + usage(var_usage); + } + setup_ident(); + val = NULL; + + if (strcmp(argv[1], "-l") == 0) { + list_vars(); + return 0; + } + val = read_var(argv[1]); + if (!val) + usage(var_usage); + + printf("%s\n", val); + + return 0; +} - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/6] ident.c: Disambiguate the error messages in setup_ident
If your user name is too long it is your sysadmin who hates you not your parents! Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> --- ident.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 935f88376b79fc19df6dff85ba57ed94f06d79f0 diff --git a/ident.c b/ident.c --- a/ident.c +++ b/ident.c @@ -26,13 +26,13 @@ int setup_ident(void) /* Get the name ("gecos") */ len = strlen(pw->pw_gecos); if (len >= sizeof(real_name)) - die("Your parents must have hated you"); + die("Your parents must have hated you!"); memcpy(real_name, pw->pw_gecos, len+1); /* Make up a fake email address (name + '@' + hostname [+ '.' + domainname]) */ len = strlen(pw->pw_name); if (len > sizeof(real_email)/2) - die("Your parents must have hated you"); + die("Your sysadmin must have hate you!"); memcpy(real_email, pw->pw_name, len); real_email[len++] = '@'; gethostname(real_email + len, sizeof(real_email) - len); - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/6] Move git_author_info and git_commiter_info to ident.c
Moving these functions allows all of the logic for figuring out what these values are to be shared between programs. --- cache.h |2 ++ commit-tree.c | 10 -- ident.c | 10 ++ 3 files changed, 12 insertions(+), 10 deletions(-) c6f1b65729df142a8968441ca441f6b69926127a diff --git a/cache.h b/cache.h --- a/cache.h +++ b/cache.h @@ -223,6 +223,8 @@ void datestamp(char *buf, int bufsize); extern int setup_ident(void); extern char *get_ident(const char *name, const char *email, const char *date_str); +extern char *git_author_info(void); +extern char *git_committer_info(void); static inline void *xmalloc(size_t size) { diff --git a/commit-tree.c b/commit-tree.c --- a/commit-tree.c +++ b/commit-tree.c @@ -79,16 +79,6 @@ static int new_parent(int idx) return 1; } -static char *git_author_info(void) -{ - return get_ident(gitenv("GIT_AUTHOR_NAME"), gitenv("GIT_AUTHOR_EMAIL"), gitenv("GIT_AUTHOR_DATE")); -} - -static char *git_committer_info(void) -{ - return get_ident(gitenv("GIT_COMMITTER_NAME"), gitenv("GIT_COMMITTER_EMAIL"), gitenv("GIT_COMMITTER_DATE")); -} - int main(int argc, char **argv) { int i; diff --git a/ident.c b/ident.c --- a/ident.c +++ b/ident.c @@ -136,3 +136,13 @@ char *get_ident(const char *name, const buffer[i] = 0; return buffer; } + +char *git_author_info(void) +{ + return get_ident(gitenv("GIT_AUTHOR_NAME"), gitenv("GIT_AUTHOR_EMAIL"), gitenv("GIT_AUTHOR_DATE")); +} + +char *git_committer_info(void) +{ + return get_ident(gitenv("GIT_COMMITTER_NAME"), gitenv("GIT_COMMITTER_EMAIL"), gitenv("GIT_COMMITTER_DATE")); +} - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[ANNOUNCE] Gct-0.1, a GUI enabled Git commit tool
Hi, Gct v0.1 has been released and can be downloaded from http://www.cyd.liu.se/~freku045/gct/gct-0.1.tar.gz What follows is an excerpt from the README in the tarball: Introduction Git Commit Tool or gct is a simple GUI enabled Git commit tool. It allows the user to select which files should be committed, write commit messages and perform the commit. It also has some support for controlling the synchronisation between the Git cache and the working directory. Any comments, suggestions and/or bug reports regarding Gct are greatly appreciated. Requirements * Python, http://www.python.org * Qt version 3.*, http://www.trolltech.com/products/qt/index.html * PyQt, http://www.riverbankcomputing.co.uk/pyqt/ * Git a fairly recent snapshot, http://www.kernel.org/pub/software/scm/git/ and rsync://rsync.kernel.org/pub/scm/git/git.git Gct has been developed with Python 2.3, Qt 3.3.4 and PyQt 2.13. Other fairly recent versions may or may not work. - Fredrik Kuivinen - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] tagger id
Junio C Hamano <[EMAIL PROTECTED]> writes: > Eric W. Biederman xmission.com> writes: > > >> Part of the request was to put all of this information together >> in a common place. And note that it is actually: >> tagger="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE" >> Where the date is a human unreadable string of the number of seconds >> since the epoch (aka 1 Jan 1970 UTC). > > This may sound whacy, but how about having git-env command that > > (1) parrots GIT_* environment variables if the user has one; or > (2) shows the values of environment variables the user _could_ have had > to cause the program to behave the same way, when it the user does > not have them? I like the general idea. But I hate the code implications for echoing environmental variables that git cares about. Especially since we really don't care about the environmental variables. Instead we are doing this because we are doing things that the are best not done in shell. So I have made the program git-var [ -l | http://vger.kernel.org/majordomo-info.html
Re: [PATCH] tagger id
Junio C Hamano <[EMAIL PROTECTED]> writes: > I am afraid I do not follow you. I was confused. My big problem was that we don't really have an in tree user, and there wasn't a good explanation anywhere. So it was hard to track this down. I'm going to lobby for a script to import patches from email being in the git tree just so people can see how this is done, and probably because there are a lot of people who have been reinventing this script :) > The intent of "tags" (especially the signed kind) is to express "trust": > "This commit is called v2.6.12 and *I* vouch for it." > > COMMITTER is the only sensible thing to use there, because (as you said) > what you care is "who I am", not "for whom I am doing this" Sounds good. Eric - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Is cogito really this inefficient
On Thu, 14 Jul 2005, Linus Torvalds wrote: > > I'll look into making diff-cache be more efficient. I normally don't use > it myself, so I didn't bother (I use git-diff-files, which is way more > efficient, but doesn't show the difference against the _tree_, it shows > the difference against the index. Since cogito tries to hide the index > from you, cogito can't very well use that). Ok, done. I made git-diff-cache _and_ git-diff-files limit the pathnames early, so that they don't even bother expanding the tree objects that are irrelevant, and don't bother even validating index objects that don't match the pathnames given. Junio - I think this makes gitcore-pathspec pretty pointless, but I didn't actually remove it. I guess "git-diff-helper" still uses it. Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] git-diff-*: Allow "--name-only -z" as alias for "--name-only-z"
Hi, Junio C Hamano: > That said, I have been hating that diff options parsing for > quite a while, and I've been thinking about cleaning it up along > the lines I'll outline here, but have not done anything about > it. Care to help me out? > I saw the problem... > > Hmm? > Sure -- assuming I find some time to actually do it over the next few days. The problem is that this has been a problem lately. :-/ -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [EMAIL PROTECTED] Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de - - Illiterate? Write today, for free help! signature.asc Description: Digital signature
Re: [PATCH] git-diff-*: Allow "--name-only -z" as alias for "--name-only-z"
Matthias Urlichs <[EMAIL PROTECTED]> writes: > Exactly the same thing as vice versa. > Or, even more exactly, my patch *makes* that happen. ;-) Ah, I was not being careful enough. Sorry. That said, I have been hating that diff options parsing for quite a while, and I've been thinking about cleaning it up along the lines I'll outline here, but have not done anything about it. Care to help me out? - In diff.h introduce these new stuff: struct diff_opts { int output_format; int detect_rename; ... }; void diff_opts_init(struct diff_opts *); int diff_opts_parse(const char *, struct diff_opts *); int diff_opts_final(struct diff_opts *); - In diff-* brothers: - replace individual diff option variables with a single "static struct diff_opts diff_opts"; - change the argument parsing code to do the following: diff_opts_init(&diff_opts); for each arg { /* common options to diff brothers are handled by * diff_opts_parse() */ switch (diff_opts_parse(arg, &diff_opts)) { case 1: /* was a diff option and was parsed successfully */ continue; case -1: /* error */ usage(diff_*_usage); } if (!strcmp()) ... parsing of other options } if (diff_opts_final(&diff_opts)) /* defaulting to HUMAN format when nothing specified, * complaining if find-copies-harder is specified but * -C was not, etc. is done in diff_opts_final(). * * The complex if() chains that checks if we are in * name or in raw mode and switch output_format around * properly is what I missed in your patch, but I think * you can lose that by recording z-ness of the output * independently from the output format in diff_opts_parse() * and combining diff-raw vs diff-name and z vs non-z * in diff_opts_final(). That would make the code much * simpler. */ usage(diff_*_usage); - In diff.h and diff.c, replace individual option parameters for the following functions to a single pointer to struct diff_opts: diff_setup(), diffcore_std(), diffcore_std_no_resolve(), diff_flush(). We probably can make diff_scoreopt_parse() function static to diff.c once this is done. We may want to rip out the independeant pickaxe, orderfile and filter support for diff-helper while we are at it, making it truly just a "diff-raw to diff-patch" converter. Hmm? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] git-diff-*: Allow "--name-only -z" as alias for "--name-only-z"
Hi, Junio C Hamano: > I've considered it, but what happens if you give -z first and > then name-only? > Exactly the same thing as vice versa. Or, even more exactly, my patch *makes* that happen. ;-) -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [EMAIL PROTECTED] Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de - - Isn't this a beautiful day! Just watch some bastard louse it up. signature.asc Description: Digital signature
Re: [PATCH] git-diff-*: Allow "--name-only -z" as alias for "--name-only-z"
I've considered it, but what happens if you give -z first and then name-only? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: cg update failing
> "Darrin" == Darrin Thompson <[EMAIL PROTECTED]> writes: Darrin> Now your merge should not be blocked. No? I figured out what you meant after I sent that first reply, but waited for update to finish to be sure it worked before replying again. It took about thirty minutes, and claimed that I had local changes (it was a pristine clone) that it needed to bring forward, but it seems OK. Now I just need to remember how to get the checked-out copy updated from the 2.6.12 tag to current. ;) (I'd been using hg, but www.kernel.org/hg is fubar, so I had to go back to my cg clone.) -JimC - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] git-diff-*: Allow "--name-only -z" as alias for "--name-only-z"
Junio C Hamano wrote: > + else if (!strcmp(arg, "--name-only-z")) > + diff_output_format = DIFF_FORMAT_NAME_Z; Speaking as a user, I would get rather frustrated when I try to do that and it doesn't work... so the attached patch allows that usage. Please apply. --- diff --git a/diff-cache.c b/diff-cache.c --- a/diff-cache.c +++ b/diff-cache.c @@ -222,11 +222,17 @@ int main(int argc, const char **argv) continue; } if (!strcmp(arg, "-z")) { - diff_output_format = DIFF_FORMAT_MACHINE; + if (diff_output_format == DIFF_FORMAT_NAME) + diff_output_format = DIFF_FORMAT_NAME_Z; + else + diff_output_format = DIFF_FORMAT_MACHINE; continue; } if (!strcmp(arg, "--name-only")) { - diff_output_format = DIFF_FORMAT_NAME; + if (diff_output_format == DIFF_FORMAT_MACHINE) + diff_output_format = DIFF_FORMAT_NAME_Z; + else + diff_output_format = DIFF_FORMAT_NAME; continue; } if (!strcmp(arg, "--name-only-z")) { diff --git a/diff-files.c b/diff-files.c --- a/diff-files.c +++ b/diff-files.c @@ -55,11 +55,17 @@ int main(int argc, const char **argv) ; /* no-op */ else if (!strcmp(argv[1], "-s")) ; /* no-op */ - else if (!strcmp(argv[1], "-z")) - diff_output_format = DIFF_FORMAT_MACHINE; - else if (!strcmp(argv[1], "--name-only")) - diff_output_format = DIFF_FORMAT_NAME; - else if (!strcmp(argv[1], "--name-only-z")) + else if (!strcmp(argv[1], "-z")) { + if (diff_output_format == DIFF_FORMAT_NAME) + diff_output_format = DIFF_FORMAT_NAME_Z; + else + diff_output_format = DIFF_FORMAT_MACHINE; + } else if (!strcmp(argv[1], "--name-only")) { + if (diff_output_format == DIFF_FORMAT_MACHINE) + diff_output_format = DIFF_FORMAT_NAME_Z; + else + diff_output_format = DIFF_FORMAT_NAME; + } else if (!strcmp(argv[1], "--name-only-z")) diff_output_format = DIFF_FORMAT_NAME_Z; else if (!strcmp(argv[1], "-R")) diff_setup_opt |= DIFF_SETUP_REVERSE; diff --git a/diff-stages.c b/diff-stages.c --- a/diff-stages.c +++ b/diff-stages.c @@ -86,11 +86,17 @@ int main(int ac, const char **av) } else if (!strcmp(arg, "--find-copies-harder")) find_copies_harder = 1; - else if (!strcmp(arg, "-z")) - diff_output_format = DIFF_FORMAT_MACHINE; - else if (!strcmp(arg, "--name-only")) - diff_output_format = DIFF_FORMAT_NAME; - else if (!strcmp(arg, "--name-only-z")) + else if (!strcmp(arg, "-z")) { + if (diff_output_format == DIFF_FORMAT_NAME) + diff_output_format = DIFF_FORMAT_NAME_Z; + else + diff_output_format = DIFF_FORMAT_MACHINE; + } else if (!strcmp(arg, "--name-only")) { + if (diff_output_format == DIFF_FORMAT_MACHINE) + diff_output_format = DIFF_FORMAT_NAME_Z; + else + diff_output_format = DIFF_FORMAT_NAME; + } else if (!strcmp(arg, "--name-only-z")) diff_output_format = DIFF_FORMAT_NAME_Z; else if (!strcmp(arg, "-R")) diff_setup_opt |= DIFF_SETUP_REVERSE; diff --git a/diff-tree.c b/diff-tree.c --- a/diff-tree.c +++ b/diff-tree.c @@ -483,7 +483,10 @@ int main(int argc, const char **argv) continue; } if (!strcmp(arg, "--name-only")) { - diff_output_format = DIFF_FORMAT_NAME; + if (diff_output_format == DIFF_FORMAT_MACHINE) + diff_output_format = DIFF_FORMAT_NAME_Z; + else + diff_output_format = DIFF_FORMAT_NAME; continue; } if (!strcmp(arg, "--name-only-z")) { @@ -491,7 +494,10 @@ int main(int argc, const char **argv) continue; } if (!strcmp(arg, "-z")) { - diff_output_format = DIFF_FORMAT_MACHINE; +
Re: cg update failing
On Thu, 2005-07-14 at 16:06 -0400, James Cloos wrote: > > "Darrin" == Darrin Thompson <[EMAIL PROTECTED]> writes: > > JimC> cg-merge: merge blocked: seeked from master ` > > Darrin> cg-seek master ? > > :; cg seek master > On commit 514fd7fd01d378a7b5584c657d9807fc28f22079 Now your merge should not be blocked. No? -- Darrin - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: cg update failing
> "Darrin" == Darrin Thompson <[EMAIL PROTECTED]> writes: JimC> cg-merge: merge blocked: seeked from master ` Darrin> cg-seek master ? :; cg seek master On commit 514fd7fd01d378a7b5584c657d9807fc28f22079 -JimC - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Getting list of changed objects...
Linus Torvalds wrote: >Since you haven't merged A and B in the above, they _are_ needed, aren't >they? > > My original email wasn't worded quite right. I think you are tracking what I'm trying to do... but here is a different view anyway: time | 1 A ---> B clone A to B 2 | | make changes on B and A 3 | --> C | clone A to C 4 | | <---' merge B into C 5 | | A C I am merging B (as it was at time 3, or B3) into C (as it was at time 3, or C3) via: git-read-tree -m $(git-merge-base B3 C3) C3 B3 where $(git-merge-base B3 C3) resolves to A1. After I run git-read-tree, I resolve any conflicts via git-merge-cache, etc. and write the tree via git-write-tree. >Maybe what you want is > > git-rev-list --objects B ^A ^C > >ie "objects that are in B, but not in A or in C", since you seem to >consider A uninteresting too? > > That does seem to work here by doing: git-rev-list --objects C5 ^C3 ^$(git-merge-base C3 B3) >, and also, "git-rev-list >--objects" is actually not 100% careful - it can include objects that are >in the "not" group, just because it doesn't actually bother to do a full >negative list (it only creates a negative list for the "boundary" objects, >but it won't even do "mark_tree_uninteresting()" for commits that it has >decided cannot be meaningful, so it's not in any way guaranteed to be a >_minimal_ set of objects). > > Good to know. If git-rev-list is just checking the boundary, and the merge commit is between C5 and C3 (at C4) then that explains why I see what I see. It would grab all the objects listed in C4 and not exhuaustively be removing them via one of its ancestors. The goal is to create the list of objects (tree, commit, and blob) required such that if someone already has all the objects for repo A, they just need to download the 'in C, not in A' objects and the HEAD from C and then they can create a full copy of C. I'll look to modify my scripts that merge the parent repository to cache the parent repository's SHA. I can then pass that list of merge points to get-rev-list as a set of boundaries. Thanks, James - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: cg update failing
On Thu, 2005-07-14 at 14:04 -0400, James Cloos wrote: > I'm getting this on my clone of linus' tree: > > , > | cg-merge: merge blocked: seeked from master > ` > > I've not found a way past it. cg-seek master ? -- Darrin - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
cg update failing
I'm getting this on my clone of linus' tree: , | cg-merge: merge blocked: seeked from master ` I've not found a way past it. Is there an easy way, or do I have still yet another borked lk clone? (Borked clones would be much less of an issue if I had more bandwidth than disk space, but at the moment I'm stuck behind a straw. Cloning something like lk takes hours.) -JimC -- James H. Cloos, Jr. <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Getting list of changed objects...
On Thu, 14 Jul 2005, James Ketrenos wrote: > > The problem is that if I run: > > git-rev-list --objects B ^C > > It shows me all of the tree and commit objects but also gives a > list of all of the files that changed between A and C as if they > are needed to move C to B. Since you haven't merged A and B in the above, they _are_ needed, aren't they? Maybe what you want is git-rev-list --objects B ^A ^C ie "objects that are in B, but not in A or in C", since you seem to consider A uninteresting too? I don't actually understand what you want to do, and also, "git-rev-list --objects" is actually not 100% careful - it can include objects that are in the "not" group, just because it doesn't actually bother to do a full negative list (it only creates a negative list for the "boundary" objects, but it won't even do "mark_tree_uninteresting()" for commits that it has decided cannot be meaningful, so it's not in any way guaranteed to be a _minimal_ set of objects). Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Getting list of changed objects...
I have the following tree path: A C B | | | 3.|<--. | | | 2.|-->' | | | 1.|-->' | Where A is the root repository for my overlays. B was created by cloning A (1) B is where development has been progressing. Finding the set of objects to move from A to B is easily obtained via: git-rev-list --objects B ^A The problem is now when I want to re-sync B with the latest version of A. What I currently do is: Create a new C tree based on latest A (2) and then merge B back into it (3): git-merge-tree -m $(git-merge-base C B) C B That works great. I now have a tree with all of the latest A code and the B changes applied. The problem is now in getting the list of objects to create the overlay repository. cg-log -f -r C:B Will correctly show only those files that have actually changed between C and B in the first log entry. However, cg-log does not show me the list of tree objects that have changed between C and B. The problem is that if I run: git-rev-list --objects B ^C It shows me all of the tree and commit objects but also gives a list of all of the files that changed between A and C as if they are needed to move C to B. Am I overlooking something, misusing things, or ? Thanks, James - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Why O_EXCL would make this difference? I am puzzled..
On Thu, 14 Jul 2005, Linus Torvalds wrote: > > I'll strace the dang thing. It's the "Adding" case in git-merge-one-file-script, which does git-checkout-cache -u -f -- "$4" and it's because of this: lstat64("DF", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 unlink("DF")= -1 EISDIR (Is a directory) .. unpack the object .. open("DF", O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0666) = -1 EEXIST (File exists) ie the problem is that we actually _have_ a test for this, but it's: if (errno == EISDIR && force) { but if the directory already exists, we do that wrong. Btw, this also shows a different problem: the symlink handling doesn't do any of this, so you cannot even force a directory to become a symlink. I think both problems can be fixed by just moving the (EISDIR && force) test down to the "unlink()". Will try. Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Why O_EXCL would make this difference? I am puzzled..
On Thu, 14 Jul 2005, Junio C Hamano wrote: > > The bisect search found that the commit > > Make "git-checkout" create files with O_EXCL > > makes the test t1005 fail. But it is getting late so I give up > to figuire this out tonight. Ahh, thanks for noticing. It says * expecting success: rm -f .git/index && rm -fr DF && mkdir DF && echo DF/DF >DF/DF && git-update-cache --add DF/DF && read_tree_twoway $treeDFDF $treeDF && git-ls-files --stage >DFDFcheck.out && diff -u DF.out DFDFcheck.out && check_cache_at DF clean && # different from pure 2-way : 100644 052efc3abbc31348f7abd34535b1953d38273257 3 DF 100644 b90ea14b2dd74b6f377c10870b3757344bbe077c 1 DF/DF 100644 b90ea14b2dd74b6f377c10870b3757344bbe077c 2 DF/DF Adding DF error: git-checkout-cache: unable to create file DF (File exists) Removing DF/DF 100644 052efc3abbc31348f7abd34535b1953d38273257 0 DF DF: dirty * FAIL 24: DF vs DF/DF case test (#2) rm -f .git/index && Which is strange. If the path already exists, the "lstat(path, &st)" should have returned 0 in checkout_entry (which is the only caller of "write_entry()"), and that code does an "unlink(path)" before it calls write-entry. So I was sure O_EXCL wouldn't make any difference, but I'm obviously wrong, wrong, wrong. I'll strace the dang thing. Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Patch to make README more newbie-friendly
Hi, Jerry Seutter wrote: > I'd also like to include stuff about branches, but I haven't gotten my > head wrapped around how they work yet. cg-branch-add expects a location > after the branch name and I'm not sure what to give it. Cogito branch creation is based on the idea that you have a different archive _somewhere_else_ that you pull from, so it wants to store the source URL in .git/branches/. Git doesn't have that assumption; "git checkout -b " simply creates a new branch and switches to it. However, the git branch idea came somewhat later, so there's a bit of a mismatch at the moment. Simply switching branches isn't supposed to have any effect unless you actually have changes in different branches. I tend to work along these lines: #!/bin/sh cd /tmp rm -rf test.$$ mkdir test.$$ cd test.$$ git-init-db echo not-quite-empty >testfile cg-add testfile echo Created test | cg-commit git checkout -b one echo foo >>testfile echo added foo to testfile | cg-commit git checkout -b two master echo bar >> testfile echo added bar to testfile | cg-commit cg-diff -r one:two | cat git checkout master cg-merge one cg-merge two The first merge fast-forwards your master tree to "one"; the second creates a conflict (lines were added at the same location) which you'll have to resolve (edit the file). vi testfile echo Merged one and two | cg-commit gitk -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [EMAIL PROTECTED] Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de - - Apollo, the God of light, of reason, of proportion, harmony, number -- Apollo blinds those who press too close in worship. Don't look straight at the sun. Go into a dark bar and have a beer with Dionysos, every now and then. -- Ursula K. LeGuin - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Is cogito really this inefficient
On Thu, 14 Jul 2005, Russell King wrote: > > Actually, I should've left the sh -x /usr/bin/cg-diff drivers/serial/8250.c > running a little longer. It's not the git-update-cache command which > is taking the time, it's git-diff-cache. Ok. git-diff-cache actually ends up reading your HEAD tree, and that, in turn, is 1000+ tree objects. So it can take a while for the whole tree, especially in the nonpacked and uncached case. git-diff-tree (comparing two trees) is smart enough to limit itself to just the sub-trees that have been named, and would have compared the two trees by looking up just eight objects (three subdirectories from each tree, and then the file itself from both trees). But git-diff-cache isn't - because it's comparing the tree against the index file, and the index is inevitably the whole tree. And I now think I know what makes it slow. Not only are you basically opening 1100 files (the tree objects - there's really that many subdirectories in the kernel. Scary), but because you have alternate object directories, and almost all of the objects are in the alternate (not your primary), you'll basically always end up _first_ looking in the primary, failing, and then looking in the alternate. Together with the hashing, you'll be looking all over the place, in other words ;) Which means that you'll be needing a fair amount of memory to keep all of those negative dentries etc cached (and the directory tree too). This is something the pack-files will just help enormously with, but it was only recently that we turned git around to check the pack-files _first_, and the object directories second, so you probably won't see it (not to mention that you probably don't have big pack-files at all ;) I'll look into making diff-cache be more efficient. I normally don't use it myself, so I didn't bother (I use git-diff-files, which is way more efficient, but doesn't show the difference against the _tree_, it shows the difference against the index. Since cogito tries to hide the index from you, cogito can't very well use that). Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Is cogito really this inefficient
On Thu, 14 Jul 2005, Russell King wrote: > > cg-update origin > and then I edited drivers/serial/8250.c Hmm.. > it appears that cg-diff does a > > git-update-cache --refresh >/dev/null > > each time it's run, which is taking the bulk of the time. Also note > that curiously, it exits with status 1. That part is normal - a update-cache is fast (it takes me 0.08 sec for the kernel) if the cache is already mostly up-to-date, and the non-zero exit status just means that some file was different (ie it's telling the caller that there are edits in your tree - drivers/serial/8250.c). The update-cache is slow only if the index isn't up-to-date, which can happen either if somebody plays games with the index, or if somebody touches all the files in the tree. It's quite possible that some path in cg-update ends up not updating the index properly. For example, I notice that the "fast-forward" uses "git-checkout-cache -f -a", which can do so (lack of "-u" fila), but then it does do a "git-update-cache --refresh" later, so that doesn't seem to be it either. If you do a "git-diff-files" every once in a while, it will _scream_ at you whenever you have files that aren't up-to-date in the cache. That's normal in small doses, of course (eg your edit of drivers/serial/8250.c would make that one not up-to-date), but if you get a _lot_ of files listed, that's usually a sign that something screwed up your index. Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] stgit: allow spaces in filenames (second try)
Catalin Marinas <[EMAIL PROTECTED]> wrote: > One note about patch description. I would prefer to have the > convention of the Linux kernel patches: > > --- > Short description line Probably without this line in the e-mail body since it is already in the subject line. -- Catalin - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] stgit: allow spaces in filenames (second try)
Bryan Larsen <[EMAIL PROTECTED]> wrote: > The current version of stgit does not allow whitespace in filenames. This > patch fixes that. It also speeds up operations on large filesets > considerably. > > Signed-off-by: Bryan Larsen <[EMAIL PROTECTED]> Applied. It will be visible tonight via the ftp mirror. One note about patch description. I would prefer to have the convention of the Linux kernel patches: --- Short description line Longer description Signed-off-by: ... --- A future export command with support for sendpatcheset will take the short description line and use it as a subject. Also, it would be nice for the longer description to be wrapped somewhere before column 80 (~72 would be OK). -- Catalin - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Local cg-pull fails
I think I posted about this before, but I can't find it in my git mailbox... [EMAIL PROTECTED]:[linux-2.6-arm] $ cg-update origin l `../linux-2.6/.git/refs/heads/master' -> `.git/refs/heads/origin' cp: cannot create link `.git/objects/00/ae0c9f3bc24856e7c9fcdf690466f1bbe0a4df': File exists cp: cannot create link `.git/objects/01/5bd2cf869f70ec708558f1d37980a8b4968604': File exists cp: cannot create link `.git/objects/02/c7e335d3ef3998dfb49673654152fb10124d2f': File exists Consider this flow of changes (which represents how I work): Linus' kernel.org tree --> Local pristine tree ^ ^|| | |vv | |working tree 1 working tree 2 | ||| | `'| `-' Changes are made in working tree 1, and made available to Linus. Linus merges them into his tree. I pull them into the pristine tree. Assume other changes occurred. in Linus' tree. The pristine tree is obviously a superset of the working tree. What happens when I pull those changes back into working tree 1, given that cogito uses "cp -va -ul". The pristine tree now contains the GIT objects which I created in tree 1. For whatever reason I don't understand, they are dated after the same objects in tree 1. Therefore, because of `-u', cp will want to update them - by replacing the object with a link. It refuses. Last time this was discussed, someone suggested -f, which solved the problem. Can we please modify the cg-pull script to use -f ? Secondly, can I suggest that cogito developers consider the above usage scenario and construct a regression test for it to ensure that future breakages of this nature are caught. For me, cogito has been extremely fragile, and I don't think the above usage is unreasonable. -- Russell King - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Is cogito really this inefficient
On Thu, Jul 14, 2005 at 10:08:31AM +0100, Catalin Marinas wrote: > Russell King <[EMAIL PROTECTED]> wrote: > > it appears that cg-diff does a > > > > git-update-cache --refresh >/dev/null > > > > each time it's run, which is taking the bulk of the time. Also note > > that curiously, it exits with status 1. > > Does git-ls-files --unmerged show any files? No, and it returns fairly quickly: $ /usr/bin/time git-ls-files --unmerged 0.29user 0.03system 0:00.43elapsed 73%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+655minor)pagefaults 0swaps Actually, I should've left the sh -x /usr/bin/cg-diff drivers/serial/8250.c running a little longer. It's not the git-update-cache command which is taking the time, it's git-diff-cache. Running the diff several times, both with and without changes to drivers/serial/8250.c, it seems that sometimes it's faster. I guess it has to do with dentry invalidation... However, the point is - I've only asked for _one_ file. Why do we need to look at _every_ file in the tree? I could understand this behaviour if I'd asked for a diff across the whole tree, but I didn't. Internally, the sha1 of the unmodified drivers/serial/8250.c should be known, so should be trivial to unpack that and generate a diff. Given the cache, this should be something which should be lightning fast when the requested fileset to diff is already known. -- Russell King - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Is cogito really this inefficient
Russell King <[EMAIL PROTECTED]> wrote: > it appears that cg-diff does a > > git-update-cache --refresh >/dev/null > > each time it's run, which is taking the bulk of the time. Also note > that curiously, it exits with status 1. Does git-ls-files --unmerged show any files? -- Catalin - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Why O_EXCL would make this difference? I am puzzled..
The bisect search found that the commit Make "git-checkout" create files with O_EXCL makes the test t1005 fail. But it is getting late so I give up to figuire this out tonight. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] add inetd mode to git daemon
Adds --inetd command line argument that makes server run in inetd mode. Signed-off-by: Alexey Nezhdanov <[EMAIL PROTECTED]> --- diff --git a/daemon.c b/daemon.c --- a/daemon.c +++ b/daemon.c @@ -3,7 +3,7 @@ #include #include -static const char daemon_usage[] = "git-daemon [--port=n]"; +static const char daemon_usage[] = "git-daemon [--inetd | --port=n]"; static int upload(char *dir, int dirlen) { @@ -37,11 +37,21 @@ static int execute(char *line, int len) return -1; } -static void handle(int incoming, struct sockaddr_in *addr, int addrlen) +static int handle_stdio() { static char line[1000]; int len; + len = packet_read_line(0, line, sizeof(line)); + + if (len && line[len-1] == '\n') + line[--len] = 0; + + return execute(line, len); +} + +static void handle(int incoming, struct sockaddr_in *addr, int addrlen) +{ if (fork()) { close(incoming); return; @@ -50,12 +60,8 @@ static void handle(int incoming, struct dup2(incoming, 0); dup2(incoming, 1); close(incoming); - len = packet_read_line(0, line, sizeof(line)); - - if (len && line[len-1] == '\n') - line[--len] = 0; - exit(execute(line, len)); + exit(handle_stdio()); } static int serve(int port) @@ -97,6 +103,7 @@ int main(int argc, char **argv) { int port = DEFAULT_GIT_PORT; int i; + int inetd_mode = 0; for (i = 1; i < argc; i++) { char *arg = argv[i]; @@ -110,8 +117,17 @@ int main(int argc, char **argv) continue; } } + + if (!strncmp(arg, "--inetd", 7)) { + inetd_mode = 1; + continue; + } + usage(daemon_usage); } - return serve(port); + if (inetd_mode) + return handle_stdio(); + else + return serve(port); } - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Is cogito really this inefficient
On Wed, Jul 13, 2005 at 06:51:30PM +0200, Matthias Urlichs wrote: > Hi, Russell King wrote: > > > This says it all. 1min 22secs to generate a patch from a locally > > modified but uncommitted file. > > I only get that when the index is out-of-date WRT the file modification > dates, so cg-diff has to examine every file. > > The good news is that the index is being updated as it finds that the > files are in sync, so expect this to be significantly faster the next time > around. It isn't. First time it was 1min11, second time _immediately_ after it was 1min22. See my reply to Linus. Oddly, show-diff seemed to be a lot more efficient in previous git revisions. -- Russell King - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Is cogito really this inefficient
On Wed, Jul 13, 2005 at 01:28:18PM -0700, Linus Torvalds wrote: > On Wed, 13 Jul 2005, Russell King wrote: > > This says it all. 1min 22secs to generate a patch from a locally > > modified but uncommitted file. > > No, there's something else going on. > > Most likely that something forced a total index file re-validation, and > the time you see is every single checked out file having its SHA1 > re-computed. > > Was this a recently cloned tree, or what was the last operation you did on > that tree before that command? Something must have invalidated the index. cg-update origin and then I edited drivers/serial/8250.c As discovered using: sh -x /usr/bin/cg-diff drivers/serial/8250.c it appears that cg-diff does a git-update-cache --refresh >/dev/null each time it's run, which is taking the bulk of the time. Also note that curiously, it exits with status 1. -- Russell King - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] stgit: allow spaces in filenames
Does it make that big difference if the commands are invoked via the shell? I haven't run any tests. It wasn't for the time difference that I bypassed the shell, it was to support spaces and other strange characters in parameters. It's easy to use spawnvp than it is to escape the parameters properly. Bryan - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Documentation: push-pull commands into a separate category.
This splits push-pull related commands into a separate category. I think a bigger overhaul of the main index is needed, but have not got around to it. Help is welcome. Signed-off-by: Junio C Hamano <[EMAIL PROTECTED]> --- Documentation/git.txt | 65 - 1 files changed, 42 insertions(+), 23 deletions(-) 9ea24aa8739dc23074872679d493dfd6fb0e5321 diff --git a/Documentation/git.txt b/Documentation/git.txt --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -30,8 +30,9 @@ reflect recent changes. Commands Overview - The git commands can helpfully be split into those that manipulate -the repository, the cache and the working fileset and those that -interrogate and compare them. +the repository, the cache and the working fileset, those that +interrogate and compare them, and those that moves objects and +references between repositories. There are also some ancilliary programs that can be viewed as useful aids for using the core commands but which are unlikely to be used by @@ -117,16 +118,6 @@ The interrogate commands may create file touch the working file set - but in general they don't -Ancilliary Commands -Manipulators: - -link:git-apply-patch-script.html[git-apply-patch-script]:: - Sample script to apply the diffs from git-diff-* - -link:git-convert-cache.html[git-convert-cache]:: - Converts old-style GIT repository - link:git-clone-script.html[git-clone-script]:: Clones a repository into the current repository (user interface) @@ -134,18 +125,49 @@ link:git-clone-pack.html[git-clone-pack] Clones a repository into the current repository (engine for ssh and local transport) +link:git-pull-script.html[git-pull-script]:: + Pull from a repote repository via various protocols + (user interface). + link:git-http-pull.html[git-http-pull]:: Downloads a remote GIT repository via HTTP link:git-local-pull.html[git-local-pull]:: Duplicates another GIT repository on a local system +link:git-ssh-pull.html[git-ssh-pull]:: + Pulls from a remote repository over ssh connection + +link:git-send-pack.html[git-send-pack]:: + Pushes to a remote repository, intelligently. + +link:git-receive-pack.html[git-receive-pack]:: + Invoked by 'git-send-pack' to receive what is pushed to it. + +link:git-clone-pack.html[git-clone-pack]:: + Clones from a remote repository. + +link:git-fetch-pack.html[git-fetch-pack]:: + Updates from a remote repository. + +link:git-upload-pack.html[git-upload-pack]:: + Invoked by 'git-clone-pack' and 'git-fetch-pack' to push + what are asked for. + + +Ancilliary Commands +--- +Manipulators: + +link:git-apply-patch-script.html[git-apply-patch-script]:: + Sample script to apply the diffs from git-diff-* + +link:git-convert-cache.html[git-convert-cache]:: + Converts old-style GIT repository + link:git-merge-one-file-script.html[git-merge-one-file-script]:: The standard helper program to use with "git-merge-cache" -link:git-pull-script.html[git-pull-script]:: - Script used by Linus to pull and merge a remote repository - link:git-prune-script.html[git-prune-script]:: Prunes all unreachable objects from the object database @@ -155,8 +177,6 @@ link:git-resolve-script.html[git-resolve link:git-tag-script.html[git-tag-script]:: An example script to create a tag object signed with GPG -link:git-ssh-pull.html[git-ssh-pull]:: - Pulls from a remote repository over ssh connection Interogators: @@ -221,17 +241,16 @@ The git-core manipulates the following a .git/The base (overridden with $GIT_DIR) objects/The object base (overridden with $GIT_OBJECT_DIRECTORY) - ??/ 'First 2 chars of object' directories - -It can interrogate (but never updates) the following areas: + ??/ 'First 2 chars of object' directories. + pack/ Packed archives. refs/ Directories containing symbolic names for objects (each file contains the hex SHA1 + newline) heads/Commits which are heads of various sorts tags/ Tags, by the tag name (or some local renaming of it) - snap/ - ... Everything else isn't shared - HEADSymlink to refs/heads/ + */Any other subdirectory of refs/ can be used to store + files similar to what are under refs/heads/. + HEADSymlink to refs/heads/ Higher level SCMs may provide and manage additional information in the GIT_DIR. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Documentation: send/receive.
This adds documentation for 'smarter push' family of commands. Signed-off-by: Junio C Hamano <[EMAIL PROTECTED]> --- Documentation/git-receive-pack.txt | 41 Documentation/git-send-pack.txt| 46 send-pack.c|3 ++ 3 files changed, 89 insertions(+), 1 deletions(-) create mode 100644 Documentation/git-receive-pack.txt create mode 100644 Documentation/git-send-pack.txt 1cf367fc165560b68a51b6ce4cc91d809cf09c99 diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt new file mode 100644 --- /dev/null +++ b/Documentation/git-receive-pack.txt @@ -0,0 +1,41 @@ +git-receive-pack(1) +=== +v0.1, July 2005 + +NAME + +git-receive-pack - Receive what is pushed into it + + +SYNOPSIS + +'git-receive-pack' + +DESCRIPTION +--- +Invoked by 'git-send-pack' and updates the repository with the +information fed from the remote end. + +This command is usually not invoked directly by the end user. +The UI for the protocol is on the 'git-send-pack' side, and the +program pair is meant to be used to push updates to remote +repository. For pull operations, see 'git-fetch-pack' and +'git-clone-pack'. + + +OPTIONS +--- +:: + The repository to sync into. + +Author +-- +Written by Linus Torvalds <[EMAIL PROTECTED]> + +Documentation +-- +Documentation by Junio C Hamano. + +GIT +--- +Part of the link:git.html[git] suite diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt new file mode 100644 --- /dev/null +++ b/Documentation/git-send-pack.txt @@ -0,0 +1,46 @@ +git-send-pack(1) + +v0.1, July 2005 + +NAME + +git-send-pack - Push missing objects packed. + + +SYNOPSIS + +'git-send-pack' [--exec=] [:] [...] + +DESCRIPTION +--- +Invokes 'git-receive-pack' on a possibly remote repository, and +updates it from the current repository, sending named heads. + + +OPTIONS +--- +--exec=:: + Path to the 'git-receive-pack' program on the remote + end. Sometimes useful when pushing to a remote + repository over ssh, and you do not have the program in + a directory on the default $PATH. + +:: + A remote host to house the repository. When this + part is specified, 'git-receive-pack' is invoked via + ssh. + +:: + The repository to update. + +Author +-- +Written by Linus Torvalds <[EMAIL PROTECTED]> + +Documentation +-- +Documentation by Junio C Hamano. + +GIT +--- +Part of the link:git.html[git] suite diff --git a/send-pack.c b/send-pack.c --- a/send-pack.c +++ b/send-pack.c @@ -2,7 +2,8 @@ #include "refs.h" #include "pkt-line.h" -static const char send_pack_usage[] = "git-send-pack [--exec=other] destination [heads]*"; +static const char send_pack_usage[] = +"git-send-pack [--exec=git-receive-pack] [host:]directory [heads]*"; static const char *exec = "git-receive-pack"; struct ref { - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Documentation: clone/fetch/upload.
This adds documentation for 'smarter pull' family of commands. Signed-off-by: Junio C Hamano <[EMAIL PROTECTED]> --- Documentation/git-clone-pack.txt | 13 +-- Documentation/git-fetch-pack.txt | 73 + Documentation/git-upload-pack.txt | 40 fetch-pack.c | 11 -- 4 files changed, 130 insertions(+), 7 deletions(-) create mode 100644 Documentation/git-fetch-pack.txt create mode 100644 Documentation/git-upload-pack.txt 1ac6853af4e4a24eaf7008be9b4e9e033bc624f1 diff --git a/Documentation/git-clone-pack.txt b/Documentation/git-clone-pack.txt --- a/Documentation/git-clone-pack.txt +++ b/Documentation/git-clone-pack.txt @@ -9,7 +9,7 @@ git-clone-pack - Clones a repository by SYNOPSIS -'git-clone-pack' [-q] [--exec=] [:] [...] +'git-clone-pack' [-q] [--exec=] [:] [...] DESCRIPTION --- @@ -36,10 +36,15 @@ OPTIONS shells by having a lean .bashrc file (they set most of the things up in .bash_profile). -[:]:: + A remote host that houses the repository. When this + part is specified, 'git-upload-pack' is invoked via + ssh. -...:: +:: + The repository to sync from. + +...:: The heads to update. This is relative to $GIT_DIR (e.g. "HEAD", "refs/heads/master"). When unspecified, all heads are updated to match the remote repository. diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt new file mode 100644 --- /dev/null +++ b/Documentation/git-fetch-pack.txt @@ -0,0 +1,73 @@ +git-fetch-pack(1) += +v0.1, July 2005 + +NAME + +git-fetch-pack - Receive missing objects from another repository. + + +SYNOPSIS + +git-fetch-pack [-q] [--exec=] [:] [...] < + +DESCRIPTION +--- +Invokes 'git-upload-pack' on a potentially remote repository, +and asks it to send objects missing from this repository, to +update the named heads. The list of commits available locally +is fed from the standard input, to be sent to 'git-upload-pack' +running on the other end. + +This command can be used only when the local side has a common +(ancestor) commit with the remote head that is being pulled +from. Use 'git-clone-pack' for that. + + +OPTIONS +--- +-q:: + Pass '-q' flag to 'git-unpack-objects'; this makes the + cloning process less verbose. + +--exec=:: + Use this to specify the path to 'git-upload-pack' on the + remote side, if is not found on your $PATH. + Installations of sshd ignores the user's environment + setup scripts for login shells (e.g. .bash_profile) and + your privately installed GIT may not be found on the system + default $PATH. Another workaround suggested is to set + up your $PATH in ".bashrc", but this flag is for people + who do not want to pay the overhead for non-interactive + shells by having a lean .bashrc file (they set most of + the things up in .bash_profile). + +:: + A remote host that houses the repository. When this + part is specified, 'git-upload-pack' is invoked via + ssh. + +:: + The repository to sync from. + +...:: + The remote heads to update from. This is relative to + $GIT_DIR (e.g. "HEAD", "refs/heads/master"). When + unspecified, update from all heads the remote side has. + + However the program refuses to work if more than one + remote head matches the specified heads. I am not sure + what this means... Help! + + +Author +-- +Written by Linus Torvalds <[EMAIL PROTECTED]> + +Documentation +-- +Documentation by Junio C Hamano. + +GIT +--- +Part of the link:git.html[git] suite diff --git a/Documentation/git-upload-pack.txt b/Documentation/git-upload-pack.txt new file mode 100644 --- /dev/null +++ b/Documentation/git-upload-pack.txt @@ -0,0 +1,40 @@ +git-upload-pack(1) +== +v0.1, July 2005 + +NAME + +git-upload-pack - Send missing objects packed. + + +SYNOPSIS + +'git-upload-pack' + +DESCRIPTION +--- +Invoked by 'git-clone-pack' and/or 'git-fetch-pack', learns what +objects the other side is missing, and sends them after packing. + +This command is usually not invoked directly by the end user. +The UI for the protocol is on the 'git-fetch-pack' side, and the +program pair is meant to be used to pull updates from a remote +repository. For push operations, see 'git-send-pack'. + + +OPTIONS +--- +:: + The repository to sync from. + +Author +-- +Written by Linus Torvalds <[EMAIL PROTECTED]> + +Documentation +-- +Documentation by Junio C Hamano. + +GIT +--- +Part of the link:git.html[git] suite diff --git a/fetch-pack.c b/fetch-pack.c --- a/fetch-pack.c +++ b/fetch-pack.c @@ -3,7 +3,8 @@ #include "pkt-line.h" #include -static const char fetch_pack_usage[] = "git-fetch-pack [host:]directory [heads]* < mycommitlist"; +static int quie
[PATCH] Documentation: packed GIT support commands.
This adds documentation for creating packed archives, inspecting, validating them, and unpacking them. Signed-off-by: Junio C Hamano <[EMAIL PROTECTED]> --- Documentation/git-pack-objects.txt | 80 ++ Documentation/git-show-index.txt | 36 +++ Documentation/git-unpack-objects.txt | 33 ++ Documentation/git-verify-pack.txt| 13 +- 4 files changed, 161 insertions(+), 1 deletions(-) create mode 100644 Documentation/git-pack-objects.txt create mode 100644 Documentation/git-show-index.txt create mode 100644 Documentation/git-unpack-objects.txt 32a772fa72da57fbbe9ea27d195e6b755c83cd22 diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt new file mode 100644 --- /dev/null +++ b/Documentation/git-pack-objects.txt @@ -0,0 +1,80 @@ +git-pack-objects(1) +=== +v0.1, July 2005 + +NAME + +git-pack-objects - Create a packed archive of objects. + + +SYNOPSIS + +'git-pack-objects' [--incremental] [--window=N] [--depth=N] {--stdout | base-name} < object-list + + +DESCRIPTION +--- +Reads list of objects from the standard input, and writes a packed +archive with specified base-name, or to the standard output. + +A packed archive is an efficient way to transfer set of objects +between two repositories, and also is an archival format which +is efficient to access. The packed archive format (.pack) is +designed to be unpackable without having anything else, but for +random access, accompanied with the pack index file (.idx). + +'git-unpack-objects' command can read the packed archive and +expand the objects contained in the pack into "one-file +one-object" format; this is typically done by the smart-pull +commands when a pack is created on-the-fly for efficient network +transport by their peers. + +Placing both in pack subdirectory of $GIT_OBJECT_DIRECTORY (or +any of the directories on $GIT_ALTERNATE_OBJECT_DIRECTORIES) +enables GIT to read from such an archive. + + +OPTIONS +--- +base-name:: + Write into a pair of files (.pack and .idx), using +to determine the name of the created file. + When this option is used, the two files are written in + -.{pack,idx} files. is a hash + of object names (currently in random order so it does + not have any useful meaning) to make the resulting + filename reasonably unique, and written to the standard + output of the command. + +--stdout:: + Write the pack contents (what would have been writtin to + .pack file) out to the standard output. + +--window and --depth:: + These two options affects how the objects contained in + the pack are stored using delta compression. The + objects are first internally sorted by type, size and + optionally names and compared against the other objects + within --window to see if using delta compression saves + space. --depth limits the maximum delta depth; making + it too deep affects the performance on the unpacker + side, because delta data needs to be applied that many + times to get to the necessary object. + +--incremental:: + This flag causes an object already in a pack ignored + even if it appears in the standard input. + + +Author +-- +Written by Linus Torvalds <[EMAIL PROTECTED]> + +Documentation +- +Documentation by Junio C Hamano + +GIT +--- +Part of the link:git.html[git] suite + diff --git a/Documentation/git-show-index.txt b/Documentation/git-show-index.txt new file mode 100644 --- /dev/null +++ b/Documentation/git-show-index.txt @@ -0,0 +1,36 @@ +git-show-index(1) += +v0.1, July 2005 + +NAME + +git-show-index - Show packed archive index + + +SYNOPSIS + +'git-show-index' < idx-file + + +DESCRIPTION +--- +Reads given idx file for packed GIT archive created with +git-pack-objects command, and dumps its contents. + +The information it outputs is subset of what you can get from +'git-verify-pack -v'; this command only shows the packfile +offset and SHA1 of each object. + + +Author +-- +Written by Linus Torvalds <[EMAIL PROTECTED]> + +Documentation +-- +Documentation by Junio C Hamano + +GIT +--- +Part of the link:git.html[git] suite + diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt new file mode 100644 --- /dev/null +++ b/Documentation/git-unpack-objects.txt @@ -0,0 +1,33 @@ +git-unpack-objects(1) += +v0.1, July 2005 + +NAME + +git-unpack-objects - Create a packed archive of objects. + + +SYNOPSIS + +'git-unpack-objects' < pack-file + + +DESCRIPTION +--- +Reads a packed archive (.pack) from the standard input, and +expands the objects contained in the pack into "one-file +one-object" format in $GIT_OBJECT_DIRECTORY. + + +Author +-- +Written by Linus Torvalds <[EMAIL PROTECTED]> + +Documentation +- +Do
Re: [PATCH] stgit: allow spaces in filenames
On Wed, 2005-07-13 at 15:26 -0700, Junio C Hamano wrote: > Catalin Marinas <[EMAIL PROTECTED]> writes: > > >> I'd very much like to stay on the same list. By the same logic, cogito > >> should have it's own list as well... > > > > I'd like this too and it's probably OK with a low traffic (we'll see if > > we receive complaints :-) ). > > I'd like to keep Porcelain discussions on this list for two > reasons: That's great then. I will keep the StGIT discussions on this list. -- Catalin - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html