1
0
mirror of https://github.com/git/git.git synced 2024-10-06 12:11:26 +02:00
Commit Graph

3321 Commits

Author SHA1 Message Date
Michal Ostrowski
2c620a1ad1 git-fetch: pass --upload-pack to fetch-pack
Without this, there is no way to specify a remote executable when
invoking git-pull/git-fetch as there is for git-clone.

[jc: I have a mild suspicion that this is a broken environment (aka
 sysadmin disservice).  It may be legal to configure your sshd to
 spawn named program without involving shell at all, and if your
 sysadmin does so and you have your git programs under your home
 directory, you would need something like this, but then I suspect
 you would need such workaround everywhere, not just git. But we
 have these options we can use to work around the issue, so there
 is no strong reason not to reject this patch, either. ]

Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-24 23:17:26 -08:00
Junio C Hamano
e6489a1bdf clone: do not accept more than one -o option.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-24 23:17:06 -08:00
Junio C Hamano
4fb66a62ee clone: do not create remotes/origin nor origin branch in a bare repository.
It is simply pointless, since no merges will ever happen in such
a repository.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-24 23:17:06 -08:00
Junio C Hamano
87e80c4b5f git-clone: PG13 --naked option to --bare.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-24 23:17:06 -08:00
Pavel Roskin
941c944999 Don't include ../README in git.txt - make a local copy
asciidoc 7.0.4 and newer considers such includes from parent directory
unsafe.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-24 23:16:31 -08:00
Junio C Hamano
41e79c9559 sample update-hook: sanely handle a new branch head.
Instead of showing all the history since the beginning of time
leading to the the branch head, show only the changes this new
branch brings to the world.

This originally came from Linus and tested by Andreas Ericsson.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-24 17:38:06 -08:00
Andreas Ericsson
8a3ee7c314 update-hook: Major overhaul (handling tags, mainly).
This is the update hook we use in all our git-repos.

It has some improvements over the original version, namely:
* Don't send every commit since dawn of time when adding a new tag.
* When updating an annotated tag, just send the diffs since the last tag.
* Add diffstat output for 'normal' commits (top) and annotated tags (bottom).
* Block un-annotated tags in shared repos.

I'm a bit uncertain about that last one, but it demonstrates how to
disallow updates of a ref which we use, so I kept it.

Note that git-describe is needed for the "changes since last annotated tag"
thing to work.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-24 17:27:33 -08:00
Junio C Hamano
dcc6e28f70 Documentation: finishing touches to the new tutorial.
We forgot to update the primary link from git.html leading to
the tutorial, and also forgot to build and install the renamed
core-tutorial document.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-22 22:43:59 -08:00
Junio C Hamano
76b927f19f Recommend to remove unused origin in a shared repository.
It is a common mistake to leave an unsed `origin` branch behind
if a shared public repository was created by first cloning from
somewhere else.  Subsequent `git push` into it with the default
"push all the matching ref" would push the `origin` branch from
the developer repository uselessly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-22 22:05:54 -08:00
J. Bruce Fields
927a503cd0 New tutorial
The current Documentation/tutorial.txt concentrates on the lower-level
git interfaces.  So it's useful to people developing alternative
porcelains, to advanced users, etc., but not so much to beginning users.

I think it makes sense for the main tutorial to address those
beginnning users, so with this patch I'm proposing that we move
Documentation/tutorial.txt to Documentation/core-tutorial.txt and
replace it by a new tutorial.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-22 21:52:33 -08:00
Junio C Hamano
5b2bcc7b2d git-grep: clarification on parameters.
We forgot to make sure that there is no more than one pattern
parameter.  Also when looking for files in a directory called
'--others', it passed that path limiter without preceding the
end-of-options marker '--' to underlying git-ls-files, which
misunderstood it as one of its options instead.

	$ git grep --others -e Meta/Make Meta
	$ git grep -o -e Meta/Make Meta
	$ git grep -o Meta/Make Meta

look for a string "Meta/Make" from untracked files in Meta/
directory.

	$ git grep Meta/Make --others

looks for the same string from tracked files in ./--others
directory.

On the other hand,

	$ git grep -e Meta/Make --others

does not have a freestanding pattern, so everybody is parameter
and there is no path specifier.  It looks for the string in all
the untracked files without any path limiter.

