Junio C Hamano [Sat, 23 Jul 2005 02:09:34 +0000 (19:09 -0700)]
[PATCH] Test framework: prettyprint the failed command.
The output from a failure case had the test description message
and the first line of the actual test script concatenated on the
same line, which was ugly. Correct the output routine a bit to
make it more readable.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sat, 23 Jul 2005 02:09:20 +0000 (19:09 -0700)]
[PATCH] Install tools with "make install-tools".
Match the main Makefile by separating COPTS from CFLAGS,
defining INSTALL, prefix, and bin. Add a new target 'install-tools'
to the main Makefile to install them.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sat, 23 Jul 2005 02:09:05 +0000 (19:09 -0700)]
[PATCH] Audit rev-parse users.
This patch changes rev-parse users that pass a single argument
that is supposed to be a rev parameter to use "--verify".
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sat, 23 Jul 2005 02:08:47 +0000 (19:08 -0700)]
[PATCH] git-branch: avoid getting confused by empty or nonexisting branches.
When not specifying the start point explicitly, we ended up
emitting ^0 in addition to the default HEAD. Be careful to see
if we have "$2" before finding out which commit to base the new
branch on.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Sat, 23 Jul 2005 02:08:32 +0000 (19:08 -0700)]
[PATCH] Help scripts that use git-rev-parse to grok args with SP/TAB/LF
The git-rev-parse command uses LF to separate each argument it
parses, so its users at least need to set IFS to LF to be able
to handle filenames with embedded SPs and TABs. Some commands,
however, can take and do expect arguments with embedded LF,
notably, "-S" (pickaxe) of diff family, so even this workaround
does not work for them.
When --sq flag to git-rev-parse is given, instead of showing one
argument per line, it outputs arguments quoted for consumption
with "eval" by the caller, to remedy this situation.
As an example, this patch converts git-whatchanged to use this
new feature.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Sat, 23 Jul 2005 00:30:26 +0000 (17:30 -0700)]
[PATCH] Document "curl" requirements.
Not just libcurl, but now we require curl executable as well.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Darrin Thompson [Wed, 13 Jul 2005 02:12:40 +0000 (21:12 -0500)]
[PATCH] Support more http features: https no cert, .netrc -> auth
Cause setting environment variable GIT_SSL_NO_VERIFY to turn off
curl's ssl peer verification.
Only use curl for http transfers, instead of curl and wget.
Make curl check ~/.netrc for credentials.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Sat, 16 Jul 2005 20:19:24 +0000 (14:19 -0600)]
[PATCH] Install git-verify-tag-script
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Sat, 16 Jul 2005 20:18:40 +0000 (14:18 -0600)]
[PATCH] Cleanup: git-verify-tag-script
- Use git-rev-parse to allow sha1 tags references
- When the tag does not verify set an appropriate exit status
- Use git-sh-setup-script to verify the .git directory
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Veldeman [Tue, 19 Jul 2005 21:59:09 +0000 (14:59 -0700)]
[PATCH] Fix a typo in git-unpack-objects documentation.
Fix a typo in git-unpack-objects documentation.
Signed-off-by: Jan Veldeman <jan@mind.be>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ryan Anderson [Wed, 20 Jul 2005 01:17:47 +0000 (21:17 -0400)]
[PATCH] debian/ fixes
Make debian/rules executable, and correct the spelling of rsync in
debian/control.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Fri, 22 Jul 2005 23:04:47 +0000 (16:04 -0700)]
[PATCH] format-patch: --mbox and --check.
Add --mbox option to export patches in a format resembling UNIX
mbox, so that later they can be concatenated and fed to
applymbox.
Add --check to look for lines that introduce bogus whitespaces.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Fri, 22 Jul 2005 23:04:34 +0000 (16:04 -0700)]
[PATCH] git-format-patch-script and mailinfo updates.
- avoid duplicating [PATCH] in the commit message body if the
original commit has it already (happens for commits done from
mails via applymbox).
- check if the commit author is different from the one who is
running the script, and emit an appropriate "From:" and
"Date: " lines to the output.
- with '--date', emit "Date: " line to preserve the original
author date even for the user's own commit.
- teach mailinfo to grok not just "From: " but "Date: ".
The patch e-mail output by format-patch starts with the first
line from the original commit message, prefixed with [PATCH],
and optionally a From: line if you are reformatting a patch
obtained from somebody else, a Date: line from the original
commit if (1) --date is specified or (2) for somebody else's
patch, and the rest of the commit message body.
Expected use of this is to move the title line from the commit
to Subject: when sending it via an e-mail, and leave the From:
and the Date: lines as the first lines of your message.
The mailinfo command has been changed to read Date: (in addition
to From: it already understands) and do sensible things when
running applymbox.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Fri, 22 Jul 2005 23:04:19 +0000 (16:04 -0700)]
[PATCH] tools/applymbox: allow manual fixing and continuing after a failure.
With "-c .dotest/0002" flag, the applymbox command can be told
to use existing .dotest/patch file after hand-fixing the patch
conflicts for the second patch in the mailbox, and continue on
from that message, skipping the already applied first patch in
.dotest/0001.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Fri, 22 Jul 2005 16:56:57 +0000 (09:56 -0700)]
[PATCH] apply.c: --exclude=fnmatch-pattern option.
Adds --exclude=pattern option to the "git-apply" command. This
was useful while reimporting the BKCVS patchset dump of the
Linux kernel, starting at 2.4.0 and ending at 2.6.12-rc2 Ingo
announced some time ago to exclude BitKeeper directory.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Fri, 22 Jul 2005 16:56:39 +0000 (09:56 -0700)]
[PATCH] apply.c: handle incomplete lines correctly.
The parsing code had a bug that failed to recognize an
incomplete line at the end of a fragment, and the fragment
application code had a comparison bug to recognize such. Fix
them to handle incomplete lines correctly.
Add a test script for patches with various combinations of
complete and incomplete lines to make sure the fix works.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Tue, 19 Jul 2005 11:20:39 +0000 (07:20 -0400)]
Add "git commit --all" since everybody seems to want it.
This replaces
git-diff-files --name-only | xargs git-update-cache
git commit
with a new "--all" argument to "git commit".
Linus Torvalds [Tue, 19 Jul 2005 11:03:47 +0000 (07:03 -0400)]
git-send-pack: verify that sender is a proper superset of receiver
This should make sure that if you have multiple people pushing to the
same tree, they cannot overwrite each others work, but have to merge
before being able to update the common reference tree.
Linus Torvalds [Mon, 18 Jul 2005 23:26:00 +0000 (19:26 -0400)]
Merge master.kernel.org:/pub/scm/gitk/gitk
Paul Mackerras [Mon, 18 Jul 2005 18:29:03 +0000 (14:29 -0400)]
Make the diff display less gaudy.
The old style is still available as an option (we still need a
preferences window so we can set/clear it though).
Paul Mackerras [Mon, 18 Jul 2005 16:16:35 +0000 (12:16 -0400)]
Allow short SHA1 IDs in the SHA1 entry field.
Paul Mackerras [Sun, 17 Jul 2005 15:11:44 +0000 (11:11 -0400)]
Fix display of mode changes in details pane.
Also simplified the parsing of the git-diff-tree -p output and got
rid of the unused 'seenfile' variable.
Paul Mackerras [Sun, 17 Jul 2005 07:39:44 +0000 (03:39 -0400)]
First cut at displaying the diffs for a merge.
We display the files where the child differs from the first parent
first in black in the file list window, followed by the second parent
in blue, and so on using different colors for each parent (provided
you don't have more than 6 parents; if you do we cycle around).
Paul Mackerras [Sun, 17 Jul 2005 01:53:55 +0000 (21:53 -0400)]
Make searching in files changed faster, and fix some bugs.
We now kick off a single git-diff-tree -r --stdin and feed it all
the commit pairs we want to know about, instead of doing a separate
git-diff-tree invocation for each.
Linus Torvalds [Sat, 16 Jul 2005 20:55:50 +0000 (13:55 -0700)]
Merge three separate "fetch refs" functions
It really just boils down to one "get_remote_heads()" function, and a
common "struct ref" structure definition.
Linus Torvalds [Sat, 16 Jul 2005 20:26:33 +0000 (13:26 -0700)]
git-send-pack: add "--all" option to send all refs to the other side
This affects only refs that the other side doesn't already have. The
ones it has are still filtered by the ref selection.
Linus Torvalds [Sat, 16 Jul 2005 17:31:38 +0000 (10:31 -0700)]
git-fetch-script: fix http:// breakage
We were trying to fetch using the merge-head name rather than the
merge-head SHA1 that we just got.
Now, http:// is broken anyway right now for packing, but this should
make it work for nonpacked repositories again.
Linus Torvalds [Sat, 16 Jul 2005 17:27:19 +0000 (10:27 -0700)]
Fix git-fetch-script breakage
It had the test for the destination reversed.
Linus Torvalds [Sat, 16 Jul 2005 17:12:06 +0000 (10:12 -0700)]
Merge git-tools repository under "tools" subdirectory
Thanks to Ryan Anderson for setting me up to do this. I'd have used his
work, but I wanted to clean up the old git-tools repository before
merging it: it had old-style file modes etc that needed a round of
git-convert-cache to fix up.
Linus Torvalds [Sat, 16 Jul 2005 17:05:26 +0000 (10:05 -0700)]
Prepare git-tools for merging into the main git archive
Rename into a "tools" subdirectory, and change name of "dotest" to "applymbox".
Remove stripspace (which was already copied into git) and cvs2git (which
was likewise already copied into git, and then replaced by a much better
perl version).
All of this was brought on by Ryan Anderson shaming me into it. Thanks.
I guess.
Linus Torvalds [Sat, 16 Jul 2005 16:57:03 +0000 (09:57 -0700)]
git-convert-cache: fix up file modes in trees too
git-fsck-cache complains about some of the odder ones, and is quiet
about the old (S_IFREG | 664) case, but that's wrong too.
Converting the kernel tree is too painful right now, but at least we
know how to do it if we ever want to.
Junio C Hamano [Sat, 16 Jul 2005 07:17:42 +0000 (00:17 -0700)]
[PATCH] Documentation: describe short-hand used in fetch/pull.
Describe short-hand for remote repository used in fetch/pull.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Sat, 16 Jul 2005 07:16:24 +0000 (00:16 -0700)]
[PATCH] fetch/pull: short-hand notation for remote repositories.
Since pull and fetch are done often against the same remote
repository repeatedly, keeping the URL to pull from along with
the name of the head to use in $GIT_DIR/branches/$name makes a
lot of sense. Adopt that convention from Cogito, and try to be
compatible when possible; storing a partial URL and completing
it with a trailing path may not be understood by Cogito.
While we are at it, fix pulling a tag. Earlier, we updated only
refs/tags/$tag without updating FETCH_HEAD, and called
resolve-script using a stale (or absent) FETCH_HEAD.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Sat, 16 Jul 2005 11:46:13 +0000 (07:46 -0400)]
Add "Files" and "Pickaxe" to the find menu.
"Files" matches the find string against each of the files modified
by each commit, and can do exact, case-ignoring or regexp matching.
"Pickaxe" uses git-diff-tree -S'string' and can only do exact
matching. I called it "pickaxe" rather than "find within patch"
since it only finds commits where the string is present in the child
but not the parents or vice versa, and "pickaxe" is what the author
of that feature calls it.
Linus Torvalds [Sat, 16 Jul 2005 05:53:31 +0000 (22:53 -0700)]
Be slightly smarter about git-daemon client shutdown
Shut down connections that haven't even identified themselves as git
clients first. That should get rid of people who just connect to the
port and wait for something to happen.
Junio C Hamano [Sat, 16 Jul 2005 03:56:12 +0000 (20:56 -0700)]
[PATCH] Documentation: update recommended workflow when working with others.
Clarify that the hierarchy implied by the recommended workflow
is only informal.
Refer readers to nice illustration by Randy Dunlap.
Separate out the step to "push" to own public repository in the
workflow.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Sat, 16 Jul 2005 03:54:04 +0000 (20:54 -0700)]
[PATCH] Documentation: adjust cvsimport command line.
The cvsimport example in the cvs migration document was still
using the old syntax for target repository after new and
improved cvsimport-script was merged.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Sat, 16 Jul 2005 04:51:57 +0000 (21:51 -0700)]
git-daemon: actually remember the children we have outstanding
This is using a lockless approach that allows us to handle children
dying without having to block SIGCHLD.
Right now our "solution" to too many kids is pretty damn rough, but it
at least shows what you can do.
Linus Torvalds [Sat, 16 Jul 2005 03:42:28 +0000 (20:42 -0700)]
git-daemon: keep track of children
We don't want them as zombies, and eventually we'll want to limit their
number. Right now we just count them.
Linus Torvalds [Fri, 15 Jul 2005 23:08:01 +0000 (16:08 -0700)]
Ahh, the heady days of 0.99 patchfiles
Now, not all projects can be as refined as Linux. Before the final 1.0
release, we went through fifteen 0.99 patchfiles, and pl14 alone went
through subreleases 'a' through 'z'. Now _that_ is a release process.
Not to mention the odd-ball releases, like 0.96c+
Sadly, in this day and age of RPM's etc, we have silly limitations, and
I cannot call this release '0.99pl5a or some such awe-inspiring name
just because "rpmbuild" is such a party pooper. So it's just 0.99.1.
Oh well. Aspiring to such greatness as the Linux release numbering is
hubris anyway. You can attain such perfection only once in your life.
Linus Torvalds [Fri, 15 Jul 2005 21:57:09 +0000 (14:57 -0700)]
Fix up "make doc"
Fix 'git-var.txt' and use "-b xhtml11" instead of "-b css-embedded" to
make asciidoc 7.0.1 happy.
Junio C Hamano [Fri, 15 Jul 2005 18:40:56 +0000 (11:40 -0700)]
[PATCH] Documentation: pull, push, packing repository and working with others.
Describe where you can pull from with a bit more detail.
Clarify description of pushing.
Add a section on packing repositories.
Add a section on recommended workflow for the project lead,
subsystem maintainers and individual developers.
Move "Tag" section around to make the flow of example simpler to
follow.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Fri, 15 Jul 2005 07:59:34 +0000 (00:59 -0700)]
[PATCH] Documentation: update tutorial to talk about push.
Talk about publishing to a public repository. Also fixes a
couple of typos.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 01:26:31 +0000 (19:26 -0600)]
[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 <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 01:24:23 +0000 (19:24 -0600)]
[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 <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 01:21:57 +0000 (19:21 -0600)]
[PATCH] Add doc and install-doc targets to the Makefile
This makes it straightforward 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 <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 01:20:50 +0000 (19:20 -0600)]
[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 <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 01:20:25 +0000 (19:20 -0600)]
[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 <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 01:02:10 +0000 (19:02 -0600)]
[PATCH] 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 :)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 01:00:15 +0000 (19:00 -0600)]
[PATCH] 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 <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 00:57:53 +0000 (18:57 -0600)]
[PATCH] 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 <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 00:55:09 +0000 (18:55 -0600)]
[PATCH] 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.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 00:52:31 +0000 (18:52 -0600)]
[PATCH] 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 <ebiederm@xmission.com>
[ Fixed grammar ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Fri, 15 Jul 2005 00:50:33 +0000 (18:50 -0600)]
[PATCH] 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.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Fri, 15 Jul 2005 16:32:16 +0000 (09:32 -0700)]
Add "--inetd" flag to git-daemon
All credit go to Alexey Nezhdanov <snake@penza-gsm.ru>, I just ended up
re-implementing his idea.
Linus Torvalds [Fri, 15 Jul 2005 16:27:05 +0000 (09:27 -0700)]
git-daemon: re-organize code a bit for --inetd flag
Alexey Nezhdanov sent a patch that made git-daemon usable from inetd (ie
where inetd has already done the accept on the new connection, the fork,
and the setup of stdin/stdout). I wanted to organize the thing slightly
differently, though.
Linus Torvalds [Fri, 15 Jul 2005 00:59:17 +0000 (17:59 -0700)]
Split up "diff_format" into "format" and "line_termination".
This removes the separate "formats" for name and name-with-zero-
termination.
It also removes the difference between HUMAN and MACHINE formats, and
they both become DIFF_FORMAT_RAW, with the difference being just in the
line and inter-filename termination.
It also makes the code easier to understand.
Linus Torvalds [Thu, 14 Jul 2005 23:55:06 +0000 (16:55 -0700)]
Make "ce_match_path()" a generic helper function
... and make git-diff-files use it too. This all _should_ make the
diffcore-pathspec.c phase unnecessary, since the diff'ers now all do the
path matching early interally.
Linus Torvalds [Thu, 14 Jul 2005 23:43:01 +0000 (16:43 -0700)]
Make git-diff-cache skip any comparisons which don't match pathspec
This brings all the same pathspec optimizations that git-diff-tree does
to git-diff-cache.
Linus Torvalds [Thu, 14 Jul 2005 20:19:19 +0000 (13:19 -0700)]
Start using the partial tree reading in "git-diff-cache"
The reason I say "start using" is that we really should also limit the
index checking by name - now we limit the tree object accesses by name,
but we still check the whole index.
Still, this should help.
Linus Torvalds [Thu, 14 Jul 2005 18:39:27 +0000 (11:39 -0700)]
Fix up read_tree() pathspec matching to use "const char **"
The same way the other pathspecs work. Also fix missing success return
from the matching - not that anything actually uses this yet ;)
Linus Torvalds [Thu, 14 Jul 2005 18:26:31 +0000 (11:26 -0700)]
Start adding interfaces to read in partial trees
The same way "git-diff-tree" can limit its output to just a set of matches,
we can read in just a partial tree for comparison purposes.
Linus Torvalds [Thu, 14 Jul 2005 16:58:45 +0000 (09:58 -0700)]
Fix replacing of a directory with a file/symlink in git-checkout-cache
The symlink case had never worked, and the file case was broken by the
O_EXCL change because the error return changed from EISDIR to EEXIST.
Fix both problems by just moving the test for an existing directory to a
more logical place.
Linus Torvalds [Thu, 14 Jul 2005 16:29:35 +0000 (09:29 -0700)]
Make "git diff" use git-sh-setup-script too..
Give a sane error rather than just silently claiming no diffs when
you're not at the top-level directory.
Linus Torvalds [Thu, 14 Jul 2005 15:57:14 +0000 (08:57 -0700)]
Make "git prune" use the "--full" flag to git-fsck-cache
It's too dangerous not to. We need to follow alternate object
directories etc, or we might say something is unreachable just because
we didn't look it up completely.
Junio C Hamano [Thu, 14 Jul 2005 07:10:48 +0000 (00:10 -0700)]
[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 <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Thu, 14 Jul 2005 07:10:05 +0000 (00:10 -0700)]
[PATCH] Documentation: send/receive.
This adds documentation for 'smarter push' family of commands.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Thu, 14 Jul 2005 07:08:37 +0000 (00:08 -0700)]
[PATCH] Documentation: clone/fetch/upload.
This adds documentation for 'smarter pull' family of commands.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Thu, 14 Jul 2005 07:08:05 +0000 (00:08 -0700)]
[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 <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Thu, 14 Jul 2005 03:55:56 +0000 (20:55 -0700)]
Get rid of nasty utf-8 characters in printout
Oh, well.. FC4 has UTF-8 as the default environment, and I applaud
that, but then it sometimes results in these characters that aren't
actually visible as a problem.
Junio C Hamano [Thu, 14 Jul 2005 03:28:55 +0000 (20:28 -0700)]
[PATCH] apply: match documentation, usage string and code.
The more recent --apply option was not described.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Thu, 14 Jul 2005 03:27:41 +0000 (20:27 -0700)]
[PATCH] Remove leftover comment from documentation.
The comment was left over from the days when we had a single
huge core-git.txt document. No more.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Thu, 14 Jul 2005 03:26:54 +0000 (20:26 -0700)]
[PATCH] clone-pack: Typofix in the error message.
Cleans a small cut-and-paste mistake.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Thu, 14 Jul 2005 03:25:54 +0000 (20:25 -0700)]
[PATCH] clone-pack and clone-script: documentation and add a missing parameter.
While adding the documentation for these two commands, I noticed
that the name of the program on the other end (git-upload-pack)
is already almost configurable but git-clone-pack lacked command
line parameter parsing to actually use anything but default, so
I introduced --exec= like other remote commands while I was at it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Thu, 14 Jul 2005 03:25:07 +0000 (20:25 -0700)]
[PATCH] checkout-cache: add usage string.
This adds the usage string to checkout-cache and you can say
"--help" to get it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Thu, 14 Jul 2005 03:23:40 +0000 (20:23 -0700)]
[PATCH] cat-file: be consistent in usage string and documentation.
Now that we have something called tag object, and a notion of
"tags" stored in .git/refs/tags/ directory, the word "tagname"
has become misleading in the usage string. The documentation
already calls that <type>.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Thu, 14 Jul 2005 03:21:54 +0000 (20:21 -0700)]
[PATCH] Document two pack push-pull protocols.
This documents the two pack push-pull protocols used by the
smart upload-fetch/clone and send/receive commands.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Thu, 14 Jul 2005 03:05:17 +0000 (20:05 -0700)]
Fix the "close before dup" bug in clone-pack too
Same issue as git-fetch-pack.
Linus Torvalds [Thu, 14 Jul 2005 02:45:26 +0000 (19:45 -0700)]
Add a "git-daemon" that listens on a TCP port
.. and does a "git-upload-pack" on demand.
Linus Torvalds [Thu, 14 Jul 2005 02:40:06 +0000 (19:40 -0700)]
git-fetch-pack: close output fd after dup'ing the input
With the socket case, the input and output fd's might end up being the same,
so we want to dup the other before we close either of them.
Linus Torvalds [Thu, 14 Jul 2005 01:46:20 +0000 (18:46 -0700)]
Add first cut at "git protocol" connect logic.
Useful for pulling stuff off a dedicated server. Instead of connecting
with ssh or just starting a local pipeline, we connect over TCP to the
other side and try to see if there's a git server listening.
Of course, since I haven't written the git server yet, that will never
happen. But the server really just needs to listen on a port, and
execute a "git-upload-pack" when somebody connects.
(It should read one packet-line, which should be of the format
"git-upload-pack directoryname\n"
and eventually we migth have other commands the server might accept).
Linus Torvalds [Thu, 14 Jul 2005 00:27:48 +0000 (17:27 -0700)]
Make "git-checkout" create files with O_EXCL
We should always have unlinked any old ones before, but this just makes
sure that we never over-write any old file.
A quick "grep" now shows that all the core tools that open files for
writing use O_EXCL, ie we never overwrite an existing file in place.
Linus Torvalds [Thu, 14 Jul 2005 00:25:53 +0000 (17:25 -0700)]
git-apply: be a lot more careful when writing files
We write them under another name and rename them to their destination,
so that if something bad happens in the middle, we won't have caused any
bigger harm.
Also, this makes the writing be NFS "intr" safe, and as a side effects
makes sure that if the target is hardlinked (or symlinked) we will have
broken the link.
Junio C Hamano [Wed, 13 Jul 2005 19:52:35 +0000 (12:52 -0700)]
[PATCH] Clean up diff option descriptions.
I got tired of maintaining almost duplicated descriptions in
diff-* brothers, both in usage string and documentation.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Wed, 13 Jul 2005 19:45:51 +0000 (12:45 -0700)]
[PATCH] git-diff-*: --name-only and --name-only-z.
Porcelain layers often want to find only names of changed files,
and even with diff-raw output format they end up having to pick
out only the filename. Support --name-only (and --name-only-z
for xargs -0 and cpio -0 users that want to treat filenames with
embedded newlines sanely) flag to help them.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Wed, 13 Jul 2005 19:45:06 +0000 (12:45 -0700)]
[PATCH] diff-stages: support "-u" as a synonym for "-p".
Just to be consistent, support "-u" as a synonym for "-p" like
everybody else does.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Sven Verdoolaege [Tue, 12 Jul 2005 21:35:32 +0000 (23:35 +0200)]
[PATCH] git-cvsimport-script: parse multidigit revisions.
Previously, git-cvsimport-script would fail
on revisions with more than one digit.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tony Luck [Tue, 12 Jul 2005 18:54:21 +0000 (11:54 -0700)]
[PATCH] git: fix trivial warning from show_rename_copy()
apply.c: In function `show_rename_copy':
apply.c:1147: warning: field precision is not type int (arg 3)
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Tue, 12 Jul 2005 18:49:27 +0000 (11:49 -0700)]
Abstract out the "name <email> date" handling of commit-tree.c
We'll want to use it for the tagging too.
Linus Torvalds [Tue, 12 Jul 2005 17:33:06 +0000 (10:33 -0700)]
parse_date(): allow const date string
This is part of breaking up the tag ID patch by Eric Biederman.
Linus Torvalds [Tue, 12 Jul 2005 17:12:52 +0000 (10:12 -0700)]
"make clean" should clean up after a rpm build
There's a few generated files that we left behind.
Linus Torvalds [Tue, 12 Jul 2005 17:07:18 +0000 (10:07 -0700)]
Rename the RPM from "git" to "git-core"
That way we avoid any confusion with "GNU Interactive Tools", and it's
more descriptive anyway (the rpm documentation talks about how git is
split into a "core" part and an "SCM" part, this makes it clear that
this is the core one).
Linus Torvalds [Tue, 12 Jul 2005 04:30:23 +0000 (21:30 -0700)]
Add "git branch" script
You can use it as
git branch <branchname> [start-point]
and it creates a new branch of name <branchname>. If a starting point
is specified, that will be where the branch is created, otherwise it
will be created at the current HEAD.
The sequence
git branch xyz abc
git checkout xyz
can also be written as
git checkout -b xyz abc
as per the previous commit.
Linus Torvalds [Tue, 12 Jul 2005 03:44:20 +0000 (20:44 -0700)]
Make "git checkout" create new branches on demand
In particular, if we check out something that isn't an old branch, it
now requires a new branch-name to check the thing out into.
So, for example:
git checkout -b my-branch v2.6.12
will create the new branch "my-branch", and start it at v2.6.12, while
git checkout master
will just switch back to the master branch.
Of course, if you want to create a new branch "my-branch" and _not_
check it out, you could have done so with just
git-rev-parse v2.6.12^0 > .git/refs/heads/my-branch
which I think I will codify as "git branch".
Linus Torvalds [Tue, 12 Jul 2005 01:32:30 +0000 (18:32 -0700)]
Make "git checkout" verify that the argument refers to a commit
We still need to create a new branch if it didn't refer to an existing
branch, otherwise our HEAD will continue to point to something totally
different than what we just checked out.
I'll need to think about it. Maybe only do it with "-f" and force it to
the "master" branch?
Linus Torvalds [Tue, 12 Jul 2005 01:27:25 +0000 (18:27 -0700)]
git-rev-parse: Allow a "zeroth" parent of a commit - the commit itself.
This sounds nonsensical, but it's useful to make sure that the result is
a commit.
For example, "git-rev-parse v2.6.12" will return the _tag_ object for
v2.6.12, but "git-rev-parse v2.6.12^0" will return the _commit_ object
associated with that tag (and v2.6.12^1 will return the first parent).
Also, since the "parent" code will actually parse the commit, this,
together with the "--verify" flag, will verify not only that the result
is a single SHA1, but will also have verified that it's a proper commit
that we can see.
Linus Torvalds [Tue, 12 Jul 2005 01:03:34 +0000 (18:03 -0700)]
git-send-pack: Fix duplicate refname match
Cut-and-paste dup noticed by Junio. It's not even harmless, since a
match also causes that match to be invalidated, so this made it
impossible to update an existing branch by name.
I'd only tested the case of "ref doesn't exist at all on the other end",
which worked fine.
Chris Wright [Mon, 11 Jul 2005 21:03:09 +0000 (14:03 -0700)]
[PATCH] Bootstrap "make dist"
Use git-tar-tree directly from git source during make dist. This
handles bootstrap issue with git not being installed.
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Junio C Hamano [Mon, 11 Jul 2005 20:30:54 +0000 (13:30 -0700)]
[PATCH] git-clone-script local optimization tweaks
- When local optimization is used, the variable repo has
already been passed through get_repo_base so there is no need
to check for .git subdirectory in there.
- Use cpio -l instead of "cp -l".
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Sven Verdoolaege [Mon, 11 Jul 2005 14:57:49 +0000 (16:57 +0200)]
[PATCH] git-cvsimport-script: add "import only" option
git-cvsimport-script: add "import only" option which tells the script
not to perform a checkout after importing.
This ensures that the working directory and cache remain untouched and
will not create them if they do not exist.
Acked-by: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>