Re: [PATCH] tests: turn on test-lint-shell-syntax by default

2013-01-13 Thread Torsten Bögershausen
On 12.01.13 07:00, Junio C Hamano wrote: Torsten Bögershausen tbo...@web.de writes: The test Makefile has a default set of lint tests which are run as part of make test. The macro TEST_LINT defaults to test-lint-duplicates test-lint-executable. Add test-lint-shell-syntax here, to detect

git list files

2013-01-13 Thread Стойчо Слепцов
Hi, I was searching for some git- command to provide me a list of files (in a git directory), same as ls, but showing information from the last commit of the file instead. lets, say the equivalent of the $ls -d b* within git.git root directory would look like: 98746061 jrnieder

Re: missing objects -- prevention

2013-01-13 Thread Jeff King
On Sun, Jan 13, 2013 at 06:26:53AM +0530, Sitaram Chamarty wrote: Right, I meant if you have receive.fsckObjects on. It won't help this situation at all, as we already do a connectivity check separate from the fsck. But I do recommend it in general, just because it helps catch bad objects

Re: [PATCH 0/8] Initial support for Python 3

2013-01-13 Thread John Keeping
On Sun, Jan 13, 2013 at 12:41:30AM +, John Keeping wrote: On Sat, Jan 12, 2013 at 06:43:04PM -0500, Pete Wyckoff wrote: Can you give me some hints about the byte/unicode string issues in git-p4.py? There's really only one place that does: p4 = subprocess.Popen(p4 -G ...)

[PATCH v3 00/31] nd/parse-pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Changes from v2 (it's hard to keep track of after the rebase, so I may be missing something here): - rebased on top of recent master, incorporate changes in init_pathspec from jk/pathspec-literal and nd/pathspec-wildcard to parse_pathspec - kill strip_trailing_slash_from_submodules and

[PATCH v3 01/31] clean: remove unused variable seen

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/clean.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c index 69c1cda..4cdabe0 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -46,7 +46,6 @@ int

[PATCH v3 02/31] Add copy_pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/mv.c | 13 +++-- cache.h | 1 + dir.c| 8 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/builtin/mv.c b/builtin/mv.c index 034fec9..16ce99b 100644 --- a/builtin/mv.c +++

[PATCH v3 03/31] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Currently to fill a struct pathspec, we do: const char **paths; paths = get_pathspec(prefix, argv); ... init_pathspec(pathspec, paths); paths can only carry bare strings, which loses information from command line arguments such as pathspec magic or the prefix part's length for each

[PATCH v3 04/31] parse_pathspec: save original pathspec for reporting

2013-01-13 Thread Nguyễn Thái Ngọc Duy
We usually use pathspec_item's match field for pathspec error reporting. However match (or raw) does not show the magic part, which will play more important role later on. Preserve exact user input for reporting. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 1 + dir.c |

[PATCH v3 05/31] Export parse_pathspec() and convert some get_pathspec() calls

2013-01-13 Thread Nguyễn Thái Ngọc Duy
These call sites follow the pattern: paths = get_pathspec(prefix, argv); init_pathspec(pathspec, paths); which can be converted into a single parse_pathspec() call. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/grep.c | 4 +--- builtin/ls-tree.c | 8

[PATCH v3 06/31] Guard against new pathspec magic in pathspec matching code

2013-01-13 Thread Nguyễn Thái Ngọc Duy
GUARD_PATHSPEC() marks pathspec-sensitive code (basically anything in 'struct pathspec' except fields nr and original). GUARD_PATHSPEC() is not supposed to fail. The steps for a new pathspec magic or optimization would be: - update parse_pathspec, add extra information to struct pathspec -

[PATCH v3 07/31] clean: convert to use parse_pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/clean.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c index 4cdabe0..fb0fe9a 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -42,7 +42,7 @@ int

[PATCH v3 08/31] parse_pathspec: add PATHSPEC_EMPTY_MATCH_ALL

2013-01-13 Thread Nguyễn Thái Ngọc Duy
We have two ways of dealing with empty pathspec: 1. limit it to current prefix 2. match the entire working directory Some commands go with #1, some with #2. get_pathspec() and parse_pathspec() only supports #1. Make it support #2 too via PATHSPEC_EMPTY_MATCH_ALL flag. Signed-off-by: Nguyễn Thái

[PATCH v3 09/31] commit: convert to use parse_pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/commit.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index d6dd3df..444ae1d 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -277,17 +277,17 @@

[PATCH v3 10/31] status: convert to use parse_pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/commit.c | 9 + wt-status.c | 17 +++-- wt-status.h | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index 444ae1d..196dfab 100644 ---

[PATCH v3 11/31] rerere: convert to use parse_pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/rerere.c | 6 +++--- rerere.c | 8 rerere.h | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/builtin/rerere.c b/builtin/rerere.c index dc1708e..a573c4a 100644 ---

[PATCH v3 12/31] checkout: convert to use parse_pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
This commit introduces a subtle bug: - when match_pathspec() returns seen[], it follows the order of the input const char **pathspec, which is now pathspec.raw[] - when match_pathspec() returns seen[], it follows the order of pathspec.items[] - due to 86e4ca6 (tree_entry_interesting(): fix

[PATCH v3 13/31] rm: convert to use parse_pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/rm.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/builtin/rm.c b/builtin/rm.c index dabfcf6..1a2c932 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -216,7 +216,7 @@ static struct

[PATCH v3 14/31] parse_pathspec: support stripping submodule trailing slashes

2013-01-13 Thread Nguyễn Thái Ngọc Duy
This flag is equivalent to builtin/ls-files.c:strip_trailing_slashes() and is intended to replace that function when ls-files is converted to use parse_pathspec. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 1 + setup.c | 9 + 2 files changed, 10 insertions(+)

[PATCH v3 16/31] archive: convert to use parse_pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- archive.c | 16 ++-- archive.h | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/archive.c b/archive.c index 93e00bb..f1a28c9 100644 --- a/archive.c +++ b/archive.c @@ -151,7 +151,6 @@ int

[PATCH v3 18/31] add: convert to use parse_pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c | 106 +- 1 file changed, 39 insertions(+), 67 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index 075312a..22076ff 100644 --- a/builtin/add.c +++

[PATCH v3 19/31] Convert read_cache_preload() to take struct pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 2 +- builtin/commit.c | 4 ++-- builtin/diff-files.c | 2 +- builtin/diff-index.c | 2 +- builtin/diff.c | 4 ++-- cache.h | 4 +++- preload-index.c | 20 +++- 7

[PATCH v3 20/31] Convert unmerge_cache to take struct pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 2 +- rerere.c | 2 +- resolve-undo.c | 4 ++-- resolve-undo.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 7ec5472..92b11ea

[PATCH v3 21/31] checkout: convert read_tree_some to take struct pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 9 +++-- tree.c | 4 ++-- tree.h | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 92b11ea..97ea496 100644 ---

[PATCH v3 22/31] Convert report_path_error to take struct pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
This commit fixes a subtle bug in ls-files and commit: - when match_pathspec() returns seen[], it follows the order of the input const char **pathspec, which is now pathspec.raw[] - when match_pathspec() returns seen[], it follows the order of pathspec.items[] - due to 86e4ca6

[PATCH v3 24/31] Convert {read,fill}_directory to take struct pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c | 2 +- builtin/clean.c| 2 +- builtin/grep.c | 2 +- builtin/ls-files.c | 2 +- dir.c | 16 +++- dir.h | 4 ++-- wt-status.c| 4 ++-- 7 files changed, 19

[PATCH v3 25/31] Convert add_files_to_cache to take struct pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c| 8 +--- builtin/commit.c | 2 +- cache.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index dcea98f..89ae67d 100644 --- a/builtin/add.c +++

[PATCH v3 27/31] Remove diff_tree_{setup,release}_paths

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/blame.c | 12 ++-- builtin/reset.c | 4 ++-- diff.h | 2 -- notes-merge.c | 4 ++-- revision.c | 5 +++-- tree-diff.c | 18 -- 6 files changed, 17 insertions(+), 28 deletions(-)

[PATCH v3 28/31] Remove init_pathspec() in favor of parse_pathspec()

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- archive.c | 2 +- builtin/blame.c| 6 +++--- builtin/log.c | 2 +- builtin/ls-files.c | 10 -- cache.h| 1 - diff-lib.c | 2 +- dir.c | 52

[PATCH v3 29/31] Remove match_pathspec() in favor of match_pathspec_depth()

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c | 46 --- dir.c | 100 -- dir.h | 1 - 3 files changed, 20 insertions(+), 127 deletions(-) diff --git a/builtin/add.c

[PATCH v3 30/31] tree-diff: remove the use of pathspec's raw[] in follow-rename codepath

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Put a checkpoint to guard unsupported pathspec features in future. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- tree-diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree-diff.c b/tree-diff.c index aba6df7..718f938 100644 --- a/tree-diff.c +++

[PATCH v3 31/31] Rename field raw to _raw in struct pathspec

2013-01-13 Thread Nguyễn Thái Ngọc Duy
This patch is essentially no-op. It helps catching new use of this field though. This field is introduced as an intermediate step for the pathspec conversion and will be removed eventually. At this stage no more access sites should be introduced. Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH/WIP 00/10] Fancy pathspec stuff

2013-01-13 Thread Nguyễn Thái Ngọc Duy
I wanted to see how new pathspec feature can be implemented after nd/parse-pathspec, mainly to see if nd/parse-pathspec needs fixing. It's nowhere near 'pu' quality but may be interesting for some people. It does: - introduce :q/.../ syntax in addition to :(...), which always requires quoting

[PATCH/WIP 01/10] pathspec: allow to use alternate char for quoting long magic mnemonic

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Currently use parentheses, e.g. :(icase,literal)path, but they do not play well with unix shells because they have special meaning and we need to quote them. Allow an alternate syntax :q/icase,literal/path. Similar to ed's s/// syntax, '/' can be replaced with anything. If the opening quote has a

[PATCH/WIP 02/10] parse_pathspec: make sure the prefix part is wildcard-free

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h| 1 + path.c | 15 ++- setup.c| 24 +++ t/t6131-pathspec-prefix.sh | 47 ++ 4 files changed,

[PATCH/WIP 04/10] parse_pathspec: save prefix information

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 2 +- setup.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index 900b81a..fb54876 100644 --- a/cache.h +++ b/cache.h @@ -493,7 +493,7 @@ struct pathspec { const char

[PATCH/WIP 05/10] pathspec: prepare for :(glob)path syntax

2013-01-13 Thread Nguyễn Thái Ngọc Duy
:(glob)path differs from path that it uses wildmatch with FNM_PATHNAME while plain path uses fnmatch without FNM_PATHNAME. git_fnmatch() was probably ill-designed. It was intended to cover other use of fnmatch besides pathspec. But so far it's only used by pathspec code. Signed-off-by: Nguyễn

[PATCH/WIP 06/10] Enable :(glob)path syntax for a lot of commands

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c | 4 +++- builtin/checkout.c | 4 +++- builtin/clean.c| 4 +++- builtin/commit.c | 8 ++-- builtin/grep.c | 4 +++- builtin/ls-files.c | 4 +++- builtin/ls-tree.c | 4 +++-

[PATCH/WIP 07/10] parse_pathspec: accept :(icase)path syntax

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 1 + setup.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index 9c27f18..c3b5585 100644 --- a/cache.h +++ b/cache.h @@ -480,6 +480,7 @@ extern int ie_modified(const struct index_state

[PATCH/WIP 08/10] common_prefix/read_directory: treat PATHSPEC_ICASE like wildcards

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- dir.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dir.c b/dir.c index 760b776..d0e7ca8 100644 --- a/dir.c +++ b/dir.c @@ -66,15 +66,22 @@ static size_t common_prefix_len(const struct pathspec

[PATCH/WIP 09/10] pathspec: support icase in match_pathspec_depth and tree_entry_interesting

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 17 + dir.c | 18 +++--- tree-walk.c | 30 +++--- 3 files changed, 47 insertions(+), 18 deletions(-) diff --git a/cache.h b/cache.h index c3b5585..216f87c 100644 ---

[PATCH/WIP 10/10] Enable ls-files and ls-tree for testing PATHSPEC_ICASE

2013-01-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c | 6 -- builtin/ls-files.c | 3 ++- builtin/ls-tree.c | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index a3ffa9d..b9a5432 100644 --- a/builtin/add.c +++

Re: [PATCH 2/8] git_remote_helpers: fix input when running under Python 3

2013-01-13 Thread John Keeping
On Sun, Jan 13, 2013 at 04:26:39AM +0100, Michael Haggerty wrote: On 01/12/2013 08:23 PM, John Keeping wrote: Although 2to3 will fix most issues in Python 2 code to make it run under Python 3, it does not handle the new strict separation between byte strings and unicode strings. There is one

Re: [PATCH 3/8] git_remote_helpers: Force rebuild if python version changes

2013-01-13 Thread John Keeping
On Sat, Jan 12, 2013 at 06:30:44PM -0500, Pete Wyckoff wrote: j...@keeping.me.uk wrote on Sat, 12 Jan 2013 19:23 +: When different version of python are used to build via distutils, the behaviour can change. Detect changes in version and pass --force in this case. [..] diff --git

Re: [PATCH 0/8] Initial support for Python 3

2013-01-13 Thread Pete Wyckoff
j...@keeping.me.uk wrote on Sun, 13 Jan 2013 00:41 +: On Sat, Jan 12, 2013 at 06:43:04PM -0500, Pete Wyckoff wrote: Can you give me some hints about the byte/unicode string issues in git-p4.py? There's really only one place that does: p4 = subprocess.Popen(p4 -G ...)

Re: [PATCH] tests: turn on test-lint-shell-syntax by default

2013-01-13 Thread Matt Kraai
On Sun, Jan 13, 2013 at 11:25:57AM +0100, Torsten Bögershausen wrote: @@ -16,10 +16,10 @@ sub err { while () { chomp; - /^\s*sed\s+-i/ and err 'sed -i is not portable'; - /^\s*echo\s+-n/ and err 'echo -n is not portable (please use printf)'; - /^\s*declare\s+/ and err

Re: [PATCH] t/lib-cvs: cvsimport no longer works without Python = 2.7

2013-01-13 Thread John Keeping
On Sat, Jan 12, 2013 at 04:27:36PM +0100, Michael Haggerty wrote: Even if we were to rip out the fallback code that uses the 2.7-only subprocess.check_output() on cvsps -V, the function is also used for doing the real work interacting with cvsps-3.x, so I think this patch will be

Re: [PATCH 0/8] Initial support for Python 3

2013-01-13 Thread John Keeping
On Sun, Jan 13, 2013 at 11:40:45AM -0500, Pete Wyckoff wrote: j...@keeping.me.uk wrote on Sun, 13 Jan 2013 00:41 +: On Sat, Jan 12, 2013 at 06:43:04PM -0500, Pete Wyckoff wrote: Can you give me some hints about the byte/unicode string issues in git-p4.py? There's really only one place

Re: [PATCH 3/8] git_remote_helpers: Force rebuild if python version changes

2013-01-13 Thread John Keeping
On Sun, Jan 13, 2013 at 12:14:02PM -0500, Pete Wyckoff wrote: j...@keeping.me.uk wrote on Sun, 13 Jan 2013 16:26 +: On Sat, Jan 12, 2013 at 06:30:44PM -0500, Pete Wyckoff wrote: j...@keeping.me.uk wrote on Sat, 12 Jan 2013 19:23 +: When different version of python are used to build

Re: git list files

2013-01-13 Thread Jonathan Nieder
Hi, Стойчо Слепцов wrote: lets, say the equivalent of the $ls -d b* within git.git root directory would look like: 98746061 jrnieder 2010-08-12 17:11 Standardize-do-.-while-0-style base85.c c43cb386 pclouds 2012-10-26 22:53 Move-estimate_bisect_steps-to-li bisect.c

Re: git list files

2013-01-13 Thread Стойчо Слепцов
not really, ls-tree provides the hash of blobs and trees, what I am searching for isthe last commitwho introduced the blob or tree. but, hey, thanks for the answer! Blind 2013/1/13 Matthieu Moy matthieu@grenoble-inp.fr: Стойчо Слепцов stoycho.slept...@gmail.com writes: Hi, I was

Re: git list files

2013-01-13 Thread Стойчо Слепцов
thanks alot, Jonathan, I'll try to search through those scripts. Blind. 2013/1/13 Jonathan Nieder jrnie...@gmail.com: Hi, Стойчо Слепцов wrote: lets, say the equivalent of the $ls -d b* within git.git root directory would look like: 98746061 jrnieder 2010-08-12 17:11

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-13 Thread Jeff King
On Sun, Jan 13, 2013 at 06:42:01PM +0100, René Scharfe wrote: When parsing these config variable names, we currently check that the second dot is found nine characters into the name, disallowing filter names with a length of five characters. Additionally, git archive crashes when the second

Re: git list files

2013-01-13 Thread Jeff King
On Sun, Jan 13, 2013 at 09:56:02AM -0800, Jonathan Nieder wrote: lets, say the equivalent of the $ls -d b* within git.git root directory would look like: 98746061 jrnieder 2010-08-12 17:11 Standardize-do-.-while-0-style base85.c c43cb386 pclouds 2012-10-26 22:53

[PATCH] t0050: mark TC merge (case change) as success

2013-01-13 Thread Torsten Bögershausen
The test merge (case change) passes on a case ignoring file system Use test_expect_success to remove the known breakage vanished Signed-off-by: Torsten Bögershausen tbo...@web.de --- t/t0050-filesystem.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t0050-filesystem.sh

[PATCH] t0050: mark TC merge (case change) as success

2013-01-13 Thread Torsten Bögershausen
The test merge (case change) passes on a case ignoring file system Use test_expect_success to remove the known breakage vanished Signed-off-by: Torsten Bögershausen tbo...@web.de --- t/t0050-filesystem.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t0050-filesystem.sh

Re: [PATCH v5] git-completion.bash: add support for path completion

2013-01-13 Thread Junio C Hamano
Manlio Perillo manlio.peri...@gmail.com writes: +# Skip git (first argument) +for ((i=1; i ${#words[@]}; i++)); do +word=${words[i]} + +case $word in +--) Sorry, I have incorrectly (again) indented the case labels. I have now

Re: What's cooking in git.git (Jan 2013, #05; Fri, 11)

2013-01-13 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Sat, Jan 12, 2013 at 6:56 AM, Junio C Hamano gits...@pobox.com wrote: * nd/parse-pathspec (2013-01-11) 20 commits Uses the parsed pathspec structure in more places where we used to use the raw array of strings pathspec. Unfortunately, this

Re: git-completion.bash should not add a space after a ref

2013-01-13 Thread Junio C Hamano
Manlio Perillo manlio.peri...@gmail.com writes: This is not really a bug, but a small usability problem. When completing a reference, Bash will add a space after the reference name. As an example in: $git show masterTAB The problem is that an user may want to show a tree or blog

Re: [PATCH v3 00/31] nd/parse-pathspec

2013-01-13 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: Changes from v2 (it's hard to keep track of after the rebase, so I may be missing something here): - rebased on top of recent master, incorporate changes in init_pathspec from jk/pathspec-literal and nd/pathspec-wildcard to

Re: [PATCH] t0050: mark TC merge (case change) as success

2013-01-13 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: The test merge (case change) passes on a case ignoring file system Use test_expect_success to remove the known breakage vanished Signed-off-by: Torsten Bögershausen tbo...@web.de --- Interesting. When did this change? Do you happen to have a

Re: [PATCH] cvsimport: rewrite to use cvsps 3.x to fix major bugs

2013-01-13 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Jonathan Nieder jrnie...@gmail.com writes: Michael Haggerty wrote: Regarding your claim that within a few months the Perl git-cvsimport is going to cease even pretending to work: It might be that the old git-cvsimport will stop working *for people

Re: [PATCH v3 03/31] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-13 Thread Martin von Zweigbergk
On Sun, Jan 13, 2013 at 4:35 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: +static void parse_pathspec(struct pathspec *pathspec, + unsigned magic_mask, unsigned flags, + const char *prefix, const char **argv) +{ + struct

cvs-fast-export release announcement

2013-01-13 Thread Eric S. Raymond
Version 0.2 of the code formerly known as parsecvs has just shipped as cvs-fast-export. Project page, with links to documentation and the public repository, is at http://www.catb.org/esr/cvs-fast-export/. I have some cvsps and reposurgeon patches to merge before I can get back to the script

Re: [PATCH v3 03/31] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-13 Thread Duy Nguyen
On Mon, Jan 14, 2013 at 7:05 AM, Martin von Zweigbergk martinv...@gmail.com wrote: On Sun, Jan 13, 2013 at 4:35 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: +static void parse_pathspec(struct pathspec *pathspec, + unsigned magic_mask, unsigned flags, +

Re: What's cooking in git.git (Jan 2013, #05; Fri, 11)

2013-01-13 Thread Duy Nguyen
On Mon, Jan 14, 2013 at 6:02 AM, Junio C Hamano gits...@pobox.com wrote: Duy Nguyen pclo...@gmail.com writes: On Sat, Jan 12, 2013 at 6:56 AM, Junio C Hamano gits...@pobox.com wrote: * nd/parse-pathspec (2013-01-11) 20 commits Uses the parsed pathspec structure in more places where we used

[PATCH 0/3] A smoother transition plan for cvsimport

2013-01-13 Thread Junio C Hamano
So here is a start of how such a transition plan outlined in the previous message may look like. The first two are preparatory step to allow the current code to still work even when cvsps2 and cvsps3 are both available on the system. The last patch is mostly for illustration purposes; the

[PATCH 1/3] cvsimport: allow setting a custom cvsps (2.x) program name

2013-01-13 Thread Junio C Hamano
Distros may ship old cvsps under a different name, or the user may install it outside the normal $PATH. Allow setting CVSPS2_PATH from the build environment. Signed-off-by: Junio C Hamano gits...@pobox.com --- Makefile | 9 +++-- git-cvsimport.perl | 4 +++- t/lib-cvs.sh | 4

[PATCH 3/3] cvsimport: start adding cvsps 3.x support

2013-01-13 Thread Junio C Hamano
The new cvsps 3.x series lacks support of some options cvsps 2.x series had and used by cvsimport-2; add a replacement program from the author of cvsps 3.x and allow users to choose it by setting the GIT_CVSPS_VERSION environment variable to 3. We would later add support to auto-detect the

Re: [PATCH 2/3] cvsimport: introduce a version-switch wrapper

2013-01-13 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: In preparation to have both old and new cvsimport during the transition period, rename the cvsimport script to cvsimport-2 and introduce a small wrapper that we can later change it to allow users to run either frontend (with their corresponding cvsps

Re: [PATCH/RFC 4/7] contrib/subtree: Code cleaning and refactoring

2013-01-13 Thread Techlive Zheng
2013/1/13 Techlive Zheng techlivezh...@gmail.com: Mostly prepare for the later tests refactoring. Signed-off-by: Techlive Zheng techlivezh...@gmail.com I am personally a SP-indenting guy, I did not aware of Git's indenting policy until now, so it is bad that I replaced all the lines initially

[PATCH/RFC v2 0/8] contrib/subtree: Reroll to follow Git's whitespace policy

2013-01-13 Thread Techlive Zheng
David A. Greene (1): contrib/subtree: Remove test number comments Techlive Zheng (7): contrib/subtree: Fix whitespaces contrib/subtree: Add vim modeline contrib/subtree: Ignore testing directory contrib/subtree: Code cleaning and refactoring contrib/subtree: Make each test

[PATCH/RFC v2 1/8] contrib/subtree: Fix whitespaces

2013-01-13 Thread Techlive Zheng
Previous code does not fulfill Git's whitespace policy. Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/git-subtree.sh | 68 contrib/subtree/git-subtree.txt| 42 ++--- contrib/subtree/t/t7900-subtree.sh | 314 ++--- 3

[PATCH/RFC v2 2/8] contrib/subtree: Add vim modeline

2013-01-13 Thread Techlive Zheng
Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/git-subtree.sh | 2 ++ contrib/subtree/t/t7900-subtree.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 70f86ea..88903c0 100755 ---

[PATCH/RFC v2 3/8] contrib/subtree: Ignore testing directory

2013-01-13 Thread Techlive Zheng
Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/.gitignore | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/subtree/.gitignore b/contrib/subtree/.gitignore index 91360a3..59aeeb4 100644 --- a/contrib/subtree/.gitignore +++

[PATCH/RFC v2 4/8] contrib/subtree: Remove test number comments

2013-01-13 Thread Techlive Zheng
From: David A. Greene gree...@obbligato.org Delete the comments indicating test numbers as it causes maintenance headaches. t*.sh -i will help us find any broken tests. Signed-off-by: David A. Greene gree...@obbligato.org Signed-off-by: Techlive Zheng techlivezh...@gmail.com ---

[PATCH/RFC v2 5/8] contrib/subtree: Code cleaning and refactoring

2013-01-13 Thread Techlive Zheng
Mostly prepare for the later tests refactoring. Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/t/t7900-subtree.sh | 251 +++-- 1 file changed, 130 insertions(+), 121 deletions(-) diff --git a/contrib/subtree/t/t7900-subtree.sh

[PATCH/RFC v2 6/8] contrib/subtree: Make each test self-contained

2013-01-13 Thread Techlive Zheng
Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/t/t7900-subtree.sh | 865 ++--- 1 file changed, 614 insertions(+), 251 deletions(-) diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index

[PATCH/RFC v2 7/8] contrib/subtree: Use %B for the split commit message

2013-01-13 Thread Techlive Zheng
Use %B rather than %s%n%n%b to handle the special case of a commit that only has a subject line. We don't want to introduce a newline after the subject, causing generation of a new hash. After this commit, the newly split branch might differ from the previous one. If this is the case, --fallback

[PATCH/RFC v2 8/8] contrib/subtree: Handle '--prefix' argument with a slash appended

2013-01-13 Thread Techlive Zheng
'git subtree merge' will fail if the argument of '--prefix' has a slash appended. Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/git-subtree.sh | 2 +- contrib/subtree/t/t7900-subtree.sh | 19 +++ 2 files changed, 20 insertions(+), 1 deletion(-)

Re: [PATCH 2/8] git_remote_helpers: fix input when running under Python 3

2013-01-13 Thread Michael Haggerty
On 01/13/2013 05:17 PM, John Keeping wrote: On Sun, Jan 13, 2013 at 04:26:39AM +0100, Michael Haggerty wrote: On 01/12/2013 08:23 PM, John Keeping wrote: Although 2to3 will fix most issues in Python 2 code to make it run under Python 3, it does not handle the new strict separation between byte

Re: [PATCH] cvsimport: rewrite to use cvsps 3.x to fix major bugs

2013-01-13 Thread Michael Haggerty
On 01/13/2013 11:20 PM, Junio C Hamano wrote: After a quick survey of various distros, I think it is very unlikely that we will see distros move on to newer cvsps, leaving cvsimport broken situation. If anything, it is more like distros decide to ignore the new cvsps, until it is made to work

[PATCH 02/14] imap-send.c: remove struct msg_data

2013-01-13 Thread Michael Haggerty
Now that its flags member has been deleted, all that is left is a strbuf. So use a strbuf directly. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/imap-send.c b/imap-send.c index

[PATCH 04/14] imap-send.c: remove struct store_conf

2013-01-13 Thread Michael Haggerty
It was never used. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/imap-send.c b/imap-send.c index d675e70..3177361 100644 --- a/imap-send.c +++ b/imap-send.c @@ -33,15 +33,6 @@ typedef void *SSL; #include

[PATCH 05/14] imap-send.c: remove struct message

2013-01-13 Thread Michael Haggerty
It was never used. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/imap-send.c b/imap-send.c index 3177361..a47008b 100644 --- a/imap-send.c +++ b/imap-send.c @@ -33,23 +33,10 @@ typedef void

[PATCH 06/14] imap-send.c: remove some unused fields from struct store

2013-01-13 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/imap-send.c b/imap-send.c index a47008b..fe2bfab 100644 --- a/imap-send.c +++ b/imap-send.c @@ -36,12 +36,7 @@ typedef void *SSL; struct

[PATCH 08/14] imap-send.c: remove struct imap argument to parse_imap_list_l()

2013-01-13 Thread Michael Haggerty
It was always set to NULL. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 39 +++ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/imap-send.c b/imap-send.c index 452e73e..5238c74 100644 --- a/imap-send.c +++ b/imap-send.c

[PATCH 10/14] imap-send.c: remove unused field imap_store::trashnc

2013-01-13 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/imap-send.c b/imap-send.c index 9616e80..70abe9b 100644 --- a/imap-send.c +++ b/imap-send.c @@ -127,7 +127,6 @@ struct imap_store { int uidvalidity; struct

[PATCH 13/14] imap-send.c: remove unused field imap_store::uidvalidity

2013-01-13 Thread Michael Haggerty
I suspect that the existence of both imap_store::uidvalidity and store::uidvalidity was an accident. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 1 - 1 file changed, 1 deletion(-) diff --git a/imap-send.c b/imap-send.c index 31fdbf3..4d24faf 100644 --- a/imap-send.c

[PATCH 14/14] imap-send.c: fold struct store into struct imap_store

2013-01-13 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/imap-send.c b/imap-send.c index 4d24faf..1b665bb 100644 --- a/imap-send.c +++ b/imap-send.c @@ -33,12 +33,6 @@ typedef void *SSL; #include

[PATCH 01/14] imap-send.c: remove msg_data::flags, which was always zero

2013-01-13 Thread Michael Haggerty
This removes the need for function imap_make_flags(), so delete it, too. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 40 +++- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/imap-send.c b/imap-send.c index

[PATCH 03/14] iamp-send.c: remove unused struct imap_store_conf

2013-01-13 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 5 - 1 file changed, 5 deletions(-) diff --git a/imap-send.c b/imap-send.c index a8cb66a..d675e70 100644 --- a/imap-send.c +++ b/imap-send.c @@ -130,11 +130,6 @@ static struct imap_server_conf server = { NULL,

[PATCH 07/14] imap-send.c: inline imap_parse_list() in imap_list()

2013-01-13 Thread Michael Haggerty
The function is only called from here. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/imap-send.c b/imap-send.c index fe2bfab..452e73e 100644 --- a/imap-send.c +++ b/imap-send.c @@ -669,21 +669,16

[PATCH 12/14] imap-send.c: use struct imap_store instead of struct store

2013-01-13 Thread Michael Haggerty
In fact, all struct store instances are upcasts of struct imap_store anyway, so stop making the distinction. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/imap-send.c b/imap-send.c

[PATCH 09/14] imap-send.c: remove namespace fields from struct imap

2013-01-13 Thread Michael Haggerty
They are unused, and their removal means that a bunch of list-related infrastructure can be disposed of. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 74 +++-- 1 file changed, 8 insertions(+), 66 deletions(-) diff

[PATCH 11/14] imap-send.c: simplify logic in lf_to_crlf()

2013-01-13 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- imap-send.c | 31 --- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/imap-send.c b/imap-send.c index 70abe9b..3167dcc 100644 --- a/imap-send.c +++ b/imap-send.c @@ -1089,36 +1089,21 @@ static

Re: [PATCH 01/14] imap-send.c: remove msg_data::flags, which was always zero

2013-01-13 Thread Jonathan Nieder
Hi, Michael Haggerty wrote: This removes the need for function imap_make_flags(), so delete it, too. [...] --- a/imap-send.c +++ b/imap-send.c [...] box = gctx-name; prefix = !strcmp(box, INBOX) ? : ctx-prefix; cb.create = 0; - ret = imap_exec_m(ctx, cb, APPEND

Re: [PATCH 00/14] Remove unused code from imap-send.c

2013-01-13 Thread Jeff King
On Mon, Jan 14, 2013 at 06:32:32AM +0100, Michael Haggerty wrote: As discussed before [1], imap-send.c was copied from isync, including a lot of code that is not used within the git project. This patch series rips a bunch of it out. Thanks, this looks like a good direction. I did not notice

Announcing git-reparent

2013-01-13 Thread Mark Lodato
I threw together a small utility called git-reparent, available on GitHub at: https://github.com/MarkLodato/git-reparent I welcome any comments or suggestions. To make discussion easier, I've copied the README and code below. --- 8 --- NAME git-reparent - Recommit HEAD with a new

Re: [PATCH 06/14] imap-send.c: remove some unused fields from struct store

2013-01-13 Thread Jonathan Nieder
Michael Haggerty wrote: --- a/imap-send.c +++ b/imap-send.c [...] @@ -772,13 +767,10 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd) !strcmp(NO, arg) || !strcmp(BYE, arg)) { if ((resp =

  1   2   >