summaryrefslogtreecommitdiff
path: root/builtin
AgeCommit message (Collapse)AuthorFilesLines
2010-12-01Merge branch 'maint'Libravatar Junio C Hamano1-1/+2
* maint: add: introduce add.ignoreerrors synonym for add.ignore-errors bash: Match lightweight tags in prompt git-commit.txt: (synopsis): move -i and -o before "--"
2010-12-01Merge branch 'maint-1.7.2' into maintLibravatar Junio C Hamano1-1/+2
* maint-1.7.2: add: introduce add.ignoreerrors synonym for add.ignore-errors bash: Match lightweight tags in prompt git-commit.txt: (synopsis): move -i and -o before "--"
2010-12-01Merge branch 'maint-1.7.1' into maint-1.7.2Libravatar Junio C Hamano1-1/+2
* maint-1.7.1: add: introduce add.ignoreerrors synonym for add.ignore-errors
2010-12-01Merge branch 'maint-1.7.0' into maint-1.7.1Libravatar Junio C Hamano1-1/+2
* maint-1.7.0: add: introduce add.ignoreerrors synonym for add.ignore-errors
2010-11-29Merge branch 'jl/clone-recurse-sm-synonym'Libravatar Junio C Hamano1-0/+2
* jl/clone-recurse-sm-synonym: clone: Add the --recurse-submodules option as alias for --recursive
2010-11-29Merge branch 'jn/cherry-pick-refresh-index'Libravatar Junio C Hamano1-2/+16
* jn/cherry-pick-refresh-index: cherry-pick/revert: transparently refresh index
2010-11-29Merge branch 'np/pack-broken-boundary'Libravatar Junio C Hamano1-1/+15
* np/pack-broken-boundary: make pack-objects a bit more resilient to repo corruption
2010-11-29Merge branch 'fc/apply-p2-get-header-name'Libravatar Junio C Hamano1-14/+14
* fc/apply-p2-get-header-name: test: git-apply -p2 rename/chmod only Fix git-apply with -p greater than 1
2010-11-29Merge branch 'kb/blame-author-email'Libravatar Junio C Hamano1-6/+22
* kb/blame-author-email: blame: Add option to show author email instead of name Conflicts: t/annotate-tests.sh
2010-11-29Merge branch 'ak/apply-non-git-epoch'Libravatar Junio C Hamano1-6/+29
* ak/apply-non-git-epoch: apply: handle patches with funny filename and colon in timezone apply: Recognize epoch timestamps with : in the timezone
2010-11-24Merge branch 'cb/maint-orphan-merge-noclobber'Libravatar Junio C Hamano1-1/+19
* cb/maint-orphan-merge-noclobber: do not overwrite untracked during merge from unborn branch
2010-11-24Merge branch 'rs/opt-help-text'Libravatar Junio C Hamano26-49/+48
* rs/opt-help-text: verify-tag: document --verbose branch: improve --verbose description archive: improve --verbose description Describe various forms of "be quiet" using OPT__QUIET add OPT__FORCE add description parameter to OPT__QUIET add description parameter to OPT__DRY_RUN add description parameter to OPT__VERBOSE
2010-11-24Merge branch 'mm/phrase-remote-tracking'Libravatar Junio C Hamano5-12/+12
* mm/phrase-remote-tracking: git-branch.txt: mention --set-upstream as a way to change upstream configuration user-manual: remote-tracking can be checked out, with detached HEAD user-manual.txt: explain better the remote(-tracking) branch terms Change incorrect "remote branch" to "remote tracking branch" in C code Change incorrect uses of "remote branch" meaning "remote-tracking" Change "tracking branch" to "remote-tracking branch" everyday.txt: change "tracking branch" to "remote-tracking branch" Change remote tracking to remote-tracking in non-trivial places Replace "remote tracking" with "remote-tracking" Better "Changed but not updated" message in git-status
2010-11-24Merge branch 'jk/maint-apply-no-binary' into maintLibravatar Junio C Hamano1-0/+6
* jk/maint-apply-no-binary: apply: don't segfault on binary files with missing data
2010-11-24Merge branch 'jn/send-pack-error' into maintLibravatar Junio C Hamano1-1/+1
* jn/send-pack-error: send-pack: avoid redundant "pack-objects died with strange error"
2010-11-24Merge branch 'jk/maint-rev-list-nul' into maintLibravatar Junio C Hamano1-2/+4
* jk/maint-rev-list-nul: rev-list: handle %x00 NUL in user format
2010-11-24Merge branch 'bc/fix-cherry-pick-root' into maintLibravatar Junio C Hamano1-1/+1
* bc/fix-cherry-pick-root: builtin/revert.c: don't dereference a NULL pointer
2010-11-17Merge branch 'jk/maint-apply-no-binary'Libravatar Junio C Hamano1-0/+6
* jk/maint-apply-no-binary: apply: don't segfault on binary files with missing data
2010-11-17Merge branch 'jk/push-progress'Libravatar Junio C Hamano1-0/+3
* jk/push-progress: push: pass --progress down to git-pack-objects t5523-push-upstream: test progress messages t5523-push-upstream: add function to ensure fresh upstream repo test_terminal: ensure redirections work reliably test_terminal: catch use without TTY prerequisite test-lib: allow test code to check the list of declared prerequisites tests: test terminal output to both stdout and stderr tests: factor out terminal handling from t7006
2010-11-17Merge branch 'tr/maint-merge-file-subdir'Libravatar Junio C Hamano1-1/+6
* tr/maint-merge-file-subdir: merge-file: correctly find files when called in subdir prefix_filename(): safely handle the case where pfx_len=0
2010-11-17Merge branch 'jn/send-pack-error'Libravatar Junio C Hamano1-1/+1
* jn/send-pack-error: send-pack: avoid redundant "pack-objects died with strange error"
2010-11-17Merge branch 'jk/maint-rev-list-nul'Libravatar Junio C Hamano1-2/+4
* jk/maint-rev-list-nul: rev-list: handle %x00 NUL in user format
2010-11-17Merge branch 'ks/no-textconv-symlink'Libravatar Junio C Hamano2-12/+23
* ks/no-textconv-symlink: blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664'' blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
2010-11-17Merge branch 'maint'Libravatar Junio C Hamano1-4/+4
* maint: clean: remove redundant variable baselen Documentation/git-pull: clarify configuration Document that rev-list --graph triggers parent rewriting. clean: avoid quoting twice document sigchain api Keep together options controlling the behaviour of diffcore-rename. t3402: test "rebase -s<strategy> -X<opt>"
2010-11-17clean: remove redundant variable baselenLibravatar Nguyễn Thái Ngọc Duy1-2/+2
baselen used to be the result of common_prefix() when it was made builtin. Since 1d8842d (Add 'fill_directory()' helper function for directory traversal - 2009-05-14), its value will always be zero. Remove it because it's no longer variable. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-16clean: avoid quoting twiceLibravatar Nguyễn Thái Ngọc Duy1-2/+2
qname is the result of quote_path_relative(), which does quote_c_style_counted() internally. Remove the hard-coded quotes. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-15verify-tag: document --verboseLibravatar René Scharfe1-1/+1
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-15branch: improve --verbose descriptionLibravatar René Scharfe1-1/+2
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-15Describe various forms of "be quiet" using OPT__QUIETLibravatar Jonathan Nieder10-11/+14
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-15add OPT__FORCELibravatar René Scharfe11-15/+12
Add OPT__FORCE as a helper macro in the same spirit as OPT__VERBOSE et.al. to simplify defining -f/--force options. Signed-off-by: Rene Scharfe <rene.scharfe@lstfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-15add description parameter to OPT__QUIETLibravatar René Scharfe11-12/+12
Allows better help text to be defined than "be quiet". Also make use of the macro in a place that already had a different description. No object code changes intended. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-15add description parameter to OPT__DRY_RUNLibravatar René Scharfe7-9/+7
Allows better help text to be defined than "dry run". Also make use of the macro in places that already had a different description. No object code changes intended. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-15add description parameter to OPT__VERBOSELibravatar René Scharfe12-13/+13
Allows better help text to be defined than "be verbose". Also make use of the macro in places that already had a different description. No object code changes intended. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-15do not overwrite untracked during merge from unborn branchLibravatar Clemens Buchacher1-1/+19
In case HEAD does not point to a valid commit yet, merge is implemented as a hard reset. This will cause untracked files to be overwritten. Instead, assume the empty tree for HEAD and do a regular merge. An untracked file will cause the merge to abort and do nothing. If no conflicting files are present, the merge will have the same effect as a hard reset. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-10cherry-pick/revert: transparently refresh indexLibravatar Jonathan Nieder1-2/+16
A stat-dirty index is not a detail that ought to concern the operator of porcelain such as "git cherry-pick". Without this change, a cherry-pick after copying a worktree with rsync errors out with a misleading message. $ git cherry-pick build/top error: Your local changes to 'file.h' would be overwritten by merge. Aborting. Please, commit your changes or stash them before you can merge. Noticed-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-10apply: handle patches with funny filename and colon in timezoneLibravatar Jonathan Nieder1-2/+22
Some patches have a timezone formatted like '-08:00' instead of '-0800' in their ---/+++ lines (e.g. http://lwn.net/Articles/131729/). Take this into account when searching for the start of the timezone (which is the end of the filename). This does not actually affect the outcome of patching unless (1) a file being patched has a non-' ' whitespace character (e.g., tab) in its filename, or (2) the patch is whitespace-damaged, so the tab between filename and timestamp has been replaced with spaces. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-05Fix git-apply with -p greater than 1Libravatar Federico Cuello1-14/+14
Fix the case when the patch is a rename or mode-change only and -p is used with a value greater than one. The git_header_name function did not remove more than one path component. Signed-off-by: Federico Cuello <fedux@lugmen.org.ar> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-05clone: Add the --recurse-submodules option as alias for --recursiveLibravatar Jens Lehmann1-0/+2
Since 1.6.5 "git clone" honors the --recursive option to recursively check out submodules too. As this option can easily be misinterpreted when it is added to other commands like "git grep", add the new --recurse-submodules option as an alias for --recursive so the same option can be used for all commands recursing into submodules. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-03Change incorrect "remote branch" to "remote tracking branch" in C codeLibravatar Matthieu Moy4-8/+8
(Just like we did for documentation already) In the process, we change "non-remote branch" to "branch outside the refs/remotes/ hierarchy" to avoid the ugly "non-remote-tracking branch". The new formulation actually corresponds to how the code detects this case (i.e. prefixcmp(refname, "refs/remotes")). Also, we use 'remote-tracking branch' in generated merge messages (by merge an fmt-merge-msg). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-03Change "tracking branch" to "remote-tracking branch"Libravatar Matthieu Moy2-3/+3
One more step towards consistancy. We change the documentation and the C code in a single patch, since the only instances in the C code are in comment and usage strings. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-03Replace "remote tracking" with "remote-tracking"Libravatar Matthieu Moy1-1/+1
"remote-tracking" branch makes it explicit that the branch is "tracking a remote", as opposed to "remote, and tracking something". See discussion in e.g. http://mid.gmane.org/8835ADF9-45E5-4A26-9F7F-A72ECC065BB2@gmail.com for more details. This patch is a straightforward application of perl -pi -e 's/remote tracking branch/remote-tracking branch/' except in the RelNotes directory. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-29apply: don't segfault on binary files with missing dataLibravatar Jeff King1-0/+6
Usually when applying a binary diff generated without --binary, it will be rejected early, as we don't even have the full sha1 of the pre- and post-images. However, if the diff is generated with --full-index (but not --binary), then we will actually try to apply it. If we have the postimage blob, then we can take a shortcut and never even look at the binary diff at all (e.g., this can happen when rebasing changes within a repository). If we don't have the postimage blob, though, we try to look at the actual fragments, of which there are none, and get a segfault. This patch checks explicitly for that case and complains to the user instead of segfaulting. We need to keep the check at a low level so that the "shortcut" case above continues to work. We also add a test that demonstrates the segfault. While we're at it, let's also explicitly test the shortcut case. Reported-by: Rafaël Carré <rafael.carre@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-26Merge branch 'jf/merge-ignore-ws'Libravatar Junio C Hamano3-32/+5
* jf/merge-ignore-ws: merge-recursive: options to ignore whitespace changes merge-recursive --patience ll-merge: replace flag argument with options struct merge-recursive: expose merge options for builtin merge
2010-10-22make pack-objects a bit more resilient to repo corruptionLibravatar Nicolas Pitre1-1/+15
Right now, packing valid objects could fail when creating a thin pack simply because a pack edge object used as a preferred base is corrupted. Since preferred base objects are not strictly needed to produce a valid pack, let's not consider the inability to read them as a fatal error. Delta compression may well be attempted against other objects in the search window. To avoid warning storms (we are in the inner loop of the delta search window) a warning is emitted only on the first occurrence. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-21Sync with 1.7.3.2Libravatar Junio C Hamano14-22/+22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-19blame: Add option to show author email instead of nameLibravatar Kevin Ballard1-6/+22
Add a new option -e (or --show-email) to git-blame that will display the author's email instead of name on each line. This option works for both git-blame and git-annotate. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-18push: pass --progress down to git-pack-objectsLibravatar Jeff King1-0/+3
When pushing via builtin transports (like file://, git://), the underlying transport helper (in this case, git-pack-objects) did not get the --progress option, even if it was passed to git push. Fix this, and update the tests to reflect this. Note that according to the git-pack-objects documentation, we can safely apply the usual --progress semantics for the transport commands like clone and fetch (and for pushing over other smart transports). Reported-by: Chase Brammer <cbrammer@gmail.com> Helped-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-18send-pack: avoid redundant "pack-objects died with strange error"Libravatar Jonathan Nieder1-1/+1
Saying "pack-objects died with strange error" after "pack-objects died of signal 13" seems kind of redundant. The latter message was introduced when the run-command API changed to report abnormal exits on behalf of the caller (v1.6.5-rc0~86^2~5, 2009-07-04). Similarly, after a controlled pack-objects failure (detectable as a normal exit with nonzero status), a "died with strange error" message would be redundant next to the message from pack-objects itself. So leave off the "strange error" messages. The result should look something like this: $ git push sf master Counting objects: 21542, done. Compressing objects: 100% (4179/4179), done. fatal: Unable to create temporary file: Permission denied error: pack-objects died of signal 13 error: failed to push some refs to 'ssh://sf.net/gitroot/project/project' $ Or in the "controlled exit" case (contrived example): [...] fatal: delta size changed error: failed to push some refs to 'ssh://example.com/foo/bar' $ Improved-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-18merge-file: correctly find files when called in subdirLibravatar Thomas Rast1-1/+6
Since b541248 (merge.conflictstyle: choose between "merge" and "diff3 -m" styles, 2008-08-29), git-merge-file uses setup_directory_gently(), thus cd'ing around to find any possible config files to use. This broke merge-file when it is called from within a subdirectory of a repository, and the arguments are all relative paths. Fix by prepending the prefix, as passed down from the main git setup code, if there is any. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-10-13rev-list: handle %x00 NUL in user formatLibravatar Jeff King1-2/+4
The code paths for showing commits in "git log" and "git rev-list --graph" correctly handle embedded NULs by looking only at the resulting strbuf's length, and never treating it as a C string. The code path for regular rev-list, however, used printf("%s"), which resulted in truncated output. This patch uses fwrite instead, like the --graph code path. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>