setup_git_directory(): return to original cwd upon reaching .git
Get series with b4
b4 am 20100724111505.GC7150@burratinoVersions newest first
- v1 Latest9 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | t1501 (rev-parse): clarifyt/ | +302 | 0 replies | |
| 2/9 | tests: try git apply from subdir of toplevelt/ | +141 | 0 replies | |
| 3/9 | setup: split off $GIT_DIR-set case from setup_git_directory_gentlysetup.c | +37 | 1 reply | |
| 4/9 | setup: split off a function to checks working dir for .git filesetup.c | +13 | 2 replies | |
| 5/9 | setup: split off code to handle stumbling upon a repositorysetup.c | +21 | 0 replies | |
| 6/9 | setup: split off a function to handle hitting ceiling in repo searchsetup.c | +12 | 0 replies | |
| 7/9 | setup: split off get_device_or_die helpersetup.c | +14 | 0 replies | |
| 8/9 | setup: do not forget working dir from subdir of gitdirsetup.c t/ | +3 | 0 replies | |
| 9/9 | Revert "rehabilitate 'git index-pack' inside the object store"builtin/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/9] setup_git_directory(): return to original cwd upon reaching .git
Hi Duy,
Quoted 1 line · Nguyễn Thái Ngọc Duy
Prefix and cwd should be consistent.
I agree with this, but it took me a while to figure out why your fix is safe. Here’s how I figured it out.
Patch 1 cleans up the test script you added a test to. After cleaning it up, it is clearer the test does not belong there.
Patch 2 creates a proper home for the new test.
Patches 3-7 split up setup_git_directory_gently() into small enough pieces that a person with a short attention span can read it now. No functional change intended.
Patch 8 is your fix. I removed the comment (which was just confusing me) and clarified the commit message to compensate
Patch 9 is your patch to revert the other, now redundant fix, also with commit message tweaks.
After this exercise, your patches still look good. :) Maybe these by-products could be useful somehow.
Thoughts (especially improvements) welcome.
Jonathan Nieder (7):
t1501 (rev-parse): clarify
tests: try git apply from subdir of toplevel
setup: split off $GIT_DIR-set case from setup_git_directory_gently
setup: split off a function to checks working dir for .git file
setup: split off code to handle stumbling upon a repository
setup: split off a function to handle hitting ceiling in repo search
setup: split off get_device_or_die function
Nguyễn Thái Ngọc Duy (2):
setup: do not forget working dir from subdir of gitdir Revert "rehabilitate 'git index-pack' inside the object store"
builtin/index-pack.c | 24 +-- setup.c | 171 ++++++++++-------- t/t1501-worktree.sh | 467 ++++++++++++++++++++++++++++++----------------- t/t4111-apply-subdir.sh | 141 ++++++++++++++ 4 files changed, 547 insertions(+), 256 deletions(-) create mode 100755 t/t4111-apply-subdir.sh
Signature · 1 line
1.7.2.rc3