[jc: updated with usability enhancements and documentation
cleanups from Sean.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 19:34:11 -08:00
Junio C Hamano
0bdd79af62 Undef DT_* before redefining them.
When overriding DT_* macro detection with NO_D_TYPE_IN_DIRENT (recent
Cygwin build problem, which hopefully is already fixed in their CVS
snapshot version), we define DTYPE() macro to return just "we do not
know", but still needed to use DT_* macro to avoid ifdef in the code
we use them.  If the platform defines DT_* macro but with unusable
d_type, this would have resulted in us redefining these preprocessor
symbols.

Admittedly, that would be just a couple of compilation warnings, and
on Cygwin at least this particular problem is transitory (the problem
is already fixed in their CVS snapshot version), so this is a low
priority fix.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 19:33:22 -08:00
Junio C Hamano
5df9140c92 t4011: "sleep 1" is not enough on FAT
This test depended on "sleep 1" to be enough to dirty the index
entry for a symlink.  Alex noticed that on his Cygwin installation
"sleep 1" was sometimes not enough, and after further discussion with
Christopher Faylor, it was brought up that on FAT filesystem timestamp
granularity is 2 seconds so sleeping 1 second is not enough.

For now this patch takes an easy workaround of sleeping for 3 seconds.

Very strictly speaking, POSIX requires lstat to fill only S_IFMT part
of st_mode and st_size for symlinks, and depending on timestamp might
be considered a bug, but we depend on that anyway, so it is better to
test that.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 19:33:22 -08:00
Junio C Hamano
63be37b06f DT_UNKNOWN: do not fully trust existence of DT_UNKNOWN
The recent Cygwin defines DT_UNKNOWN although it does not have d_type
in struct dirent.  Give an option to tell us not to use d_type on such
platforms.  Hopefully this problem will be transient.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 19:33:22 -08:00
Junio C Hamano
35a730f01c fsck-objects: support platforms without d_ino in struct dirent.
The d_ino field is only used for performance reasons in
fsck-objects.  On a typical filesystem, i-number tends to have a
strong correlation with where the actual bits sit on the disk
platter, and we sort the entries to allow us scan things that
ought to be close together together.

If the platform lacks support for it, it is not a big deal.
Just do not use d_ino for sorting, and scan them unsorted.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 19:33:22 -08:00
Junio C Hamano
bdc37f5a81 Makefile: do not assume lack of IPV6 means no sockaddr_storage.
Noticed first by Alex, that the latest Cygwin now properly has
sockaddr_storage.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 19:33:22 -08:00
J. Bruce Fields
eff351c957 Mention install-doc in INSTALL
I think most people will want to install the man pages as well.

[jc: incorporated Pasky's comment on not building them as root.
Some people may not want to install asciidoc/xmlto toolchain, so
redirect them to the man and html branches of the git.git
repository as well.]

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 19:24:55 -08:00
Petr Baudis
a325957062 Document git-ls-files --directory
Add the appropriate bit of documentation.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 19:12:03 -08:00
J. Bruce Fields
8278ac2f4a Minor git-reset and git-commit documentation fixes
Minor copyediting of recent additions to git-commit and git-reset
documentation.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 19:11:51 -08:00
Junio C Hamano
8e76c79f4a Revert "git-push: avoid falling back on pushing "matching" refs."
This reverts 9e9b26751a5ca7a257b3e1cfb319fe3e4efc663c commit partially.
When no refspec is specified on the command line and there is no
default refspec to push specified in remotes/ file, just let
send-pack to do its default "matching refs" updates.

Thanks to Greg KH for complaining.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 12:36:12 -08:00
Florian Weimer
e72c9f5c54 AsciiDoc fixes for the git-svnimport manpage
Change "SVN:: Perl" to "SVN::Perl", wrap a long line, and clean up the
description of positional arguments.

Signed-off-by: Florian Weimer <fw@deneb.enyo.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-21 12:22:02 -08:00
Luck, Tony
abb9ae95f4 update using-topic-branches
Update documentation to warn users not to create noise in then Linux
history by creating pointless "Auto-update from upstream" merge
commits.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-20 13:34:12 -08:00
Uwe Zeisberger
e7555785f4 Fix generation of "humanish" part of source repo
If repo has the form <host>:<path> and <path> doesn't contain a slash, the
cloned repository is named "<host>:<path>", instead of "<path>" only.

Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-19 23:24:34 -08:00
Pavel Roskin
2fabd21733 Disable USE_SYMLINK_HEAD by default
Disable USE_SYMLINK_HEAD by default.  Recommend using it only for
compatibility with older software.

Treat USE_SYMLINK_HEAD like other optional defines - check whether it's
defined, not its value.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-19 23:14:31 -08:00
Junio C Hamano
949964c4af Merge fixes up to GIT 1.1.4 2006-01-19 19:57:56 -08:00
Junio C Hamano
c4e804bbf0 GIT 1.1.4 v1.1.4 2006-01-19 19:56:27 -08:00
Junio C Hamano
3a75f67401 GIT 1.0.12 v1.0.12 2006-01-19 18:32:54 -08:00
Johannes Schindelin
e921fb82cf git-fetch-pack: really do not ask for funny refs
If git-fetch-pack was called with out any refspec, it would ask the server
for funny refs. That cannot work, since the funny refs are not marked
as OUR_REF by upload-pack, which just exits with an error.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-19 18:29:43 -08:00
Junio C Hamano
e93ec6f9d8 Revert "check_packed_git_idx(): check integrity of the idx file itself."
This reverts c5ced64578a82b9d172aceb2f67c6fb9e639f6d9 commit.
It turns out that doing this check every time we map the idx file
is quite expensive.  A corrupt idx file is caught by git-fsck-objects,
so this check is not strictly necessary.

In one unscientific test, 0.99.9m spent 10 seconds usertime for
the same task 1.1.3 takes 37 seconds usertime.  Reverting this gives
us the performance of 0.99.9 back.
2006-01-19 18:29:11 -08:00
Junio C Hamano
5c7d3c9507 Allow building of RPM from interim snapshot.
By popular demand.  If you build and install such binary RPMs,
the version numbering will lose monotonicity, so you may have to
later override downgrade warnings from your packaging manager,
but as long as you are aware of that and know how to deal with it,
there is no reason for us to forbid it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-16 00:58:45 -08:00
Junio C Hamano
42301e34a2 git-push: fix --tags and document it.
Previously 'git-push --tags dst', used information from
remotes/dst to determine which refs to push; this patch corrects
it, and also documents the --tags option.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15 23:59:12 -08:00
Junio C Hamano
fec9ebf16c Merge fixes up to GIT 1.1.3 2006-01-15 22:25:35 -08:00
Junio C Hamano
8a263aeb4f GIT 1.1.3 v1.1.3 2006-01-15 22:22:23 -08:00
Junio C Hamano
181dc77695 describe: omit clearing marks on the last one.
When describing more than one, we need to clear the commit marks
before handling the next one, but most of the time we are
running it for only one commit, and in such a case this clearing
phase is totally unnecessary.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15 22:15:37 -08:00
Junio C Hamano
0620db36f8 Merge branch 'fix' 2006-01-15 21:34:31 -08:00
Junio C Hamano
8cd1621149 cvsimport: ease migration from CVSROOT/users format
This fixes a minor bug, which caused the author email to be
doubly enclosed in a <> pair (the code gave enclosing <> to
GIT_AUTHOR_EMAIL and GIT_COMMITTER_EMAIL environment variable).

The read_author_info() subroutine is taught to also understand
the user list in CVSROOT/users format.  This is primarily done
to ease migration for CVS users, who can use the -A option
to read from existing CVSROOT/users file.  write_author_info()
always writes in the git-cvsimport's native format ('='
delimited and value without quotes).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15 21:13:22 -08:00
Andreas Ericsson
ffd97f3a35 git-cvsimport: Add -A <author-conv-file> option
This patch adds the option to specify an author name/email conversion
file in the format

	exon=Andreas Ericsson <ae@op5.se>
	spawn=Simon Pawn <spawn@frog-pond.org>

