git mailing list

FromSubjectsort iconDate
Erik Faye-Lund
git-archive and core.eol
I recently tried the following on Windows: $ git init Initialized empty Git repository in c:/Users/kusma/test/.git/ $ echo "foo bar" > test.txt $ git -c core.autocrlf=true add test.txt warning: LF will be replaced by CRLF in test.txt. The file will have its original line endings in your working directory. $ git commit -m. 1 files changed, 2 insertions(+), 0 deletions(-) create mode 100644 test.txt $ git -c core.autocrlf=true -c core.eol=lf archive --format=tar HEAD > test.tar $ tar xvf ...
Dec 15, 3:32 pm 2010
Adam Monsen
disallowing non-trivial merges on integration branches
Does anyone have or want to help with a hook script to prevent trivial merges? Here's some context: I'm using the phrase "trivial merge" to refer to a merge without conflicts, like, when two distinct files are edited. In the Mifos project, the "head" repo at sf.net--for all intents and purposes-- is the authoritative place to find Mifos source code. At my request, many of the devs pushing to "head" have started using rebase more often than merge when their local copy of a branch diverges ...
Dec 15, 11:27 am 2010
Vallon, Justin
RE: disallowing non-trivial merges on integration branches
My two cents: * Rebase is evil (grab your pitchforks!). * One thing that I have found is that if you fetch/merge --no-ff in the authoritative repo, then you actually end up with a better graph. Why? If you allow fast-forward to the contributor, then in the case of a trivial merge on the contributor branch, the contributor will have merged master *into* the contributor branch, making the contributor the left-parent, and the master the right-parent. If you 'merge --no-ff', then you insure that in ...
Dec 15, 3:04 pm 2010
Thomas Rast
[PATCH 2/4] diff.c: implement a sanity check for word regexes
Word regexes are a bit of a dangerous beast, since it is easily possible to not match a non-space part, which is subsequently ignored for the purposes of emitting the word diff. This was clearly stated in the docs, but users still tripped over it. Implement a safeguard that verifies two basic sanity assumptions: * The word regex matches anything that is !isspace(). * The word regex does not match '\n'. (This case is not very harmful, but we used to silently cut off at the '\n' which may ...
Dec 15, 8:13 am 2010
Thomas Rast
[PATCH 1/4] diff.c: pass struct diff_words into find_wor ...
We need the word_regex_check member. Instead of adding another argument, just pass in the whole struct for future extensibility. Signed-off-by: Thomas Rast <trast@student.ethz.ch> --- diff.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/diff.c b/diff.c index a16ce69..8758a51 100644 --- a/diff.c +++ b/diff.c @@ -778,12 +778,13 @@ static void fn_out_diff_words_aux(void *priv, char *line, unsigned long len) } /* This function starts looking at ...
Dec 15, 8:13 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 17/21] grep: use match_pathspec_depth() for cache ...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/grep.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 4179af8..fbc7d02 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -595,7 +595,7 @@ static int grep_cache(struct grep_opt *opt, const struct pathspec *pathspec, int struct cache_entry *ce = active_cache[nr]; if (!S_ISREG(ce->ce_mode)) continue; - if (!pathspec_matches(pathspec->raw, ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 21/21] t7810: overlapping pathspecs and depth limit
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- t/t7810-grep.sh | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 023f225..d89faee 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -182,6 +182,24 @@ do test_cmp expected actual ' + test_expect_success "grep --max-depth 0 -- . t $L" ' + { + echo ${HC}t/v:1:vvv + echo ${HC}v:1:vvv + } >expected && + git grep --max-depth 0 -n ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 03/21] Convert struct diff_options to use struct ...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/diff-files.c | 2 +- builtin/diff.c | 4 ++-- builtin/log.c | 2 +- diff-lib.c | 2 +- diff-no-index.c | 4 ++-- diff.h | 4 +--- revision.c | 6 +----- tree-diff.c | 48 +++++++++++++----------------------------------- 8 files changed, 22 insertions(+), 50 deletions(-) diff --git a/builtin/diff-files.c b/builtin/diff-files.c index ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 05/21] Move tree_entry_interesting() to tree-walk ...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- tree-diff.c | 110 --------------------------------------------------------- tree-walk.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tree-walk.h | 2 + 3 files changed, 114 insertions(+), 110 deletions(-) diff --git a/tree-diff.c b/tree-diff.c index 57e8909..28a69dc 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -82,116 +82,6 @@ static int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 07/21] diff-tree: convert base+baselen to writabl ...
In traversing trees, a full path is splitted into two parts: base directory and entry. They are however quite often concatenated whenever a full path is needed. Current code allocates a new buffer, do two memcpy(), use it, then release. Instead this patch turns "base" to a writable, extendable buffer. When a concatenation is needed, the callee only needs to append "entry" to base, use it, then truncate the entry out again. "base" must remain unchanged before and after entering a ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 14/21] Convert ce_path_match() to use struct pathspec
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/update-index.c | 8 ++++++-- cache.h | 2 +- diff-lib.c | 10 ++++++++-- preload-index.c | 5 ++++- read-cache.c | 7 ++++--- revision.c | 5 ++++- wt-status.c | 5 ++++- 7 files changed, 31 insertions(+), 11 deletions(-) diff --git a/builtin/update-index.c b/builtin/update-index.c index 3ab214d..9d1f67e 100644 --- ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 11/21] tree_entry_interesting(): support wildcard ...
never_interesting optimization is disabled if there is any wildcard pathspec, even if it only matches exactly on trees. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- cache.h | 2 ++ dir.c | 3 +++ t/t4010-diff-pathspec.sh | 14 ++++++++++++++ tree-walk.c | 30 +++++++++++++++++++++++++++--- tree-walk.h | 2 +- 5 files changed, 47 insertions(+), 4 deletions(-) diff --git a/cache.h b/cache.h index ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 09/21] tree_entry_interesting(): support depth limit
This is needed to replace pathspec_matches() in builtin/grep.c. max_depth == -1 means infinite depth. Depth limit is only effective when pathspec.recursive == 1. When pathspec.recursive == 0, the behavior depends on match functions: non-recursive for tree_entry_interesting() and recursive for match_pathspec{,_depth} Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- cache.h | 2 ++ dir.c | 15 +++++++++++++++ dir.h | 1 + tree-diff.c | 4 ++++ ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 19/21] grep: use writable strbuf from caller in g ...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/grep.c | 52 +++++++++++++++++++++++++--------------------------- 1 files changed, 25 insertions(+), 27 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index fbc7d02..5ecbbf8 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -623,43 +623,29 @@ static int grep_cache(struct grep_opt *opt, const struct pathspec *pathspec, int } static int grep_tree(struct grep_opt *opt, const struct pathspec ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 12/21] tree_entry_interesting(): optimize wildcar ...
If base is already matched, skip that part when calling fnmatch(). This happens quite often if users start a command from worktree's subdirectory and prefix is usually prepended to all pathspecs. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- t/t4010-diff-pathspec.sh | 18 ++++++++++++++++++ tree-walk.c | 14 ++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/t/t4010-diff-pathspec.sh b/t/t4010-diff-pathspec.sh index 4b120f8..fbc8cd8 ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 02/21] diff-no-index: use diff_tree_setup_paths()
diff_options.{paths,nr_paths} will be removed later. Do not modify them directly. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- diff-no-index.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/diff-no-index.c b/diff-no-index.c index ce9e783..e48ab92 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -231,8 +231,9 @@ void diff_no_index(struct rev_info *revs, if (prefix) { int len = strlen(prefix); + const char ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 13/21] pathspec: add match_pathspec_depth()
match_pathspec_depth() is a clone of match_pathspec() except that it can take depth limit. Computation is a bit lighter compared to match_pathspec() because it's usually precomputed and stored in struct pathspec. In long term, match_pathspec() and match_one() should be removed in favor of this function. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- dir.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ dir.h | 3 ++ 2 files changed, 92 ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 06/21] glossary: define pathspec
From: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- Documentation/glossary-content.txt | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index 1f029f8..4ed2a28 100644 --- a/Documentation/glossary-content.txt +++ b/Documentation/glossary-content.txt @@ -273,6 +273,29 @@ This commit is referred to as a "merge commit", or ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 15/21] Convert ce_path_match() to use match_paths ...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- read-cache.c | 24 +----------------------- 1 files changed, 1 insertions(+), 23 deletions(-) diff --git a/read-cache.c b/read-cache.c index f1141a3..7f51cd6 100644 --- a/read-cache.c +++ b/read-cache.c @@ -685,29 +685,7 @@ int ce_same_name(struct cache_entry *a, struct cache_entry *b) int ce_path_match(const struct cache_entry *ce, const struct pathspec *pathspec) { - const char *match, *name; - const char **ps = ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 16/21] grep: convert to use struct pathspec
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/grep.c | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index da32f3d..4179af8 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -585,7 +585,7 @@ static void run_pager(struct grep_opt *opt, const char *prefix) free(argv); } -static int grep_cache(struct grep_opt *opt, const char **paths, int cached) +static int ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 00/21] nd/struct-pathspec v2
Changes from previous version [1] - fixes depth limit and overlapping pathspecs, by checking deepest pathspecs first. struct pathspec is now sorted (raw[] untouched) - match_pathspec_depth depends on new match_pathspec_item() (a clone of match_one(), but takes advantage of struct pathspec) - ce_path_match uses struct pathspec - strbuf is used instead of fixed length "base" buffer. This introduces the weird strbuf_offset() function. - never_interesting is disabled if any ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 01/21] Add struct pathspec
The old pathspec structure remains as pathspec.raw[]. New things are stored in pathspec.items[]. There's no guarantee that the pathspec order in raw[] is exactly as in items[]. raw[] is external (source) data and is untouched by pathspec manipulation functions. It eases migration from old const char ** to this new struct. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- cache.h | 11 +++++++++++ dir.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 42 ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 10/21] tree_entry_interesting(): fix depth limit ...
Suppose we have two pathspecs 'a' and 'a/b' (both are dirs) and depth limit 1. In current code, pathspecs are checked in input order. When 'a/b' is checked against pathspec 'a', it fails depth limit and therefore is excluded, although it should match 'a/b' pathspec. This patch reorders all pathspecs alphabetically, then teaches tree_entry_interesting() to check against the deepest pathspec first, so depth limit of a shallower pathspec won't affect a deeper one. Signed-off-by: Nguyễn Thái Ngọc ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 18/21] strbuf: allow "buf" to point to the middle ...
This allows offseting buf forward by neglen bytes. This patch makes sure that reallocation works even when buf is not at the top of allocated region. Many functions are not aware that there could be data before buf. Use with care. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- strbuf.c | 36 ++++++++++++++++++++++++++---------- strbuf.h | 10 ++++++---- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/strbuf.c b/strbuf.c index bc3a080..12cda6f ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 08/21] tree_entry_interesting(): refactor into se ...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- tree-walk.c | 170 ++++++++++++++++++++++++++++++++--------------------------- 1 files changed, 93 insertions(+), 77 deletions(-) diff --git a/tree-walk.c b/tree-walk.c index 0830676..5012705 100644 --- a/tree-walk.c +++ b/tree-walk.c @@ -456,6 +456,90 @@ int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned ch return retval; } +static int match_entry(const struct name_entry *entry, int ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 04/21] tree_entry_interesting(): remove dependenc ...
This function can be potentially used in more places than just tree-diff.c. "struct diff_options" does not make much sense outside diff_tree_sha1(). While removing the use of diff_options, it also removes tree_entry_extract() call, which means S_ISDIR() uses the entry->mode directly, without being filtered by canon_mode() (called internally inside tree_entry_extract). The only use of the mode information in this function is to check the type of the entry by giving it to S_ISDIR() macro, and ...
Dec 15, 8:02 am 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH 20/21] grep: drop pathspec_matches() in favor of ...
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/grep.c | 125 ++++++------------------------------------------------- 1 files changed, 14 insertions(+), 111 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 5ecbbf8..3cd66b1 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -333,106 +333,6 @@ static int grep_config(const char *var, const char *value, void *cb) return 0; } -/* - * Return non-zero if max_depth is negative or path has no more then ...
Dec 15, 8:02 am 2010
Martin von Zweigbergk
[PATCH] completion: add missing configuration variables
Quite a few configuration variables have been added since 226b343 (completion: add missing configuration variables to _git_config(), 2009-05-03). Add these variables to the Bash completion script. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> --- The color.grep.external option has been deleted. Should it be deleted from here or do we want to help users run e.g. 'git config --unset color.grep.external'? Same goes for add.ignore-errors. I didn't find any references ...
Dec 14, 11:46 pm 2010
Martin von Zweigbergk
Re: [PATCH] completion: add missing configuration variables
Sounds good to me. If no one disagrees, I'll send an updated patch in ... but not that. Thanks. I could/should have figured that out if I Strictly speaking, that note is for Junio to think of when he merges, right? But adding it early is pretty harmless and if that relieves him of some work, I would be happy to add it in the next submission of this patch. Is that better? Thinking a bit more, maybe what you are suggesting is that I base the next revision of this patch on the branch ...
Dec 15, 12:44 pm 2010
Jeff King
Re: [PATCH] completion: add missing configuration variables
IMHO, they should go away. People who have them can figure out how to delete them, but it is more important not to advertise them to people who are adding variables. As an aside, I would think "--unset" should actually choose from the set of configured variables for completion (i.e., "git config --list | cut All variables are case-insensitive. The config parser down-cases them, so all code should treat tham as all-lowercase. However, we tend to document them as camelCase for ...
Dec 15, 6:00 am 2010
Uwe Kleine-König
Re: TopGit release?
Hello, There are a few patches pending, but I currently don't find the time to go through and apply them[1]. Moreover I hardly use topgit anymore. So if someone with interest in topgit wants to step forward to help this would be very appreciated. Best regards Uwe [1] http://thread.gmane.org/gmane.comp.version-control.git/159433 hint to Bert: this series doesn't apply to master -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux ...
Dec 15, 1:01 am 2010
Uwe Kleine-König
Re: TopGit release?
Hi Bert, If you tell me the commit you based your series on I can use the same and merge the result into master. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | --
Dec 15, 8:32 am 2010
Bert Wesarg
Re: TopGit release?
I know, you applied a patch, which was rendered obsolete with this patch series. you commited on Nov 02, and I send the series Oct 20. --
Dec 15, 7:54 am 2010
Bert Wesarg
Re: TopGit release?
Hi, 8b0f1f9d215d767488542a7853320d1789838d92 But I just refreshed my repo.or.cz fork (topgit/bertw), where I pushed a rebased series (I've done this some time ago already) git://repo.or.cz/topgit/bertw.git index-wt --
Dec 15, 9:48 am 2010
Chunlin Zhang
Re: When I merge, a binary file conflict,how can I selec ...
Thanks you very much.That is what I want! --
Dec 15, 2:01 am 2010
Chunlin Zhang
When I merge, a binary file conflict,how can I select be ...
The only way now I know is to replace the file with the version file I want in working copy,and then git add and git commit.I think it is inconvenient. When I use "git mergetool",it output: ''' Merging the files: binary_example.png Normal merge conflict for 'binary_example.png': {local}: modified {remote}: modified Hit return to start merge resolution tool (meld): ''' Then I think if there is some command to select local or remote version file to add more easier,because it is ...
Dec 15, 1:00 am 2010
Ilari Liusvaara
Re: When I merge, a binary file conflict,how can I selec ...
IIRC, git checkout --theirs -- <file> git add <file> -Ilari --
Dec 15, 1:33 am 2010
Scott Johnson
html userdiff is not showing all my changes
I am attempting to do a word diff of an html source file. Part of the removed html is disappearing from the diff when I enable the fancy html word diff. Here's the output from basic `git diff`: diff --git a/adv_layout_source.html b/adv_layout_source.html index 18a81dd..c4ed609 100644 --- a/adv_layout_source.html +++ b/adv_layout_source.html @@ -42,8 +42,8 @@ <ul> <li class="ydn-patterns"><em></em><a href="#">ydn-patterns</a></li> <li class="ydn-mail"><em></em><a ...
Dec 14, 8:47 pm 2010
Thomas Rast
[PATCH 3/4] userdiff: fix typo in ruby word regex
The regex had an unclosed ] that pretty much ruined the safeguard against not matching a non-space char. Signed-off-by: Thomas Rast <trast@student.ethz.ch> --- userdiff.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/userdiff.c b/userdiff.c index f9e05b5..4d6433b 100644 --- a/userdiff.c +++ b/userdiff.c @@ -81,7 +81,7 @@ "(@|@@|\\$)?[a-zA-Z_][a-zA-Z0-9_]*" "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?." ...
Dec 15, 8:13 am 2010
Michael J Gruber
Re: html userdiff is not showing all my changes
Yep, I just found out myself experimenting with a wordRegex for csv. Seems like quite a "Gimme rope" feature... What strikes me is that both lines are semantically identical, yet one is treated correctly and the other isn't. Michael --
Dec 15, 2:29 am 2010
Matthijs Kooijman
Re: html userdiff is not showing all my changes
It can do exactly that. The word regex determines what is a word, but everything else is counted as "whitespace". The word diff view shows only differences in words, not in whitespace (which is intentional, since whitespace changes in things like LaTeX or HTML are not interesting). Note that it doesn't show whitespace _differences_, but it does show the whitespace itself (taken from the "new" version of the file). So, if the word regex somehow doesn't match the second line at all (or That ...
Dec 15, 2:12 am 2010
Michael J Gruber
Re: html userdiff is not showing all my changes
The wordRegex should really only control what comprises a word, i.e. the granularity of --word-diff. (Where do we insert additional line-breaks before running ordinary diff?) If a wordRegex can make parts of diff disappear than there is problem deeper in the diff machinery. Can you trim this down to a minimal example? Michael --
Dec 15, 2:06 am 2010
Thomas Rast
[PATCH 4/4] t4034: bulk verify builtin word regex sanity
The builtin word regexes should be tested with some simple examples against simple issues, like failing to match a non-space character. Do this in bulk. Many of these patterns are a rather ad-hoc combination of a few simple lines of code, so they can certainly be improved. However, they already unearthed a typo in the ruby pattern (previous commit). Signed-off-by: Thomas Rast <trast@student.ethz.ch> --- t/t4034-diff-words.sh | 20 ++++++++++++++++++++ t/t4034/bibtex/expect | 15 ...
Dec 15, 8:13 am 2010
Scott Johnson
Re: [PATCH 0/4] --word-regex sanity checking and such
Turns out to be system-dependent. I built v1.7.3.3 from source on three different boxes and only one of them is broken. The /etc/redhat-release shows: Broken: Fedora Core release 6 (Zod) Correct: Red Hat Enterprise Linux WS release 4 (Nahant Update 6) Fedora release 9 (Sulphur) So I guess that means the problem is in some library that has most likely been fixed since Fedora 6. ----- Original Message ---- From: Thomas Rast <trast@student.ethz.ch> To: Scott Johnson ...
Dec 15, 1:48 pm 2010
Thomas Rast
Re: [PATCH 0/4] --word-regex sanity checking and such
I can't reproduce. I did this: $ ls -l total 16 -rw-r--r-- 1 thomas users 2128 2010-12-15 20:42 post.html -rw-r--r-- 1 thomas users 2354 2010-12-15 20:42 pre.html $ echo '*.html diff=html' >.gitattributes $ git diff --no-index pre.html post.html diff --git 1/pre.html 2/post.html [...] - <li class="ydn-patterns"><em></em><a href="#">ydn-patterns</a></li> - <li class="ydn-mail"><em></em><a href="#">ydn-mail</a></li> - <li ...
Dec 15, 12:51 pm 2010
Thomas Rast
[PATCH 0/4] --word-regex sanity checking and such
[Forgot the list and Matthijs on the first sending. Sorry for the spam!] Well. Yes. No. Maybe. Thanks for bringing this to my attention. I currently have enough more serious work to avoid that this actually motivated me to hack up a sanity check. It's just far too error prone as it is now. But I cannot reproduce the problem! I put Scott's two offending lines (taken from his "straight" diff) into t4034/html/{pre,post}, and I think the output is valid. Also, the word regex for html ...
Dec 15, 8:13 am 2010
Junio C Hamano
Re: [PATCH v6.1 4/8] Implement line-history search (git ...
Note that opt->nr_paths may be going away soon (cf. nd/struct-pathspec topic). Do you need this assignment here? --
Dec 14, 5:20 pm 2010
Jan Wielemaker
Re: subdirectory-filter does not delete files before the ...
In addition to my previous reply: Looking at the result of the initial filter, if remove all unchanged refs I loose the history before 2008. Qgit however shows a broken history at the start of the directory in 2002. If I keep deleting the tag that is the head of older stuff I end up with what I hoped in the first place. This is of course a bit tedious :-( You can view the result at git://www.swi-prolog.org/home/pl/git/packages/odbc.git I'll split some more packages. Curious to what ...
Dec 15, 3:40 am 2010
Jan Wielemaker
Re: subdirectory-filter does not delete files before the ...
The reported problems also apply to the next module. What appears to work is this: * Walk through the history, finding the commit where the directory is created. * use git tag -l --contains <commit that created dir> to get the tags we want to keep. * get all tags, use comm and delete the tags not in the `contained' set above. Not very friendly and I'm (with Thomas) about the status of these findings. I like to thank Thomas for giving me the right clue. Regards --- ...
Dec 15, 5:22 am 2010
Jan Wielemaker
Re: subdirectory-filter does not delete files before the ...
Dear Thomas, Thanks for the insight. Catching these errors and running git tag -d on them gets me a nice and clean history. Only ... It starts in 12/08/2008 instead of 03/07/2002. This is (almost) compatible with the filtering feedback that says it rewrote 174 commits. The filtered and cleaned history contains 171. This is a bit odd. If I open qgit on the original (before filtering) and show the history of odbc.c, it looks like a nice and continuous one going back to 2002. Also ...
Dec 15, 2:50 am 2010
Junio C Hamano
Re: [PATCH v3 0/5] make open/unlink failures user friend ...
That is superficially similar to the way we let xread() silently handle short read to give us an easier to use API. Especially, the part to silently retry for a few times is similar to xread() recovering by repeating short reads. I do not think "ask the user one last time" part belongs to such a wrapper, though. --
Dec 15, 1:45 pm 2010
Junio C Hamano
Re: [PATCH v3 3/8] mingw: make failures to unlink or mov ...
I had the same reaction. Maybe MinGW will get a different compiler I recall there are a few old-style declaration in compat/ directory, especially in borrowed code like nedmalloc/ and possibly regex/, and I am not so sure if we want to touch them. I'll leave this up to msysgit folks. Thanks. --
Dec 14, 8:05 pm 2010
Johannes Schindelin
Re: [PATCH v3 5/5] mingw_rmdir: set errno=ENOTEMPTY when ...
Hi, This is how the patch looks in current 4msysgit.git's devel branch: -- snip -- #undef rmdir int mingw_rmdir(const char *pathname) { - int ret, tries = 0; + int ret, tries = 0; while ((ret = rmdir(pathname)) == -1 && tries < ARRAY_SIZE(delay)) { if (errno != EACCES) break; + if (!is_dir_empty(pathname)) { + errno = ENOTEMPTY; + break; + } ...
Dec 14, 5:21 pm 2010
Johannes Schindelin
Re: [PATCH v3 3/8] mingw: make failures to unlink or mov ...
Hi, LOL. This file is called compat/mingw.c... :-) But I have no objection to stay with the convention of the rest of Git. I like ask_yes_no_if_tty. Ciao, Dscho
Dec 14, 5:11 pm 2010
Erik Faye-Lund
Re: [PATCH v3 3/8] mingw: make failures to unlink or mov ...
We already have; compat/msvc.c includes compat/mingw.c. mingw.c is called mingw.c because it was the first native windows port, not because it will always be compiled with MinGW. So this file is REALLY more about the OS than the compiler. I don't think MSVC has a problem with this declaration either, but wouldn't it be nicer if we had Windows-code that was as portable as possible across compilers? I've also been playing around with the idea of using LLVM's clang for Git on Windows, because ...
Dec 15, 2:09 am 2010
Heiko Voigt
Re: Re: [PATCH v3 3/8] mingw: make failures to unlink or ...
Hi, How about ask_yes_no_if_possible() ? Since we do not just rely on tty but still have GIT_ASK_YESNO to get to the user I think this would be a closer description of what happens. Cheers Heiko --
Dec 15, 12:36 am 2010
Heiko Voigt
Re: Re: [PATCH v3 3/8] mingw: make failures to unlink or ...
Hi, Will change as stated in the previous email but of course using this code for efficiency ;) Can anybody estimate how fast the user would need to type to actually make this noticeable and how much heat that would I do not mind to change this function name to make it more match what its doing. Since code is read way more often than written I think this Do you mean that I append " (y/n)? " ? For the (y/n) you can think of it as the tui implementation of the yes/no button. I can see that ...
Dec 15, 12:48 am 2010
Heiko Voigt
Re: Re: [PATCH v3 3/8] mingw: make failures to unlink or ...
I do not mind changing this sincce I need to change this patch anyway. Will do in the next iteration. Cheers Heiko --
Dec 15, 12:28 am 2010
Erik Faye-Lund
Re: [PATCH v3 0/5] make open/unlink failures user friend ...
I like the goal of the series (and enjoy the end-result on mingw), but the more I think of this the more I wonder if this is solving the problem on the wrong abstraction level. POSIX says that unlink et al can set errno to EBUSY if a file is in use and the implementation considers that an error. I suspect they had a reason for adding that, and I doubt that reason was Windows. POSIX is already pretty incompatible with Windows. Some Googling have suggested (but I haven't found definitive proof) ...
Dec 15, 8:52 am 2010
Johannes Sixt
Re: [PATCH 11/14] t3032-*.sh: Pass the -b (--binary) opt ...
Sorry, but on MinGW, I only need the GREP_OPTIONS part of that fix, but not the SED_OPTIONS. It's also mysterious for me. OTOH, the fix in ca02ad3 that applies to t6038, does not work for me as is because my sed does not understand -b; it needs --nocr. Maybe it is the sed version that makes the difference? D:\Src\mingw-git\t>sed --version GNU sed version 3.02 ... -- Hannes --
Dec 15, 1:22 am 2010
Eric Sunshine
Re: [PATCH 11/14] t3032-*.sh: Pass the -b (--binary) opt ...
Failure of t3032 was reported by Pat Thoyts [1] when preparing for the v1.7.3 release. The problem was diagnosed and patched via [2] under the standard msysgit netinstall [3] environment. From commit message [2], GREP_OPTIONS and SED_OPTIONS were applied to resolve distinct cases of line-terminator "corruption" (t3032.4-t3032.8 and t3032.9, respectively) within that environment at the time the patch was prepared. Your tool versions may indeed not be compatible with those of the ...
Dec 15, 2:30 am 2010
Thomas Rast
Re: [PATCH] branch: do not attempt to track HEAD implicitly
Good point. It seems HEAD wins the dwim_ref() over the rest: $ g rev-parse HEAD ORIG_HEAD FETCH_HEAD 79f9a226d33659f0e6a69429931d66b5f70c9708 79f9a226d33659f0e6a69429931d66b5f70c9708 79f9a226d33659f0e6a69429931d66b5f70c9708 $ g branch test $ g config -l | grep branch.test. Not sure through which mechanism, however. -- Thomas Rast trast@{inf,student}.ethz.ch --
Dec 15, 8:26 am 2010
Martin von Zweigbergk
Re: [PATCH] branch: do not attempt to track HEAD implicitly
Probably a stupid question, but why are all three of them pointing to the same commit? I guess that is what you want to show, but how did you get there? If I run the same command (I assume your 'g' alias simply calls git), I get three different commits (in general, of The scenario I meant is the following: $ git config branch.autosetupmerge always $ git branch test ORIG_HEAD Branch test set up to track local ref ORIG_HEAD. $ git config -l | grep ...
Dec 15, 11:30 am 2010
Martin von Zweigbergk
Re: [PATCH] branch: do not attempt to track HEAD implicitly
Thanks. This has been on my todo list for a while. Should it only check for HEAD? How about ORIG_HEAD and FETCH_HEAD? Simply anything outside of refs/ maybe? Would that make sense? /Martin --
Dec 14, 5:50 pm 2010
Junio C Hamano
Re: [PATCH/RFC] ident: die on bogus date format
These days I think the bogodate parser knows what "now" is, but you can change the example to use "ahora" instead of "now" and your argument does not change. But if you force user to change something in order to work with a new version of git, it is a regression, no matter how small that change is. Having said that, I don't think --date=ahora is something we need to worry about within the context of "git commit", as the regression feels purely technical (the author-date defaults to the ...
Dec 15, 2:53 pm 2010
Nguyen Thai Ngoc Duy
Re: [PATCH 3/3] get_sha1: support ref^{/regex} syntax
To make '' match everything is easy. I'll cook up something when I get home. -- Duy --
Dec 14, 8:12 pm 2010
Junio C Hamano
Re: [PATCH 3/3] get_sha1: support ref^{/regex} syntax
I'd have to say that dismissing before even trying is not a very disciplined attitude. Shouldn't an empty regexp simply match everything? Even on FBSD8, $ grep '' /etc/passwd seems to show everything. How hard would it be to do this in the codepath we are discussing? --
Dec 14, 7:56 pm 2010
Nguyen Thai Ngoc Duy
Re: [PATCH 3/3] get_sha1: support ref^{/regex} syntax
Perhaps we should just reject this case. No sane body would ever use it. -- Duy --
Dec 14, 6:58 pm 2010
Junio C Hamano
Re: [PATCH 3/3] get_sha1: support ref^{/regex} syntax
This test fails on FBSD 8, which refuses to regcomp("") saying "empty (sub)expression", which is somewhat bogus. I'd change it to "/." for now ;-). --
Dec 14, 5:50 pm 2010
=?UTF-8?q?Nguy=E1=BB ...
[PATCH] get_sha1: handle special case $commit^{/}
Empty regex pattern should always match. But the exact behavior of regexec() may vary. Because it always matches anyway, we can just return 'matched' without calling regex machinery. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- On top of nd/oneline-sha1-name-from-specific-ref sha1_name.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/sha1_name.c b/sha1_name.c index 1ba4bc3..c5c59ce 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -599,6 ...
Dec 15, 2:02 am 2010
Junio C Hamano
Re: [PATCH] get_sha1: handle special case $commit^{/}
Hmm, I just noticed that "git grep -e '' Makefile" fails on FBSD8 for the same reason. I'd prefer a solution that is not about "special case $commit^{/}" but is about "work around regcomp that cannot compile an empty regexp". --
Dec 15, 4:44 pm 2010
Jonathan Nieder
[PATCH 1/3] bash: get --pretty=m<tab> completion to work ...
From: Peter van der Does <peter@avirtualhome.com> Bash's programmable completion provides the COMP_WORDS array variable, which holds the individual words in the current command line. In bash versions prior to v4 "words are split on shell metacharacters as the shell parser would separate them" (quote from bash v3.2.48's man page). This behavior has changed with bash v4, and the command line "is split into words as readline would split it, using COMP_WORDBREAKS as" "the set of characters that ...
Dec 14, 11:26 pm 2010
Jonathan Nieder
[MERGE PATCH 3/3] Merge branch 'master' (early part) int ...
* 'master' (early part): (529 commits) completion: fix zsh check under bash with 'set -u' Fix copy-pasted comments related to tree diff handling. Git 1.7.3.2 {cvs,svn}import: use the new 'git read-tree --empty' t/t9001-send-email.sh: fix stderr redirection in 'Invalid In-Reply-To' Clarify and extend the "git diff" format documentation git-show-ref.txt: clarify the pattern matching documentation: git-config minor cleanups Update test script annotate-tests.sh to handle ...
Dec 14, 11:42 pm 2010
Jonathan Nieder
[PATCH 2/3] bash: simple reimplementation of _get_comp_w ...
Add a minimal implementation of _get_comp_words_by_ref so $ git show head:g <tab><tab> on bash 4 can complete paths within the head commit without requiring the bash_completion functions to be loaded. This is a follow-up to the previous patch (bash: get --pretty=m<tab> completion to work with bash v4). Based on bash-completion 2.x (commit bf763033, 2010-10-26) but tweaked for simplicity and to allow zsh to parse the code. Signed-off-by: Jonathan Nieder ...
Dec 14, 11:27 pm 2010
Jonathan Nieder
[PATCH v5.1 0/3] Make git-completion Bash 4 compatible
Agh, sorry for the mess. Please fetch git://repo.or.cz/git/jrn.git pd/bash-4-completion to receive the following history: o [maint-1.7.2] --- A --- B --- M [FETCH_HEAD] / o [master (early part)] [A] bash: get --pretty=m<tab> completion to work with bash v4 (by Peter) [B] bash: simple reimplementation of _get_comp_words_by_ref (discussed above) [M] Merge branch 'master' (early part) into ...
Dec 14, 11:24 pm 2010
previous daytodaynext day
December 14, 2010December 15, 2010December 16, 2010