1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-16 14:04:52 +01:00
Commit graph

33161 commits

Author SHA1 Message Date
Linus Torvalds
d727782eaf Make "git tag" create both simple and signed tags
A simple tag is just a direct pointer to the object, while a signed tag
is a pointer to a "tag object" that has a pgp signature and points to
the object we tagged.

Use "git tag -s tagname" to create a signed tag.

The "-f" flag overwrites any previous tag of that name (useful if you
update a tag to point to a newer version for things like "latest" etc
tags that aren't necessarily static versions).
2005-07-23 15:21:22 -07:00
Junio C Hamano
1d8fa411e0 [PATCH] mailinfo: handle folded header.
Some people split their long E-mail address over two lines
using the RFC2822 header "folding".  We can lose authorship
information this way, so make a minimum effort to deal with it,
instead of special casing only the "Subject:" field.

We could teach mailsplit to unfold the folded header, but
teaching mailinfo about folding would make more sense; a single
message can be fed to mailinfo without going through mailsplit.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-23 11:13:11 -07:00
Linus Torvalds
ce6f8e7ec2 Fix git protocol connection 'port' override
It was broken by the IPv6 patches - we need to remove the ":" part from
the hostname for a successful name lookup.
2005-07-23 11:10:21 -07:00
YOSHIFUJI Hideaki
5ba884483f [PATCH] GIT: Try all addresses for given remote name
Try all addresses for given remote name until it succeeds.  Also
supports IPv6.

Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-23 11:05:58 -07:00
Ryan Anderson
34862b2e24 [PATCH] Deb packaging needs two more configuration files
The deb package building needs these two new files to work correctly.

debian/compat sets the rules under which the debhelper scripts (dh_*)
operate.

debian/git-core.install tells dh_install what files to install in each
package that is generated.  There is only one package being generated,
so all files go into it.

(I missed these in the last patch, mostly because I needed to do this to
find stuff I had missed:
	find . -name .git -type d -prune -o -type f -print \
		| grep -v -e .tree1 -e .tree2 \
		| sed -e "s/^\.\///" \
		| sort >.tree1
	git-ls-files | grep -v -e .tree1 -e .tree2 \
		| sort >.tree2
	diff -u .tree1 .tree2
)

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-23 11:05:58 -07:00
Ryan Anderson
71fb3de0ee [PATCH] Deb packages should include the binaries
The Deb packages were missing a dependency on "build install" from the
binary target - this fixes that, and cleans up some inconsistencies
elsewhere in the rulesets.

Traditionally, Debian packaging uses a file called "build-stamp" (or
"install-stamp", etc) in the main source tree.  The initial deb package
support for Git tried to move this "build-stamp" file into the debian/
directory, but some instances were missed.  That problem, however, was
incidental - the real fix is the missing dependency mentioned above.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-23 11:05:58 -07:00
Linus Torvalds
4311d328fe Be more aggressive about marking trees uninteresting
We'll mark all the trees at the edges (as deep as we had to go to
realize that we have all the commits needed) as uninteresting.
Otherwise we'll occasionally list a lot of objects that were actually
available at the edge in a commit that we just never ended up parsing
because we could determine early that we had all relevant commits.

NOTE! The object listing is still just a _heuristic_.  It's guaranteed
to list a superset of the actual new objects, but there might be the
occasional old object in the list, just because the commit that
referenced it was much further back in the history.

For example, let's say that a recent commit is a revert of part of the
tree to much older state: since we didn't walk _that_ far back in the
commit history tree to list the commits necessary, git-rev-tree will
never have marked the old objects uninteresting, and we'll end up
listing them as "new".

