git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Tell vim the textwidth is 75.
@ 2005-07-21 20:23 Bryan larsen
  2005-07-22  2:50 ` Junio C Hamano
  0 siblings, 1 reply; 59+ messages in thread
From: Bryan larsen @ 2005-07-21 20:23 UTC (permalink / raw)
  To: git; +Cc: catalin.marinas, Bryan Larsen

When invoking EDITOR, add some metadata to tell vim the textwidth is 75.

Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com>
---

 stgit/stack.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/stgit/stack.py b/stgit/stack.py
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -66,6 +66,8 @@ def edit_file(string, comment):
           % __comment_prefix
     print >> f, __comment_prefix, \
           'Trailing empty lines will be automatically removed.'
+    print >> f, __comment_prefix, \
+          'vim: textwidth=75'
     f.close()
 
     # the editor

^ permalink raw reply	[flat|nested] 59+ messages in thread
* Re: [RFC] extending git-ls-files --exclude.
@ 2005-07-25  6:41 Marco Costalba
  2005-07-25  7:32 ` Junio C Hamano
  2005-07-25 19:56 ` Junio C Hamano
  0 siblings, 2 replies; 59+ messages in thread
From: Marco Costalba @ 2005-07-25  6:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano wrote:


>The list of patterns that is in effect at a given time is
>built and ordered in the following way:
>
> * --exclude=<pattern> and lines read from --exclude-from=<file>
>   come at the beginning of the list of patterns, in the order
>   given on the command line.  Patterns that come from the file
>   specified with --exclude-from are ordered in the same order
>   as they appear in the file.
>
> * When --exclude-per-directory=<name> is specified, upon
>   entering a directory that has such a file, its contents are
>   appended at the end of the current "list of patterns".  They
>   are popped off when leaving the directory.
>

Are really necessary to have both --exclude-from=<file> and 
--exclude-per-directory=<name> ?

Peraphs, if the file name of excluded list is the same for each directory, 
e.g. .gitignore or something similar, instead of --exclude-per-directory
we can use a concept of file validity 'scope' and just use --exclude-from=<file>.
If entering in a directory <file> is found its contents are appended and 
removed when leaving directory. A bad analogy can be with the use of 
recursive Makefile.

>
>A pattern specified on the command line with --exclude or read
>from the file specified with --exclude-from is relative to the
>top of the directory tree.  A pattern read from a file specified
>by --exclude-per-directory is relative to the directory that the
>pattern file appears in.
>

If we use the 'scope' logic we can just prepend path when adding entries
and serach with with FNM_PATHNAME flag.

> - if it does not contain a slash '/', it is a shell glob
>   pattern and used to match against the filename without
>   leading directories (i.e. the same way as the current
>   implementation).
>
> - otherwise, it is a shell glob pattern, suitable for
>   consumption by fnmatch(3) with FNM_PATHNAME flag.  I.e. a
>   slash in the pattern must match a slash in the pathname.
>   "Documentation/*.html" matches "Documentation/git.html" but
>   not "ppc/ppc.html".  As a natural exception, "/*.c" matches
>   "cat-file.c" but not "mozilla-sha1/sha1.c".
>

Same comment as above, if prepending path when adding per 
directory contents we can simplify to always use FNM_PATHNAME flag.

We don't have even to special case base directory global
scope <file> if we use realtive paths so that we prepend its contents 
with ./ and we have what we expect.

I am sorry to not be able to send a patch, better explaining what 
proposed but I am just leaving today and I will be off line
for a couple of weeks.


Marco


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 59+ messages in thread
[parent not found: <20050725213456.23910.qmail@web26310.mail.ukl.yahoo.com>]

end of thread, other threads:[~2005-08-01 16:24 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-21 20:23 [PATCH 1/1] Tell vim the textwidth is 75 Bryan larsen
2005-07-22  2:50 ` Junio C Hamano
2005-07-22 10:37   ` Catalin Marinas
2005-07-22 19:24     ` Sam Ravnborg
2005-07-22 20:39       ` Junio C Hamano
2005-07-22 20:59         ` Petr Baudis
2005-07-24 22:49           ` [RFC] extending git-ls-files --exclude Junio C Hamano
2005-07-24 22:50             ` [PATCH] git-ls-files: --exclude mechanism updates Junio C Hamano
2005-07-24 22:51             ` [PATCH] Documentation: describe git-ls-files --exclude patterns Junio C Hamano
2005-07-25  9:19             ` [RFC] extending git-ls-files --exclude Catalin Marinas
2005-07-25 19:58               ` Junio C Hamano
2005-07-25 20:09                 ` Linus Torvalds
2005-07-25 20:27                   ` Junio C Hamano
2005-07-25 20:51                     ` Catalin Marinas
2005-07-28 15:57                     ` Petr Baudis
2005-07-25 20:59                 ` Catalin Marinas
2005-07-28 15:52             ` Petr Baudis
2005-07-28 16:04               ` A Large Angry SCM
2005-07-28 19:25                 ` Matthias Urlichs
2005-07-29  7:21                   ` Petr Baudis
2005-07-29  7:37                     ` Matthias Urlichs
2005-07-29 13:49                     ` A Large Angry SCM
2005-07-29  5:04               ` Junio C Hamano
2005-07-29  7:36                 ` Petr Baudis
2005-07-29  8:24                   ` Junio C Hamano
2005-07-29  8:41                     ` Petr Baudis
2005-08-01 16:14                     ` Wayne Scott
2005-07-29  7:50                 ` [PATCH] ls-files: rework exclude patterns Junio C Hamano
2005-07-29  7:51                 ` [PATCH] Documentation and tests: ls-files exclude pattern Junio C Hamano
2005-07-22 21:43         ` [PATCH 1/1] Tell vim the textwidth is 75 Catalin Marinas
2005-07-22 23:07           ` Junio C Hamano
2005-07-23  8:41             ` Catalin Marinas
2005-07-23  9:30               ` Petr Baudis
2005-07-23 10:27                 ` Catalin Marinas
2005-07-23 16:33                   ` Bryan Larsen
2005-07-23 20:52                     ` Catalin Marinas
2005-07-28 19:47                   ` Petr Baudis
2005-07-29  2:24                     ` Junio C Hamano
2005-07-29  2:59                       ` Linus Torvalds
2005-07-29  9:55                     ` Catalin Marinas
2005-07-29 11:10                       ` Petr Baudis
2005-07-29 12:34                         ` Catalin Marinas
2005-07-30  2:11                         ` Junio C Hamano
2005-07-23  9:04             ` Petr Baudis
2005-07-24  1:13               ` Junio C Hamano
2005-07-22 21:00       ` Catalin Marinas
2005-07-22 20:41     ` Petr Baudis
2005-07-22 21:16       ` Junio C Hamano
2005-07-22 21:27         ` Petr Baudis
2005-07-22 23:24           ` Junio C Hamano
2005-07-22 23:50             ` Petr Baudis
2005-07-23 10:32             ` Catalin Marinas
2005-07-26  0:18             ` Updating diff-raw status letter to 'A' for added files Junio C Hamano
2005-07-26  0:20               ` [PATCH 1/2] Use symbolic constants for diff-raw status indicators Junio C Hamano
2005-07-26  0:21               ` [PATCH 2/2] diff-raw: Use 'A' instead of 'N' for added files Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2005-07-25  6:41 [RFC] extending git-ls-files --exclude Marco Costalba
2005-07-25  7:32 ` Junio C Hamano
2005-07-25 19:56 ` Junio C Hamano
     [not found] <20050725213456.23910.qmail@web26310.mail.ukl.yahoo.com>
2005-07-25 22:06 ` Junio C Hamano

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).