* Re: [PATCH] gitk: add the equivalent of diff --color-words
From: Paul Mackerras @ 2010-12-11 23:48 UTC (permalink / raw)
To: Thomas Rast; +Cc: git
In-Reply-To: <3c06517d478b3725054f4ca08fb8c38e681549c4.1287223650.git.trast@student.ethz.ch>
On Sat, Oct 16, 2010 at 12:15:10PM +0200, Thomas Rast wrote:
> Use the newly added 'diff --word-diff=porcelain' to teach gitk a
> color-words mode, with two different modes analogous to the
> --word-diff=plain and --word-diff=color settings. These are selected
> by a dropdown box.
Thanks, applied.
Paul.
^ permalink raw reply
* Re: [GITK PATCH] gitk: add menuitem for file checkout from selected or parent commit
From: Paul Mackerras @ 2010-12-11 23:23 UTC (permalink / raw)
To: Heiko Voigt; +Cc: git
In-Reply-To: <20100928200344.GA12843@book.hvoigt.net>
On Tue, Sep 28, 2010 at 10:03:45PM +0200, Heiko Voigt wrote:
> This is useful if a user wants to checkout a file from a certain
> commit. This is equivalent to
>
> git checkout $commit $file
>
> Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Thanks for the patch. However, the commit message doesn't mention
that the patch also adds the 'checkout from parent' menu item or why
that's a useful thing to have. I like the 'checkout from this commit'
thing but I don't immediately see why checking out from the first
parent is so useful that we have to have it as a menu item, but
checking out from other parents of a merge isn't.
Also, don't bother updating the po files. The translators generally
prefer it if we don't.
Paul.
^ permalink raw reply
* [PATCH db/vcs-svn-incremental] vcs-svn: quote all paths passed to fast-import
From: Jonathan Nieder @ 2010-12-11 23:11 UTC (permalink / raw)
To: David Michael Barr
Cc: git, Ramkumar Ramachandra, Sverre Rabbelier, Sam Vilain,
Stephen Bash, Tomas Carnecky
In-Reply-To: <DD24C01C-19FD-424B-B602-E9BB1A930805@cordelta.com>
Filenames with linefeeds or double quotes need to be quoted if
fast-import is not to misinterpret them.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
vcs-svn/fast_export.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index 7856ff2..2d2a6b2 100644
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
@@ -31,19 +31,18 @@ static int init_postimage(void)
void fast_export_delete(uint32_t depth, const uint32_t *path)
{
- putchar('D');
- putchar(' ');
- pool_print_seq(depth, path, '/', stdout);
- putchar('\n');
+ printf("D \"");
+ pool_print_seq_q(depth, path, '/', stdout);
+ printf("\"\n");
}
void fast_export_modify(uint32_t depth, const uint32_t *path, uint32_t mode,
const char *dataref)
{
/* Mode must be 100644, 100755, 120000, or 160000. */
- printf("M %06"PRIo32" %s ", mode, dataref);
- pool_print_seq(depth, path, '/', stdout);
- putchar('\n');
+ printf("M %06"PRIo32" %s \"", mode, dataref);
+ pool_print_seq_q(depth, path, '/', stdout);
+ printf("\"\n");
}
static char gitsvnline[MAX_GITSVN_LINE_LEN];
--
1.7.2.4
^ permalink raw reply related
* [PATCH 12/10] vcs-svn: quote paths correctly for ls command
From: David Michael Barr @ 2010-12-11 23:04 UTC (permalink / raw)
To: Jonathan Nieder
Cc: git, Ramkumar Ramachandra, Sverre Rabbelier, Sam Vilain,
Stephen Bash, Tomas Carnecky
In-Reply-To: <20101210102007.GA26298@burratino>
From: David Barr <david.barr@cordelta.com>
Date: Sun, 12 Dec 2010 03:59:31 +1100
Subject: [PATCH] vcs-svn: quote paths correctly for ls command
This bug was found while importing rev 601865 of ASF.
Signed-off-by: David Barr <david.barr@cordelta.com>
---
vcs-svn/fast_export.c | 4 ++--
vcs-svn/string_pool.c | 11 +++++++++++
vcs-svn/string_pool.h | 1 +
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index c798f6d..d2397d8 100644
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
@@ -100,7 +100,7 @@ static void ls_from_rev(uint32_t rev, const uint32_t *path)
{
/* ls :5 "path/to/old/file" */
printf("ls :%"PRIu32" \"", rev);
- pool_print_seq(REPO_MAX_PATH_DEPTH, path, '/', stdout);
+ pool_print_seq_q(REPO_MAX_PATH_DEPTH, path, '/', stdout);
printf("\"\n");
fflush(stdout);
}
@@ -149,7 +149,7 @@ void fast_export_ls(const uint32_t *path,
uint32_t *mode, struct strbuf *dataref)
{
printf("ls \"");
- pool_print_seq(REPO_MAX_PATH_DEPTH, path, '/', stdout);
+ pool_print_seq_q(REPO_MAX_PATH_DEPTH, path, '/', stdout);
printf("\"\n");
fflush(stdout);
parse_ls_response(get_response_line(), mode, dataref);
diff --git a/vcs-svn/string_pool.c b/vcs-svn/string_pool.c
index c08abac..a03f5a4 100644
--- a/vcs-svn/string_pool.c
+++ b/vcs-svn/string_pool.c
@@ -4,6 +4,8 @@
*/
#include "git-compat-util.h"
+#include "strbuf.h"
+#include "quote.h"
#include "trp.h"
#include "obj_pool.h"
#include "string_pool.h"
@@ -75,6 +77,15 @@ void pool_print_seq(uint32_t len, const uint32_t *seq, char delim, FILE *stream)
}
}
+void pool_print_seq_q(uint32_t len, const uint32_t *seq, char delim, FILE *stream)
+{
+ uint32_t i;
+ for (i = 0; i < len && ~seq[i]; i++) {
+ quote_c_style(pool_fetch(seq[i]), NULL, stream, 1);
+ if (i < len - 1 && ~seq[i + 1])
+ fputc(delim, stream);
+ }
+}
uint32_t pool_tok_seq(uint32_t sz, uint32_t *seq, const char *delim, char *str)
{
char *context = NULL;
diff --git a/vcs-svn/string_pool.h b/vcs-svn/string_pool.h
index 3720cf8..96e501d 100644
--- a/vcs-svn/string_pool.h
+++ b/vcs-svn/string_pool.h
@@ -5,6 +5,7 @@ uint32_t pool_intern(const char *key);
const char *pool_fetch(uint32_t entry);
uint32_t pool_tok_r(char *str, const char *delim, char **saveptr);
void pool_print_seq(uint32_t len, const uint32_t *seq, char delim, FILE *stream);
+void pool_print_seq_q(uint32_t len, const uint32_t *seq, char delim, FILE *stream);
uint32_t pool_tok_seq(uint32_t sz, uint32_t *seq, const char *delim, char *str);
void pool_reset(void);
--
1.7.3.2.846.gf4b062
^ permalink raw reply related
* [PATCH db/vcs-svn-incremental] vcs-svn: avoid git-isms in fast-import stream
From: Jonathan Nieder @ 2010-12-11 23:00 UTC (permalink / raw)
To: David Michael Barr
Cc: git, Ramkumar Ramachandra, Sverre Rabbelier, Sam Vilain,
Stephen Bash, Tomas Carnecky
In-Reply-To: <20101211184654.GA17464@burratino>
Jonathan Nieder wrote:
> I am not totally happy with the result, since it adds another
> git-specific detail to svn-fe (the first was hardcoding the
> empty blob sha1 instead of using
>
> blob
> mark :0
> data 0
>
> ).
Maybe this would help?
-- 8< --
Subject: vcs-svn: avoid git-isms in fast-import stream
Current svn-fe is not likely to work without change with other
fast-import backends, but don't let that stop us from trying:
- instead of suppressing copies of empty trees, let the backend
decide what to do with them;
- use a mark instead of hard-coding git's name for the empty blob.
However, we do not include commands in the stream for new empty
directories, since no syntax is documented for that yet.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
vcs-svn/fast_export.c | 8 +-------
vcs-svn/svndump.c | 2 +-
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index 75d674e..85166a6 100644
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
@@ -40,12 +40,6 @@ void fast_export_delete(uint32_t depth, const uint32_t *path)
void fast_export_modify(uint32_t depth, const uint32_t *path, uint32_t mode,
const char *dataref)
{
- /* Git does not track empty directories. */
- if (S_ISDIR(mode) && !strcmp(dataref, EMPTY_TREE_SHA1_HEX)) {
- fast_export_delete(depth, path);
- return;
- }
-
/* Mode must be 100644, 100755, 120000, or 160000. */
printf("M %06"PRIo32" %s ", mode, dataref);
pool_print_seq(depth, path, '/', stdout);
@@ -255,7 +249,7 @@ void fast_export_data(uint32_t mode, uint32_t len, struct line_buffer *input)
void fast_export_empty_blob(void)
{
- printf("blob\ndata 0\n\n");
+ printf("blob\nmark :0\ndata 0\n\n");
}
void fast_export_delta(const uint32_t *path, uint32_t mode, uint32_t old_mode,
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index 68a8435..e28e762 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -244,7 +244,7 @@ static void handle_node(void)
if (type == REPO_MODE_DIR)
old_data = NULL;
else if (have_text)
- old_data = EMPTY_BLOB_SHA1_HEX;
+ old_data = ":0";
else
die("invalid dump: adds node without text");
} else {
--
1.7.2.4
^ permalink raw reply related
* [RFC/PATCH] fast-import: treat filemodify with empty tree as delete
From: Jonathan Nieder @ 2010-12-11 22:47 UTC (permalink / raw)
To: David Michael Barr
Cc: git, Ramkumar Ramachandra, Sverre Rabbelier, Sam Vilain,
Stephen Bash, Tomas Carnecky
In-Reply-To: <20101211184654.GA17464@burratino>
Jonathan Nieder wrote:
> Maybe fast-import should make the check itself, to avoid
> writing trees with empty directories that would be hard to
> re-create with "git write-tree".
Like this, maybe?
-- 8< --
Subject: fast-import: treat filemodify with empty tree as delete
Traditionally, git trees do not contain entries for empty
subdirectories. Generally speaking, subtrees are not created or
destroyed explicitly; instead, they automatically appear when needed
to hold regular files, symlinks, and submodules.
v1.7.3-rc0~75^2 (Teach fast-import to import subtrees named by tree
id, 2010-06-30) changed that, by allowing an empty subtree to be
included in a fast-import stream explicitly:
M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 subdir
That was unintentional. Better and more closely analogous to "git
read-tree --prefix" to treat such an input line as a request to delete
("to empty") subdir.
Noticed-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Tests use the "ls" command from vcs-svn-pu. The actual change
would apply cleanly to master or maint, though.
fast-import.c | 10 ++++
t/t9300-fast-import.sh | 107 ++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 109 insertions(+), 8 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index e62f34d..c774893 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2196,6 +2196,16 @@ static void file_change_m(struct branch *b)
p = uq.buf;
}
+ /*
+ * Git does not track empty, non-toplevel directories.
+ */
+ if (S_ISDIR(mode) &&
+ !memcmp(sha1, (unsigned char *) EMPTY_TREE_SHA1_BIN, 20) &&
+ *p) {
+ tree_content_remove(&b->branch_tree, p, NULL);
+ return;
+ }
+
if (S_ISGITLINK(mode)) {
if (inline_data)
die("Git links cannot be specified 'inline': %s",
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index b0e3bda..c17f704 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -25,6 +25,14 @@ echo "$@"'
>empty
+test_expect_success 'setup: have pipes?' '
+ rm -f frob &&
+ if mkfifo frob
+ then
+ test_set_prereq PIPE
+ fi
+'
+
###
### series A
###
@@ -881,6 +889,97 @@ test_expect_success \
git diff-tree -C --find-copies-harder -r N4^ N4 >actual &&
compare_diff_raw expect actual'
+test_expect_success PIPE 'N: read and copy directory' '
+ cat >expect <<-\EOF
+ :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf file3/newf
+ :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100 file2/oldf file3/oldf
+ EOF
+ git update-ref -d refs/heads/N4 &&
+ rm -f backflow &&
+ mkfifo backflow &&
+ (
+ exec <backflow &&
+ cat <<-EOF &&
+ commit refs/heads/N4
+ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+ data <<COMMIT
+ copy by tree hash, part 2
+ COMMIT
+
+ from refs/heads/branch^0
+ ls "file2"
+ EOF
+ read mode type tree filename &&
+ echo "M 040000 $tree file3"
+ ) |
+ git fast-import --cat-blob-fd=3 3>backflow &&
+ git diff-tree -C --find-copies-harder -r N4^ N4 >actual &&
+ compare_diff_raw expect actual
+'
+
+test_expect_success PIPE 'N: read and copy "empty" directory' '
+ cat <<-\EOF >expect &&
+ OBJNAME
+ :000000 100644 OBJNAME OBJNAME A greeting
+ OBJNAME
+ :100644 000000 OBJNAME OBJNAME D unrelated
+ OBJNAME
+ :000000 100644 OBJNAME OBJNAME A unrelated
+ EOF
+ git update-ref -d refs/heads/copy-empty &&
+ rm -f backflow &&
+ mkfifo backflow &&
+ (
+ exec <backflow &&
+ cat <<-EOF &&
+ commit refs/heads/copy-empty
+ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+ data <<COMMIT
+ copy "empty" (missing) directory
+ COMMIT
+
+ M 100644 inline src/greeting
+ data <<BLOB
+ hello
+ BLOB
+ C src/greeting dst1/non-greeting
+ C src/greeting unrelated
+ # leave behind "empty" src directory
+ D src/greeting
+ ls "src"
+ EOF
+ read mode type tree filename &&
+ sed -e "s/X\$//" <<-EOF
+ M $mode $tree dst1
+ M $mode $tree dst2
+
+ commit refs/heads/copy-empty
+ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+ data <<COMMIT
+ copy empty directory to root
+ COMMIT
+
+ M $mode $tree X
+
+ commit refs/heads/copy-empty
+ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+ data <<COMMIT
+ add another file
+ COMMIT
+
+ M 100644 inline greeting
+ data <<BLOB
+ hello
+ BLOB
+ EOF
+ ) |
+ git fast-import --cat-blob-fd=3 3>backflow &&
+ git rev-list copy-empty |
+ git diff-tree -r --root --stdin |
+ sed "s/$_x40/OBJNAME/g" >actual &&
+ test_cmp expect actual
+'
+
test_expect_success \
'N: copy root directory by tree hash' \
'cat >expect <<-\EOF &&
@@ -1773,14 +1872,6 @@ test_expect_success 'R: print two blobs to stdout' '
test_cmp expect actual
'
-test_expect_success 'setup: have pipes?' '
- rm -f frob &&
- if mkfifo frob
- then
- test_set_prereq PIPE
- fi
-'
-
test_expect_success PIPE 'R: copy using cat-file' '
expect_id=$(git hash-object big) &&
expect_len=$(wc -c <big) &&
--
1.7.2.4
^ permalink raw reply related
* Re: [PATCH 01/14] msvc: Fix compilation errors in compat/win32/sys/poll.c
From: Johannes Sixt @ 2010-12-11 22:09 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, kusmabite, GIT Mailing-list
In-Reply-To: <4D039E73.80301@ramsay1.demon.co.uk>
On Samstag, 11. Dezember 2010, Ramsay Jones wrote:
> Before sending the patch, I generated a
> before and after pre-processor file and spent about 2-3 hours using tkdiff,
> vim, grep etc., to try and determine if it was a "safe" change.
Thanks. This dispels my concerns.
-- Hannes
^ permalink raw reply
* What's cooking in git.git (Dec 2010, #03; Fri, 10)
From: Junio C Hamano @ 2010-12-11 7:49 UTC (permalink / raw)
To: git
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'. The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.
Some hawk-eyes among you might have noticed that I've been re-reading many
series and merging them to 'next' at a lot quicker pace than usual for the
last few days, and that would mean only one thing. I don't think we have
quite enough time to deliver anything solid by the year end, but let's
wrap up the current round and prepare to tag 1.7.4 soonish.
--------------------------------------------------
[New Topics]
* jh/gitweb-caching-8 (2010-12-09) 18 commits
. gitweb: Add better error handling for gitweb caching
. gitweb: Prepare for cached error pages & better error page handling
. gitweb: When changing output (STDOUT) change STDERR as well
. gitweb: Add show_warning() to display an immediate warning, with refresh
. gitweb: add print_transient_header() function for central header printing
. gitweb: Add commented url & url hash to page footer
. gitweb: Change file handles (in caching) to lexical variables as opposed to globs
. gitweb: add isDumbClient() check
. gitweb: Adding isBinaryAction() and isFeedAction() to determine the action type
. gitweb: Revert reset_output() back to original code
. gitweb: Change is_cacheable() to return true always
. gitweb: Revert back to $cache_enable vs. $caching_enabled
. gitweb: Add more explicit means of disabling 'Generating...' page
. gitweb: Regression fix concerning binary output of files
. gitweb: Minimal testing of gitweb caching
. gitweb: File based caching layer (from git.kernel.org)
. gitweb: add output buffering and associated functions
. gitweb: Prepare for splitting gitweb
It appears that John and Jakub are finally working together to help
producing something that we can ship in-tree, finally. I am looking
forward to seeing the conclusion of the discussion.
* rj/msvc-fix (2010-12-04) 4 commits
(merged to 'next' on 2010-12-10 at 7a2c2c6)
+ msvc: Fix macro redefinition warnings
+ msvc: Fix build by adding missing INTMAX_MAX define
+ msvc: git-daemon.exe: Fix linker "unresolved externals" error
+ msvc: Fix compilation errors in compat/win32/sys/poll.c
--------------------------------------------------
[Stalled]
* nd/index-doc (2010-09-06) 1 commit
- doc: technical details about the index file format
Half-written but it is a good start. I may need to give some help in
describing more recent index extensions.
* cb/ignored-paths-are-precious (2010-08-21) 1 commit
- checkout/merge: optionally fail operation when ignored files need to be overwritten
This needs tests; also we know of longstanding bugs in related area that
needs to be addressed---they do not have to be part of this series but
their reproduction recipe would belong to the test script for this topic.
It would hurt users to make the new feature on by default, especially the
ones with subdirectories that come and go.
* jk/tag-contains (2010-07-05) 4 commits
- Why is "git tag --contains" so slow?
- default core.clockskew variable to one day
- limit "contains" traversals based on commit timestamp
- tag: speed up --contains calculation
The idea of the bottom one is probably Ok, except that the use of object
flags needs to be rethought, or at least the helper needs to be moved to
builtin/tag.c to make it clear that it should not be used outside the
current usage context.
* tr/config-doc (2010-10-24) 2 commits
. Documentation: complete config list from other manpages
. Documentation: Move variables from config.txt to separate file
This unfortunately heavily conflicts with patches in flight...
--------------------------------------------------
[Cooking]
* ak/describe-exact (2010-12-09) 4 commits
(merged to 'next' on 2010-12-10 at 33497db)
+ describe: Delay looking up commits until searching for an inexact match
+ describe: Store commit_names in a hash table by commit SHA1
+ describe: Do not use a flex array in struct commit_name
+ describe: Use for_each_rawref
Rerolled and looked fine.
* jc/maint-svn-info-test-fix (2010-12-06) 1 commit
(merged to 'next' on 2010-12-08 at f821694)
+ t9119: do not compare "Text Last Updated" line from "svn info"
* jn/submodule-b-current (2010-12-05) 2 commits
(merged to 'next' on 2010-12-08 at 33423f3)
+ git submodule: Remove now obsolete tests before cloning a repo
+ git submodule -b ... of current HEAD fails
* jc/maint-no-openssl-build-fix (2010-12-08) 1 commit
(merged to 'next' on 2010-12-08 at e348a87)
+ Do not link with -lcrypto under NO_OPENSSL
* aa/status-hilite-branch (2010-12-09) 2 commits
(merged to 'next' on 2010-12-10 at d00551d)
+ default color.status.branch to "same as header"
(merged to 'next' on 2010-12-08 at 0291858)
+ status: show branchname with a configurable color
Will merge to 'master'.
* ef/help-cmd-prefix (2010-11-26) 1 commit
(merged to 'next' on 2010-12-08 at c92752e)
+ help: always suggest common-cmds if prefix of cmd
Will merge to 'master'.
* jn/fast-import-blob-access (2010-12-03) 5 commits
(merged to 'next' on 2010-12-08 at a42f0b3)
+ t9300: remove unnecessary use of /dev/stdin
+ fast-import: Allow cat-blob requests at arbitrary points in stream
+ fast-import: let importers retrieve blobs
+ fast-import: clarify documentation of "feature" command
+ fast-import: stricter parsing of integer options
Will merge to 'master'.
* jn/gitweb-per-request-config (2010-11-28) 2 commits
(merged to 'next' on 2010-12-08 at 44be9e5)
+ gitweb: document $per_request_config better
+ gitweb: selectable configurations that change with each request
Will merge to 'master'.
* kb/diff-C-M-synonym (2010-11-10) 2 commits
- diff: use "find" instead of "detect" as prefix for long forms of -M and -C
- diff: add --detect-copies-harder as a synonym for --find-copies-harder
* mg/cvsimport (2010-11-28) 3 commits
- cvsimport.txt: document the mapping between config and options
- cvsimport: fix the parsing of uppercase config options
- cvsimport: partial whitespace cleanup
I was being lazy and said "Ok" to "cvsimport.capital-r" but luckily other
people injected sanity to the discussion. Weatherbaloon patch sent, but
not queued here.
* mz/maint-rebase-stat-config (2010-11-09) 1 commit
(merged to 'next' on 2010-12-08 at 97d4912)
+ rebase: only show stat if configured to true
Will merge to 'master'.
* mz/pull-rebase-rebased (2010-11-13) 1 commit
(merged to 'next' on 2010-12-08 at 99c1762)
+ Use reflog in 'pull --rebase . foo'
Will merge to 'master'.
* nd/maint-hide-checkout-index-from-error (2010-11-28) 1 commit
(merged to 'next' on 2010-12-08 at 1869996)
+ entry.c: remove "checkout-index" from error messages
Will merge to 'master'.
* tf/commit-list-prefix (2010-11-26) 1 commit
- commit: Add commit_list prefix in two function names.
* gb/web--browse (2010-12-03) 4 commits
(merged to 'next' on 2010-12-08 at cff4009)
+ web--browse: better support for chromium
+ web--browse: support opera, seamonkey and elinks
+ web--browse: split valid_tool list
+ web--browse: coding style
The remainder of the series, which is mostly Debian specific addition, can
wait (or just left for the distro).
Will merge to 'master'.
* ja/maint-pull-rebase-doc (2010-12-03) 1 commit
(merged to 'next' on 2010-12-08 at 211bf89)
+ git-pull.txt: Mention branch.autosetuprebase
Will merge to 'master'.
* js/configurable-tab (2010-11-30) 2 commits
(merged to 'next' on 2010-12-08 at 3257365)
+ Make the tab width used for whitespace checks configurable
+ Merge branch 'js/maint-apply-tab-in-indent-fix' into HEAD
(this branch uses js/maint-apply-tab-in-indent-fix.)
Will merge to 'master'.
* js/maint-apply-tab-in-indent-fix (2010-11-30) 1 commit
(merged to 'next' on 2010-12-08 at 02aedd5)
+ apply --whitespace=fix: fix tab-in-indent
(this branch is used by js/configurable-tab.)
Will merge to 'master'.
* pd/bash-4-completion (2010-12-01) 2 commits
- Use the new functions to get the current cword.
- Introduce functions from bash-completion project.
There is a "here is a better way to do this" from Jonathan, but I lost
track.
* ef/win32-dirent (2010-11-23) 6 commits
(merged to 'next' on 2010-12-08 at 1a7169d)
+ win32: use our own dirent.h
+ msvc: opendir: handle paths ending with a slash
+ win32: dirent: handle errors
+ msvc: opendir: do not start the search
+ msvc: opendir: allocate enough memory
+ msvc: opendir: fix malloc-failure
Will merge to 'master'.
* jk/asciidoc-update (2010-11-19) 1 commit
(merged to 'next' on 2010-12-08 at 72ffafe)
+ docs: default to more modern toolset
Will merge to 'master'.
* jk/maint-reflog-bottom (2010-11-21) 1 commit
(merged to 'next' on 2010-12-08 at f5ca80a)
+ reflogs: clear flags properly in corner case
Will merge to 'master'.
* jn/fast-import-ondemand-checkpoint (2010-11-22) 1 commit
(merged to 'next' on 2010-12-08 at f538396)
+ fast-import: treat SIGUSR1 as a request to access objects early
Will merge to 'master'.
* jn/maint-fast-import-object-reuse (2010-11-23) 1 commit
(merged to 'next' on 2010-12-08 at 5d29c08)
+ fast-import: insert new object entries at start of hash bucket
Will merge to 'master'.
* jn/maint-svn-fe (2010-12-08) 4 commits
(merged to 'next' on 2010-12-09 at 98beb7c)
+ t9010 fails when no svn is available
(merged to 'next' on 2010-12-08 at e25350b)
+ vcs-svn: fix intermittent repo_tree corruption
+ treap: make treap_insert return inserted node
+ t9010 (svn-fe): Eliminate dependency on svn perl bindings
Will merge to 'master'.
* jn/svn-fe (2010-12-06) 18 commits
- vcs-svn: Allow change nodes for root of tree (/)
- vcs-svn: Implement Prop-delta handling
- vcs-svn: Sharpen parsing of property lines
- vcs-svn: Split off function for handling of individual properties
- vcs-svn: Make source easier to read on small screens
- vcs-svn: More dump format sanity checks
- vcs-svn: Reject path nodes without Node-action
- vcs-svn: Delay read of per-path properties
- vcs-svn: Combine repo_replace and repo_modify functions
- vcs-svn: Replace = Delete + Add
- vcs-svn: handle_node: Handle deletion case early
- vcs-svn: Use mark to indicate nodes with included text
- vcs-svn: Unclutter handle_node by introducing have_props var
- vcs-svn: Eliminate node_ctx.mark global
- vcs-svn: Eliminate node_ctx.srcRev global
- vcs-svn: Check for errors from open()
- vcs-svn: Allow simple v3 dumps (no deltas yet)
- vcs-svn: Error out for v3 dumps
Some RFC patches, to give them early and wider exposure.
* mz/rebase-abort-reflog-fix (2010-11-21) 1 commit
(merged to 'next' on 2010-12-08 at adce2e1)
+ rebase --abort: do not update branch ref
Will merge to 'master'.
* mz/rebase-i-verify (2010-11-22) 1 commit
(merged to 'next' on 2010-12-08 at 18275df)
+ rebase: support --verify
Will merge to 'master'.
* nd/maint-relative (2010-11-20) 1 commit
(merged to 'next' on 2010-12-10 at 018bc80)
+ get_cwd_relative(): do not misinterpret root path
* tc/format-patch-p (2010-11-23) 1 commit
(merged to 'next' on 2010-12-08 at e8bff23)
+ format-patch: page output with --stdout
Will merge to 'master'.
* tc/http-urls-ends-with-slash (2010-11-25) 9 commits
(merged to 'next' on 2010-12-08 at b9a878a)
+ http-fetch: rework url handling
+ http-push: add trailing slash at arg-parse time, instead of later on
+ http-push: check path length before using it
+ http-push: Normalise directory names when pushing to some WebDAV servers
+ http-backend: use end_url_with_slash()
+ url: add str wrapper for end_url_with_slash()
+ shift end_url_with_slash() from http.[ch] to url.[ch]
+ t5550-http-fetch: add test for http-fetch
+ t5550-http-fetch: add missing '&&'
Will merge to 'master'.
* nd/extended-sha1-relpath (2010-12-09) 3 commits
(merged to 'next' on 2010-12-10 at 0018aa6)
+ get_sha1: teach ":$n:<path>" the same relative path logic
(merged to 'next' on 2010-12-08 at 940e5e2)
+ get_sha1: support relative path ":path" syntax
+ Make prefix_path() return char* without const
(this branch uses jn/parse-options-extra.)
* nd/maint-fix-add-typo-detection (2010-11-27) 5 commits
- Revert "excluded_1(): support exclude files in index"
- unpack-trees: fix sparse checkout's "unable to match directories"
- unpack-trees: move all skip-worktree checks back to unpack_trees()
- dir.c: add free_excludes()
- cache.h: realign and use (1 << x) form for CE_* constants
Note that the commit that used to be at the bottom of this series
have been merged to 'master' (it was a no-op fix).
* jh/gitweb-caching (2010-12-03) 4 commits
. gitweb: Minimal testing of gitweb caching
. gitweb: File based caching layer (from git.kernel.org)
. gitweb: add output buffering and associated functions
. gitweb: Prepare for splitting gitweb
Previous iteration; dropped.
* jn/parse-options-extra (2010-12-01) 10 commits
(merged to 'next' on 2010-12-08 at 3a3e3ac)
+ update-index: migrate to parse-options API
+ setup: save prefix (original cwd relative to toplevel) in startup_info
+ parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION
+ parse-options: allow git commands to invent new option types
+ parse-options: never suppress arghelp if LITERAL_ARGHELP is set
+ parse-options: do not infer PARSE_OPT_NOARG from option type
+ parse-options: sanity check PARSE_OPT_NOARG flag
+ parse-options: move NODASH sanity checks to parse_options_check
+ parse-options: clearer reporting of API misuse
+ parse-options: Don't call parse_options_check() so much
(this branch is used by nd/extended-sha1-relpath.)
Will merge to 'master'.
* nd/setup (2010-11-26) 47 commits
- git.txt: correct where --work-tree path is relative to
- Revert "Documentation: always respect core.worktree if set"
- t0001: test git init when run via an alias
- Remove all logic from get_git_work_tree()
- setup: rework setup_explicit_git_dir()
- setup: clean up setup_discovered_git_dir()
- t1020-subdirectory: test alias expansion in a subdirectory
- setup: clean up setup_bare_git_dir()
- setup: limit get_git_work_tree()'s to explicit setup case only
- Use git_config_early() instead of git_config() during repo setup
- Add git_config_early()
- rev-parse: prints --git-dir relative to user's cwd
- git-rev-parse.txt: clarify --git-dir
- t1510: setup case #31
- t1510: setup case #30
- t1510: setup case #29
- t1510: setup case #28
- t1510: setup case #27
- t1510: setup case #26
- t1510: setup case #25
- t1510: setup case #24
- t1510: setup case #23
- t1510: setup case #22
- t1510: setup case #21
- t1510: setup case #20
- t1510: setup case #19
- t1510: setup case #18
- t1510: setup case #17
- t1510: setup case #16
- t1510: setup case #15
- t1510: setup case #14
- t1510: setup case #13
- t1510: setup case #12
- t1510: setup case #11
- t1510: setup case #10
- t1510: setup case #9
- t1510: setup case #8
- t1510: setup case #7
- t1510: setup case #6
- t1510: setup case #5
- t1510: setup case #4
- t1510: setup case #3
- t1510: setup case #2
- t1510: setup case #1
- t1510: setup case #0
- Add t1510 and basic rules that run repo setup
- builtins: print setup info if repo is found
Will re-read these, hoping to merge them before the end of the year.
* jn/git-cmd-h-bypass-setup (2010-10-22) 7 commits
(merged to 'next' on 2010-12-08 at 0fc3158)
+ update-index -h: show usage even with corrupt index
+ merge -h: show usage even with corrupt index
+ ls-files -h: show usage even with corrupt index
+ gc -h: show usage even with broken configuration
+ commit/status -h: show usage even with broken configuration
+ checkout-index -h: show usage even in an invalid repository
+ branch -h: show usage even in an invalid repository
Will merge to 'master'.
* yd/dir-rename (2010-10-29) 5 commits
- Allow hiding renames of individual files involved in a directory rename.
- Unified diff output format for bulk moves.
- Add testcases for the --detect-bulk-moves diffcore flag.
- Raw diff output format for bulk moves.
- Introduce bulk-move detection in diffcore.
Need to re-queue the reroll.
* nd/struct-pathspec (2010-09-20) 11 commits
- ce_path_match: drop prefix matching in favor of match_pathspec
- Convert ce_path_match() to use struct pathspec
- tree_entry_interesting: turn to match_pathspec if wildcard is present
- pathspec: add tree_recursive_diff parameter
- pathspec: mark wildcard pathspecs from the beginning
- Move tree_entry_interesting() to tree-walk.c and export it
- tree_entry_interesting(): remove dependency on struct diff_options
- Convert struct diff_options to use struct pathspec
- pathspec: cache string length when initializing pathspec
- diff-no-index: use diff_tree_setup_paths()
- Add struct pathspec
(this branch is tangled with en/object-list-with-pathspec.)
This is related to something I have long been wanting to see happen.
Wait Nguyen for another round (2010-11-11).
* en/object-list-with-pathspec (2010-09-20) 8 commits
- Add testcases showing how pathspecs are handled with rev-list --objects
- Make rev-list --objects work together with pathspecs
- Move tree_entry_interesting() to tree-walk.c and export it
- tree_entry_interesting(): remove dependency on struct diff_options
- Convert struct diff_options to use struct pathspec
- pathspec: cache string length when initializing pathspec
- diff-no-index: use diff_tree_setup_paths()
- Add struct pathspec
(this branch is tangled with nd/struct-pathspec.)
* jl/fetch-submodule-recursive (2010-12-09) 4 commits
(merged to 'next' on 2010-12-10 at edd0bf0)
+ fetch_populated_submodules(): document dynamic allocation
(merged to 'next' on 2010-12-08 at 676c4f5)
+ Submodules: Add the "fetchRecurseSubmodules" config option
+ Add the 'fetch.recurseSubmodules' config setting
+ fetch/pull: Add the --recurse-submodules option
After giving another look, I think this is Ok, although I didn't quite get
where the magic number 5 in fetch_populated_submodules() came from.
Will merge to 'master'.
* tr/merge-unborn-clobber (2010-08-22) 1 commit
- Exhibit merge bug that clobbers index&WT
* ab/i18n (2010-10-07) 161 commits
- po/de.po: complete German translation
- po/sv.po: add Swedish translation
- gettextize: git-bisect bisect_next_check "You need to" message
- gettextize: git-bisect [Y/n] messages
- gettextize: git-bisect bisect_replay + $1 messages
- gettextize: git-bisect bisect_reset + $1 messages
- gettextize: git-bisect bisect_run + $@ messages
- gettextize: git-bisect die + eval_gettext messages
- gettextize: git-bisect die + gettext messages
- gettextize: git-bisect echo + eval_gettext message
- gettextize: git-bisect echo + gettext messages
- gettextize: git-bisect gettext + echo message
- gettextize: git-bisect add git-sh-i18n
- gettextize: git-stash drop_stash say/die messages
- gettextize: git-stash "unknown option" message
- gettextize: git-stash die + eval_gettext $1 messages
- gettextize: git-stash die + eval_gettext $* messages
- gettextize: git-stash die + eval_gettext messages
- gettextize: git-stash die + gettext messages
- gettextize: git-stash say + gettext messages
- gettextize: git-stash echo + gettext message
- gettextize: git-stash add git-sh-i18n
- gettextize: git-submodule "blob" and "submodule" messages
- gettextize: git-submodule "path not initialized" message
- gettextize: git-submodule "[...] path is ignored" message
- gettextize: git-submodule "Entering [...]" message
- gettextize: git-submodule $errmsg messages
- gettextize: git-submodule "Submodule change[...]" messages
- gettextize: git-submodule "cached cannot be used" message
- gettextize: git-submodule $update_module say + die messages
- gettextize: git-submodule die + eval_gettext messages
- gettextize: git-submodule say + eval_gettext messages
- gettextize: git-submodule echo + eval_gettext messages
- gettextize: git-submodule add git-sh-i18n
- gettextize: git-pull "rebase against" / "merge with" messages
- gettextize: git-pull "[...] not currently on a branch" message
- gettextize: git-pull "You asked to pull" message
- gettextize: git-pull split up "no candidate" message
- gettextize: git-pull eval_gettext + warning message
- gettextize: git-pull eval_gettext + die message
- gettextize: git-pull die messages
- gettextize: git-pull add git-sh-i18n
- gettext docs: add "Testing marked strings" section to po/README
- gettext docs: the Git::I18N Perl interface
- gettext docs: the git-sh-i18n.sh Shell interface
- gettext docs: the gettext.h C interface
- gettext docs: add "Marking strings for translation" section in po/README
- gettext docs: add a "Testing your changes" section to po/README
- po/pl.po: add Polish translation
- po/hi.po: add Hindi Translation
- po/en_GB.po: add British English translation
- po/de.po: add German translation
- Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
- gettext docs: add po/README file documenting Git's gettext
- gettextize: git-am printf(1) message to eval_gettext
- gettextize: git-am core say messages
- gettextize: git-am "Apply?" message
- gettextize: git-am clean_abort messages
- gettextize: git-am cannot_fallback messages
- gettextize: git-am die messages
- gettextize: git-am eval_gettext messages
- gettextize: git-am multi-line getttext $msg; echo
- gettextize: git-am one-line gettext $msg; echo
- gettextize: git-am add git-sh-i18n
- gettext tests: add GETTEXT_POISON tests for shell scripts
- gettext tests: add GETTEXT_POISON support for shell scripts
- Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
- Makefile: add GNU_GETTEXT, set when we expect GNU gettext
- gettextize: git-shortlog basic messages
- gettextize: git-revert split up "could not revert/apply" message
- gettextize: git-revert literal "me" messages
- gettextize: git-revert "Your local changes" message
- gettextize: git-revert basic messages
- gettextize: git-notes "Refusing to %s notes in %s" message
- gettextize: git-notes GIT_NOTES_REWRITE_MODE error message
- gettextize: git-notes basic commands
- gettextize: git-gc "Auto packing the repository" message
- gettextize: git-gc basic messages
- gettextize: git-describe basic messages
- gettextize: git-clean clean.requireForce messages
- gettextize: git-clean basic messages
- gettextize: git-bundle basic messages
- gettextize: git-archive basic messages
- gettextize: git-status "renamed: " message
- gettextize: git-status "Initial commit" message
- gettextize: git-status "Changes to be committed" message
- gettextize: git-status shortstatus messages
- gettextize: git-status "nothing to commit" messages
- gettextize: git-status basic messages
- gettextize: git-push "prevent you from losing" message
- gettextize: git-push basic messages
- gettextize: git-tag tag_template message
- gettextize: git-tag basic messages
- gettextize: git-reset "Unstaged changes after reset" message
- gettextize: git-reset reset_type_names messages
- gettextize: git-reset basic messages
- gettextize: git-rm basic messages
- gettextize: git-mv "bad" messages
- gettextize: git-mv basic messages
- gettextize: git-merge "Wonderful" message
- gettextize: git-merge "You have not concluded your merge" messages
- gettextize: git-merge "Updating %s..%s" message
- gettextize: git-merge basic messages
- gettextize: git-log "--OPT does not make sense" messages
- gettextize: git-log basic messages
- gettextize: git-grep "--open-files-in-pager" message
- gettextize: git-grep basic messages
- gettextize: git-fetch split up "(non-fast-forward)" message
- gettextize: git-fetch update_local_ref messages
- gettextize: git-fetch formatting messages
- gettextize: git-fetch basic messages
- gettextize: git-diff basic messages
- gettextize: git-commit advice messages
- gettextize: git-commit "enter the commit message" message
- gettextize: git-commit print_summary messages
- gettextize: git-commit formatting messages
- gettextize: git-commit "middle of a merge" message
- gettextize: git-commit basic messages
- gettextize: git-checkout "Switched to a .. branch" message
- gettextize: git-checkout "HEAD is now at" message
- gettextize: git-checkout describe_detached_head messages
- gettextize: git-checkout: our/their version message
- gettextize: git-checkout basic messages
- gettextize: git-branch "(no branch)" message
- gettextize: git-branch "git branch -v" messages
- gettextize: git-branch "Deleted branch [...]" message
- gettextize: git-branch "remote branch '%s' not found" message
- gettextize: git-branch basic messages
- gettextize: git-add refresh_index message
- gettextize: git-add "remove '%s'" message
- gettextize: git-add "pathspec [...] did not match" message
- gettextize: git-add "Use -f if you really want" message
- gettextize: git-add "no files added" message
- gettextize: git-add basic messages
- gettextize: git-clone "Cloning into" message
- gettextize: git-clone basic messages
- gettext tests: test message re-encoding under C
- po/is.po: add Icelandic translation
- gettext tests: mark a test message as not needing translation
- gettext tests: test re-encoding with a UTF-8 msgid under Shell
- gettext tests: test message re-encoding under Shell
- gettext tests: add detection for is_IS.ISO-8859-1 locale
- gettext tests: test if $VERSION exists before using it
- gettextize: git-init "Initialized [...] repository" message
- gettextize: git-init basic messages
- gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
- gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter
- gettext.c: use libcharset.h instead of langinfo.h when available
- gettext.c: work around us not using setlocale(LC_CTYPE, "")
- builtin.h: Include gettext.h
- Makefile: use variables and shorter lines for xgettext
- Makefile: tell xgettext(1) that our source is in UTF-8
- Makefile: provide a --msgid-bugs-address to xgettext(1)
- Makefile: A variable for options used by xgettext(1) calls
- gettext tests: locate i18n lib&data correctly under --valgrind
- gettext: setlocale(LC_CTYPE, "") breaks Git's C function assumptions
- gettext tests: rename test to work around GNU gettext bug
- gettext: add infrastructure for translating Git with gettext
- builtin: use builtin.h for all builtin commands
- tests: use test_cmp instead of piping to diff(1)
- t7004-tag.sh: re-arrange git tag comment for clarity
It is getting ridiculously painful to keep re-resolving the conflicts with
other topics in flight, even with the help with rerere.
Needs a bit more minor work to get the basic code structure right.
^ permalink raw reply
* git calls SSH_ASKPASS even if DISPLAY is not set
From: Xin Wang @ 2010-12-11 3:24 UTC (permalink / raw)
To: git
Hi all,
I'm using git 1.7.3.2 in Fedora 14. In Fedora, SSH_ASKPASS will set to
be /usr/libexec/openssh/gnome-ssh-askpass in
/etc/profile.d/gnome-ssh-askpass.sh, so this environment is set by
login shell, and it will still be set even when X11 is not inuse.
According to ssh's manpage: "If ssh does not have a terminal
associated with it but DISPLAY and SSH_ASKPASS are set, it will
execute the program specified by SSH_ASKPASS and open an X11 window to
read the passphrase." But git will call SSH_ASKPASS even if there is a
terminal associated with it and DISPLAY is not set, then following
warning is displayed and git failed to go through.
$ git fetch
(gnome-ssh-askpass:1487): Gtk-WARNING **: cannot open display:
I think it‘s better if git could implement behavior conforming to ssh.
Thanks,
Xin Wang
^ permalink raw reply
* Re: [RFC/PATCH] cherry-pick/revert: add support for -X/--strategy-option
From: Jonathan Nieder @ 2010-12-11 2:35 UTC (permalink / raw)
To: Junio C Hamano
Cc: git, Christian Couder, Justin Frankel, Bert Wesarg,
Eyvind Bernhardsen, Kevin Ballard
In-Reply-To: <7vvd319h50.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> $ git revert -Xrenormalize old-problematic-commit
[...]
> I guess this can also take "ignore whitespace", which might be a better
> option for this particular use case?
Suppose in olden days you checked in files with \r\n line endings and
now you have switched to \n (attribute "crlf" or "text"), and in
between there was a day in which the line endings were switched.
Now you notice that old-problematic-commit is broken. If that commit
removed lines (which had \r\n line endings), then even with
-Xignore-space-at-eol, "git revert" will add them back verbatim. By
contrast, "git revert -Xrenormalize" would add them back in such a way
as to follow the current line ending style.
^ permalink raw reply
* Re: [RFC/PATCH] cherry-pick/revert: add support for -X/--strategy-option
From: Junio C Hamano @ 2010-12-11 2:29 UTC (permalink / raw)
To: Jonathan Nieder
Cc: git, Christian Couder, Justin Frankel, Bert Wesarg,
Eyvind Bernhardsen, Kevin Ballard
In-Reply-To: <20101211005144.GA6634@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
> For example, this would allow cherry-picking or reverting patches from
> a piece of history with a different end-of-line style, like so:
>
> $ git revert -Xrenormalize old-problematic-commit
>
> Currently that is possible with manual use of merge-recursive but the
> cherry-pick/revert porcelain does not expose the functionality.
>
> While at it, document the existing support for --strategy.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> Thoughts?
I guess this can also take "ignore whitespace", which might be a better
option for this particular use case?
^ permalink raw reply
* Re: [PATCH 11/18] gitweb: add isDumbClient() check
From: Jakub Narebski @ 2010-12-11 1:40 UTC (permalink / raw)
To: J.H.; +Cc: Junio C Hamano, git
In-Reply-To: <4D02D0C4.2020207@eaglescrag.net>
On Sat, 11 Dec 2010, J.H. wrote:
> On 12/10/2010 04:15 PM, Jakub Narebski wrote:
>> Junio C Hamano wrote:
>>> "J.H." <warthog9@eaglescrag.net> writes:
>>>
>>>> My initial look indicated that perl-http-browserdetect wasn't available
>>>> for RHEL / CentOS 5 - it is however available in EPEL.
>>>>
>>>> However there are a couple of things to note about User Agents at all:
>>>> - They lie... a lot
>>>> - Robots lie even more
>>>>
>>>> Blacklisting is still the better option, by a lot. I'll re-work this
>>>> some in v9, as I'm fine with the added dependency.
>>>
>>> Thanks, both. I sense that we finally are going to get a single version
>>> of gitweb that can be used at larger sites ;-)
>>
>> I wouldn't be so optimistic. While we borrow features and ideas from
>> each other, the difference still remains that J.H. patches are bit hacky
>> but are tested, while my rewrite is IMHO cleaner but untested (well,
>> untested on real life load).
>
> At this point I'm not sure there is a way to rectify the two patch
> series, and while we may borrow ideas from each other it's becoming
> clear that we are both, generally speaking, heading in different
> directions for what we want and need out of gitweb. Jakub's patches for
> the admin page are indicative of that.
Actually the cache administration page was just proof of concept. Perhaps
a better solution would be to provide script that can be run to safely
clean cache (or just heavily outdated entries).
What I want from caching series is a clean separation between capturing
(so it can be replaced in the future e.g. by Capture::Tiny, or capturing
to mmapped fragment for Cache::FastMmap-like cache, or simple capturing
to memory for Memcached), caching engine (so it can be replaced by some
good and tested caching engine, like Cache::Cache, Cache, Cache::Memcached,
Cache::FastMmap, CHI and its drivers and options like cache levels), and
caching output module. Modular build makes it easier to catch errors
and allows for unit testing each component separately. And you can simply
use 'require <Package>' instead of doing manual error handling and
protecting against redefine errors / multiple include via 'do <file>'.
What I don't like is caching engine guts strewn all over the gitweb.
I'd rather capturing engine was not tied too tightly with gitweb. The
least controversial is "output caching" part...
Anyway I'd try to keep my rewrite feature-compatibile with J.H. series,
including (from v7) also backward compatibility with cache config option
names, including $cache_enable. (Grrr... API/ABI backwards compatibility).
>
>> Anyway the main issue that was discovered by PATCHv6 by me, and v8 by J.H.
>> is that die_error sucks... well, at least if background caching is enabled.
>
> I'd agree with that, and as such I'm working on a complete re-work of
> error handling in gitweb for v9. Things are looking pretty good so far,
> but to claim that it's a non-invasive patch would be akin to selling
> someone the Brooklyn bridge.
Hmmm... I am also thinking about changing the way error handling is done
in gitweb, but I don't think it would be very invasive: for a non-cached
case it would be simply one "eval" in run_request() or run(), and "die"
instead of "goto DONE_XXX" in die_error().
Now if only there were HTTP::Server::Simple::FCGI so I would be able to
test fastCGI support without need to install mod_fcgi / mod_fastcgi for
Apache... (local::lib and cpanm for the win!).
> That said, the way Gitweb handles it's errors and things like exit are
> appalling and this has been something that's needed doing for a while
> anyway. Guess now's the time to do it. Might be a few days for me to
> get far enough for any of it to be worthwhile sharing, late next week
> maybe. That said I hit vacation starting on the 20th so it might be
> next year before that is finalized.
I also don't think that output caching can be done before end of this year,
sorry.
Hmmm... I guess that in shortened minimal version of my rewrite of output
caching for gitweb (without zero-size check, adaptive cache lifetime,
perhaps even without support for alternate caching engines) I should also
include minimal improvement to die_error-handling. Just like there is
"gitweb: Prepare for splitting gitweb" there.
--
Jakub Narebski
Poland
^ permalink raw reply
* Re: [PATCH 11/18] gitweb: add isDumbClient() check
From: J.H. @ 2010-12-11 1:15 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Junio C Hamano, git
In-Reply-To: <201012110115.16225.jnareb@gmail.com>
On 12/10/2010 04:15 PM, Jakub Narebski wrote:
> Junio C Hamano wrote:
>> "J.H." <warthog9@eaglescrag.net> writes:
>>
>>> My initial look indicated that perl-http-browserdetect wasn't available
>>> for RHEL / CentOS 5 - it is however available in EPEL.
>>>
>>> However there are a couple of things to note about User Agents at all:
>>> - They lie... a lot
>>> - Robots lie even more
>>>
>>> Blacklisting is still the better option, by a lot. I'll re-work this
>>> some in v9, as I'm fine with the added dependency.
>>
>> Thanks, both. I sense that we finally are going to get a single version
>> of gitweb that can be used at larger sites ;-)
>
> I wouldn't be so optimistic. While we borrow features and ideas from
> each other, the difference still remains that J.H. patches are bit hacky
> but are tested, while my rewrite is IMHO cleaner but untested (well,
> untested on real life load).
At this point I'm not sure there is a way to rectify the two patch
series, and while we may borrow ideas from each other it's becoming
clear that we are both, generally speaking, heading in different
directions for what we want and need out of gitweb. Jakub's patches for
the admin page are indicative of that.
> Anyway the main issue that was discovered by PATCHv6 by me, and v8 by J.H.
> is that die_error sucks... well, at least if background caching is enabled.
I'd agree with that, and as such I'm working on a complete re-work of
error handling in gitweb for v9. Things are looking pretty good so far,
but to claim that it's a non-invasive patch would be akin to selling
someone the Brooklyn bridge.
That said, the way Gitweb handles it's errors and things like exit are
appalling and this has been something that's needed doing for a while
anyway. Guess now's the time to do it. Might be a few days for me to
get far enough for any of it to be worthwhile sharing, late next week
maybe. That said I hit vacation starting on the 20th so it might be
next year before that is finalized.
- John 'Warthog9' Hawley
^ permalink raw reply
* [RFC/PATCH] cherry-pick/revert: add support for -X/--strategy-option
From: Jonathan Nieder @ 2010-12-11 0:51 UTC (permalink / raw)
To: git
Cc: Christian Couder, Justin Frankel, Bert Wesarg, Eyvind Bernhardsen,
Kevin Ballard
For example, this would allow cherry-picking or reverting patches from
a piece of history with a different end-of-line style, like so:
$ git revert -Xrenormalize old-problematic-commit
Currently that is possible with manual use of merge-recursive but the
cherry-pick/revert porcelain does not expose the functionality.
While at it, document the existing support for --strategy.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Thoughts?
Documentation/git-cherry-pick.txt | 32 ++++++++++++++++++++++++++++++++
Documentation/git-revert.txt | 10 ++++++++++
builtin/merge.c | 6 ++++--
builtin/revert.c | 29 ++++++++++++++++++++++-------
contrib/examples/git-revert.sh | 13 ++++++++++++-
merge-recursive.h | 4 +++-
t/t3032-merge-recursive-options.sh | 14 ++++++++++++++
7 files changed, 97 insertions(+), 11 deletions(-)
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 7300870..749d68a 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -79,6 +79,16 @@ effect to your index in a row.
cherry-pick'ed commit, then a fast forward to this commit will
be performed.
+--strategy=<strategy>::
+ Use the given merge strategy. Should only be used once.
+ See the MERGE STRATEGIES section in linkgit:git-merge[1]
+ for details.
+
+-X<option>::
+--strategy-option=<option>::
+ Pass the merge strategy-specific option through to the
+ merge strategy. See linkgit:git-merge[1] for details.
+
EXAMPLES
--------
git cherry-pick master::
@@ -120,6 +130,28 @@ git rev-list --reverse master \-- README | git cherry-pick -n --stdin::
so the result can be inspected and made into a single new
commit if suitable.
+The following sequence attempts to backport a patch, bails out because
+the code the patch applies to has changed too much, and then tries
+again, this time exercising more care about matching up context lines.
+
+------------
+$ git cherry-pick topic^ <1>
+$ git diff <2>
+$ git reset --merge ORIG_HEAD <3>
+$ git cherry-pick -Xpatience topic^ <4>
+------------
+<1> apply the change that would be shown by `git show topic^`.
+In this example, the patch does not apply cleanly, so
+information about the conflict is written to the index and
+working tree and no new commit results.
+<2> summarize changes to be reconciled
+<3> cancel the cherry-pick. In other words, return to the
+pre-cherry-pick state, preserving any local modifications you had in
+the working tree.
+<4> try to apply the change introduced by `topic^` again,
+spending extra time to avoid mistakes based on incorrectly matching
+context lines.
+
Author
------
Written by Junio C Hamano <gitster@pobox.com>
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index 752fc88..45be851 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -80,6 +80,16 @@ effect to your index in a row.
--signoff::
Add Signed-off-by line at the end of the commit message.
+--strategy=<strategy>::
+ Use the given merge strategy. Should only be used once.
+ See the MERGE STRATEGIES section in linkgit:git-merge[1]
+ for details.
+
+-X<option>::
+--strategy-option=<option>::
+ Pass the merge strategy-specific option through to the
+ merge strategy. See linkgit:git-merge[1] for details.
+
EXAMPLES
--------
git revert HEAD~3::
diff --git a/builtin/merge.c b/builtin/merge.c
index 3921cd3..c57d06e 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -582,7 +582,8 @@ static void write_tree_trivial(unsigned char *sha1)
die("git write-tree failed to write a tree");
}
-int try_merge_command(const char *strategy, struct commit_list *common,
+int try_merge_command(const char *strategy, size_t xopts_nr,
+ const char **xopts, struct commit_list *common,
const char *head_arg, struct commit_list *remotes)
{
const char **args;
@@ -680,7 +681,8 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
rollback_lock_file(lock);
return clean ? 0 : 1;
} else {
- return try_merge_command(strategy, common, head_arg, remoteheads);
+ return try_merge_command(strategy, xopts_nr, xopts,
+ common, head_arg, remoteheads);
}
}
diff --git a/builtin/revert.c b/builtin/revert.c
index bb6e9e8..dc1b702 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -44,7 +44,11 @@ static const char **commit_argv;
static int allow_rerere_auto;
static const char *me;
+
+/* Merge strategy. */
static const char *strategy;
+static const char **xopts;
+static size_t xopts_nr, xopts_alloc;
#define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
@@ -55,6 +59,17 @@ static const char * const *revert_or_cherry_pick_usage(void)
return action == REVERT ? revert_usage : cherry_pick_usage;
}
+static int option_parse_x(const struct option *opt,
+ const char *arg, int unset)
+{
+ if (unset)
+ return 0;
+
+ ALLOC_GROW(xopts, xopts_nr + 1, xopts_alloc);
+ xopts[xopts_nr++] = xstrdup(arg);
+ return 0;
+}
+
static void parse_args(int argc, const char **argv)
{
const char * const * usage_str = revert_or_cherry_pick_usage();
@@ -67,6 +82,8 @@ static void parse_args(int argc, const char **argv)
OPT_INTEGER('m', "mainline", &mainline, "parent number"),
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
OPT_STRING(0, "strategy", &strategy, "strategy", "merge strategy"),
+ OPT_CALLBACK('X', "strategy-option", &xopts, "option",
+ "option for merge strategy", option_parse_x),
OPT_END(),
OPT_END(),
OPT_END(),
@@ -311,18 +328,13 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
struct merge_options o;
struct tree *result, *next_tree, *base_tree, *head_tree;
int clean, index_fd;
+ const char **xopt;
static struct lock_file index_lock;
index_fd = hold_locked_index(&index_lock, 1);
read_cache();
- /*
- * NEEDSWORK: cherry-picking between branches with
- * different end-of-line normalization is a pain;
- * plumb in an option to set o.renormalize?
- * (or better: arbitrary -X options)
- */
init_merge_options(&o);
o.ancestor = base ? base_label : "(empty tree)";
o.branch1 = "HEAD";
@@ -332,6 +344,9 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
next_tree = next ? next->tree : empty_tree();
base_tree = base ? base->tree : empty_tree();
+ for (xopt = xopts; xopt != xopts + xopts_nr; xopt++)
+ parse_merge_opt(&o, *xopt);
+
clean = merge_trees(&o,
head_tree,
next_tree, base_tree, &result);
@@ -503,7 +518,7 @@ static int do_pick_commit(void)
commit_list_insert(base, &common);
commit_list_insert(next, &remotes);
- res = try_merge_command(strategy, common,
+ res = try_merge_command(strategy, xopts_nr, xopts, common,
sha1_to_hex(head), remotes);
free_commit_list(common);
free_commit_list(remotes);
diff --git a/contrib/examples/git-revert.sh b/contrib/examples/git-revert.sh
index 60a05a8..6bf155c 100755
--- a/contrib/examples/git-revert.sh
+++ b/contrib/examples/git-revert.sh
@@ -26,6 +26,7 @@ require_work_tree
cd_to_toplevel
no_commit=
+xopt=
while case "$#" in 0) break ;; esac
do
case "$1" in
@@ -44,6 +45,16 @@ do
-x|--i-really-want-to-expose-my-private-commit-object-name)
replay=
;;
+ -X?*)
+ xopt="$xopt$(git rev-parse --sq-quote "--${1#-X}")"
+ ;;
+ --strategy-option=*)
+ xopt="$xopt$(git rev-parse --sq-quote "--${1#--strategy-option=}")"
+ ;;
+ -X|--strategy-option)
+ shift
+ xopt="$xopt$(git rev-parse --sq-quote "--$1")"
+ ;;
-*)
usage
;;
@@ -159,7 +170,7 @@ export GITHEAD_$head GITHEAD_$next
# and $prev on top of us (when reverting), or the change between
# $prev and $commit on top of us (when cherry-picking or replaying).
-git-merge-recursive $base -- $head $next &&
+eval "git merge-recursive $xopt $base -- $head $next" &&
result=$(git-write-tree 2>/dev/null) || {
mv -f .msg "$GIT_DIR/MERGE_MSG"
{
diff --git a/merge-recursive.h b/merge-recursive.h
index c8135b0..981ed6a 100644
--- a/merge-recursive.h
+++ b/merge-recursive.h
@@ -57,6 +57,8 @@ struct tree *write_tree_from_memory(struct merge_options *o);
int parse_merge_opt(struct merge_options *out, const char *s);
/* builtin/merge.c */
-int try_merge_command(const char *strategy, struct commit_list *common, const char *head_arg, struct commit_list *remotes);
+int try_merge_command(const char *strategy, size_t xopts_nr,
+ const char **xopts, struct commit_list *common,
+ const char *head_arg, struct commit_list *remotes);
#endif
diff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh
index 2293797..796f616 100755
--- a/t/t3032-merge-recursive-options.sh
+++ b/t/t3032-merge-recursive-options.sh
@@ -107,6 +107,20 @@ test_expect_success '--ignore-space-change makes merge succeed' '
git merge-recursive --ignore-space-change HEAD^ -- HEAD remote
'
+test_expect_success 'naive cherry-pick fails' '
+ git read-tree --reset -u HEAD &&
+ test_must_fail git cherry-pick --no-commit remote &&
+ git read-tree --reset -u HEAD &&
+ test_must_fail git cherry-pick remote &&
+ test_must_fail git update-index --refresh &&
+ grep "<<<<<<" text.txt
+'
+
+test_expect_success '-Xignore-space-change makes cherry-pick succeed' '
+ git read-tree --reset -u HEAD &&
+ git cherry-pick --no-commit -Xignore-space-change remote
+'
+
test_expect_success '--ignore-space-change: our w/s-only change wins' '
q_to_cr <<-\EOF >expected &&
justice and holiness and is the nurse of his age and theQ
--
1.7.2.4
^ permalink raw reply related
* Re: [PATCH 11/18] gitweb: add isDumbClient() check
From: Jakub Narebski @ 2010-12-11 0:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: J.H., git
In-Reply-To: <7vzksd9nq2.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> "J.H." <warthog9@eaglescrag.net> writes:
>
> > My initial look indicated that perl-http-browserdetect wasn't available
> > for RHEL / CentOS 5 - it is however available in EPEL.
> >
> > However there are a couple of things to note about User Agents at all:
> > - They lie... a lot
> > - Robots lie even more
> >
> > Blacklisting is still the better option, by a lot. I'll re-work this
> > some in v9, as I'm fine with the added dependency.
>
> Thanks, both. I sense that we finally are going to get a single version
> of gitweb that can be used at larger sites ;-)
I wouldn't be so optimistic. While we borrow features and ideas from
each other, the difference still remains that J.H. patches are bit hacky
but are tested, while my rewrite is IMHO cleaner but untested (well,
untested on real life load).
Anyway the main issue that was discovered by PATCHv6 by me, and v8 by J.H.
is that die_error sucks... well, at least if background caching is enabled.
Anyway, J.H. plans v9, I plan shortened rewrite.
--
Jakub Narebski
Poland
^ permalink raw reply
* Re: [PATCH 11/18] gitweb: add isDumbClient() check
From: Junio C Hamano @ 2010-12-11 0:07 UTC (permalink / raw)
To: J.H.; +Cc: Jakub Narebski, git
In-Reply-To: <4D01A5F3.8030108@eaglescrag.net>
"J.H." <warthog9@eaglescrag.net> writes:
> My initial look indicated that perl-http-browserdetect wasn't available
> for RHEL / CentOS 5 - it is however available in EPEL.
>
> However there are a couple of things to note about User Agents at all:
> - They lie... a lot
> - Robots lie even more
>
> Blacklisting is still the better option, by a lot. I'll re-work this
> some in v9, as I'm fine with the added dependency.
Thanks, both. I sense that we finally are going to get a single version
of gitweb that can be used at larger sites ;-)
^ permalink raw reply
* Re: [PATCH 0/2] [RFD] Using gitrevisions :/search style with other operators
From: Junio C Hamano @ 2010-12-10 23:36 UTC (permalink / raw)
To: Kevin Ballard
Cc: Jonathan Nieder, Nguyen Thai Ngoc Duy, Jakub Narebski, git,
Yann Dirson, Jeff King
In-Reply-To: <64905EED-F368-4D3F-9D2D-C08D9B460D67@sb.org>
Kevin Ballard <kevin@sb.org> writes:
> On Dec 10, 2010, at 3:08 PM, Junio C Hamano wrote:
> ...
>> d414638 Merge branch 'rj/msvc-fix' into pu
>> ...
>> 1b2ea00 Merge branch 'mg/cvsimport' into pu
>> c6d41f4 Merge branch 'nd/maint-relative' into pu
>> 81f395e Merge branch 'ab/i18n' into pu
>> 9f5471f Merge branch 'nd/setup' into pu
>> 06f74a4 Merge branch 'yd/dir-rename' into pu
>> d8a2ec8 Merge branch 'en/object-list-with-pathspec' into pu
>>
>> After looking at this output, do you really want to say ":nth(2)/nd/"
>> instead of 9f5471f?
>
> Yep. Doing the latter either requires me to swap over to my mouse, copy the sha1,
> and paste in, or requires me to peer at the sha1 and re-type enough characters.
> It's a lot easier to just glance at that list, realize the 2nd one is the one I
> want, and type `git merge :^{nth(2)/nd/}`. It may not necessarily be faster than
> retyping the sha1, but it's a lot less prone to transcription errors.
What you said heavily depends on the way in which I give names to the
branches, and also on the fact that "nd/" happens to be not very common
prefix at this moment. If the branches were named without nd/ part and
still be unique, you would not be arguing for nth(2) at all to begin with.
So it is dubious that your argument is convincing.
^ permalink raw reply
* Re: [PATCH v6] generalizing sorted-array handling
From: Junio C Hamano @ 2010-12-10 23:22 UTC (permalink / raw)
To: Yann Dirson; +Cc: git
In-Reply-To: <1291848695-24601-1-git-send-email-ydirson@altern.org>
Yann Dirson <ydirson@altern.org> writes:
> ... I want to get my focus back to
> bulk-rename/builk-rm patches, which will make heavy use of this API.
Final comment. As the primary thing you want to use this is to change the
way how the rename_dst/rename_src tables are managed, and these are both
tables sorted by a string, I suspect a more reasonable might be to first
updated them to use string-list API and add to that API whatever necessary
features you might need, if any.
^ permalink raw reply
* Re: [PATCH 0/2] [RFD] Using gitrevisions :/search style with other operators
From: Kevin Ballard @ 2010-12-10 23:11 UTC (permalink / raw)
To: Junio C Hamano
Cc: Jonathan Nieder, Nguyen Thai Ngoc Duy, Jakub Narebski, git,
Yann Dirson, Jeff King
In-Reply-To: <7vipz1b4zm.fsf@alter.siamese.dyndns.org>
On Dec 10, 2010, at 3:08 PM, Junio C Hamano wrote:
> Kevin Ballard <kevin@sb.org> writes:
>
>> On Dec 10, 2010, at 11:03 AM, Jonathan Nieder wrote:
>>
>>> - What is the intended use for this family of modifiers? I sort
>>> of understand ^{:i/... } for people that forget what case they
>>> have used, but why the :nth and others?
>>
>> In my particular case, I was glancing through the logs, and I wanted to grab
>> the second branch that someone else had made that was merged into pu. I would
>> have loved to be able to run something like
>>
>> git merge origin/pu^{:nth(2)/nd/}
>>
>> While we're speaking of modifiers, could we use one that says "only search
>> the first parent hierarchy", e.g. something equivalent to git log's --first-parent
>> flag?
>
> Both feels like a very made-up example to me.
And yet the example I gave is pretty much precisely what prompted me to start
this discussion in the first place.
> The reason you can so sure that you can to give nth(2) not nth(3) nor
> nth(1) and run "merge" in the example is probably because you looked at
> the output from "git log --first-parent --oneline origin..origin/pu", no?
>
> d414638 Merge branch 'rj/msvc-fix' into pu
> e5f5e49 Merge branch 'ak/describe-exact' into pu
> 439932d Merge branch 'jn/svn-fe' into pu
> d60b33b Merge branch 'pd/bash-4-completion' into pu
> 09cbbde Merge branch 'tf/commit-list-prefix' into pu
> 1b2ea00 Merge branch 'mg/cvsimport' into pu
> c6d41f4 Merge branch 'nd/maint-relative' into pu
> 81f395e Merge branch 'ab/i18n' into pu
> 9f5471f Merge branch 'nd/setup' into pu
> 06f74a4 Merge branch 'yd/dir-rename' into pu
> d8a2ec8 Merge branch 'en/object-list-with-pathspec' into pu
>
> After looking at this output, do you really want to say ":nth(2)/nd/"
> instead of 9f5471f?
Yep. Doing the latter either requires me to swap over to my mouse, copy the sha1,
and paste in, or requires me to peer at the sha1 and re-type enough characters.
It's a lot easier to just glance at that list, realize the 2nd one is the one I
want, and type `git merge :^{nth(2)/nd/}`. It may not necessarily be faster than
retyping the sha1, but it's a lot less prone to transcription errors.
-Kevin Ballard
^ permalink raw reply
* Re: [PATCH 0/2] [RFD] Using gitrevisions :/search style with other operators
From: Junio C Hamano @ 2010-12-10 23:08 UTC (permalink / raw)
To: Kevin Ballard
Cc: Jonathan Nieder, Nguyen Thai Ngoc Duy, Jakub Narebski, git,
Yann Dirson, Jeff King
In-Reply-To: <66D6F30D-4707-4057-BB46-57B2DF01F479@sb.org>
Kevin Ballard <kevin@sb.org> writes:
> On Dec 10, 2010, at 11:03 AM, Jonathan Nieder wrote:
>
>> - What is the intended use for this family of modifiers? I sort
>> of understand ^{:i/... } for people that forget what case they
>> have used, but why the :nth and others?
>
> In my particular case, I was glancing through the logs, and I wanted to grab
> the second branch that someone else had made that was merged into pu. I would
> have loved to be able to run something like
>
> git merge origin/pu^{:nth(2)/nd/}
>
> While we're speaking of modifiers, could we use one that says "only search
> the first parent hierarchy", e.g. something equivalent to git log's --first-parent
> flag?
Both feels like a very made-up example to me.
The reason you can so sure that you can to give nth(2) not nth(3) nor
nth(1) and run "merge" in the example is probably because you looked at
the output from "git log --first-parent --oneline origin..origin/pu", no?
d414638 Merge branch 'rj/msvc-fix' into pu
e5f5e49 Merge branch 'ak/describe-exact' into pu
439932d Merge branch 'jn/svn-fe' into pu
d60b33b Merge branch 'pd/bash-4-completion' into pu
09cbbde Merge branch 'tf/commit-list-prefix' into pu
1b2ea00 Merge branch 'mg/cvsimport' into pu
c6d41f4 Merge branch 'nd/maint-relative' into pu
81f395e Merge branch 'ab/i18n' into pu
9f5471f Merge branch 'nd/setup' into pu
06f74a4 Merge branch 'yd/dir-rename' into pu
d8a2ec8 Merge branch 'en/object-list-with-pathspec' into pu
After looking at this output, do you really want to say ":nth(2)/nd/"
instead of 9f5471f?
To come up with the "(2)" part you need to carefully scan the other lines
and make sure that there is only one "nd/" after what you want, and the
string does not appear in an unexpected places.
^ permalink raw reply
* Re: Oops, I screwed it up
From: Andreas Schwab @ 2010-12-10 23:01 UTC (permalink / raw)
To: Péter András Felvégi; +Cc: git
In-Reply-To: <AANLkTi=eFmCjdBYHx9Jy=Q7993GghuV1dp12E4Aj7pkZ@mail.gmail.com>
Péter András Felvégi <petschy@gmail.com> writes:
> This is what I did precisely:
> - added 3 files to the index, then committed (#1)
> - realized that a file was left out (not yet tracked), so added + committed it
FWIW, at this point doing "git commit --amend" would have been easier
and avoided the need to stash.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Re: [PATCH 6/6] [RFC] subvert sorted-array to replace binary-search in unpack-objects.
From: Junio C Hamano @ 2010-12-10 23:00 UTC (permalink / raw)
To: Yann Dirson; +Cc: git
In-Reply-To: <1291848695-24601-7-git-send-email-ydirson@altern.org>
Yann Dirson <ydirson@altern.org> writes:
> Signed-off-by: Yann Dirson <ydirson@altern.org>
> ---
> builtin/unpack-objects.c | 40 +++++++++++++++++++++++++---------------
> 1 files changed, 25 insertions(+), 15 deletions(-)
>
> diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
> index f63973c..6d7d113 100644
> --- a/builtin/unpack-objects.c
> +++ b/builtin/unpack-objects.c
> @@ -157,7 +158,24 @@ struct obj_info {
> #define FLAG_OPEN (1u<<20)
> #define FLAG_WRITTEN (1u<<21)
>
> -static struct obj_info *obj_list;
> +/*
> + * FIXME: obj_info is a sorted array, but we read it as a whole, we
> + * don't need insertion features. This allows us to abuse unused
> + * obj_info_nr later as a means of specifying an upper bound for
> + * binary search. obj_info_alloc shall be eliminated by the compiler
> + * as unused.
> + */
I was scratching my head when I read "subvert" on your Subject line and
FIXME above for the first time, but after thinking about it, I think I got
it, and more importantly, I think you realized and shared with me the "too
rigid and brittle" I mentioned in my response to [1/6] earlier, if not
"overengineered" part.
As pack stream is read in, obj_list is built into an array that is sorted
by its "offset" field up to "nr"-th element. And assigning the current
number of elements in the array to obj_list_nr is not a "kludge to bound
the search" as you said in the comment, but is the right thing to do given
the structure of your API. "nr" is "up to this index the array is filled
and used", "alloc" is "this many is allocated", and at the point of that
assignment, "nr" is indeed what it is.
The only reason it might seem kludgy is because the API is not designed to
anticipate that there is a way to add new elements at the end by feeding
elements in the already sorted order, and that facility does so without
calling the functions your API autogenerates.
I think the most bothersome repetition with the current codebase around
binary searchable tables is the binary search loops. Perhaps introducing
a macro that lets us write them in a more structured way, without trying
to build an elaborate top-level declarations that do everything (and
failing to do so), may give you a better payback?
^ permalink raw reply
* Re: [PATCH 2/6] Convert diffcore-rename's rename_dst to the new sorted-array API.
From: Junio C Hamano @ 2010-12-10 22:32 UTC (permalink / raw)
To: Yann Dirson; +Cc: git
In-Reply-To: <1291848695-24601-3-git-send-email-ydirson@altern.org>
Separating "locate with 'please optionally create'" into "locate" and
"register" looks like the right thing to do to make the callers easier to
read.
^ permalink raw reply
* Re: [PATCH 1/6] Introduce sorted-array binary-search function.
From: Junio C Hamano @ 2010-12-10 22:29 UTC (permalink / raw)
To: Yann Dirson; +Cc: git
In-Reply-To: <1291848695-24601-2-git-send-email-ydirson@altern.org>
Yann Dirson <ydirson@altern.org> writes:
> +Suffix meanings are as follows:
> +
> +`check`::
> +...
> +* those defining the generic algorithms
Yuck.
All of these feel way overengineered and at the same time too rigid and
brittle.
I have a suspicion that the "convenience" macros that generate many
functions and definitions are the main culprit. For example, why do all
the functions generated by a "convenience" macro must share the same
MAYBESTATIC? "binsearch" takes a comparison function pointer, and always
picks the midpoint, but what is the performance implication if we wanted
to use sorted-array.h to rewrite say sha1-lookup.c? How can an API user
who wants to use declare_sorted_array_insert_checkbook() easily figure out
what other macros fromt this family can be used without getting the same
thing generated twice? If somebody wanted to have a sorted array in a
struct, it may be tempting to use declare_sorted_array() with an empty
MAYBESTATIC inside struct's field declaration (even when the struct itself
is static---which leaves a queasy feeling, but that is a separate issue),
and the _current_ macro definition of declare_sorted_array() may allow
such a usage work perfectly fine, but how can such an API user be rest
assured it won't break in later revisions of these macros?
In addition, these macros in this patch are almost unreadable, but that
probably is mostly a fault of C's macro, not yours.
^ permalink raw reply
* Re: What's cooking in git.git (Dec 2010, #01; Sat, 4)
From: Junio C Hamano @ 2010-12-10 21:59 UTC (permalink / raw)
To: Miles Bader; +Cc: Yann Dirson, git list
In-Reply-To: <AANLkTinJu0KzXZ2Rjbs2+XH7T=Gq5MOajxo51DHtqoGZ@mail.gmail.com>
Miles Bader <miles@gnu.org> writes:
> Maybe if you renamed every option simultaneously, there would be
> confusion, but seriously, it's only one option. It's not going to be
> a problem.
Well, let's avoid all of that trouble before it is too late, by putting
this on top of what is in 'next' and ship 1.7.4 with it.
Between "find" and "detect", I do not have much preference either way. It
may sound more active to "find" them, but if told to "detect" them, git
goes ahead and actively changes its internal behaviour in order to do so,
which amounts to an active "find"ing anyway, so...
-- >8 --
From: Yann Dirson <ydirson@altern.org>
Date: Wed, 10 Nov 2010 21:27:12 +0100
Subject: [PATCH] diff: use "find" instead of "detect" as prefix for long forms of -M and -C
It is more consistent with existing --find-copies-harder; luckily "detect"
variant has not appeared in any officially released version of git.
Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/diff-options.txt | 5 ++---
diff.c | 18 +++++++++---------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 7246e10..c93124b 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -230,7 +230,7 @@ eligible for being picked up as a possible source of a rename to
another file.
-M[<n>]::
---detect-renames[=<n>]::
+--find-renames[=<n>]::
ifndef::git-log[]
Detect renames.
endif::git-log[]
@@ -246,12 +246,11 @@ endif::git-log[]
hasn't changed.
-C[<n>]::
---detect-copies[=<n>]::
+--find-copies[=<n>]::
Detect copies as well as renames. See also `--find-copies-harder`.
If `n` is specified, it has the same meaning as for `-M<n>`.
--find-copies-harder::
---detect-copies-harder::
For performance reasons, by default, `-C` option finds copies only
if the original file of the copy was modified in the same
changeset. This flag makes the command
diff --git a/diff.c b/diff.c
index dee0bd8..b5ef1ec 100644
--- a/diff.c
+++ b/diff.c
@@ -3150,14 +3150,14 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
if ((options->break_opt = diff_scoreopt_parse(arg)) == -1)
return -1;
}
- else if (!prefixcmp(arg, "-M") || !prefixcmp(arg, "--detect-renames=") ||
- !strcmp(arg, "--detect-renames")) {
+ else if (!prefixcmp(arg, "-M") || !prefixcmp(arg, "--find-renames=") ||
+ !strcmp(arg, "--find-renames")) {
if ((options->rename_score = diff_scoreopt_parse(arg)) == -1)
return -1;
options->detect_rename = DIFF_DETECT_RENAME;
}
- else if (!prefixcmp(arg, "-C") || !prefixcmp(arg, "--detect-copies=") ||
- !strcmp(arg, "--detect-copies")) {
+ else if (!prefixcmp(arg, "-C") || !prefixcmp(arg, "--find-copies=") ||
+ !strcmp(arg, "--find-copies")) {
if (options->detect_rename == DIFF_DETECT_COPY)
DIFF_OPT_SET(options, FIND_COPIES_HARDER);
if ((options->rename_score = diff_scoreopt_parse(arg)) == -1)
@@ -3194,7 +3194,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
DIFF_OPT_SET(options, TEXT);
else if (!strcmp(arg, "-R"))
DIFF_OPT_SET(options, REVERSE_DIFF);
- else if (!strcmp(arg, "--find-copies-harder") || !strcmp(arg, "--detect-copies-harder"))
+ else if (!strcmp(arg, "--find-copies-harder"))
DIFF_OPT_SET(options, FIND_COPIES_HARDER);
else if (!strcmp(arg, "--follow"))
DIFF_OPT_SET(options, FOLLOW_RENAMES);
@@ -3380,12 +3380,12 @@ static int diff_scoreopt_parse(const char *opt)
opt += strlen("break-rewrites");
if (*opt == 0 || *opt++ == '=')
cmd = 'B';
- } else if (!prefixcmp(opt, "detect-copies")) {
- opt += strlen("detect-copies");
+ } else if (!prefixcmp(opt, "find-copies")) {
+ opt += strlen("find-copies");
if (*opt == 0 || *opt++ == '=')
cmd = 'C';
- } else if (!prefixcmp(opt, "detect-renames")) {
- opt += strlen("detect-renames");
+ } else if (!prefixcmp(opt, "find-renames")) {
+ opt += strlen("find-renames");
if (*opt == 0 || *opt++ == '=')
cmd = 'M';
}
--
1.7.3.3.710.g2d012
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox