summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-15Merge branch 'jk/maint-commit-amend-only-no-paths'Libravatar Junio C Hamano2-1/+14
"git commit --amend --only --" was meant to allow "Clever" people to rewrite the commit message without making any change even when they have already changes for the next commit added to their index, but it never worked as advertised since it was introduced in 1.3.0 era. * jk/maint-commit-amend-only-no-paths: commit: fix "--amend --only" with no pathspec
2012-07-15Merge branch 'cw/amend-commit-without-message'Libravatar Junio C Hamano2-1/+16
"commit --amend" used to refuse amending a commit with an empty log message, with or without "--allow-empty-message". * cw/amend-commit-without-message: Allow edit of empty message with commit --amend
2012-07-15Merge branch 'jn/makefile-cleanup'Libravatar Junio C Hamano2-102/+131
Tightens dependency rules to avoid unnecessary recompilation, and cleans up our Makefile in general. * jn/makefile-cleanup: Makefile: document ground rules for target-specific dependencies Makefile: move GIT-VERSION-FILE dependencies closer to use Makefile: build instaweb similar to other scripts Makefile: update scripts when build-time parameters change Makefile: do not replace @@GIT_VERSION@@ in shell scripts Makefile: split prefix flags from GIT-CFLAGS Makefile: be silent when only GIT_USER_AGENT changes Makefile: split GIT_USER_AGENT from GIT-CFLAGS Makefile: do not replace @@GIT_USER_AGENT@@ in scripts Makefile: apply dependencies consistently to sparse/asm targets Makefile: do not have git.o depend on common-cmds.h Makefile: fold XDIFF_H and VCSSVN_H into LIB_H Makefile: fold MISC_H into LIB_H Makefile: sort LIB_H list
2012-07-15Merge branch 'ar/clone-honor-umask-at-top'Libravatar Junio C Hamano3-3/+3
A handful of files and directories we create had tighter than necessary permission bits when the user wanted to have group writability (e.g. by setting "umask 002"). * ar/clone-honor-umask-at-top: add: create ADD_EDIT.patch with mode 0666 rerere: make rr-cache fanout directory honor umask Restore umasks influence on the permissions of work tree created by clone
2012-07-15Merge branch 'jc/apply-3way'Libravatar Junio C Hamano4-118/+615
"git apply" learned to wiggle the base version and perform three-way merge when a patch does not exactly apply to the version you have. * jc/apply-3way: apply: tests for the --3way option apply: document --3way option apply: allow rerere() to work on --3way results apply: register conflicted stages to the index apply: --3way with add/add conflict apply: move verify_index_match() higher apply: plug the three-way merge logic in apply: fall back on three-way merge apply: accept -3/--3way command line option apply: move "already exists" logic to check_to_create() apply: move check_to_create_blob() closer to its sole caller apply: further split load_preimage() apply: refactor "previous patch" logic apply: split load_preimage() helper function out apply: factor out checkout_target() helper function apply: refactor read_file_or_gitlink() apply: clear_image() clears things a bit more apply: a bit more comments on PATH_TO_BE_DELETED apply: fix an incomplete comment in check_patch()
2012-07-15Merge branch 'cw/rebase-i-root'Libravatar Junio C Hamano5-17/+74
"git rebase [-i] --root $tip" can now be used to rewrite all the history down to the root. * cw/rebase-i-root: t3404: make test 57 work with dash and others Add tests for rebase -i --root without --onto rebase -i: support --root without --onto
2012-07-15Merge branch 'pw/git-p4-move'Libravatar Junio C Hamano3-40/+72
* pw/git-p4-move: git p4: add support for 'p4 move' in P4Submit git p4: refactor diffOpts calculation
2012-07-13Merge branch 'pw/git-p4-jobs'Libravatar Junio C Hamano4-88/+273
Teach "git p4" to notice "Jobs:" in the log message and relay it to Perforce to trigger its "jobs" support. # By Pete Wyckoff * pw/git-p4-jobs: git p4: notice Jobs lines in git commit messages git p4 test: refactor marshal_dump git p4: remove unused P4Submit interactive setting
2012-07-13Merge branch 'jk/push-delete-ref-error-message'Libravatar Junio C Hamano1-0/+3
The error message from "git push $there :bogo" mentioned we tried and failed to guess what ref is being deleted based on the LHS of the refspec, which we don't. # By Jeff King * jk/push-delete-ref-error-message: push: don't guess at qualifying remote refs on deletion
2012-07-13Sixth batch for 1.7.12Libravatar Junio C Hamano1-0/+33
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-13Merge branch 'jc/refactor-diff-stdin'Libravatar Junio C Hamano4-50/+67
Due to the way "git diff --no-index" is bolted onto by touching the low level code that is shared with the rest of the "git diff" code, even though it has to work in a very different way, any comparison that involves a file "-" at the root level incorrectly tried to read from the standard input. This cleans up the no-index codepath further to remove code that reads from the standard input from the core side, which is never necessary when git is running its usual diff operation. * jc/refactor-diff-stdin: diff-index.c: "git diff" has no need to read blob from the standard input diff-index.c: unify handling of command line paths diff-index.c: do not pretend paths are pathspecs
2012-07-13Merge branch 'tg/ce-namelen'Libravatar Junio C Hamano2-3/+3
Trivially correct clean-up and micro optimization. * tg/ce-namelen: Replace strlen() with ce_namelen()
2012-07-13Merge branch 'tb/sanitize-decomposed-utf-8-pathname'Libravatar Junio C Hamano13-10/+446
Teaches git to normalize pathnames read from readdir(3) and all arguments from the command line into precomposed UTF-8 (assuming that they come as decomposed UTF-8) to work around issues on Mac OS. I think there still are other places that need conversion (e.g. paths that are read from stdin for some commands), but this should be a good first step in the right direction. * tb/sanitize-decomposed-utf-8-pathname: git on Mac OS and precomposed unicode
2012-07-13Merge branch 'mm/mediawiki-tests'Libravatar Junio C Hamano18-26/+2260
* mm/mediawiki-tests: git-remote-mediawiki: be more defensive when requests fail git-remote-mediawiki: more efficient 'pull' in the best case git-remote-mediawiki: extract revision-importing loop to a function git-remote-mediawiki: refactor loop over revision ids git-remote-mediawiki: change return type of get_mw_pages git-remote-mediawiki (t9363): test 'File:' import and export git-remote-mediawiki: support for uploading file in test environment git-remote-mediawiki (t9362): test git-remote-mediawiki with UTF8 characters git-remote-mediawiki (t9361): test git-remote-mediawiki pull and push git-remote-mediawiki (t9360): test git-remote-mediawiki clone git-remote-mediawiki: test environment of git-remote-mediawiki git-remote-mediawiki: scripts to install, delete and clear a MediaWiki
2012-07-13Merge branch 'jn/vcs-svn'Libravatar Junio C Hamano9-43/+31
vcs-svn updates to clean-up compilation, lift 32-bit limitations, etc. * jn/vcs-svn: vcs-svn: allow 64-bit Prop-Content-Length vcs-svn: suppress a signed/unsigned comparison warning vcs-svn: suppress a signed/unsigned comparison warning vcs-svn: suppress signed/unsigned comparison warnings vcs-svn: use strstr instead of memmem vcs-svn: use constcmp instead of prefixcmp vcs-svn: simplify cleanup in apply_one_window vcs-svn: avoid self-assignment in dummy initialization of pre_off vcs-svn: drop no-op reset methods vcs-svn: suppress -Wtype-limits warning vcs-svn: allow import of > 4GiB files vcs-svn: rename check_overflow and its arguments for clarity
2012-07-13Merge branch 'mm/mediawiki-file-attachments'Libravatar Junio C Hamano1-64/+386
"mediawiki" remote helper (in contrib/) learned to handle file attachments. * mm/mediawiki-file-attachments: git-remote-mediawiki: improve support for non-English Wikis git-remote-mediawiki: import "File:" attachments git-remote-mediawiki: split get_mw_pages into smaller functions git-remote-mediawiki: send "File:" attachments to a remote wiki git-remote-mediawiki: don't "use encoding 'utf8';" git-remote-mediawiki: don't compute the diff when getting commit message
2012-07-13Merge branch 'tr/maint-show-walk'Libravatar Junio C Hamano2-0/+94
Fixes "git show"'s auto-walking behaviour, and make it behave just like "git log" does when it walks. * tr/maint-show-walk: show: fix "range implies walking" Demonstrate git-show is broken with ranges
2012-07-13Merge branch 'mz/rebase-no-mbox'Libravatar Junio C Hamano7-36/+66
Teach "am --rebasing" codepath to grab authorship, log message and the patch text directly out of existing commits. This will help rebasing commits that have confusing "diff" output in their log messages. * mz/rebase-no-mbox: am: don't call mailinfo if $rebasing am --rebasing: get patch body from commit, not from mailbox rebase --root: print usage on too many args rebase: don't source git-sh-setup twice
2012-07-12git p4: add support for 'p4 move' in P4SubmitLibravatar Gary Gibbons2-16/+34
For -M option (detectRenames) in P4Submit, use 'p4 move' rather than 'p4 integrate'. Check Perforce server for exisitence of 'p4 move' and use it if present, otherwise revert to 'p4 integrate'. [pw: wildcard-encode src/dest, add/update tests, tweak code] Signed-off-by: Gary Gibbons <ggibbons@perforce.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-11Reduce draft release notes to 1.7.12Libravatar Junio C Hamano1-61/+0
Many "fixes since 1.7.11" items are now in the maintenance track Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-11Sync with 1.7.11.2Libravatar Junio C Hamano2-1/+55
2012-07-11Git 1.7.11.2Libravatar Junio C Hamano4-3/+57
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-11Merge branch 'jc/maint-blame-unique-abbrev' into maintLibravatar Junio C Hamano1-4/+21
"git blame" did not try to make sure that the abbreviated commit object names in its output are unique. * jc/maint-blame-unique-abbrev: blame: compute abbreviation width that ensures uniqueness
2012-07-11Merge branch 'rj/platform-pread-may-be-thread-unsafe' into maintLibravatar Junio C Hamano2-2/+10
On Cygwin, the platform pread(2) is not thread safe, just like our own compat/ emulation, and cannot be used in the index-pack program. Makefile variable NO_THREAD_SAFE_PREAD can be defined to avoid use of this function in a threaded program. * rj/platform-pread-may-be-thread-unsafe: index-pack: Disable threading on cygwin
2012-07-11Merge branch 'th/diff-no-index-fixes' into maintLibravatar Junio C Hamano5-24/+112
"git diff --no-index" did not correctly handle relative paths and did not correctly give exit codes when run under "--quiet" option. * th/diff-no-index-fixes: diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changes diff: handle relative paths in no-index
2012-07-11Merge branch 'nd/clone-single-fix' into maintLibravatar Junio C Hamano2-3/+11
"git clone --single-branch" to clone a single branch did not limit the cloning to the specified branch. * nd/clone-single-fix: clone: fix ref selection in --single-branch --branch=xxx
2012-07-11Merge branch 'jc/rev-list-simplify-merges-first-parent' into maintLibravatar Junio C Hamano1-12/+29
When "git log" gets "--simplify-merges/by-decoration" together with "--first-parent", the combination of these options makes the simplification logic to use in-core commit objects that haven't been examined for relevance, either producing incorrect result or taking too long to produce any output. Teach the simplification logic to ignore commits that the first-parent traversal logic ignored when both are in effect to work around the issue. * jc/rev-list-simplify-merges-first-parent: revision: ignore side parents while running simplify-merges revision: note the lack of free() in simplify_merges() revision: "simplify" options imply topo-order sort
2012-07-11Merge branch 'hv/submodule-update-nuke-submodules' into maintLibravatar Junio C Hamano1-6/+0
"git add" allows adding a regular file to the path where a submodule used to exist, but "git update-index" did not allow an equivalent operation to Porcelain writers. * hv/submodule-update-nuke-submodules: update-index: allow overwriting existing submodule index entries
2012-07-11Merge branch 'jk/diff-no-index-pager' into maintLibravatar Junio C Hamano3-15/+22
"git diff --no-index" did not work with pagers correctly. * jk/diff-no-index-pager: do not run pager with diff --no-index --quiet fix pager.diff with diff --no-index
2012-07-11Merge branch 'mm/verify-filename-fix' into maintLibravatar Junio C Hamano8-10/+44
"git diff COPYING HEAD:COPYING" gave a nonsense error message that claimed that the treeish HEAD did not have COPYING in it. * mm/verify-filename-fix: verify_filename(): ask the caller to chose the kind of diagnosis sha1_name: do not trigger detailed diagnosis for file arguments
2012-07-11Merge branch 'cn/cherry-pick-range-docs' into maintLibravatar Junio C Hamano2-1/+13
The documentation for "git cherry-pick A B..C" was misleading. * cn/cherry-pick-range-docs: git-cherry-pick.txt: clarify the use of revision range notation Documentation: --no-walk is no-op if range is specified
2012-07-11Merge branch 'jc/ustar-checksum-is-unsigned' into maintLibravatar Junio C Hamano1-3/+3
"git archive" incorrectly computed the header checksum; the symptom was observed only when using pathnames with hi-bit set. * jc/ustar-checksum-is-unsigned: archive: ustar header checksum is computed unsigned
2012-07-11Merge branch 'jc/bundle-complete-notice' into maintLibravatar Junio C Hamano1-6/+10
Running "git bundle verify" on a bundle that records a complete history said "it requires these 0 commits". * jc/bundle-complete-notice: tweak "bundle verify" of a complete history
2012-07-11Merge branch 'jc/ls-files-i-dir' into maintLibravatar Junio C Hamano6-10/+109
"git ls-files --exclude=t -i" did not consider anything under t/ as excluded, as it did not pay attention to exclusion of leading paths while walking the index. Other two users of excluded() are also updated. * jc/ls-files-i-dir: dir.c: make excluded() file scope static unpack-trees.c: use path_excluded() in check_ok_to_remove() builtin/add.c: use path_excluded() path_excluded(): update API to less cache-entry centric ls-files -i: micro-optimize path_excluded() ls-files -i: pay attention to exclusion of leading paths
2012-07-11Merge branch 'jc/request-pull-match-tagname' into maintLibravatar Junio C Hamano1-7/+22
"git request-pull $url dev" when the tip of "dev" branch was tagged with "ext4-for-linus" used the contents from the tag in the output but still asked the "dev" branch to be pulled, not the tag. * jc/request-pull-match-tagname: request-pull: really favor a matching tag
2012-07-10commit: fix "--amend --only" with no pathspecLibravatar Jeff King2-1/+14
When we do not have any pathspec, we typically disallow an explicit "--only", because it makes no sense (your commit would, by definition, be empty). But since 6a74642 (git-commit --amend: two fixes., 2006-04-20), we have allowed "--amend --only" with the intent that it would amend the commit, ignoring any contents staged in the index. However, while that commit allowed the combination, we never actually implemented the logic to make it work. The current code notices that we have no pathspec and assumes we want to do an as-is commit (i.e., the "--only" is ignored). Instead, we must make sure to follow the partial-commit code-path. We also need to tweak the list_paths function to handle a NULL pathspec. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: tests for the --3way optionLibravatar Junio C Hamano1-0/+54
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09add: create ADD_EDIT.patch with mode 0666Libravatar Jeff King1-1/+1
We should be letting the user's umask take care of restricting permissions. Even though this is a temporary file and probably nobody would notice, this brings us in line with other temporary file creations in git (e.g., choosing "e"dit from git-add--interactive). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09rerere: make rr-cache fanout directory honor umaskLibravatar Junio C Hamano1-1/+1
This is the last remaining call to mkdir(2) that restricts the permission bits by passing 0755. Just use the same mkdir_in_gitdir() used to create the leaf directories. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: document --3way optionLibravatar Junio C Hamano1-1/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: allow rerere() to work on --3way resultsLibravatar Junio C Hamano2-0/+28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: register conflicted stages to the indexLibravatar Junio C Hamano2-6/+138
Now we have all the necessary logic to fall back on three-way merge when the patch does not cleanly apply, insert the conflicted entries to the index as appropriate. This obviously triggers only when the "--index" option is used. When we fall back to three-way merge and some of the merges fail, just like the case where the "--reject" option was specified and we had to write some "*.rej" files out for unapplicable patches, exit the command with non-zero status without showing the diffstat and summary. Otherwise they would make the list of problematic paths scroll off the display. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: --3way with add/add conflictLibravatar Junio C Hamano1-8/+62
When a patch wants to create a path, but we already have it in our current state, pretend as if the patch and we independently added the same path and cause add/add conflict, so that the user can resolve it just like "git merge" in the same situation. For that purpose, implement load_current() in terms of the load_patch_target() helper introduced earlier to read the current contents from the path given by patch->new_name (patch->old_name is NULL for a creation patch). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: move verify_index_match() higherLibravatar Junio C Hamano1-10/+10
We will be adding another caller of this function in a later patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: plug the three-way merge logic inLibravatar Junio C Hamano1-3/+50
When a patch does not apply to what we have, but we know the preimage the patch was made against, we apply the patch to the preimage to compute what the patch author wanted the result to look like, and attempt a three-way merge between the result and our version, using the intended preimage as the base version. When we are applying the patch using the index, we would additionally need to add the object names of these three blobs involved in the merge, which is not yet done in this step, but we add a field to "struct patch" so that later write-out step can use it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: fall back on three-way mergeLibravatar Junio C Hamano1-1/+45
Grab the preimage blob the patch claims to be based on out of the object store, apply the patch, and then call three-way-merge function. This step still does not plug the actual three-way merge logic yet, but we are getting there. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: accept -3/--3way command line optionLibravatar Junio C Hamano2-2/+31
Begin teaching the three-way merge fallback logic "git am -3" uses to the underlying "git apply". It only implements the command line parsing part, and does not do anything interesting yet, other than making sure that "--reject" and "--3way" are not given together, and making "--3way" imply "--index". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: move "already exists" logic to check_to_create()Libravatar Junio C Hamano1-11/+29
The check_to_create_blob() function used to check only the case where we are applying to the working tree. Rename the function to check_to_create() and make it also responsible for checking the case where we apply to the index. Also make its caller responsible for issuing an error message. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: move check_to_create_blob() closer to its sole callerLibravatar Junio C Hamano1-23/+23
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-09apply: further split load_preimage()Libravatar Junio C Hamano1-19/+40
load_preimage() is very specific to grab the current contents for the path given by patch->old_name. Split the logic that grabs the contents for a path out of it into a separate load_patch_target() function. Signed-off-by: Junio C Hamano <gitster@pobox.com>