That's ok.
2005-07-23 10:01:49 -07:00
Junio C Hamano
a692b9656a [PATCH] tutorial: mention "git clone" records .git/branches/origin
Update the recommended workflow for individual developers.
While they are tracking the origin, refs/heads/origin is updated
by "git fetch", so there is no need to manually copy FETCH_HEAD
to refs/heads/ anywhere.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-22 20:34:17 -07:00
Junio C Hamano
1cadb5a271 [PATCH] git-clone-script: store where we cloned from in .git/branches/origin
A bit more usability enhancement, while retaining Cogito
compatibility (and fixing the "-u" flag).

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-22 20:34:16 -07:00
Junio C Hamano
bf0dd8a8de [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>
2005-07-22 20:34:16 -07:00
Junio C Hamano
8cc393068a [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>
2005-07-22 20:34:16 -07:00
Junio C Hamano
f6e1a4d6dc [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>
2005-07-22 20:34:16 -07:00
Junio C Hamano
a38e727925 [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>
2005-07-22 20:34:16 -07:00
Junio C Hamano
5bb2c65aba [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>
2005-07-22 20:34:16 -07:00
Junio C Hamano
99cff830e0 [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>
2005-07-22 17:48:45 -07:00
Darrin Thompson
3dcb90f526 [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>
2005-07-22 17:48:45 -07:00
Eric W. Biederman
421cbeb2f7 [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>
2005-07-22 17:48:45 -07:00
Eric W. Biederman
62b532b080 [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>
2005-07-22 17:48:45 -07:00
Jan Veldeman
8228326e46 [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>
2005-07-22 17:48:45 -07:00
Ryan Anderson
f2a1f9a56e [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>
2005-07-22 17:48:45 -07:00
Junio C Hamano
5c2c972f47 [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>
2005-07-22 16:29:28 -07:00
Junio C Hamano
44d2eb51b1 [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>
2005-07-22 16:29:28 -07:00
Junio C Hamano
3727531899 [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>
2005-07-22 16:29:28 -07:00
Junio C Hamano
d854f783af [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>
2005-07-22 10:26:01 -07:00
Junio C Hamano
8b64647dd9 [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>
2005-07-22 10:26:01 -07:00
Paul Mackerras
7eab29339b Handle the rename cases reported by git-diff-tree -C correctly. 2005-07-20 12:25:54 -04:00
Paul Mackerras
3c461ffe88 Calculate the list of interesting files for a merge.
If there is a GCA for the parents of the merge, then a file is
interesting if some parent has a version that is different from both
the child and the GCA.  If there is no GCA (e.g. for a merge that
pulls in an external project) then a file is interesting if the child's
version is different from all of the parents.

Next step is to actually show the differences for the interesting
files...
2005-07-20 09:13:46 -04:00
Linus Torvalds
f0b32737ad 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".
2005-07-19 07:20:39 -04:00
Linus Torvalds
2a9c3fe838 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.
2005-07-19 07:03:47 -04:00
Linus Torvalds
07ee0d77c6 Merge master.kernel.org:/pub/scm/gitk/gitk 2005-07-18 19:26:00 -04:00
Paul Mackerras
f06548617d 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).
2005-07-18 14:29:03 -04:00
Paul Mackerras
f3b8b3ce3e Allow short SHA1 IDs in the SHA1 entry field. 2005-07-18 12:16:35 -04:00
Paul Mackerras
4f2c2642ca 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.
2005-07-17 11:11:44 -04:00
Paul Mackerras
e2ed4324b0 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).
2005-07-17 03:39:44 -04:00
Paul Mackerras
14c9dbd69b 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.
2005-07-16 21:53:55 -04:00
Linus Torvalds
d1c133f5d4 Merge three separate "fetch refs" functions
It really just boils down to one "get_remote_heads()" function, and a
common "struct ref" structure definition.
2005-07-16 13:55:50 -07:00
Linus Torvalds
d089391c00 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.
2005-07-16 13:26:33 -07:00
Linus Torvalds
9c2b1c0cd8 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.
2005-07-16 10:31:38 -07:00
Linus Torvalds
60ea0fdd7d Fix git-fetch-script breakage
It had the test for the destination reversed.
2005-07-16 10:27:19 -07:00
Linus Torvalds
98e031f0bb 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.
2005-07-16 10:12:06 -07:00
Linus Torvalds
c5f7674a97 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.
2005-07-16 10:05:26 -07:00
Linus Torvalds
e2418c01b1 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.
2005-07-16 09:57:03 -07:00
Junio C Hamano
0c04094bc1 [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>
2005-07-16 09:23:06 -07:00
Junio C Hamano
f170e4b39d [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>
2005-07-16 09:23:06 -07:00
Paul Mackerras
b74fd57966 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.
2005-07-16 07:46:13 -04:00
Linus Torvalds
02d57da4a5 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.
2005-07-15 22:53:31 -07:00
Junio C Hamano
a232a132ea [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>
2005-07-15 21:53:22 -07:00
Junio C Hamano
2c38fe4c57 [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>
2005-07-15 21:53:22 -07:00
Linus Torvalds
66e631def8 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.
2005-07-15 21:51:57 -07:00
Linus Torvalds
eaa9491955 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.
2005-07-15 20:42:28 -07:00