* [PATCH] Documentation/git-update-index.txt: Remove obsolete note
@ 2011-03-30 13:01 Jakob Pfender
2011-03-31 12:15 ` Nguyen Thai Ngoc Duy
0 siblings, 1 reply; 5+ messages in thread
From: Jakob Pfender @ 2011-03-30 13:01 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, torvalds, spearce, johannes.schindelin, peff,
nico, pclouds, barkalow, chriscool, jrnieder, raa.lkml,
Matthieu.Moy, Johannes Sixt
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.
Signed-off-by: Jakob Pfender <jpfender@elegosoft.com>
---
Documentation/git-update-index.txt | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-update-index.txt
b/Documentation/git-update-index.txt
index 1ca56c8..f0dcd1f 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -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
---------------
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/git-update-index.txt: Remove obsolete note
2011-03-30 13:01 [PATCH] Documentation/git-update-index.txt: Remove obsolete note Jakob Pfender
@ 2011-03-31 12:15 ` Nguyen Thai Ngoc Duy
2011-03-31 15:18 ` Jakob Pfender
2011-03-31 21:41 ` Junio C Hamano
0 siblings, 2 replies; 5+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2011-03-31 12:15 UTC (permalink / raw)
To: Jakob Pfender
Cc: git, Junio C Hamano, torvalds, spearce, johannes.schindelin, peff,
nico, barkalow, chriscool, jrnieder, raa.lkml, Matthieu.Moy,
Johannes Sixt
On Wed, Mar 30, 2011 at 8:01 PM, Jakob Pfender <jpfender@elegosoft.com> wrote:
> 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.
Sounds good.
> <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.
Do you mean the slashes or the directories are discarded? Directories
are not, I believe.
--
Duy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/git-update-index.txt: Remove obsolete note
2011-03-31 12:15 ` Nguyen Thai Ngoc Duy
@ 2011-03-31 15:18 ` Jakob Pfender
2011-03-31 21:41 ` Junio C Hamano
1 sibling, 0 replies; 5+ messages in thread
From: Jakob Pfender @ 2011-03-31 15:18 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, torvalds, spearce, johannes.schindelin, peff,
nico, barkalow, chriscool, jrnieder, raa.lkml, Matthieu.Moy,
Johannes Sixt
On 03/31/2011 02:15 PM, Nguyen Thai Ngoc Duy wrote:
> On Wed, Mar 30, 2011 at 8:01 PM, Jakob
Pfender<jpfender@elegosoft.com> wrote:
>> 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.
>
> Sounds good.
>
>> <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.
>
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/git-update-index.txt: Remove obsolete note
2011-03-31 12:15 ` Nguyen Thai Ngoc Duy
2011-03-31 15:18 ` Jakob Pfender
@ 2011-03-31 21:41 ` Junio C Hamano
2011-04-02 8:52 ` Nguyen Thai Ngoc Duy
1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2011-03-31 21:41 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy
Cc: Jakob Pfender, git, Junio C Hamano, torvalds, spearce,
johannes.schindelin, peff, nico, barkalow, chriscool, jrnieder,
raa.lkml, Matthieu.Moy, Johannes Sixt
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> On Wed, Mar 30, 2011 at 8:01 PM, Jakob Pfender <jpfender@elegosoft.com> wrote:
>> 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.
>
> 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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/git-update-index.txt: Remove obsolete note
2011-03-31 21:41 ` Junio C Hamano
@ 2011-04-02 8:52 ` Nguyen Thai Ngoc Duy
0 siblings, 0 replies; 5+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2011-04-02 8:52 UTC (permalink / raw)
To: Junio C Hamano
Cc: Jakob Pfender, git, torvalds, spearce, johannes.schindelin, peff,
nico, barkalow, chriscool, jrnieder, raa.lkml, Matthieu.Moy,
Johannes Sixt
On Fri, Apr 1, 2011 at 4:41 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>
>> On Wed, Mar 30, 2011 at 8:01 PM, Jakob Pfender <jpfender@elegosoft.com> wrote:
>>> 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.
>>
>> 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.
--
Duy
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-02 8:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-30 13:01 [PATCH] Documentation/git-update-index.txt: Remove obsolete note Jakob Pfender
2011-03-31 12:15 ` Nguyen Thai Ngoc Duy
2011-03-31 15:18 ` Jakob Pfender
2011-03-31 21:41 ` Junio C Hamano
2011-04-02 8:52 ` Nguyen Thai Ngoc Duy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).