Skip to contentSkip to conversation

What's in git.git

DISCUSSION Junio C Hamano 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Quite a bit of stuff has been merged, and I have tagged the tip of the master as v1.4.2-rc1, before heading for Ottawa.

Notable changes in the "master" branch includes:

- Merge-base has been improved thanks to a test script by ALASCM.

- A handful gitweb enhancements and fixes by Alp Toker and Luben Tuikov.

- git-svn is now out of "contrib/" status.

- Many documentation updates.

- Fixed a performance bug in git-show-branch, which affected git-merge.

- Fixed a nonsense output from git-fmt-merge-msg when pulling HEAD from a remote repository, spotted by Linus.

- "git-log --merge" helps the archeology during a conflicted merge, per request by Linus.

- git-grep boolean expression to allow --and, --or, and --not is now in "master".

- A few updates to git-daemon by Matthias Lederhofer.

- A handful portability fixes by Pavel Roskin and Shawn Pearce.

- Ref-log updates by Shawn Pearce.

* The 'next' branch, in addition, has these.

- "checkout -f" and "reset --hard" fixes, when the new tree should have file "foo" and the old tree and/or working tree has directory there. Earlier we failed to instantiate file "foo", and did not report an error. Testing is appreciated.

- git-apply fixes that was started by a test script by Eric Wong. Testing is appreciated on this stuff.

- Perly git by Pasky with help from others.

- Optional autoconf by Jakub Narebski.

- A WIP of merge-recursive by Johannes and Alex Riesen.

- A usability enhancement of format-patch for imap-send users by Josh Triplett

- A new loose object format support by Linus.

- An update to diff to make --name-only, --name-status, --check and -s mutually exclusive by Timo Hirvonen.

* The 'pu' branch has an experimental "read-tree --rename" to teach renames to git-merge-resolve, but currently it fails a few of its own tests.

I noticed that "git diff" from subdirectories does not seem to pick up the configuration from $GIT_DIR/config properly. I suspect that fixing this breakage properly would help us later, as more and more commands learn to use the configuration mechanism to store user preferences, and the same fix would be applicable to them. If somebody can fix this while we are away this week, that would be wonderful ;-).

#1 lore raw

Re: git diff in subdirectories

Quoted 7 lines · Junio C Hamano

I noticed that "git diff" from subdirectories does not seem to pick up the configuration from $GIT_DIR/config properly. I suspect that fixing this breakage properly would help us later, as more and more commands learn to use the configuration mechanism to store user preferences, and the same fix would be applicable to them. If somebody can fix this while we are away this week, that would be wonderful ;-).

I can think of these ways to fix this:
- Allow git_config() to work in subdirectories.
- It can either change the working directory using setup_git_directory_gently() and go back to the subdirectory later.
- Or we add a function to get the full path to the repository. This could perhaps also be used in setup_git_env() to initialize git_dir? Otherwise I would just add another function similar to git_path pointing to the full path instead of .git/. (This is the way I'd prefer.)
- Fix the it in builtin-diff: change the directory before calling git_config(). Then we would either need to change the directory back or add a parameter to init_revisions to get the prefix without calling setup_git_directory itself. (I think this will change the least code but wont help other commands.)

Any comments?