which will translate the ugly cvs authornames to the more informative
git style.

The info is saved in $GIT_DIR/cvs-authors, so that subsequent
incremental imports will use the same author-info even if no -A
option is specified. If an -A option *is* specified, the info in
$GIT_DIR/cvs-authors is appended/updated appropriately.

Docs updated accordingly.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15 21:13:22 -08:00
Junio C Hamano
7cb038a692 Merge branch 'fixo/1.0' 2006-01-15 21:12:12 -08:00
Junio C Hamano
ae4a35261d GIT 1.0.11 v1.0.11 2006-01-15 21:11:30 -08:00
Junio C Hamano
ee3d299e93 diffcore-break/diffcore-rename: integer overflow.
While reviewing the end user tutorial rewrite by J. Bruce
Fields, I noticed that "git-diff-tree -B -C" did not correctly
break the total rewrite of Documentation/tutorial.txt.  It turns
out that we had integer overflow during the break score
computations.

Cop out by using floating point.  This is not a kernel.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15 21:08:42 -08:00
Junio C Hamano
d425142e2a Merge branches 'jc/checkout', 'jc/format-patch', 'jc/octopus', 'jc/sb' and 'jc/clone' 2006-01-15 01:19:09 -08:00
Junio C Hamano
1aa68d6735 show-branch: --current includes the current branch.
With this, the command includes the current branch to the list
of revs to be shown when it is not given on the command line.
This is handy to use in the configuration file like this:

	[showbranch]
	default = --current
	default = heads/*	; primary branches, not topics under
				; subdirectories

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15 00:04:23 -08:00
Junio C Hamano
ebedc31952 show-branch: make the current branch and merge commits stand out.
This changes the character used to mark the commits that is on the
branch from '+' to '*' for the current branch, to make it stand out.
Also we show '-' for merge commits.

When you have a handful branches with relatively long diversion, it
is easier to see which one is the current branch this way.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15 00:04:23 -08:00
Junio C Hamano
54f9734ec8 Documentation: show-branch.
Describe showbranch.default configuration item and give an example.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-15 00:04:23 -08:00
Junio C Hamano
98efc8f3d8 octopus: allow manual resolve on the last round.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-14 17:21:38 -08:00
Junio C Hamano
36383a3df3 [PATCH] format-patch: always --mbox and show sane Date:
Make --mbox, --author, and --date options a no-op, and always
use --mbox output, and rewrite the commit log formatting in
Perl.  This makes it easier to output Date: header in RFC 2822
format, so do that as well.

Inspiration for this patch came from Andreas Ericsson's earlier
patch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-14 17:21:34 -08:00
Junio C Hamano
8a1a120c55 clone: --naked option.
The new option --naked is to help creating a naked repository
for public consumption.

	$ git clone -l -s --naked \
	  /pub/scm/.../torvalds/linux-2.6.git subproj-2.6.git

is equivalent to this sequence:

	$ git clone -l -s -n /pub/scm/.../torvalds/linux-2.6.git temp
	$ mv temp/.git subproj-2.6.git
	$ rmdir temp

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-14 16:00:32 -08:00
Junio C Hamano
980d8ce551 [PATCH] checkout: show dirty state upon switching branches.
This shows your working file state when you switch branches.  As
a side effect, "git checkout" without any branch name (i.e. stay
on the current branch) becomes a more concise shorthand for the
"git status" command.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-14 13:18:28 -08:00
Junio C Hamano
9e9b26751a git-push: avoid falling back on pushing "matching" refs.
The underlying "git send-pack remote.host:path" pushes all the
matching refs that both local and remote have, and "git push"
blindly inherits this property.  Which probably was a mistake.

A typical cloned repository (e.g. a subsystem repository cloned
from Linus repository) has at least two branches, "master" to
keep the subsystem and "origin" that records tip of Linus
"master" when the repository was cloned.  If this is the public
repository for the subsystem, then subsystem developers would
clone it, and then cloned ones have "master" and "origin".  When
developers use this public subsystem repository as a shared
repository, pushing into it via "git push subsys:/path/name"
would try to push the matching refs, "master" and "origin", from
the developers' repositories.  The "origin" in the public shared
repository does not have much relevance, yet pushing into
"origin" would cause "not a fast forward" checks to be
triggered.  Arguably "git push subsys:/path/name master" would
work it around, but having them to say it explicitly to avoid
pushing into "origin" as well is bad.

This commit requires you to give at least one refspec to
git-push.  You could "give" by either:

 (1) Listing the refspec(s) explicitly on the command line.
     E.g. "git push subsys:/path/name master".

 (2) Using --all or --tags on the command line.
     E.g. "git push --tags subsys:/path/name".

 (3) Using a $GIT_DIR/remotes shorthand with 'Push: refspec'
     line in it.

Unlike pull that can happen pretty much promiscuously, people
will push into the same set of a limited number of remote
repositories repeatedly over the life of the project, so it is
reasonable to assume they would want to keep a $GIT_DIR/remotes/
entry for those repositories even only to save typing the URL,
so keeping the default 'Push: refspec' line in such is a
sensible thing to do.

It was suggested to further fall back on pushing the current
branch, but this commit does not implement it.  If developers
adopt topic branch workflow, pushing to public while on a topic
branch by mistake would expose the topic branch to the public
repository.  Not falling back to the current branch prevents
that mistake from happening.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-13 16:53:35 -08:00
Junio C Hamano
1be0659efc checkout: merge local modifications while switching branches.
* Instead of going interactive, introduce a command line switch
   '-m' to allow merging changes when normal two-way merge by
   read-tree prevents branch switching.

 * Leave the unmerged stages intact if automerge fails, but
   reset index entries of cleanly merged paths to that of the
   new branch, so that "git diff" (not "git diff HEAD") would
   show the local modifications.

 * Swap the order of trees in read-tree three-way merge used in
   the fallback, so that `git diff` to show the conflicts become
   more natural.

 * Describe the new option and give more examples in the documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-13 16:52:37 -08:00