{"push_id":951878425,"size":23,"distinct_size":7,"ref":"refs/heads/master","head":"d10e2cb9d0299a26f43d57dd5bdcf2b3f86a30b3","before":"e572fef9d459497de2bd719747d5625a27c9b41d","commits":[{"sha":"b9badadd06ae307c5e1e0e7c36985a1360cabc22","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"create_symref: modernize variable names\n\nOnce upon a time, create_symref() was used only to point\nHEAD at a branch name, and the variable names reflect that\n(e.g., calling the path git_HEAD). However, it is much more\ngeneric these days (and has been for some time). Let's\nupdate the variable names to make it easier to follow:\n\n  - `ref_target` is now just `refname`. This is closer to\n    the `ref` that is already in `cache.h`, but with the\n    extra twist that \"name\" makes it clear this is the name\n    and not a ref struct. Dropping \"target\" hopefully makes\n    it clear that we are talking about the symref itself,\n    not what it points to.\n\n  - `git_HEAD` is now `ref_path`; the on-disk path\n    corresponding to `ref`.\n\n  - `refs_heads_master` is now just `target`; i.e., what the\n    symref points at. This term also matches what is in\n    the symlink(2) manpage (at least on Linux).\n\n  - the buffer to hold the symref file's contents was simply\n    called `ref`. It's now `buf` (admittedly also generic,\n    but at least not actively introducing confusion with the\n    other variable holding the refname).\n\nSigned-off-by: Jeff King <peff@peff.net>\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/b9badadd06ae307c5e1e0e7c36985a1360cabc22"},{"sha":"370e5ad65e8878989eecbae28a479b1a4d6a841b","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"create_symref: use existing ref-lock code\n\nThe create_symref() function predates the existence of\n\"struct lock_file\", let alone the more recent \"struct\nref_lock\". Instead, it just does its own manual dot-locking.\nBesides being more code, this has a few downsides:\n\n - if git is interrupted while holding the lock, we don't\n   clean up the lockfile\n\n - we don't do the usual directory/filename conflict check.\n   So you can sometimes create a symref \"refs/heads/foo/bar\",\n   even if \"refs/heads/foo\" exists (namely, if the refs are\n   packed and we do not hit the d/f conflict in the\n   filesystem).\n\nThis patch refactors create_symref() to use the \"struct\nref_lock\" interface, which handles both of these things.\nThere are a few bonus cleanups that come along with it:\n\n - we leaked ref_path in some error cases\n\n - the symref contents were stored in a fixed-size buffer,\n   putting an artificial (albeit large) limitation on the\n   length of the refname. We now write through fprintf, and\n   handle refnames of any size.\n\n - we called adjust_shared_perm only after the file was\n   renamed into place, creating a potential race with\n   readers in a shared repository. The lockfile code now\n   handles this when creating the lockfile, making it\n   atomic.\n\n - the legacy prefer_symlink_refs path did not do any\n   locking at all. Admittedly, it is not atomic from a\n   reader's perspective (as it unlinks and re-creates the\n   symlink to overwrite), but at least it cannot conflict\n   with other writers now.\n\n - the result of this patch is hopefully more readable. It\n   eliminates three goto labels. Two were for error checking\n   that is now simplified, and the third was to reach shared\n   code that has been pulled into its own function.\n\nSigned-off-by: Jeff King <peff@peff.net>\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/370e5ad65e8878989eecbae28a479b1a4d6a841b"},{"sha":"396da8f7a07ae02a6152e0c0fc3eaac8a99b4c65","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"create_symref: write reflog while holding lock\n\nWe generally hold a lock on the matching ref while writing\nto its reflog; this prevents two simultaneous writers from\nclobbering each other's reflog lines (it does not even have\nto be two symref updates; because we don't hold the lock, we\ncould race with somebody writing to the pointed-to ref via\nHEAD, for example).\n\nWe can fix this by writing the reflog before we commit the\nlockfile. This runs the risk of writing the reflog but\nfailing the final rename(), but at least we now err on the\nsame side as the rest of the ref code.\n\nNoticed-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Jeff King <peff@peff.net>\nReviewed-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/396da8f7a07ae02a6152e0c0fc3eaac8a99b4c65"},{"sha":"4be49d756894daca0e8a4477d36c6ed1096ccddc","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"checkout,clone: check return value of create_symref\n\nIt's unlikely that we would fail to create or update a\nsymbolic ref (especially HEAD), but if we do, we should\nnotice and complain. Note that there's no need to give more\ndetails in our error message; create_symref will already\nhave done so.\n\nWhile we're here, let's also fix a minor memory leak in\nclone.\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/4be49d756894daca0e8a4477d36c6ed1096ccddc"},{"sha":"6294dcb49fb2654993fbc132f1b49443adfe4c87","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"lock_ref_sha1_basic: always fill old_oid while holding lock\n\nOur basic strategy for taking a ref lock is:\n\n  1. Create $ref.lock to take the lock\n\n  2. Read the ref again while holding the lock (during which\n     time we know that nobody else can be updating it).\n\n  3. Compare the value we read to the expected \"old_sha1\"\n\nThe value we read in step (2) is returned to the caller via\nthe lock->old_oid field, who may use it for other purposes\n(such as writing a reflog).\n\nIf we have no \"old_sha1\" (i.e., we are unconditionally\ntaking the lock), then we obviously must omit step 3. But we\n_also_ omit step 2. This seems like a nice optimization, but\nit means that the caller sees only whatever was left in\nlock->old_oid from previous calls to resolve_ref_unsafe(),\nwhich happened outside of the lock.\n\nWe can demonstrate this race pretty easily. Imagine you have\nthree commits, $one, $two, and $three. One script just flips\nbetween $one and $two, without providing an old-sha1:\n\n  while true; do\n    git update-ref -m one refs/heads/foo $one\n    git update-ref -m two refs/heads/foo $two\n  done\n\nMeanwhile, another script tries to set the value to $three,\nalso not using an old-sha1:\n\n  while true; do\n    git update-ref -m three refs/heads/foo $three\n  done\n\nIf these run simultaneously, we'll see a lot of lock\ncontention, but each of the writes will succeed some of the\ntime. The reflog may record movements between any of the\nthree refs, but we would expect it to provide a consistent\nlog: the \"from\" field of each log entry should be the same\nas the \"to\" field of the previous one.\n\nBut if we check this:\n\n  perl -alne '\n    print \"mismatch on line $.\"\n            if defined $last && $F[0] ne $last;\n    $last = $F[1];\n  ' .git/logs/refs/heads/foo\n\nwe'll see many mismatches. Why?\n\nBecause sometimes, in the time between lock_ref_sha1_basic\nfilling lock->old_oid via resolve_ref_unsafe() and it taking\nthe lock, there may be a complete write by another process.\nAnd the \"from\" field in our reflog entry will be wrong, and\nwill refer to an older value.\n\nThis is probably quite rare in practice. It requires writers\nwhich do not provide an old-sha1 value, and it is a very\nquick race. However, it is easy to fix: we simply perform\nstep (2), the read-under-lock, whether we have an old-sha1\nor not. Then the value we hand back to the caller is always\natomic.\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/6294dcb49fb2654993fbc132f1b49443adfe4c87"},{"sha":"2859dcd4c8605a5b9cf35efb815418ea8892658b","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"lock_ref_sha1_basic: handle REF_NODEREF with invalid refs\n\nWe sometimes call lock_ref_sha1_basic with REF_NODEREF\nto operate directly on a symbolic ref. This is used, for\nexample, to move to a detached HEAD, or when updating\nthe contents of HEAD via checkout or symbolic-ref.\n\nHowever, the first step of the function is to resolve the\nrefname to get the \"old\" sha1, and we do so without telling\nresolve_ref_unsafe() that we are only interested in the\nsymref. As a result, we may detect a problem there not with\nthe symref itself, but with something it points to.\n\nThe real-world example I found (and what is used in the test\nsuite) is a HEAD pointing to a ref that cannot exist,\nbecause it would cause a directory/file conflict with other\nexisting refs.  This situation is somewhat broken, of\ncourse, as trying to _commit_ on that HEAD would fail. But\nit's not explicitly forbidden, and we should be able to move\naway from it. However, neither \"git checkout\" nor \"git\nsymbolic-ref\" can do so. We try to take the lock on HEAD,\nwhich is pointing to a non-existent ref. We bail from\nresolve_ref_unsafe() with errno set to EISDIR, and the lock\ncode thinks we are attempting to create a d/f conflict.\n\nOf course we're not. The problem is that the lock code has\nno idea what level we were at when we got EISDIR, so trying\nto diagnose or remove empty directories for HEAD is not\nuseful.\n\nTo make things even more complicated, we only get EISDIR in\nthe loose-ref case. If the refs are packed, the resolution\nmay \"succeed\", giving us the pointed-to ref in \"refname\",\nbut a null oid. Later, we say \"ah, the null oid means we are\ncreating; let's make sure there is room for it\", but\nmistakenly check against the _resolved_ refname, not the\noriginal.\n\nWe can fix this by making two tweaks:\n\n  1. Call resolve_ref_unsafe() with RESOLVE_REF_NO_RECURSE\n     when REF_NODEREF is set. This means any errors\n     we get will be from the orig_refname, and we can act\n     accordingly.\n\n     We already do this in the REF_DELETING case, but we\n     should do it for update, too.\n\n  2. If we do get a \"refname\" return from\n     resolve_ref_unsafe(), even with RESOLVE_REF_NO_RECURSE\n     it may be the name of the ref pointed-to by a symref.\n     We already normalize this back to orig_refname before\n     taking the lockfile, but we need to do so before the\n     null_oid check.\n\nWhile we're rearranging the REF_NODEREF handling, we can\nalso bump the initialization of lflags to the top of the\nfunction, where we are setting up other flags. This saves us\nfrom having yet another conditional block on REF_NODEREF\njust to set it later.\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/2859dcd4c8605a5b9cf35efb815418ea8892658b"},{"sha":"a02b8bc4d7525896b5f20553dc10e7ada257046a","author":{"email":"6e28a907263eb96f21562ff8278dfde4b21bd4e0@oakbits.com","name":"Romain Picard"},"message":"git-p4.py: add support for filetype change\n\nAfter changing the type of a file in the git repository, it is not possible to\n\"git p4 publish\" the commit to perforce. This is due to the fact that the git\n\"T\" status is not handled in git-p4.py. This can typically occur when replacing\nan existing file with a symbolic link.\n\nThe \"T\" modifier is now supported in git-p4.py. When a file type has changed,\ninform perforce with the \"p4 edit -f auto\" command.\n\nSigned-off-by: Romain Picard <romain.picard@oakbits.com>\nAcked-by: Luke Diamand <luke@diamand.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/a02b8bc4d7525896b5f20553dc10e7ada257046a"},{"sha":"bc6bf2d7641d6c2450b347d5a0b2f954728bf4d9","author":{"email":"1e54dc1c299571bb7a58e37a7ea31ffd91d38f4e@gmail.com","name":"Alexander Kuleshov"},"message":"format-patch: introduce format.outputDirectory configuration\n\nWe can pass -o/--output-directory to the format-patch command to store\npatches in some place other than the working directory. This patch\nintroduces format.outputDirectory configuration option for same\npurpose.\n\nThe case of usage of this configuration option can be convenience\nto not pass every time -o/--output-directory if an user has pattern\nto store all patches in the /patches directory for example.\n\nThe format.outputDirectory has lower priority than command line\noption, so if user will set format.outputDirectory and pass the\ncommand line option, a result will be stored in a directory that\npassed to command line option.\n\nSigned-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>\nSigned-off-by: Stephen P. Smith <ischis2@cox.net>\nReviewed-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/bc6bf2d7641d6c2450b347d5a0b2f954728bf4d9"},{"sha":"0898c96281044a1130f1a777660aaf17e782c4f6","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"fetch: release pack files before garbage-collecting\n\nBefore auto-gc'ing, we need to make sure that the pack files are\nreleased in case they need to be repacked and garbage-collected.\n\nThis fixes https://github.com/git-for-windows/git/issues/500\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/0898c96281044a1130f1a777660aaf17e782c4f6"},{"sha":"df617b529e9ebf01cde572b8f78f4dd8bc6c010b","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"am: release pack files before garbage-collecting\n\nBefore auto-gc'ing, we need to make sure that the pack files are\nreleased in case they need to be repacked and garbage-collected.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/df617b529e9ebf01cde572b8f78f4dd8bc6c010b"},{"sha":"dcacb1b2ee42d3cc20e4720134f18ab5ba267f3a","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"merge: release pack files before garbage-collecting\n\nBefore auto-gc'ing, we need to make sure that the pack files are\nreleased in case they need to be repacked and garbage-collected.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/dcacb1b2ee42d3cc20e4720134f18ab5ba267f3a"},{"sha":"d5621020c1e0edfa998cb5c5e80cdf47f36ffb1a","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"receive-pack: release pack files before garbage-collecting\n\nBefore auto-gc'ing, we need to make sure that the pack files are\nreleased in case they need to be repacked and garbage-collected.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/d5621020c1e0edfa998cb5c5e80cdf47f36ffb1a"},{"sha":"8c24f5b022095f4735fcb73364ccae7d97576636","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"rebase: ignore failures from \"gc --auto\"\n\nAfter rebasing, we call \"gc --auto\" to clean up if we\ncreated a lot of loose objects. However, we do so inside an\n&&-chain. If \"gc --auto\" fails (e.g., because a previous\nbackground gc blocked us by leaving \"gc.log\" in place),\nthen:\n\n  1. We will fail to clean up the state directory, leaving\n     the user stuck in the rebase forever (even \"git am\n     --abort\" doesn't work, because it calls \"gc --auto\"!).\n\n  2. In some cases, we may return a bogus exit code from\n     rebase, indicating failure when everything except the\n     auto-gc succeeded.\n\nWe can fix this by ignoring the exit code of \"gc --auto\".\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/8c24f5b022095f4735fcb73364ccae7d97576636"},{"sha":"f5eb87b98dd6aa587683057b9f5bd063e682e145","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"pull: allow interactive rebase with --rebase=interactive\n\nA couple of years ago, I found the need to collaborate on topic\nbranches that were rebased all the time, and I really needed to see\nwhat I was rebasing when pulling, so I introduced an\ninteractively-rebasing pull.\n\nThe way builtin pull works, this change also supports the value\n'interactive' for the 'branch.<name>.rebase' config variable, which\nis a neat thing because users can now configure given branches for\ninteractively-rebasing pulls without having to type out the complete\n`--rebase=interactive` option every time they pull.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/f5eb87b98dd6aa587683057b9f5bd063e682e145"},{"sha":"b5496d484d244bc291db0973466b76e7f679cb9f","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"remote: handle the config setting branch.*.rebase=interactive\n\nThe config variable branch.<branchname>.rebase is not only used by `git\npull`, but also by `git remote` when showing details about a remote.\nTherefore, it needs to be taught to accept the newly-introduced\n`interactive` value of said variable.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/b5496d484d244bc291db0973466b76e7f679cb9f"},{"sha":"17c4ddbbaf5842ee6389f6a0f525c40d15152b55","author":{"email":"53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de","name":"Johannes Schindelin"},"message":"completion: add missing branch.*.rebase values\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/rlugojr/git/commits/17c4ddbbaf5842ee6389f6a0f525c40d15152b55"},{"sha":"f9219c0b3233229c6686224dfc953e5b3fe92a84","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"Merge branch 'js/pull-rebase-i'\n\n\"git pull --rebase\" has been extended to allow invoking\n\"rebase -i\".\n\n* js/pull-rebase-i:\n  completion: add missing branch.*.rebase values\n  remote: handle the config setting branch.*.rebase=interactive\n  pull: allow interactive rebase with --rebase=interactive","distinct":true,"url":"https://api.github.com/repos/rlugojr/git/commits/f9219c0b3233229c6686224dfc953e5b3fe92a84"},{"sha":"eefc461ce3f2f0405639ff0919b844a894d6a02c","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"Merge branch 'jk/ok-to-fail-gc-auto-in-rebase'\n\n\"git rebase\", unlike all other callers of \"gc --auto\", did not\nignore the exit code from \"gc --auto\".\n\n* jk/ok-to-fail-gc-auto-in-rebase:\n  rebase: ignore failures from \"gc --auto\"","distinct":true,"url":"https://api.github.com/repos/rlugojr/git/commits/eefc461ce3f2f0405639ff0919b844a894d6a02c"},{"sha":"3c809405cb35679dd5205bf0ea118b7ee9256abb","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"Merge branch 'js/close-packs-before-gc'\n\nMany codepaths that run \"gc --auto\" before exiting kept packfiles\nmapped and left the file descriptors to them open, which was not\nfriendly to systems that cannot remove files that are open.  They\nnow close the packs before doing so.\n\n* js/close-packs-before-gc:\n  receive-pack: release pack files before garbage-collecting\n  merge: release pack files before garbage-collecting\n  am: release pack files before garbage-collecting\n  fetch: release pack files before garbage-collecting","distinct":true,"url":"https://api.github.com/repos/rlugojr/git/commits/3c809405cb35679dd5205bf0ea118b7ee9256abb"},{"sha":"c7dd1c5818111a86deffde1190b57d07efbeed0a","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"Merge branch 'rp/p4-filetype-change'\n\n* rp/p4-filetype-change:\n  git-p4.py: add support for filetype change","distinct":true,"url":"https://api.github.com/repos/rlugojr/git/commits/c7dd1c5818111a86deffde1190b57d07efbeed0a"}]}