- 15 7月, 2014 19 次提交
-
-
由 Ronnie Sahlberg 提交于
Update ref_transaction_update() do some basic error checking and return non-zero on error. Update all callers to check ref_transaction_update() for error. There are currently no conditions in _update that will return error but there will be in the future. Add an err argument that will be updated on failure. In future patches we will start doing both locking and checking for name conflicts in _update instead of _commit at which time this function will start returning errors for these conditions. Also check for BUGs during update and die(BUG:...) if we are calling _update with have_old but the old_sha1 pointer is NULL. Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Since all callers now use QUIET_ON_ERR we no longer need to provide an onerr argument any more. Remove the onerr argument from the ref_transaction_commit signature. Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Call ref_transaction_commit with QUIET_ON_ERR and use the strbuf that is returned to print a log message if/after the transaction fails. Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Change update_ref_write to also update an error strbuf on failure. This makes the error available to ref_transaction_commit callers if the transaction failed due to update_ref_sha1/write_ref_sha1 failures. Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Make ref_update_reject_duplicates return any error that occurs through a new strbuf argument. This means that when a transaction commit fails in this function we will now be able to pass a helpful error message back to the caller. Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Making errno from write_ref_sha1() meaningful, which should fix * a bug in "git checkout -b" where it prints strerror(errno) despite errno possibly being zero or clobbered * a bug in "git fetch"'s s_update_ref, which trusts the result of an errno == ENOTDIR check to detect D/F conflicts Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Making errno when returning from resolve_ref_unsafe() meaningful, which should fix * a bug in lock_ref_sha1_basic, where it assumes EISDIR means it failed due to a directory being in the way Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Making errno when returning from commit_packed_refs() meaningful, which should fix * a bug in "git clone" where it prints strerror(errno) based on errno, despite errno possibly being zero and potentially having been clobbered by that point * the same kind of bug in "git pack-refs" and prepares for repack_without_refs() to get a meaningful error message when commit_packed_refs() fails without falling into the same bug. Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Making errno when returning from remove_empty_directories() more obviously meaningful, which should provide some peace of mind for people auditing lock_ref_sha1_basic. Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Making errno when returning from verify_lock() meaningful, which should almost but not completely fix * a bug in "git fetch"'s s_update_ref, which trusts the result of an errno == ENOTDIR check to detect D/F conflicts ENOTDIR makes sense as a sign that a file was in the way of a directory we wanted to create. Should "git fetch" also look for ENOTEMPTY or EEXIST to catch cases where a directory was in the way of a file to be created? Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Making errno when returning from log_ref_setup() meaningful, Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Update repack_without_refs to take an err argument and update it if there is a failure. Pass the err variable from ref_transaction_commit to this function so that callers can print a meaningful error message if _commit fails due to this function. Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Making errno when returning from lock_file() meaningful, which should fix * an existing almost-bug in lock_ref_sha1_basic where it assumes errno==ENOENT is meaningful and could waste some work on retries * an existing bug in repack_without_refs where it prints strerror(errno) and picks advice based on errno, despite errno potentially being zero and potentially having been clobbered by that point Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Introducing a new unable_to_lock_message helper, which has nicer semantics than unable_to_lock_error and cleans up lockfile.c a little. Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Add a strbuf argument to _commit so that we can pass an error string back to the caller. So that we can do error logging from the caller instead of from _commit. Longer term plan is to first convert all callers to use onerr==QUIET_ON_ERR and craft any log messages from the callers themselves and finally remove the onerr argument completely. Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Allow ref_transaction_free(NULL) as a no-op. This makes ref_transaction_free easier to use and more similar to plain 'free'. In particular, it lets us rollback unconditionally as part of cleanup code after setting 'transaction = NULL' if a transaction has been committed or rolled back already. Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
ref_transaction_create|delete|update has no need to modify the sha1 arguments passed to it so it should use const unsigned char* instead of unsigned char*. Some functions, such as fast_forward_to(), already have its old/new sha1 arguments as consts. This function will at some point need to use ref_transaction_update() in which case this change is required. Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
由 Ronnie Sahlberg 提交于
We do not yet need both a rollback and a free function for transactions. Remove ref_transaction_rollback and use ref_transaction_free instead. At a later stage we may reintroduce a rollback function if we want to start adding reusable transactions and similar. Reviewed-by: NJonathan Nieder <jrnieder@gmail.com> Signed-off-by: NRonnie Sahlberg <sahlberg@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Acked-by: NMichael Haggerty <mhagger@alum.mit.edu>
-
- 17 6月, 2014 21 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
Allow specifying only certain individual test pieces to be run using a range notation (e.g. "t1234-test.sh --run='1-4 6 8 9-'"). * ib/test-selectively-run: t0000-*.sh: fix the GIT_SKIP_TESTS sub-tests test-lib: '--run' to run only specific tests test-lib: tests skipped by GIT_SKIP_TESTS say so test-lib: document short options in t/README
-
由 Junio C Hamano 提交于
* ta/string-list-init: string-list: spell all values out that are given to a string_list initializer
-
由 Junio C Hamano 提交于
* jm/dedup-test-config: t/t7810-grep.sh: remove duplicate test_config()
-
由 Junio C Hamano 提交于
* dt/refs-check-refname-component-optim: refs.c: optimize check_refname_component()
-
由 Junio C Hamano 提交于
* sk/test-cmp-bin: t5000, t5003: do not use test_cmp to compare binary files
-
由 Junio C Hamano 提交于
* sh/enable-preloadindex: environment.c: enable core.preloadindex by default
-
由 Junio C Hamano 提交于
* rs/read-ref-at: refs.c: change read_ref_at to use the reflog iterators
-
由 Junio C Hamano 提交于
* jk/error-resolve-conflict-advice: error_resolve_conflict: drop quotations around operation error_resolve_conflict: rewrap advice message
-
由 Junio C Hamano 提交于
Avoid unnecessary copy of previous contents when extending the hashtable used in pack-objects. * rs/pack-objects-no-unnecessary-realloc: pack-objects: use free()+xcalloc() instead of xrealloc()+memset()
-
由 Junio C Hamano 提交于
* lt/log-auto-decorate: git log: support "auto" decorations
-
由 Junio C Hamano 提交于
* jm/doc-wording-tweaks: Documentation: wording fixes in the user manual and glossary
-
由 Junio C Hamano 提交于
* jm/format-patch-mail-sig: format-patch: add "--signature-file=<file>" option format-patch: make newline after signature conditional
-
由 Junio C Hamano 提交于
Propagate the error messages from the webserver better to the client coming over the HTTP transport. * jk/http-errors: http: default text charset to iso-8859-1 remote-curl: reencode http error messages strbuf: add strbuf_reencode helper http: optionally extract charset parameter from content-type http: extract type/subtype portion of content-type t5550: test display of remote http error messages t/lib-httpd: use write_script to copy CGI scripts test-lib: preserve GIT_CURL_VERBOSE from the environment
-
由 Junio C Hamano 提交于
mailmap.file configuration names a pathname, hence should honor ~/path and ~user/path as its value. * ow/config-mailmap-pathname: config: respect '~' and '~user' in mailmap.file
-
由 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
-
由 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
-
由 Junio C Hamano 提交于
* jm/t9138-style-fix: t9138-git-svn-authors-prog.sh fixups
-
由 Junio C Hamano 提交于
* jm/instaweb-apache-24: git-instaweb: add support for Apache 2.4
-
由 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
-
由 Junio C Hamano 提交于
The completion code did not know about quite a few options that are common between "git merge" and "git pull", and a couple of options unique to "git merge". * jk/complete-merge-pull: completion: add missing options for git-merge completion: add a note that merge options are shared
-