summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rev-parse: --abbrev option.Junio C Hamano2006-01-281-0/+14
| | | | | | | The new option behaves just like --verify, but outputs an abbreviated object name that is unique within the repository. Signed-off-by: Junio C Hamano <junkio@cox.net>
* abbrev cleanup: use symbolic constantsJunio C Hamano2006-01-285-8/+7
| | | | | | | | | | The minimum length of abbreviated object name was hardcoded in different places to be 4, risking inconsistencies in the future. Also there were three different "default abbreviation precision". Use two C preprocessor symbols to clean up this mess. Signed-off-by: Junio C Hamano <junkio@cox.net>
* merge: seed the commit message with list of conflicted files.Junio C Hamano2006-01-271-0/+8
| | | | | | | | | | | The files with conflicts need to be hand resolved, and it is a good discipline for the committer to explain which branch was taken and why. Pre-fill the merge message template with the list of conflicted paths to encourage it. This is from Linus. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge fixes up to GIT 1.1.5Junio C Hamano2006-01-271-6/+3
|\ | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * GIT 1.1.5v1.1.5Junio C Hamano2006-01-271-6/+3
| |\ | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| | * GIT 1.0.13v1.0.13Junio C Hamano2006-01-272-7/+4
| | |\ | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| | | * checkout: do not make a temporary copy of symlink target.Junio C Hamano2006-01-271-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the index records an insanely long symbolic link, copying into the temporary would overflow the buffer (noticed by Mark Wooding). Because read_sha1_file() terminates the returned buffer with NUL since late May 2005, there is no reason to copy it anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Add freebsd support in MakefileAlecs King2006-01-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Needs iconv and third party lib/headers are inside /usr/local Signed-off-by: Alecs King <alecsk@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Make GIT-VERSION-GEN tolerate missing git describe command againUwe Zeisberger2006-01-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5c7d3c95 broke that by making the git-describe command part of a pipe. Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Use symbolic name SHORT_NAME_AMBIGUOUS as error return valueUwe Zeisberger2006-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Remove unneeded headerUwe Zeisberger2006-01-261-1/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | git-fetch --upload-pack: disambiguate.Junio C Hamano2006-01-262-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Johannes noticed the recent addition of this new flag inadvertently took over existing --update-head-ok (-u). Require longer abbreviation to this new option which would be needed in a rare setup. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Only use a single parser for tree objectsDaniel Barkalow2006-01-265-46/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes read_tree_recursive and read_tree take a struct tree instead of a buffer. It also move the declaration of read_tree into tree.h (where struct tree is defined), and updates ls-tree and diff-index (the only places that presently use read_tree*()) to use the new versions. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Add compat/unsetenv.c .Jason Riedy2006-01-254-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a (slow) unsetenv() for older systems. Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Run GIT-VERSION-GEN with $(SHELL), not sh.Jason Riedy2006-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alas, not all shells named sh are capable enough to run GIT-VERSION-GEN. Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Fix git-format-patch -s to include a Signed-off-by: line...Eric W. Biederman2006-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the last round of bug fixes the signed-off-by line was still be generated but it was not including a signed-off-by line :( Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | tests: adjust breakage by stricter rev-parseJunio C Hamano2006-01-251-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | git-whatchanged: exit out early on errorsLinus Torvalds2006-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we get an error parsing the arguments, exit. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Make git-rev-list and git-rev-parse argument parsing stricterLinus Torvalds2006-01-252-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you pass it a filename without the "--" marker to separate it from revision information and flags, we now require that the file in question actually exists. This makes mis-typed revision information not be silently just considered a strange filename. With the "--" marker, you can continue to pass in filenames that do not actually exists - useful for querying what happened to a file that you no longer have in the repository. [ All scripts should use the "--" format regardless, to make things unambiguous. So this change should not affect any existing tools ] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| | | |
| \ \ \
| \ \ \
| \ \ \
*---. \ \ \ Merge branches 'jc/clone', 'md/env' and 'mo/path'Junio C Hamano2006-01-257-25/+70
|\ \ \ \ \ \
| | | * | | | git-{fetch,peek-remote} handling of --upload-packMichal Ostrowski2006-01-242-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-peek-remote needs to handle a -u|--upload-pack parameter just like git-fetch (and git-fetch has to pass it on to git-peek-remote). (This is actually a follow-up to my previous git-fetch patch.) Signed-off-by: Michal Ostrowski <mostrows@heater.watson.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| | | * | | | git-fetch: pass --upload-pack to fetch-packMichal Ostrowski2006-01-242-1/+14
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | local push/pull env cleanupMatt Draisey2006-01-251-2/+8
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove environment variables relating to the current repository before execing the 'remote' half of a local push or pull operation [jc: the original from Matt spelled out the environment variable names, which I changed to the preprocessor symbols defined in cache.h. Also it missed GRAFT_ENVIRONMENT.] Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | clone: do not accept more than one -o option.Junio C Hamano2006-01-241-1/+15
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | clone: do not create remotes/origin nor origin branch in a bare repository.Junio C Hamano2006-01-242-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is simply pointless, since no merges will ever happen in such a repository. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | git-clone: PG13 --naked option to --bare.Junio C Hamano2006-01-243-16/+17
|/ / / / | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Don't include ../README in git.txt - make a local copyPavel Roskin2006-01-243-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | sample update-hook: sanely handle a new branch head.Junio C Hamano2006-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | update-hook: Major overhaul (handling tags, mainly).Andreas Ericsson2006-01-241-6/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Documentation: finishing touches to the new tutorial.Junio C Hamano2006-01-223-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Recommend to remove unused `origin` in a shared repository.Junio C Hamano2006-01-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | New tutorialJ. Bruce Fields2006-01-222-1703/+2107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | git-grep: clarification on parameters.Junio C Hamano2006-01-212-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Undef DT_* before redefining them.Junio C Hamano2006-01-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | t4011: "sleep 1" is not enough on FATJunio C Hamano2006-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | DT_UNKNOWN: do not fully trust existence of DT_UNKNOWNJunio C Hamano2006-01-212-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | fsck-objects: support platforms without d_ino in struct dirent.Junio C Hamano2006-01-212-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Makefile: do not assume lack of IPV6 means no sockaddr_storage.Junio C Hamano2006-01-211-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed first by Alex, that the latest Cygwin now properly has sockaddr_storage. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Mention install-doc in INSTALLJ. Bruce Fields2006-01-211-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Document git-ls-files --directoryPetr Baudis2006-01-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the appropriate bit of documentation. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Minor git-reset and git-commit documentation fixesJ. Bruce Fields2006-01-212-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Revert "git-push: avoid falling back on pushing "matching" refs."Junio C Hamano2006-01-211-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | AsciiDoc fixes for the git-svnimport manpageFlorian Weimer2006-01-211-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | update using-topic-branchesLuck, Tony2006-01-201-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Fix generation of "humanish" part of source repoUwe Zeisberger2006-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Disable USE_SYMLINK_HEAD by defaultPavel Roskin2006-01-192-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge fixes up to GIT 1.1.4Junio C Hamano2006-01-192-18/+1
|\ \ \ \ | |/ / /
| * | | GIT 1.1.4v1.1.4Junio C Hamano2006-01-192-18/+1
| |\ \ \ | | |/ /
| | * | GIT 1.0.12v1.0.12Junio C Hamano2006-01-193-19/+2
| | |\ \ | | | |/
| | | * git-fetch-pack: really do not ask for funny refsJohannes Schindelin2006-01-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>