Documentation/git-update-index.txt: Remove obsolete note
PATCH 1/1 Documentation/git-update-index.txt: Remove obsolete note
8dcf39 (Prevent bogus paths from being added to the index) introduced a check for files beginning with '.', preventing path names such as ./file, dir/./file or dir/../file from being added. This was reflected in the man page.
d089eba (setup: sanitize absolute and funny paths in get_pathspec()) removed this check without reflecting the change in the man page.
--- Documentation/git-update-index.txt | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
Documentation/git-update-index.txt +2 -4
@@ -152,10 +152,8 @@ you will need to handle the situation manually. <file>:: Files to act on. - Note that files beginning with '.' are discarded. This includes - `./file` and `dir/./file`. If you don't want this, then use - cleaner names. - The same applies to directories ending '/' and paths with '//' + Note that directories ending in '/' and paths with '//' are + discarded. Using --refresh ---------------
Signature · 1 line
1.7.0.4
Quoted 7 lines · Jakob Pfender
8dcf39 (Prevent bogus paths from being added to the index) introduced a check for files beginning with '.', preventing path names such as
./file,dir/./fileordir/../filefrom being added. This was reflected in the man page.d089eba (setup: sanitize absolute and funny paths in
get_pathspec()) removed this check without reflecting the change in the man page.
Sounds good.
Quoted 8 lines
<file>::
Files to act on.
- Note that files beginning with '.' are discarded. This includes
-./fileanddir/./file. If you don't want this, then use
- cleaner names.
- The same applies to directories ending '/' and paths with '//'
+ Note that directories ending in '/' and paths with '//' are
+ discarded.
Do you mean the slashes or the directories are discarded? Directories are not, I believe.
Signature · 1 line
Duy
Quoted 20 lines · Nguyen Thai Ngoc Duy
Quoted 7 lines · Jakob Pfender
8dcf39 (Prevent bogus paths from being added to the index) introduced a check for files beginning with '.', preventing path names such as
./file,dir/./fileordir/../filefrom being added. This was reflected in the man page.d089eba (setup: sanitize absolute and funny paths in
get_pathspec()) removed this check without reflecting the change in the man page.Sounds good.
Documentation/git-update-index.txt you will need to handle the situation manually. · line 156
Quoted 8 lines
<file>::
Files to act on.Documentation/git-update-index.txt +2
-4- Note that files beginning with '.' are discarded. This includes - `./file` and `dir/./file`. If you don't want this, then use - cleaner names. - The same applies to directories ending '/' and paths with '//' + Note that directories ending in '/' and paths with '//' are + discarded.
Quoted 2 lines
Do you mean the slashes or the directories are discarded? Directories are not, I believe.
Since we're talking about update-index, yes, directories are actually discarded, as update-index only accepts files. Directories can be added via git-add as git-add just passes the single files in the directory to update-index.
Quoted 10 lines · Nguyen Thai Ngoc Duy
Quoted 7 lines · Jakob Pfender
8dcf39 (Prevent bogus paths from being added to the index) introduced a check for files beginning with '.', preventing path names such as
./file,dir/./fileordir/../filefrom being added. This was reflected in the man page.d089eba (setup: sanitize absolute and funny paths in
get_pathspec()) removed this check without reflecting the change in the man page.Sounds good.
When I first read it, however, I thought that the "removal" meant that the rewrite made the code riskier by accepting nonsense, which turns out not to be what the author meant. It was more like "instead of rejecting, accept these paths after normalizing", no?
Quoted 11 lines · Junio C Hamano
Quoted 9 lines · Nguyen Thai Ngoc Duy
Quoted 7 lines · Jakob Pfender
8dcf39 (Prevent bogus paths from being added to the index) introduced a check for files beginning with '.', preventing path names such as
./file,dir/./fileordir/../filefrom being added. This was reflected in the man page.d089eba (setup: sanitize absolute and funny paths in
get_pathspec()) removed this check without reflecting the change in the man page.
Quoted 7 lines
Quoted 1 line
Sounds good.
When I first read it, however, I thought that the "removal" meant that the rewrite made the code riskier by accepting nonsense, which turns out not to be what the author meant. It was more like "instead of rejecting, accept these paths after normalizing", no?
Yes it's more like that.
Signature · 1 line
Duy