1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-15 05:33:04 +01:00
git/builtin
Ronnie Sahlberg 6629ea2d4a receive-pack.c: use a reference transaction for updating the refs
Wrap all the ref updates inside a transaction.

In the new API there is no distinction between failure to lock and
failure to write a ref.  Both can be permanent (e.g., a ref
"refs/heads/topic" is blocking creation of the lock file
"refs/heads/topic/1.lock") or transient (e.g., file system full) and
there's no clear difference in how the client should respond, so
replace the two statuses "failed to lock" and "failed to write" with
a single status "failed to update ref".  In both cases a more
detailed message is sent by sideband to diagnose the problem.

Example, before:

 error: there are still refs under 'refs/heads/topic'
 remote: error: failed to lock refs/heads/topic
 To foo
  ! [remote rejected] HEAD -> topic (failed to lock)

After:

 error: there are still refs under 'refs/heads/topic'
 remote: error: Cannot lock the ref 'refs/heads/topic'.
 To foo
  ! [remote rejected] HEAD -> topic (failed to update ref)

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-03 10:04:14 -07:00
..
add.c Merge branch 'fr/add-interactive-argv-array' 2014-03-28 13:51:05 -07:00
annotate.c
apply.c Merge branch 'jc/apply-ignore-whitespace' 2014-06-03 12:06:40 -07:00
archive.c
bisect--helper.c
blame.c Merge branch 'bc/blame-crlf-test' 2014-06-06 11:26:50 -07:00
branch.c use wildmatch() directly without fnmatch() wrapper 2014-02-20 14:15:46 -08:00
bundle.c
cat-file.c Merge branch 'jk/warn-on-object-refname-ambiguity' 2014-03-25 11:07:36 -07:00
check-attr.c Merge branch 'jc/check-attr-honor-working-tree' into maint 2014-03-18 14:03:03 -07:00
check-ignore.c
check-mailmap.c
check-ref-format.c
checkout-index.c
checkout.c Merge branch 'rs/reflog-exists' 2014-06-06 11:23:04 -07:00
clean.c Merge branch 'jl/nor-or-nand-and' 2014-04-08 12:00:28 -07:00
clone.c refs.h: rename the action_on_err constants 2014-04-07 12:09:11 -07:00
column.c
commit-tree.c commit-tree: add and document --no-gpg-sign 2014-02-24 14:51:35 -08:00
commit.c commit.c: use ref transactions for updates 2014-09-03 10:04:11 -07:00
config.c Merge branch 'jk/daemon-tolower' 2014-06-16 10:07:15 -07:00
count-objects.c
credential.c
describe.c Merge branch 'nd/no-more-fnmatch' 2014-03-14 14:25:31 -07:00
diff-files.c
diff-index.c
diff-tree.c
diff.c
fast-export.c fast-export: add support to delete refs 2014-04-21 11:47:34 -07:00
fetch-pack.c Merge branch 'nd/shallow-clone' 2014-01-17 12:21:20 -08:00
fetch.c Merge branch 'ep/varscope' 2014-02-27 14:01:30 -08:00
fmt-merge-msg.c
for-each-ref.c use wildmatch() directly without fnmatch() wrapper 2014-02-20 14:15:46 -08:00
fsck.c Merge branch 'mh/replace-refs-variable-rename' 2014-03-14 14:27:06 -07:00
gc.c Merge branch 'nd/daemonize-gc' 2014-06-16 12:18:12 -07:00
get-tar-commit-id.c
grep.c Merge branch 'sk/spawn-less-case-insensitively-from-grep-O-i' 2014-06-06 11:32:49 -07:00
hash-object.c
help.c
index-pack.c Merge branch 'jk/index-pack-report-missing' 2014-06-06 11:28:13 -07:00
init-db.c i18n: only extract comments marked with "TRANSLATORS:" 2014-04-17 11:09:56 -07:00
log.c Merge branch 'lt/log-auto-decorate' 2014-06-16 12:18:41 -07:00
ls-files.c pathspec: pass directory indicator to match_pathspec_item() 2014-02-24 14:37:19 -08:00
ls-remote.c builtin/ls-remote.c: rearrange xcalloc arguments 2014-05-27 14:00:43 -07:00
ls-tree.c pathspec: rename match_pathspec_depth() to match_pathspec() 2014-02-24 14:37:14 -08:00
mailinfo.c Merge branch 'rs/mailinfo-header-cmp' 2014-06-09 11:27:53 -07:00
mailsplit.c
merge-base.c Merge branch 'bm/merge-base-octopus-dedup' into maint 2014-02-13 13:38:59 -08:00
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'fc/merge-default-to-upstream' 2014-06-03 12:06:43 -07:00
mktag.c
mktree.c builtin/mktree.c: use ALLOC_GROW() in append_to_tree() 2014-03-03 14:54:45 -08:00
mv.c Merge branch 'dt/merge-recursive-case-insensitive' 2014-06-06 11:23:13 -07:00
name-rev.c use wildmatch() directly without fnmatch() wrapper 2014-02-20 14:15:46 -08:00
notes.c Merge branch 'mh/ref-transaction' 2014-06-03 12:06:41 -07:00
pack-objects.c Merge branch 'jk/pack-bitmap' 2014-04-08 12:00:33 -07:00
pack-redundant.c
pack-refs.c
patch-id.c patch-id: make it stable against hunk reordering 2014-06-10 13:09:24 -07:00
prune-packed.c i18n: mark all progress lines for translation 2014-02-24 09:08:37 -08:00
prune.c Merge branch 'mh/replace-refs-variable-rename' 2014-03-14 14:27:06 -07:00
push.c Merge branch 'cc/starts-n-ends-with-endgame' 2014-03-07 15:18:28 -08:00
read-tree.c
receive-pack.c receive-pack.c: use a reference transaction for updating the refs 2014-09-03 10:04:14 -07:00
reflog.c refs.c: add new functions reflog_exists and delete_reflog 2014-05-08 14:31:43 -07:00
remote-ext.c
remote-fd.c
remote.c refs.c: add an err argument to repack_without_refs 2014-07-14 11:54:41 -07:00
repack.c Merge branch 'jk/repack-pack-keep-objects' 2014-03-18 13:50:29 -07:00
replace.c replace.c: use the ref transaction functions for updates 2014-09-03 10:04:10 -07:00
rerere.c rerere: fix for merge.conflictstyle 2014-04-30 10:30:02 -07:00
reset.c refs.h: rename the action_on_err constants 2014-04-07 12:09:11 -07:00
rev-list.c Merge branch 'jk/pack-bitmap' 2014-02-27 14:01:48 -08:00
rev-parse.c rev-parse --parseopt: option argument name hints 2014-03-23 17:28:03 -07:00
revert.c parse-options: multi-word argh should use dash to separate words 2014-03-24 10:43:34 -07:00
rm.c Merge branch 'nd/submodule-pathspec-ending-with-slash' 2014-02-27 14:01:15 -08:00
send-pack.c Merge branch 'nd/shallow-clone' 2014-01-17 12:21:20 -08:00
shortlog.c
show-branch.c use wildmatch() directly without fnmatch() wrapper 2014-02-20 14:15:46 -08:00
show-ref.c
stripspace.c
symbolic-ref.c
tag.c tag.c: use ref transactions when doing updates 2014-09-03 10:04:10 -07:00
unpack-file.c
unpack-objects.c Merge branch 'mh/replace-refs-variable-rename' 2014-03-14 14:27:06 -07:00
update-index.c update-index: fix segfault with missing --cacheinfo argument 2014-06-04 11:02:55 -07:00
update-ref.c refs.c: make ref_transaction_begin take an err argument 2014-09-03 10:04:08 -07:00
update-server-info.c
upload-archive.c
var.c
verify-pack.c
verify-tag.c
write-tree.c