{"push_id":740352887,"size":875,"distinct_size":0,"ref":"refs/heads/master","head":"a17c56c056d5fea0843b429132904c429a900229","before":"3d4a3ffe64162b45ae7c991fc60623ecb4678cfd","commits":[{"sha":"4ef9caf5431dbbd23f240a25b69a989aeb9840a4","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"path.c: make get_pathname() return strbuf instead of static buffer\n\nWe've been avoiding PATH_MAX whenever possible. This patch makes\nget_pathname() return a strbuf and updates the callers to take\nadvantage of this. The code is simplified as we no longer need to\nworry about buffer overflow.\n\nvsnpath() behavior is changed slightly: previously it always clears\nthe buffer before writing, now it just appends. Fortunately this is a\nstatic function and all of its callers prepare the buffer properly:\ngit_path() gets the buffer from get_pathname() which resets the\nbuffer, the remaining call sites start with STRBUF_INIT'd buffer.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/4ef9caf5431dbbd23f240a25b69a989aeb9840a4"},{"sha":"dcf692625ac569fefbe52269061230f4fde10e47","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"path.c: make get_pathname() call sites return const char *\n\nBefore the previous commit, get_pathname returns an array of PATH_MAX\nlength. Even if git_path() and similar functions does not use the\nwhole array, git_path() caller can, in theory.\n\nAfter the commit, get_pathname() may return a buffer that has just\nenough room for the returned string and git_path() caller should never\nwrite beyond that.\n\nMake git_path(), mkpath() and git_path_submodule() return a const\nbuffer to make sure callers do not write in it at all.\n\nThis could have been part of the previous commit, but the \"const\"\nconversion is too much distraction from the core changes in path.c.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/dcf692625ac569fefbe52269061230f4fde10e47"},{"sha":"1a83c240f2fe7a0caa94009f066d15fa677d32cd","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"git_snpath(): retire and replace with strbuf_git_path()\n\nIn the previous patch, git_snpath() is modified to allocate a new\nstrbuf buffer because vsnpath() needs that. But that makes it\nawkward because git_snpath() receives a pre-allocated buffer from\noutside and has to copy data back. Rename it to strbuf_git_path()\nand make it receive strbuf directly.\n\nUsing git_path() in update_refs_for_switch() which used to call\ngit_snpath() is safe because that function and all of its callers do\nnot keep any pointer to the round-robin buffer pool allocated by\nget_pathname().\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/1a83c240f2fe7a0caa94009f066d15fa677d32cd"},{"sha":"8afdaf39e318711dc05ad52ae6c227eaedf6c7ff","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"path.c: rename vsnpath() to do_git_path()\n\nThe name vsnpath() gives an impression that this is general path\nhandling function. It's not. This is the underlying implementation of\ngit_path(), git_pathdup() and strbuf_git_path() which will prefix\n$GIT_DIR in the result string.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/8afdaf39e318711dc05ad52ae6c227eaedf6c7ff"},{"sha":"57a23b770a839786f2eaae4a9dde779149bfb812","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"path.c: group git_path(), git_pathdup() and strbuf_git_path() together\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/57a23b770a839786f2eaae4a9dde779149bfb812"},{"sha":"557bd833bb4e2bd1f109f6f911ab517b6ba3d27a","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"git_path(): be aware of file relocation in $GIT_DIR\n\nWe allow the user to relocate certain paths out of $GIT_DIR via\nenvironment variables, e.g. GIT_OBJECT_DIRECTORY, GIT_INDEX_FILE and\nGIT_GRAFT_FILE. Callers are not supposed to use git_path() or\ngit_pathdup() to get those paths. Instead they must use\nget_object_directory(), get_index_file() and get_graft_file()\nrespectively. This is inconvenient and could be missed in review (for\nexample, there's git_path(\"objects/info/alternates\") somewhere in\nsha1_file.c).\n\nThis patch makes git_path() and git_pathdup() understand those\nenvironment variables. So if you set GIT_OBJECT_DIRECTORY to /foo/bar,\ngit_path(\"objects/abc\") should return /foo/bar/abc. The same is done\nfor the two remaining env variables.\n\n\"git rev-parse --git-path\" is the wrapper for script use.\n\nThis patch kinda reverts a0279e1 (setup_git_env: use git_pathdup\ninstead of xmalloc + sprintf - 2014-06-19) because using git_pathdup\nhere would result in infinite recursion:\n\n  setup_git_env() -> git_pathdup(\"objects\") -> .. -> adjust_git_path()\n  -> get_object_directory() -> oops, git_object_directory is NOT set\n  yet -> setup_git_env()\n\nI wanted to make git_pathdup_literal() that skips adjust_git_path().\nBut that won't work because later on when $GIT_COMMON_DIR is\nintroduced, git_pathdup_literal(\"objects\") needs adjust_git_path() to\nreplace $GIT_DIR with $GIT_COMMON_DIR.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/557bd833bb4e2bd1f109f6f911ab517b6ba3d27a"},{"sha":"c697b577a28ba8360314e09bc3d66c6c80043b3c","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"*.sh: respect $GIT_INDEX_FILE\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/c697b577a28ba8360314e09bc3d66c6c80043b3c"},{"sha":"1fdc2abf1b09e2c6971b189a8a36430a34c280b6","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"reflog: avoid constructing .lock path with git_path\n\nAmong pathnames in $GIT_DIR, e.g. \"index\" or \"packed-refs\", we want to\nautomatically and silently map some of them to the $GIT_DIR of the\nrepository we are borrowing from via $GIT_COMMON_DIR mechanism.  When\nwe formulate the pathname for its lockfile, we want it to be in the\nsame location as its final destination.  \"index\" is not shared and\nneeds to remain in the borrowing repository, while \"packed-refs\" is\nshared and needs to go to the borrowed repository.\n\ngit_path() could be taught about the \".lock\" suffix and map\n\"index.lock\" and \"packed-refs.lock\" the same way their basenames are\nmapped, but instead the caller can help by asking where the basename\n(e.g. \"index\") is mapped to git_path() and then appending \".lock\"\nafter the mapping is done.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/1fdc2abf1b09e2c6971b189a8a36430a34c280b6"},{"sha":"aaa26805add2a8dedf00dda94c816b60479381c6","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"fast-import: use git_path() for accessing .git dir instead of get_git_dir()\n\nThis allows git_path() to redirect info/fast-import to another place\nif needed\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/aaa26805add2a8dedf00dda94c816b60479381c6"},{"sha":"af07b20d515dce034d16062d9f6baa2e4b4bf7ae","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"commit: use SEQ_DIR instead of hardcoding \"sequencer\"\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/af07b20d515dce034d16062d9f6baa2e4b4bf7ae"},{"sha":"c7b3a3d2fe2688a30ddb8d516ed000eeda13c24e","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"$GIT_COMMON_DIR: a new environment variable\n\nThis variable is intended to support multiple working directories\nattached to a repository. Such a repository may have a main working\ndirectory, created by either \"git init\" or \"git clone\" and one or more\nlinked working directories. These working directories and the main\nrepository share the same repository directory.\n\nIn linked working directories, $GIT_COMMON_DIR must be defined to point\nto the real repository directory and $GIT_DIR points to an unused\nsubdirectory inside $GIT_COMMON_DIR. File locations inside the\nrepository are reorganized from the linked worktree view point:\n\n - worktree-specific such as HEAD, logs/HEAD, index, other top-level\n   refs and unrecognized files are from $GIT_DIR.\n\n - the rest like objects, refs, info, hooks, packed-refs, shallow...\n   are from $GIT_COMMON_DIR (except info/sparse-checkout, but that's\n   a separate patch)\n\nScripts are supposed to retrieve paths in $GIT_DIR with \"git rev-parse\n--git-path\", which will take care of \"$GIT_DIR vs $GIT_COMMON_DIR\"\nbusiness.\n\nThe redirection is done by git_path(), git_pathdup() and\nstrbuf_git_path(). The selected list of paths goes to $GIT_COMMON_DIR,\nnot the other way around in case a developer adds a new\nworktree-specific file and it's accidentally promoted to be shared\nacross repositories (this includes unknown files added by third party\ncommands)\n\nThe list of known files that belong to $GIT_DIR are:\n\nADD_EDIT.patch BISECT_ANCESTORS_OK BISECT_EXPECTED_REV BISECT_LOG\nBISECT_NAMES CHERRY_PICK_HEAD COMMIT_MSG FETCH_HEAD HEAD MERGE_HEAD\nMERGE_MODE MERGE_RR NOTES_EDITMSG NOTES_MERGE_WORKTREE ORIG_HEAD\nREVERT_HEAD SQUASH_MSG TAG_EDITMSG fast_import_crash_* logs/HEAD\nnext-index-* rebase-apply rebase-merge rsync-refs-* sequencer/*\nshallow_*\n\nPath mapping is NOT done for git_path_submodule(). Multi-checkouts are\nnot supported as submodules.\n\nHelped-by: Jens Lehmann <Jens.Lehmann@web.de>\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/c7b3a3d2fe2688a30ddb8d516ed000eeda13c24e"},{"sha":"3bc518084acfdbc81a656c9cdff1f1bd50e0615f","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"git-sh-setup.sh: use rev-parse --git-path to get $GIT_DIR/objects\n\nIf $GIT_COMMON_DIR is set, $GIT_OBJECT_DIRECTORY should be\n$GIT_COMMON_DIR/objects, not $GIT_DIR/objects. Just let rev-parse\n--git-path handle it.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/3bc518084acfdbc81a656c9cdff1f1bd50e0615f"},{"sha":"b849b954d22ee069b0edec1a12c78782ae1e629d","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"*.sh: avoid hardcoding $GIT_DIR/hooks/...\n\nIf $GIT_COMMON_DIR is set, it should be $GIT_COMMON_DIR/hooks/, not\n$GIT_DIR/hooks/. Just let rev-parse --git-path handle it.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/b849b954d22ee069b0edec1a12c78782ae1e629d"},{"sha":"337959b491170c13166d7bced07a4c23b7567d27","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"git-stash: avoid hardcoding $GIT_DIR/logs/....\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/337959b491170c13166d7bced07a4c23b7567d27"},{"sha":"1d186b6f3517b88325fec893f53cf59c3098f409","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"setup.c: convert is_git_directory() to use strbuf\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/1d186b6f3517b88325fec893f53cf59c3098f409"},{"sha":"4dc4e1457e17788e8f258a3f18c78bd58ef543af","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"setup.c: detect $GIT_COMMON_DIR in is_git_directory()\n\nIf the file \"$GIT_DIR/commondir\" exists, it contains the value of\n$GIT_COMMON_DIR.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/4dc4e1457e17788e8f258a3f18c78bd58ef543af"},{"sha":"7d0fb0da950026c08a88d8374be5716dafce72cc","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"setup.c: convert check_repository_format_gently to use strbuf\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/7d0fb0da950026c08a88d8374be5716dafce72cc"},{"sha":"e61a509a497520550b5b84b753a95549158f9f1c","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/e61a509a497520550b5b84b753a95549158f9f1c"},{"sha":"31e26ebcb512ad234d9725120fb4f5670ff75625","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"setup.c: support multi-checkout repo setup\n\nThe repo setup procedure is updated to detect $GIT_DIR/commondir and\nset $GIT_COMMON_DIR properly.\n\nThe core.worktree is ignored when $GIT_COMMON_DIR is set. This is\nbecause the config file is shared in multi-checkout setup, but\ncheckout directories _are_ different. Making core.worktree effective\nin all checkouts mean it's back to a single checkout.\n\nHelped-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/31e26ebcb512ad234d9725120fb4f5670ff75625"},{"sha":"316e53e68c7c4d89876524f7f010685ebfe7be1e","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"wrapper.c: wrapper to open a file, fprintf then close\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/tacker66/git/commits/316e53e68c7c4d89876524f7f010685ebfe7be1e"}]}