GitHub PushEvent at 2014-10-15 22:21:32
Repository: git
Actor: gitster
Payload: {"shas":[["2b2b1e4d27b4e44c0c46d4857c76b8391d303af3","b57189c5f2fd5b3daf3350a77fde90def1080fa5@gmail.com","mv test: recreate mod/ directory instead of relying on stale copy\n\nThe tests for 'git mv moves a submodule' functionality often run\ncommands like\n\n\tgit mv sub mod/sub\n\nto move a submodule into a subdirectory.  Just like plain /bin/mv,\nthis is supposed to succeed if the mod/ parent directory exists\nand fail if it doesn't exist.\n\nUsually these tests mkdir the parent directory beforehand, but some\ninstead rely on it being left behind by previous tests.\n\nMore precisely, when 'git reset --hard' tries to move to a state where\nmod/sub is not present any more, it would perform the following\noperations:\n\n\trmdir(\"mod/sub\")\n\trmdir(\"mod\")\n\nThe first fails with ENOENT because the test script removed mod/sub\nwith \"rm -rf\" already, so 'reset --hard' doesn't bother to move on to\nthe second, and the mod/ directory is kept around.\n\nBetter to explicitly remove and re-create the mod/ directory so later\ntests don't have to depend on the directory left behind by the earlier\nones at all (making it easier to rearrange or skip some tests in the\nfile or to tweak 'reset --hard' behavior without breaking unrelated\ntests).\n\nNoticed while testing a patch that fixes the reset --hard behavior\ndescribed above.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nReviewed-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Jonathan Nieder",false],["1054af7d04aef64378d69a0496b45cdbf6a0bef2","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","wrapper.c: remove/unlink_or_warn: simplify, treat ENOENT as success\n\nSimplify the function warn_if_unremovable slightly. Additionally, change\nbehaviour slightly. If we failed to remove the object because the object\ndoes not exist, we can still return success back to the caller since none of\nthe callers depend on \"fail if the file did not exist\".\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["3c93c847cacea68e520f6099b18c69f406ab9407","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: lock_ref_sha1_basic is used for all refs\n\nlock_ref_sha1_basic is used to lock refs that sit directly in the .git\ndir such as HEAD and MERGE_HEAD in addition to the more ordinary refs\nunder \"refs/\".  Remove the note claiming otherwise.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["9ccc0c089667e6dccc888590376f138521784e5e","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","wrapper.c: add a new function unlink_or_msg\n\nThis behaves like unlink_or_warn except that on failure it writes the message\nto its 'err' argument, which the caller can display in an appropriate way or\nignore.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["dbdcac7d5c5eea314ec4c318a5e88cff427e9f0e","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: add an err argument to delete_ref_loose\n\nAdd an err argument to delete_ref_loose so that we can pass a descriptive\nerror string back to the caller. Pass the err argument from transaction\ncommit to this function so that transaction users will have a nice error\nstring if the transaction failed due to delete_ref_loose.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["db7516ab9f435e3ce86b257c6631fb4d2dfb12ae","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: pass the ref log message to _create/delete/update instead of _commit\n\nChange the ref transaction API so that we pass the reflog message to the\ncreate/delete/update functions instead of to ref_transaction_commit.\nThis allows different reflog messages for each ref update in a multi-ref\ntransaction.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["7522e3dbcc3946d481e6b6ac59037b884cc0a2a6","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","rename_ref: don't ask read_ref_full where the ref came from\n\nWe call read_ref_full with a pointer to flags from rename_ref but since\nwe never actually use the returned flags we can just pass NULL here instead.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["8a9df90d9a726fa9b1a1ebd13b9e43409e18c606","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: refuse to lock badly named refs in lock_ref_sha1_basic\n\nMove the check for check_refname_format from lock_any_ref_for_update to\nlock_ref_sha1_basic.  At some later stage we will get rid of\nlock_any_ref_for_update completely.  This has no visible impact to callers\nexcept for the inability to lock badly named refs, which is not possible\ntoday already for other reasons.(*)\n\nKeep lock_any_ref_for_update as a no-op wrapper.  It is the public facing\nversion of this interface and keeping it as a separate function will make\nit easier to experiment with the internal lock_ref_sha1_basic signature.\n\n(*) For example, if lock_ref_sha1_basic checks the refname format and\nrefuses to lock badly named refs, it will not be possible to delete\nsuch refs because the first step of deletion is to lock the ref.  We\ncurrently already fail in that case because these refs are not recognized\nto exist:\n\n $ cp .git/refs/heads/master .git/refs/heads/echo...\\*\\*\n $ git branch -D .git/refs/heads/echo...\\*\\*\n error: branch '.git/refs/heads/echo...**' not found.\n\nThis has been broken for a while.  Later patches in the series will start\nrepairing the handling of badly named refs.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["5d94a1b03318d14847a40f233560c2a87fb16cfa","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: call lock_ref_sha1_basic directly from commit\n\nSkip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic\ndirectly from the commit function.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["5fe7d825da8af83a9a3b9bc7f3295f836b6e3a75","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: pass a list of names to skip to is_refname_available\n\nChange is_refname_available to take a list of strings to exclude when\nchecking for conflicts instead of just one single name. We can already\nexclude a single name for the sake of renames. This generalizes that support.\n\nref_transaction_commit already tracks a set of refs that are being deleted\nin an array.  This array is then used to exclude refs from being written to\nthe packed-refs file.  At some stage we will want to change this array to a\nstruct string_list and then we can pass it to is_refname_available via the\ncall to lock_ref_sha1_basic.  That will allow us to perform transactions\nthat perform multiple renames as long as there are no conflicts within the\nstarting or ending state.\n\nFor example, that would allow a single transaction that contains two\nrenames that are both individually conflicting:\n\n   m -> n/n\n   n -> m/m\n\nNo functional change intended yet.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["28e6a97e39edb84599693db971e36d793d36e413","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: ref_transaction_commit: distinguish name conflicts from other errors\n\nIn _commit, ENOTDIR can happen in the call to lock_ref_sha1_basic, either\nwhen we lstat the new refname or if the name checking function reports that\nthe same type of conflict happened.  In both cases, it means that we can not\ncreate the new ref due to a name conflict.\n\nStart defining specific return codes for _commit.  TRANSACTION_NAME_CONFLICT\nrefers to a failure to create a ref due to a name conflict with another ref.\nTRANSACTION_GENERIC_ERROR is for all other errors.\n\nWhen \"git fetch\" is creating refs, name conflicts differ from other errors in\nthat they are likely to be resolved by running \"git remote prune <remote>\".\n\"git fetch\" currently inspects errno to decide whether to give that advice.\nOnce it switches to the transaction API, it can check for\nTRANSACTION_NAME_CONFLICT instead.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["cd94f765720e32ea0bf72996c8dc7dd0b1cc30d0","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","fetch.c: change s_update_ref to use a ref transaction\n\nChange s_update_ref to use a ref transaction for the ref update.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["aae383db8c384dc46abe199899235f67c838e601","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: make write_ref_sha1 static\n\nNo external users call write_ref_sha1 any more so let's declare it static.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["7695d118e5a3c9c6fcb4cb15eb766a1c57422aed","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: change resolve_ref_unsafe reading argument to be a flags field\n\nresolve_ref_unsafe takes a boolean argument for reading (a nonexistent ref\nresolves successfully for writing but not for reading).  Change this to be\na flags field instead, and pass the new constant RESOLVE_REF_READING when\nwe want this behaviour.\n\nWhile at it, swap two of the arguments in the function to put output\narguments at the end.  As a nice side effect, this ensures that we can\ncatch callers that were unaware of the new API so they can be audited.\n\nGive the wrapper functions resolve_refdup and read_ref_full the same\ntreatment for consistency.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["014e7db3f5563a61cefbe1f6f5747931c799a37e","a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","reflog test: test interaction with detached HEAD\n\nA proposed patch produced broken HEAD reflog entries when checking out\nanything other than a branch.  The testsuite still passed, so it took\na few days for the bug to be noticed.\n\nAdd tests checking the content of the reflog after detaching and\nreattaching HEAD so we don't have to rely on manual testing to catch\nsuch problems in the future.\n\n[jn: using 'log -g --format=%H' instead of parsing --oneline output,\n resetting state in each test so they can be safely reordered or\n skipped]\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nReviewed-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Junio C Hamano",false],["62a2d52514aed2b684409cb48e40e0cd14335d1b","b57189c5f2fd5b3daf3350a77fde90def1080fa5@gmail.com","branch -d: avoid repeated symref resolution\n\nIf a repository gets in a broken state with too much symref nesting,\nit cannot be repaired with \"git branch -d\":\n\n $ git symbolic-ref refs/heads/nonsense refs/heads/nonsense\n $ git branch -d nonsense\n error: branch 'nonsense' not found.\n\nWorse, \"git update-ref --no-deref -d\" doesn't work for such repairs\neither:\n\n $ git update-ref -d refs/heads/nonsense\n error: unable to resolve reference refs/heads/nonsense: Too many levels of symbolic links\n\nFix both by teaching resolve_ref_unsafe a new RESOLVE_REF_NO_RECURSE\nflag and passing it when appropriate.\n\nCallers can still read the value of a symref (for example to print a\nmessage about it) with that flag set --- resolve_ref_unsafe will\nresolve one level of symrefs and stop there.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nReviewed-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Jonathan Nieder",false],["18f29fc61ed88145a0664657c3cea9e9732ea5e8","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","branch -d: simplify by using RESOLVE_REF_READING\n\nWhen \"git branch -d\" reads the branch it is about to delete, it used\nto avoid passing the RESOLVE_REF_READING ('treat missing ref as\nerror') flag because a symref pointing to a nonexistent ref would show\nup as missing instead of as something that could be deleted.  To check\nif a ref is actually missing, we then check\n\n - is it a symref?\n - if not, did it resolve to null_sha1?\n\nNow we pass RESOLVE_REF_NO_RECURSE and the correct information is\nreturned for a symref even when it points to a missing ref.  Simplify\nby relying on RESOLVE_REF_READING.\n\nNo functional change intended.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["f3cc52d840418c1a38bb4ae9a09a479e77d95e77","b57189c5f2fd5b3daf3350a77fde90def1080fa5@gmail.com","packed-ref cache: forbid dot-components in refnames\n\nSince v1.7.9-rc1~10^2 (write_head_info(): handle \"extra refs\" locally,\n2012-01-06), this trick to keep track of \".have\" refs that are only\nvalid on the wire and not on the filesystem is not needed any more.\n\nSimplify by removing support for the REFNAME_DOT_COMPONENT flag.\n\nThis means we'll be slightly stricter with invalid refs found in a\npacked-refs file or during clone.  read_loose_refs() already checks\nfor and skips refnames with .components so it is not affected.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nReviewed-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Jonathan Nieder",false],["8159f4af7d21e106ed04d69c428b395701b94205","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","test: put tests for handling of bad ref names in one place\n\nThere's no straightforward way to grep for all tests dealing with\ninvalid refs.  Put them in a single test script so it is easy to see\nwhat functionality has not been exercised with bad ref names yet.\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false],["d0f810f0bc0d6b51722b400f70c2590713f168e8","2cb6c6c4ccf58d41468189c2307f7a4ebf120324@google.com","refs.c: allow listing and deleting badly named refs\n\nWe currently do not handle badly named refs well:\n\n  $ cp .git/refs/heads/master .git/refs/heads/master.....@\\*@\\\\.\n  $ git branch\n    fatal: Reference has invalid format: 'refs/heads/master.....@*@\\.'\n  $ git branch -D master.....@\\*@\\\\.\n    error: branch 'master.....@*@\\.' not found.\n\nUsers cannot recover from a badly named ref without manually finding\nand deleting the loose ref file or appropriate line in packed-refs.\nMaking that easier will make it easier to tweak the ref naming rules\nin the future, for example to forbid shell metacharacters like '`'\nand '\"', without putting people in a state that is hard to get out of.\n\nSo allow \"branch --list\" to show these refs and allow \"branch -d/-D\"\nand \"update-ref -d\" to delete them.  Other commands (for example to\nrename refs) will continue to not handle these refs but can be changed\nin later patches.\n\nDetails:\n\nIn resolving functions, refuse to resolve refs that don't pass the\ngit-check-ref-format(1) check unless the new RESOLVE_REF_ALLOW_BAD_NAME\nflag is passed.  Even with RESOLVE_REF_ALLOW_BAD_NAME, refuse to\nresolve refs that escape the refs/ directory and do not match the\npattern [A-Z_]* (think \"HEAD\" and \"MERGE_HEAD\").\n\nIn locking functions, refuse to act on badly named refs unless they\nare being deleted and either are in the refs/ directory or match [A-Z_]*.\n\nJust like other invalid refs, flag resolved, badly named refs with the\nREF_ISBROKEN flag, treat them as resolving to null_sha1, and skip them\nin all iteration functions except for for_each_rawref.\n\nFlag badly named refs (but not symrefs pointing to badly named refs)\nwith a REF_BAD_NAME flag to make it easier for future callers to\nnotice and handle them specially.  For example, in a later patch\nfor-each-ref will use this flag to detect refs whose names can confuse\ncallers parsing for-each-ref output.\n\nIn the transaction API, refuse to create or update badly named refs,\nbut allow deleting them (unless they try to escape refs/ and don't match\n[A-Z_]*).\n\nSigned-off-by: Ronnie Sahlberg <sahlberg@google.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","Ronnie Sahlberg",false]],"size":44,"ref":"refs/heads/jch","head":"7964cdb0262b7ab4b24dce419350acddb553f312"}