summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* commit: allow --amend to reuse message from another commitJunio C Hamano2007-12-142-1/+18
| | | | | | | | | | | | | | | | | After tentatively applying a patch from a contributor, you can get a replacement patch with corrected code and unusable commit log message. In such a case, this sequence ought to give you an editor based on the message in the earlier commit, to let you describe an incremental improvement: git reset --hard HEAD^ ;# discard the earlier one git am <corrected-patch git commit --amend -c HEAD@{1} Unfortunately, --amend insisted reusing the message from the commit being amended, ignoring the -c option. This corrects it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-svn: handle our top-level path being deleted and later re-addedEric Wong2007-12-142-0/+53
| | | | | | | | | | | | | | | | | | | | | | Previously, git-svn would ignore cases where the path we're tracking is removed from the repository. This was to prevent heads with follow-parent from ending up with a tree full of empty revisions (and thus breaking rename detection). The previous behavior is fine until the path we're tracking is re-added later on, leading to the old files being merged in with the new files in the directory (because the old files were never marked as deleted) We will now only remove all the old files locally that were deleted remotely iff we detect the directory we're in is being created from scratch. Thanks for Marcus D. Hanwell for the bug report and Peter Baumann for the analysis. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* cvsexportcommit: fix massive commitsJeff King2007-12-141-14/+23
| | | | | | | | | | | | | | | | | | | | | Because we feed the changed filenames to CVS on the command line, it was possible for massive commits to overflow the system exec limits. Instead, we now do an xargs-like split of the arguments. This means that we lose some of the atomicity of calling CVS in one shot. Since CVS commits are not atomic, but the CVS protocol is, the possible effects of this are not clear; however, since CVS doesn't provide a different interface, this is our only option for large commits (short of writing a CVS client library). The argument size limit is arbitrarily set to 64kB. This should be high enough to trigger only in rare cases where it is necessary, so normal-sized commits are not affected by the atomicity change. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: describe pack idx v2linux@horizon.com2007-12-141-33/+61
| | | | | | | | Lifted from the log message of c553ca25bd60dc9fd50b8bc7bd329601b81cee66 (pack-objects: learn about pack index version 2). Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* xdiff tail trimming: use correct type.Junio C Hamano2007-12-141-3/+2
| | | | | | | | | Inside xdiff library, the number of context lines is represented in long, not int. Noticed by Peter Baumann. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* xdi_diff: trim common trailing linesJunio C Hamano2007-12-131-1/+33
| | | | | | | | | | | | | This implements earlier Linus's optimization to trim common lines at the end before passing them down to low level xdiff interface for all of our xdiff users. We could later enhance this to also trim common leading lines, but that would need tweaking the output function to add the number of lines trimmed at the beginning to line numbers that appear in the hunk headers. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* xdl_diff: identify call sites.Junio C Hamano2007-12-138-10/+16
| | | | | | | | This inserts a new function xdi_diff() that currently does not do anything other than calling the underlying xdl_diff() to the callchain of current callers of xdl_diff() function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* provide advance warning of some future pack default changesNicolas Pitre2007-12-131-0/+11
| | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-svn: unlink internal index files after operationsEric Wong2007-12-131-0/+3
| | | | | | | | | Being git, we can generate these very quickly on the fly as needed, so there's no point in wasting space for these things for large projects. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-svn: expand handling of From: and Signed-off-by:Andy Whitcroft2007-12-131-4/+13
| | | | | | | | | | | | | | | | The current parsing for From: and Signed-off-by: lines handles fully specified names: From: Full Name <email@address> Expand this to include the raw email addresses and straight "names": From: email@address -> email <email@address> From: Full Name -> Full Name <unknown> Signed-off-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix spelling mistakes in user manualShawn Bohrer2007-12-131-3/+3
| | | | | | Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Acked-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-commit: squelch needless message during an empty mergeJunio C Hamano2007-12-123-4/+8
| | | | | | | | | | | | | | | | | | | | | | | When recording a merge that conflicted and ends up in no changes after manual resolution, commit callchain looked like this: cmd_commit() -> prepare_log_message() -> run_status() -> wt_status_print() This invocation of run_status() is asked to find out if there is a committable change, but it unconditionally gave instructions such as "use git-add" at the same time. When in merge, we do allow an empty change to be recorded, so after showing this message the code still went ahead and made a commit. This introduces "nowarn" parameter to run_status() to avoid these useless messages. If we are not allowed to create an empty commit, we already call run_status() again in the original codepath, and the message will be shown from that call anyway. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* GIT 1.5.4-rc0v1.5.4-rc0Junio C Hamano2007-12-122-2/+17
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'cc/help'Junio C Hamano2007-12-1212-57/+340
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cc/help: RPM spec: Adjust htmldir git-help -w: do not require to be in git repository git.spec.in: remove python_path Documentation: rename git.texi to user-manual.texi Add git-browse-help to .gitignore git-help -i: show info documentation from matching version of git git-help -i: invoke info with document and node name Documentation: add gitman.info target Documentation: describe -w/--web option to "git-help". Use {web,instaweb,help}.browser config options. git-help: add -w|--web option to display html man page in a browser. Documentation: describe -i/--info option to "git-help" git-help: add -i|--info option to display info page.
| * RPM spec: Adjust htmldirJunio C Hamano2007-12-121-4/+8
| | | | | | | | | | | | git help -w needs to know the right location of installed pages. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-help -w: do not require to be in git repositoryJunio C Hamano2007-12-122-24/+34
| | | | | | | | | | | | | | | | | | | | The users used to be able to say "git help cat-file" from anywhere, but the browse-help script insisted to be in a git repository, which caused "git help -w cat-file" to barf outside. Correct it. While at it, remove leftover debugging "echo". Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git.spec.in: remove python_pathJunio C Hamano2007-12-121-3/+0
| | | | | | | | | | | | We do not depend on python nor customize scripts for it anymore. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Documentation: rename git.texi to user-manual.texiJunio C Hamano2007-12-121-3/+3
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Add git-browse-help to .gitignoreJeff King2007-12-101-0/+1
| | | | | | | | | | Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-help -i: show info documentation from matching version of gitJunio C Hamano2007-12-102-1/+6
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-help -i: invoke info with document and node nameJunio C Hamano2007-12-101-1/+1
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Documentation: add gitman.info targetJunio C Hamano2007-12-102-8/+66
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Merge branch 'master' into cc/helpJunio C Hamano2007-12-10116-2054/+5116
| |\ | | | | | | | | | | | | This is to primarily pull in MANPATH tweak and help.txt formatting fix from the master branch.
| * | Documentation: describe -w/--web option to "git-help".Christian Couder2007-12-092-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | Also explain that "git instaweb" may use "web.browser" config variable. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Use {web,instaweb,help}.browser config options.Christian Couder2007-12-092-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now "git-instaweb" will try to use the browser configured as "web.browser", if "instaweb.browser" is not set. "git-browse-help" will check first "help.browser" and then "web.browser". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git-help: add -w|--web option to display html man page in a browser.Christian Couder2007-12-094-17/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now when using "git help -w cmd", we will try to show the HTML man page "git-cmd.html" in your prefered web browser. To do that "help.c" code will call a new shell script "git-browse-help". This currently works only if the HTML versions of the man page have been installed in $(htmldir) (typically "/usr/share/doc/git-doc"), so new target to do that is added to "Documentation/Makefile". The browser to use can be configured using the "web.browser" config variable. We try to open a new tab in an existing web browser, if possible. The code in "git-browse-help" is heavily stolen from "git-mergetool" by Theodore Y. Ts'o. Thanks. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Documentation: describe -i/--info option to "git-help"Christian Couder2007-12-032-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Option -i|--info for "git-help" is documented only in the new "git-help.txt" man page, but this new man page is referenced from the "--help" option documentation in the "git.txt" man page. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git-help: add -i|--info option to display info page.Christian Couder2007-12-031-8/+27
| | | | | | | | | | | | | | | | | | | | | "git help --info subcommand" will now call "info git-subcommand". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jc/shortlog-e'Junio C Hamano2007-12-126-22/+37
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/shortlog-e: shortlog: default to HEAD when the standard input is a tty Invert numbers and names in the git-shortlog summary mode. shortlog: document -e option git-shortlog -e: show e-mail address as well
| * | | shortlog: default to HEAD when the standard input is a ttyJunio C Hamano2007-12-115-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of warning the user that it is expecting git log output from the standard input (and waiting for the user to type the log from the keyboard, which is a silly thing to do), default to traverse from HEAD when there is no rev parameter given and the standard input is a tty. This factors out a useful helper "add_head()" from builtin-diff.c to a more appropriate place revision.c while renaming it to more descriptive name add_head_to_pending(), as that is what the function is about. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Invert numbers and names in the git-shortlog summary mode.Pierre Habouzit2007-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also make it `cut` friendly using a tab to separate the numbers and names. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | shortlog: document -e optionJeff King2007-12-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This shows e-mail address in addition to author's name. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | git-shortlog -e: show e-mail address as wellJunio C Hamano2007-12-081-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | This option shows the author's email address next to the name. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ew/svn-rev-db'Junio C Hamano2007-12-123-107/+258
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * ew/svn-rev-db: git-svn: reinstate old rev_db optimization in new rev_map git-svn: replace .rev_db with a more space-efficient .rev_map format
| * | | | git-svn: reinstate old rev_db optimization in new rev_mapEric Wong2007-12-101-14/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reinstates an old optimization in .rev_db which stored the highest revision number we scanned, allowing us to avoid scanning the SVN log for those revisions again in a subsequent invocation. This means the last 24-byte record in a .rev_map file can be a 4-byte SVN revision number with 20-bytes of zeroes representing a non-existent commit. This record can and will be overwritten when a new commit iff the commit is all zeroes. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | git-svn: replace .rev_db with a more space-efficient .rev_map formatEric Wong2007-12-103-110/+218
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrations are done automatically on an as-needed basis when new revisions are to be fetched. Stale remote branches do not get migrated, yet. However, unless you set noMetadata or useSvkProps it's safe to just do: find $GIT_DIR/svn -name '.rev_db*' -print0 | xargs rm -f to purge all the old .rev_db files. The new format is a one-way migration and is NOT compatible with old versions of git-svn. This is the replacement for the rev_db format, which was too big and inefficient for large repositories with a lot of sparse history (mainly tags). The format is this: - 24 bytes for every record, * 4 bytes for the integer representing an SVN revision number * 20 bytes representing the sha1 of a git commit - No empty padding records like the old format - new records are written append-only since SVN revision numbers increase monotonically - lookups on SVN revision number are done via a binary search - Piping the file to xxd(1) -c24 is a good way of dumping it for viewing or editing, should the need ever arise. As with .rev_db, these files are disposable unless noMetadata or useSvmProps is set. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jc/merge-recursive-gitlink'Junio C Hamano2007-12-122-4/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * jc/merge-recursive-gitlink: Support a merge with conflicting gitlink change
| * | | | Support a merge with conflicting gitlink changeJunio C Hamano2007-12-112-4/+10
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge-recursive did not support merging trees that have conflicting changes in submodules they contain, and died. Support it exactly the same way as how it handles conflicting symbolic link changes --- mark it as a conflict, take the tentative result from the current side, and letting the caller resolve the conflict, without dying in merge_file() function. Also reword the error message issued when merge_file() has to die because it sees a tree entry of type it does not support yet. [jc: fixed up initial draft by Finn Arne Gangstad] Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jk/svn-color'Junio C Hamano2007-12-125-37/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * jk/svn-color: git-svn: get color config from --get-colorbool Support GIT_PAGER_IN_USE environment variable
| * | | | git-svn: get color config from --get-colorboolJeff King2007-12-111-33/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-config recently learned a --get-colorbool option. By using it, we will get the same color=auto behavior that other git commands have. Specifically, this fixes the case where "color.diff = true" meant "always" in git-svn, but "auto" in other programs. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Support GIT_PAGER_IN_USE environment variableJeff King2007-12-114-4/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deciding whether or not to turn on automatic color support, git_config_colorbool checks whether stdout is a tty. However, because we run a pager, if stdout is not a tty, we must check whether it is because we started the pager. This used to be done by checking the pager_in_use variable. This variable was set only when the git program being run started the pager; there was no way for an external program running git indicate that it had already started a pager. This patch allows a program to set GIT_PAGER_IN_USE to a true value to indicate that even though stdout is not a tty, it is because a pager is being used. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | disable t9119 for now.Junio C Hamano2007-12-121-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix "diff --check" whitespace detectionWincent Colaiuta2007-12-122-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "diff --check" would only detect spaces before tabs if a tab was the last character in the leading indent. Fix that and add a test case to make sure the bug doesn't regress in the future. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | git-diff --numstat -z: make it machine readableJunio C Hamano2007-12-122-32/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "-z" format is all about machine parsability, but showing renamed paths as "common/{a => b}/suffix" makes it impossible. The scripts would never have successfully parsed "--numstat -z -M" in the old format. This fixes the output format in a (hopefully minimally) backward incompatible way. * The output without -z is not changed. This has given a good way for humans to view added and deleted lines separately, and showing the path in combined, shorter way would preserve readability. * The output with -z is unchanged for paths that do not involve renames. Existing scripts that do not pass -M/-C are not affected at all. * The output with -z for a renamed path is shown in a format that can easily be distinguished from an unrenamed path. This is based on Jakub Narebski's patch. Bugs and documentation typos are mine. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Documentation: minor grammar fix for "git apply"Wincent Colaiuta2007-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Use "whitespace" consistentlyWincent Colaiuta2007-12-123-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency, change "white space" and "whitespaces" to "whitespace", fixing a couple of adjacent grammar problems in the docs. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix XML parser leaks in http-pushMike Hommey2007-12-121-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XML_Parser were never freed. While at it, move the parser initialization to right before it is needed. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix small memory leaks induced by diff_tree_setup_pathsMike Hommey2007-12-123-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run diff_tree_release_paths in the appropriate places, and add a test to avoid NULL dereference. Better safe than sorry. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix git-fast-export for zero-sized blobsAlex Riesen2007-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writing 1 elements of size 0-byte successfully will cause fwrite(3) to return 0, and flagging it as error is a mistake. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix clone not to ignore depth when performing a local cloneCharles Bailey2007-12-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When git-clone detects that it can perform a local clone it follows a path that silently ignores the depth parameter. Presumably if the user explicitly requests a shallow clone they have a reason to prefer a space efficient clone of just the recent history so bypass the local magic if the user specifies the depth parameter. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>