Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-06-20use xstrdup instead of xmalloc + strcpyJeff King
This is one line shorter, and makes sure the length in the malloc and copy steps match. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-16Merge branch 'lt/log-auto-decorate'Junio C Hamano
* lt/log-auto-decorate: git log: support "auto" decorations
2014-06-16Merge branch 'jm/format-patch-mail-sig'Junio C Hamano
* jm/format-patch-mail-sig: format-patch: add "--signature-file=<file>" option format-patch: make newline after signature conditional
2014-06-16Merge branch 'fc/remote-helper-refmap'Junio C Hamano
Allow remote-helper/fast-import based transport to rename the refs while transferring the history. * fc/remote-helper-refmap: transport-helper: remove unnecessary strbuf resets transport-helper: add support to delete branches fast-export: add support to delete refs fast-import: add support to delete refs transport-helper: add support to push symbolic refs transport-helper: add support for old:new refspec fast-export: add new --refspec option fast-export: improve argument parsing
2014-06-16Merge branch 'nd/daemonize-gc'Junio C Hamano
"git gc --auto" was recently changed to run in the background to give control back early to the end-user sitting in front of the terminal, but it forgot that housekeeping involving reflogs should be done without other processes competing for accesses to the refs. * nd/daemonize-gc: gc --auto: do not lock refs in the background
2014-06-16Merge branch 'jl/remote-rm-prune'Junio C Hamano
"git remote rm" and "git remote prune" can involve removing many refs at once, which is not a very efficient thing to do when very many refs exist in the packed-refs file. * jl/remote-rm-prune: remote prune: optimize "dangling symref" check/warning remote: repack packed-refs once when deleting multiple refs remote rm: delete remote configuration as the last
2014-06-16Merge branch 'bg/xcalloc-nmemb-then-size'Junio C Hamano
Like calloc(3), xcalloc() takes nmemb and then size. * bg/xcalloc-nmemb-then-size: transport-helper.c: rearrange xcalloc arguments remote.c: rearrange xcalloc arguments reflog-walk.c: rearrange xcalloc arguments pack-revindex.c: rearrange xcalloc arguments notes.c: rearrange xcalloc arguments imap-send.c: rearrange xcalloc arguments http-push.c: rearrange xcalloc arguments diff.c: rearrange xcalloc arguments config.c: rearrange xcalloc arguments commit.c: rearrange xcalloc arguments builtin/remote.c: rearrange xcalloc arguments builtin/ls-remote.c: rearrange xcalloc arguments
2014-06-16Merge branch 'jl/status-added-submodule-is-never-ignored'Junio C Hamano
submodule.*.ignore and diff.ignoresubmodules are used to ignore all submodule changes in "diff" output, but it can be confusing to apply these configuration values to status and commit. This is a backward-incompatible change, but should be so in a good way (aka bugfix). * jl/status-added-submodule-is-never-ignored: commit -m: commit staged submodules regardless of ignore config status/commit: show staged submodules regardless of ignore config
2014-06-16Merge branch 'jk/daemon-tolower'Junio C Hamano
* jk/daemon-tolower: daemon/config: factor out duplicate xstrdup_tolower
2014-06-16Merge branch 'jk/diff-follow-must-take-one-pathspec'Junio C Hamano
* jk/diff-follow-must-take-one-pathspec: move "--follow needs one pathspec" rule to diff_setup_done
2014-06-16Merge branch 'cc/replace-edit'Junio C Hamano
"git replace" learns a new "--edit" option. * cc/replace-edit: Documentation: replace: describe new --edit option replace: add --edit to usage string replace: add tests for --edit replace: die early if replace ref already exists replace: refactor checking ref validity replace: make sure --edit results in a different object replace: add --edit option replace: factor object resolution out of replace_object replace: use OPT_CMDMODE to handle modes replace: refactor command-mode determination
2014-06-16Merge branch 'mt/patch-id-stable' (early part)Junio C Hamano
* 'mt/patch-id-stable' (early part): patch-id-test: test stable and unstable behaviour patch-id: make it stable against hunk reordering test doc: test_write_lines does not split its arguments test: add test_write_lines helper
2014-06-11patch-id: make it stable against hunk reorderingMichael S. Tsirkin
Patch id changes if users reorder file diffs that make up a patch. As the result is functionally equivalent, a different patch id is surprising to many users. In particular, reordering files using diff -O is helpful to make patches more readable (e.g. API header diff before implementation diff). Add an option to change patch-id behaviour making it stable against these kinds of patch change: calculate SHA1 hash for each hunk separately and sum all hashes (using a symmetrical sum) to get patch id We use a 20byte sum and not xor - since xor would give 0 output for patches that have two identical diffs, which isn't all that unlikely (e.g. append the same line in two places). The new behaviour is enabled - when patchid.stable is true - when --stable flag is present Using a new flag --unstable or setting patchid.stable to false force the historical behaviour. In the documentation, clarify that patch ID can now be a sum of hashes, not a hash. Document how command line and config options affect the behaviour. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-09Merge branch 'rs/mailinfo-header-cmp'Junio C Hamano
Avoid running over the end of header string while parsing an incoming e-mail message to extract the patch. * rs/mailinfo-header-cmp: mailinfo: use strcmp() for string comparison
2014-06-09Merge branch 'jc/rev-parse-argh-dashed-multi-words'Junio C Hamano
"update-index --cacheinfo" in 2.0 crashes on a malformed command line. * jc/rev-parse-argh-dashed-multi-words: update-index: fix segfault with missing --cacheinfo argument
2014-06-06Merge branch 'nd/status-auto-comment-char'Junio C Hamano
* nd/status-auto-comment-char: commit: allow core.commentChar=auto for character auto selection config: be strict on core.commentChar
2014-06-06Merge branch 'sk/spawn-less-case-insensitively-from-grep-O-i'Junio C Hamano
* sk/spawn-less-case-insensitively-from-grep-O-i: git grep -O -i: if the pager is 'less', pass the '-I' option
2014-06-06Merge branch 'jk/index-pack-report-missing'Junio C Hamano
* jk/index-pack-report-missing: index-pack: distinguish missing objects from type errors
2014-06-06Merge branch 'bc/blame-crlf-test'Junio C Hamano
If a file contained CRLF line endings in a repository with core.autocrlf=input, then blame always marked lines as "Not Committed Yet", even if they were unmodified. * bc/blame-crlf-test: blame: correctly handle files regardless of autocrlf
2014-06-06Merge branch 'dk/blame-reorg'Junio C Hamano
"git blame" has been optimized greatly by reorganising the data structure that is used to keep track of the work to be done, thanks to David Karstrup <dak@gnu.org>. * dk/blame-reorg: blame: large-scale performance rewrite
2014-06-06Merge branch 'dt/merge-recursive-case-insensitive'Junio C Hamano
On a case insensitive filesystem, merge-recursive incorrectly deleted the file that is to be renamed to a name that is the same except for case differences. * dt/merge-recursive-case-insensitive: mv: allow renaming to fix case on case insensitive filesystems merge-recursive.c: fix case-changing merge bug
2014-06-06Merge branch 'rs/reflog-exists'Junio C Hamano
* rs/reflog-exists: checkout.c: use ref_exists instead of file_exist refs.c: add new functions reflog_exists and delete_reflog
2014-06-06Merge branch 'tg/tag-state-tag-name-in-editor-hints'Junio C Hamano
* tg/tag-state-tag-name-in-editor-hints: builtin/tag.c: show tag name to hint in the message editor
2014-06-06Merge branch 'jk/grep-tell-run-command-to-cd-when-running-pager'Junio C Hamano
* jk/grep-tell-run-command-to-cd-when-running-pager: grep: use run-command's "dir" option for --open-files-in-pager
2014-06-06Merge branch 'fc/status-printf-squelch-format-zero-length-warnings'Junio C Hamano
* fc/status-printf-squelch-format-zero-length-warnings: silence a bunch of format-zero-length warnings
2014-06-06Merge branch 'jk/commit-C-pick-empty'Junio C Hamano
"git commit --allow-empty-message -C $commit" did not work when the commit did not have any log message. * jk/commit-C-pick-empty: commit: do not complain of empty messages from -C
2014-06-04update-index: fix segfault with missing --cacheinfo argumentJeff King
Running "git update-index --cacheinfo" without any further arguments results in a segfault rather than an error message. Commit ec160ae (update-index: teach --cacheinfo a new syntax "mode,sha1,path", 2014-03-23) added code to examine the format of the argument, but forgot to handle the NULL case. Returning an error from the parser is enough, since we then treat it as an old-style "--cacheinfo <mode> <sha1> <path>", and complain that we have less than 3 arguments to read. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-03Merge branch 'jk/commit-date-approxidate'Junio C Hamano
* jk/commit-date-approxidate: commit: accept more date formats for "--date" commit: print "Date" line when the user has set date pretty: make show_ident_date public commit: use split_ident_line to compare author/committer
2014-06-03Merge branch 'fc/rerere-conflict-style'Junio C Hamano
* fc/rerere-conflict-style: rerere: fix for merge.conflictstyle
2014-06-03Merge branch 'sk/tag-contains-wo-recursion'Junio C Hamano
* sk/tag-contains-wo-recursion: git tag --contains: avoid stack overflow
2014-06-03Merge branch 'jx/blame-align-relative-time'Junio C Hamano
"git blame" miscounted number of columns needed to show localized timestamps, resulting in jaggy left-side-edge of the source code lines in its output. * jx/blame-align-relative-time: blame: dynamic blame_date_width for different locales blame: fix broken time_buf paddings in relative timestamp
2014-06-03Merge branch 'fc/merge-default-to-upstream'Junio C Hamano
"git merge" without argument, even when there is an upstream defined for the current branch, refused to run until merge.defaultToUpstream is set to true. Flip the default of that configuration variable to true. * fc/merge-default-to-upstream: merge: enable defaulttoupstream by default
2014-06-03Merge branch 'rs/ref-update-check-errors-early'Junio C Hamano
* rs/ref-update-check-errors-early: commit.c: check for lock error and return early sequencer.c: check for lock failure and bail early in fast_forward_to
2014-06-03Merge branch 'nd/index-pack-one-fd-per-thread'Junio C Hamano
Enable threaded index-pack on platforms without thread-unsafe pread() emulation. * nd/index-pack-one-fd-per-thread: index-pack: work around thread-unsafe pread()
2014-06-03Merge branch 'ym/fix-opportunistic-index-update-race'Junio C Hamano
Read-only operations such as "git status" that internally refreshes the index write out the refreshed index to the disk to optimize future accesses to the working tree, but this could race with a "read-write" operation that modify the index while it is running. Detect such a race and avoid overwriting the index. Duy raised a good point that we may need to do the same for the normal writeout codepath, not just the "opportunistic" update codepath. While that is true, nobody sane would be running two simultaneous operations that are clearly write-oriented competing with each other against the same index file. So in that sense that can be done as a less urgent follow-up for this topic. * ym/fix-opportunistic-index-update-race: read-cache.c: verify index file before we opportunistically update it wrapper.c: add xpread() similar to xread()
2014-06-03Merge branch 'mh/ref-transaction'Junio C Hamano
Update "update-ref --stdin [-z]" and then introduce a transactional support for (multi-)reference updates. * mh/ref-transaction: (27 commits) ref_transaction_commit(): work with transaction->updates in place struct ref_update: add a type field struct ref_update: add a lock field ref_transaction_commit(): simplify code using temporary variables struct ref_update: store refname as a FLEX_ARRAY struct ref_update: rename field "ref_name" to "refname" refs: remove API function update_refs() update-ref --stdin: reimplement using reference transactions refs: add a concept of a reference transaction update-ref --stdin: harmonize error messages update-ref --stdin: improve the error message for unexpected EOF t1400: test one mistake at a time update-ref --stdin -z: deprecate interpreting the empty string as zeros update-ref.c: extract a new function, parse_next_sha1() t1400: test that stdin -z update treats empty <newvalue> as zeros update-ref --stdin: simplify error messages for missing oldvalues update-ref --stdin: make error messages more consistent update-ref --stdin: improve error messages for invalid values update-ref.c: extract a new function, parse_refname() parse_cmd_verify(): copy old_sha1 instead of evaluating <oldvalue> twice ...
2014-06-03Merge branch 'jc/apply-ignore-whitespace'Junio C Hamano
"--ignore-space-change" option of "git apply" ignored the spaces at the beginning of line too aggressively, which is inconsistent with the option of the same name "diff" and "git diff" have. * jc/apply-ignore-whitespace: apply --ignore-space-change: lines with and without leading whitespaces do not match
2014-06-03mailinfo: use strcmp() for string comparisonRené Scharfe
The array header is defined as: static const char *header[MAX_HDR_PARSED] = { "From","Subject","Date", }; When looking for the index of a specfic string in that array, simply use strcmp() instead of memcmp(). This avoids running over the end of the string (e.g. with memcmp("Subject", "From", 7)) and gets rid of magic string length constants. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-31git log: support "auto" decorationsLinus Torvalds
This works kind of like "--color=auto" - add decorations for interactive use, but do not change defaults when scripting or when piping the output to anything but a terminal. You can use either [log] decorate=auto in the git config files, or the "--decorate=auto" command line option to choose this behavior. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-28builtin/remote.c: rearrange xcalloc argumentsBrian Gesiak
xcalloc() takes two arguments: the number of elements and their size. builtin/remote.c includes several calls to xcalloc() that pass the arguments in reverse order. Rearrange them so they are in the correct order. Signed-off-by: Brian Gesiak <modocache@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-28builtin/ls-remote.c: rearrange xcalloc argumentsBrian Gesiak
xcalloc() takes two arguments: the number of elements and their size. cmd_ls_remote() passes the arguments in reverse order, passing the size of a char*, followed by the number of char* to be allocated. Rearrange them so they are in the correct order. Signed-off-by: Brian Gesiak <modocache@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-27format-patch: add "--signature-file=<file>" optionJeremiah Mahler
Add an option to format-patch for reading a signature from a file. $ git format-patch -1 --signature-file=$HOME/.signature The config variable `format.signaturefile` can also be used to make this the default. $ git config format.signaturefile $HOME/.signature $ git format-patch -1 Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-27gc --auto: do not lock refs in the backgroundNguyễn Thái Ngọc Duy
9f673f9 (gc: config option for running --auto in background - 2014-02-08) puts "gc --auto" in background to reduce user's wait time. Part of the garbage collecting is pack-refs and pruning reflogs. These require locking some refs and may abort other processes trying to lock the same ref. If gc --auto is fired in the middle of a script, gc's holding locks in the background could fail the script, which could never happen before 9f673f9. Keep running pack-refs and "reflog --prune" in foreground to stop parallel ref updates. The remaining background operations (repack, prune and rerere) should not impact running git processes. Reported-by: Adam Borowski <kilobyte@angband.pl> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-27remote prune: optimize "dangling symref" check/warningJens Lindström
When 'git remote prune' was used to delete many refs in a repository with many refs, a lot of time was spent checking for (now) dangling symbolic refs pointing to the deleted ref, since warn_dangling_symref() was once per deleted ref to check all other refs in the repository. Avoid this using the new warn_dangling_symrefs() function which makes one pass over all refs and checks for all the deleted refs in one go, after they have all been deleted. Signed-off-by: Jens Lindström <jl@opera.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-27remote: repack packed-refs once when deleting multiple refsJens Lindström
When 'git remote rm' or 'git remote prune' were used in a repository with many refs, and needed to delete many remote-tracking refs, a lot of time was spent deleting those refs since for each deleted ref, repack_without_refs() was called to rewrite packed-refs without just that deleted ref. To avoid this, call repack_without_refs() first to repack without all the refs that will be deleted, before calling delete_ref() to delete each one completely. The call to repack_without_ref() in delete_ref() then becomes a no-op, since packed-refs already won't contain any of the deleted refs. Signed-off-by: Jens Lindström <jl@opera.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-23daemon/config: factor out duplicate xstrdup_tolowerJeff King
We have two implementations of the same function; let's drop that to one. We take the name from daemon.c, but the implementation (which is just slightly more efficient) from the config code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-23remote rm: delete remote configuration as the lastJens Lindström
When removing a remote, delete the remote-tracking branches before deleting the remote configuration. This way, if the operation fails or is aborted while deleting the remote-tracking branches, the command can be rerun to complete the operation. Signed-off-by: Jens Lindström <jl@opera.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-22format-patch: make newline after signature conditionalJeff King
When we print an email signature, we print the divider "-- \n", then the signature string, then two newlines. Usually the signature is a one-liner (and the default is just the git version), so the extra newline makes sense. But one could easily specify a multi-line signature, like this: git format-patch --signature='this is my long signature it has multiple lines ' ... and it may end with its own newline, in which case we do not have to add yet another one. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-20move "--follow needs one pathspec" rule to diff_setup_doneJeff King
Because of the way "--follow" is implemented, we must have exactly one pathspec. "git log" enforces this restriction, but other users of the revision traversal code do not. For example, "git format-patch --follow" will segfault during try_to_follow_renames, as we have no pathspecs at all. We can push this check down into diff_setup_done, which is probably a better place anyway. It is the diff code that introduces this restriction, so other parts of the code should not need to care themselves. Reported-by: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-20replace: add --edit to usage stringChristian Couder
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>