Re: [PATCH v2 resend] gitk: Use an external icon file on Windows

2012-08-08 Thread Sebastian Schuberth
On Wed, Aug 8, 2012 at 11:13 PM, Junio C Hamano wrote: > Forwarding a misdirected patch to the maintainer who is free to pick > or ignore. How am I supposed to know if a patch has been ignored as an oversight (in which case I would resend), or because the maintainer decided not to include it (in

[PATCH v2] git svn: reset invalidates the memoized mergeinfo caches

2012-08-08 Thread Peter Baumann
On Wed, Aug 08, 2012 at 10:52:58PM +, Eric Wong wrote: > Peter Baumann wrote: > > On Tue, Aug 07, 2012 at 08:45:10PM +, Eric Wong wrote: > > > Peter Baumann wrote: > > > > + for my $suffix (qw(yaml db)) { > > > > + unlink("$cache_file.$s

Re: [PATCH 2/4] check-docs: update non-command documentation list

2012-08-08 Thread Philip Oakley
From: "Junio C Hamano" "Philip Oakley" writes: One issue I notice a few weeks ago is that `git help --all` does not list all of the available git help pages, rather it just limits itself to the available command pages. This means that new users can't discover those additional help pages in

Re: Sync production with Git

2012-08-08 Thread demerphq
On 9 August 2012 06:21, demerphq wrote: > On 8 August 2012 15:11, kiranpyati wrote: >> I am new to github, >> >> Earlier we used to manually upload files on the production through FTP >> although git was present on the production. Due to this now git status shows >> many modified and untrack file

Re: Sync production with Git

2012-08-08 Thread demerphq
On 8 August 2012 15:11, kiranpyati wrote: > I am new to github, > > Earlier we used to manually upload files on the production through FTP > although git was present on the production. Due to this now git status shows > many modified and untrack files. > > To sync that with git we have downloaded

Re: Sync production with Git

2012-08-08 Thread Drew Northup
On Wed, Aug 8, 2012 at 10:20 AM, Matthieu Moy wrote: > kiranpyati writes: > >> We want a way to seamlessly sync production and Git. > > You should be aware that Git was not designed for this scenario. The > usual flow with Git (and actually with most revision control systems), > is to do the deve

[PATCH] gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO

2012-08-08 Thread Jay Soffian
When gitweb is used as a DirectoryIndex, it attempts to strip PATH_INFO on its own, as $cgi->url() fails to do so. However, it fails to account for the fact that PATH_INFO has already been URL-decoded by the web server, but the value returned by $cgi->url() has not been. This causes the stripping

Re: [PATCH/RFC v2 0/16] Introduce index file format version 5

2012-08-08 Thread Nguyen Thai Ngoc Duy
On Wed, Aug 8, 2012 at 11:31 PM, Junio C Hamano wrote: > The current code that access nth entry from the index->cache[nth] > would need to be updated to use an accessor function, whether the > "nth" comes from index_name_pos() or from the for-loop that iterates > over the entire index. For the la

Re: [PATCH/RFC] git svn: handle errors and concurrent commits in dcommit

2012-08-08 Thread Eric Wong
Robert Luberda wrote: > Eric Wong wrote: > >> + echo "PATH=\"$PATH\"; export PATH" >> $hook > >> + echo "svnconf=\"$svnconf\"" >> $hook > >> + cat >> "$hook" <<- 'EOF2' > >> + cd work-auto-commits.svn > >> + svn up --config-dir "$svnconf

Re: [PATCH] git svn: reset invalidates the memoized mergeinfo caches

2012-08-08 Thread Eric Wong
Peter Baumann wrote: > On Tue, Aug 07, 2012 at 08:45:10PM +, Eric Wong wrote: > > Peter Baumann wrote: > > > + for my $suffix (qw(yaml db)) { > > > + unlink("$cache_file.$suffix"); > > > > Need to check for unlink() errors (and ignore ENOENT). > > I'm

Re: [PATCH 2/4] check-docs: update non-command documentation list

2012-08-08 Thread Junio C Hamano
"Philip Oakley" writes: > One issue I notice a few weeks ago is that `git help --all` does not > list all of the available git help pages, rather it just limits itself > to the available command pages. > > This means that new users can't discover those additional help pages > in any easy manner.

Re: [PATCH/RFC v2 0/16] Introduce index file format version 5

2012-08-08 Thread Junio C Hamano
Thomas Rast writes: > Junio C Hamano writes: > >> Thomas Rast writes: >> >>> I like the general idea, too, but I think there is a long way ahead, and >>> we shouldn't hold up v5 on this. >> >> We shouldn't rush, only to keep some deadline, and regret it later >> that we butchered the index form

Re: Sync production with Git

2012-08-08 Thread David Aguilar
On Wed, Aug 8, 2012 at 7:20 AM, Matthieu Moy wrote: > kiranpyati writes: > >> We want a way to seamlessly sync production and Git. > > You should be aware that Git was not designed for this scenario. The > usual flow with Git (and actually with most revision control systems), > is to do the devel

Re: [PATCH 2/4] check-docs: update non-command documentation list

2012-08-08 Thread Philip Oakley
- Original Message - From: "Jeff King" To: "Junio C Hamano" Cc: "Matthieu Moy" ; Sent: Wednesday, August 08, 2012 9:54 PM Subject: Re: [PATCH 2/4] check-docs: update non-command documentation list On Wed, Aug 08, 2012 at 12:24:29PM -0700, Junio C Hamano wrote: Jeff King writes:

Re: [PATCH 2/2] fast-import: Handle 'sub/testname' to 'sub/testname/testfile' renaming correctly

2012-08-08 Thread Junio C Hamano
Judging from "git shortlog --since=6.months fast-import.c", Jonathan may be the most qualified to see if this makes sense, among the active list regulars, so -- >8 -- From: Techlive Zheng Subject: [PATCH 2/2] fast-import: Handle 'sub/testname' to 'sub/testname/testfile' renaming correctly Da

Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-08 Thread Junio C Hamano
Thomas Gummerer writes: > On 08/08, Junio C Hamano wrote: >> Thomas Gummerer writes: >> ... >> After thinking about this, the ptr_add() macro might be the best >> solution, even though I originally called it as a band-aid. We know >> mmap is a blob of memory, byte-offset of each component of w

Re: [PATCH 8/4] check-docs: get documented command list from Makefile

2012-08-08 Thread Junio C Hamano
Jeff King writes: > The current code tries to get a list of documented commands > by doing "ls Documentation/git*txt" and culling a bunch of > special cases from the result. Looking for "git-*.txt" would > be more accurate, but would miss a few commands like > "gitweb" and "gitk". > > Fortunately

Re: [PATCH] Add Code Compare v2.80.4 as a merge / diff tool for Windows

2012-08-08 Thread Junio C Hamano
Sebastian Schuberth writes: > Code Compare is a commercial file comparison tool for Windows, see > > http://www.devart.com/codecompare/ > > Version 2.80.4 added support for command line arguments preceded by a > dash instead of a slash. This is required for Git for Windows because > slashes i

Re: [PATCH v2 resend] gitk: Use an external icon file on Windows

2012-08-08 Thread Junio C Hamano
Sebastian Schuberth writes: > Git for Windows now ships with the new Git icon from git-scm.com. Use that > icon file instead of the old procedurally drawn one if it exists. > > Signed-off-by: Sebastian Schuberth > --- Forwarding a misdirected patch to the maintainer who is free to pick or ignor

Re: [PATCH] Enable HAVE_DEV_TTY for Solaris

2012-08-08 Thread Jeff King
On Wed, Aug 08, 2012 at 04:13:03PM +0200, Erik Faye-Lund wrote: > On Tue, Aug 7, 2012 at 6:10 AM, Jeff King wrote: > > Subject: [PATCH] terminal: seek when switching between reading and writing > > > > When a stdio stream is opened in update mode (e.g., "w+"), > > the C standard forbids switching

[PATCH 8/4] check-docs: get documented command list from Makefile

2012-08-08 Thread Jeff King
The current code tries to get a list of documented commands by doing "ls Documentation/git*txt" and culling a bunch of special cases from the result. Looking for "git-*.txt" would be more accurate, but would miss a few commands like "gitweb" and "gitk". Fortunately, Documentation/Makefile already

Re: [PATCH/RFC v2 06/16] t3700: sleep for 1 second, to avoid interfering with the racy code

2012-08-08 Thread Junio C Hamano
Junio C Hamano writes: > So whether done with "sleep" or "test-chmtime", avoiding a racily > clean situation sounds like sweeping a bug in the v5 code in racy > situation under the rug to me (unless I am misunderstanding what > you are doing with this change and in your explanation, or the test >

[PATCH 7/4] check-docs: drop git-help special-case

2012-08-08 Thread Jeff King
The check-docs target special-cases git-help to avoid mentioning it as "documented but removed". This dates back to the early implementation of git-help, when its code was simply included inside git.c. These days it is a full-fledged builtin (in builtin/help.c) and does not need special-casing. S

[PATCH 6/4] check-docs: list git-gui as a command

2012-08-08 Thread Jeff King
git-gui is already documented and mentioned in command-list, but adding it to the Makefile makes sure it is so. We also add its alias git-citool (which is also documented). As a result, we can drop them from the special case statement that avoids them being listed as "documented but does not exist

[PATCH 5/4] check-docs: factor out command-list

2012-08-08 Thread Jeff King
The check-docs command list is composed from several Makefile variables plus some special cases. Let's make the meaning of the list more obvious and avoid repeating ourselves by factoring it out. Signed-off-by: Jeff King --- Makefile | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

Re: [PATCH 2/4] check-docs: update non-command documentation list

2012-08-08 Thread Jeff King
On Wed, Aug 08, 2012 at 12:24:29PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > The check-docs target looks at Documentation/git*txt and > > complains if any entry does not have a matching command. > > Therefore we need to explicitly ignore any entries which are > > not meant to descri

Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-08 Thread Thomas Gummerer
On 08/08, Junio C Hamano wrote: > Thomas Gummerer writes: > > >> > +name = (char *)mmap + *dir_offset; > >> > +beginning = mmap + *dir_table_offset; > >> > >> Notice how you computed name with pointer arithmetic by first > >> casting mmap (which is "void *") and when computing

[PATCH v2 resend] gitk: Use an external icon file on Windows

2012-08-08 Thread Sebastian Schuberth
Git for Windows now ships with the new Git icon from git-scm.com. Use that icon file instead of the old procedurally drawn one if it exists. Signed-off-by: Sebastian Schuberth --- gitk-git/gitk | 49 ++--- 1 file changed, 26 insertions(+), 23 deletions

[PATCH] Add Code Compare v2.80.4 as a merge / diff tool for Windows

2012-08-08 Thread Sebastian Schuberth
Code Compare is a commercial file comparison tool for Windows, see http://www.devart.com/codecompare/ Version 2.80.4 added support for command line arguments preceded by a dash instead of a slash. This is required for Git for Windows because slashes in command line arguments get mangled with

Re: [PATCH/RFC v2 06/16] t3700: sleep for 1 second, to avoid interfering with the racy code

2012-08-08 Thread Junio C Hamano
Thomas Gummerer writes: > On 08/05, Junio C Hamano wrote: >> Thomas Gummerer writes: >> >> > The new git racy code uses the mtime of cache-entries to smudge >> > a racy clean entry, and loads the work, of checking the file-system >> >> -ECANTPARSE. > > The git racy code for index-v5 uses the m

Re: [PATCH 0/4] update "make check-docs"

2012-08-08 Thread Jeff King
On Wed, Aug 08, 2012 at 12:13:11PM -0700, Junio C Hamano wrote: > > Hmm. We have a check-docs command? :) > > Yes, and there also is a check-builtins target. Perhaps the default > build target should depend on them, as they are fairly lightweight? I think they would want some refactoring. Right

[PATCH 2/2] fast-import: Handle 'sub/testname' to 'sub/testname/testfile' renaming correctly

2012-08-08 Thread Techlive Zheng
The current git-fast-import would not correctly handle such a commit stream in which a file was deleted and at the same time a directory with the same name was created. All paths under the newly created directory will be lost after the importing. --- fast-import.c | 9 + 1 file changed, 9

[PATCH 1/2] t9300: Add a test covering 'sub/testname' to 'sub/testname/testfile' renaming

2012-08-08 Thread Techlive Zheng
This test would fail at the moment. --- t/t9300-fast-import.sh | 31 +++ 1 file changed, 31 insertions(+) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 2fcf269..2a8368e 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -1039,6 +10

Re: [PATCH/RFC v3 06/13] Read index-v5

2012-08-08 Thread Thomas Gummerer
On 08/08, Nguyen Thai Ngoc Duy wrote: > uOn Wed, Aug 8, 2012 at 6:17 PM, Thomas Gummerer wrote: > > +static struct cache_entry *read_entry(struct directory_entry *de, > > + unsigned long *entry_offset, > > + void **mmap, > > + unsig

Re: [PATCH 2/4] check-docs: update non-command documentation list

2012-08-08 Thread Junio C Hamano
Jeff King writes: > The check-docs target looks at Documentation/git*txt and > complains if any entry does not have a matching command. > Therefore we need to explicitly ignore any entries which are > not meant to describe a command (like gitattributes.txt). > This list has grown stale over time,

Re: [PATCH/RFC v3 01/13] Move index v2 specific functions to their own file

2012-08-08 Thread Thomas Gummerer
On 08/08, Nguyen Thai Ngoc Duy wrote: > On Wed, Aug 8, 2012 at 6:17 PM, Thomas Gummerer wrote: > > Move index version 2 specific functions to their own file, > > to prepare for the addition of a new index file format. With > > the split into two files we have the non-index specific > > functions

Re: [PATCH 0/4] update "make check-docs"

2012-08-08 Thread Junio C Hamano
Jeff King writes: > On Wed, Aug 08, 2012 at 09:58:33AM -0700, Junio C Hamano wrote: > >> There really should be an easier way for the maintainer to notice >> this kind of glitch without being told (better yet, the submitter of >> a new command to notice it). Perhaps the check-docs target in the

Re: Bug with git-submodule and IFS

2012-08-08 Thread Junio C Hamano
Andrew Dranse writes: > Hi there, > > I ran into an interesting bug with git submodules today. It > appears that if your IFS is not set to what git-submodule expects > it to be (i.e. the standard IFS), it will break in a fun way. > > Example: > > $ git init > Initialized empty Git repository in

[PATCH 4/4] command-list: mention git-credential-* helpers

2012-08-08 Thread Jeff King
These commands were never added to the command-list. Adding them makes "make check-docs" run without complaint. While we're at it, let's capitalize the first letter of their one-line summaries to match the rest of the git manpages. The credential-cache--daemon command is somewhat special. It is al

[PATCH 3/4] command-list: add git-sh-i18n

2012-08-08 Thread Jeff King
This is in the same category as git-sh-setup. Signed-off-by: Jeff King --- command-list.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/command-list.txt b/command-list.txt index ec64cac..1da8f0d 100644 --- a/command-list.txt +++ b/command-list.txt @@ -114,6 +114,7 @@ git-show

[PATCH 2/4] check-docs: update non-command documentation list

2012-08-08 Thread Jeff King
The check-docs target looks at Documentation/git*txt and complains if any entry does not have a matching command. Therefore we need to explicitly ignore any entries which are not meant to describe a command (like gitattributes.txt). This list has grown stale over time, so let's bring it up to date.

Re: Git does not handle changing inode numbers well

2012-08-08 Thread Matthijs Kooijman
Hi Junio, > - if (ce->ce_ino != (unsigned int) st->st_ino) > + if (trust_inum && ce->ce_ino != (unsigned int) st->st_ino) > changed |= INODE_CHANGED; I just tried this with 1.7.10 (that is, I deleted these two lines to mimic trust_inum being false) and it indeed fixes my pro

[PATCH 1/4] check-docs: mention gitweb specially

2012-08-08 Thread Jeff King
Like gitk, gitweb is not listed in the usual Makefile variables and must be fed to check-docs specially. Otherwise check-docs thinks it is documented but removed. Signed-off-by: Jeff King --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile ind

[PATCH 0/4] update "make check-docs"

2012-08-08 Thread Jeff King
On Wed, Aug 08, 2012 at 09:58:33AM -0700, Junio C Hamano wrote: > There really should be an easier way for the maintainer to notice > this kind of glitch without being told (better yet, the submitter of > a new command to notice it). Perhaps the check-docs target in the > Makefile needs some upda

Bug with git-submodule and IFS

2012-08-08 Thread Andrew Dranse
Hi there, I ran into an interesting bug with git submodules today. It appears that if your IFS is not set to what git-submodule expects it to be (i.e. the standard IFS), it will break in a fun way. Example: $ git init Initialized empty Git repository in /home/adranse/test/.git/ $ git submodul

Re: Git does not handle changing inode numbers well

2012-08-08 Thread Matthijs Kooijman
> So, let's see if I can fix my filesystem now ;-) For anyone interested: turns out passing -o noforget makes fuse keep a persistent path -> inode mapping (at the cost of memory usage, of course). However, it also turns out that fuse wasn't my problem: It was the aufs mount that was overlayed over

Re: fast-import error: fatal: 'refs/heads/master' - not a valid ref

2012-08-08 Thread Jeff King
On Wed, Aug 08, 2012 at 11:25:02AM +0400, Andrey Pavlenko wrote: > I'm developing a remote helper which uses the fast-import stream for > fetching. When I perform cloning git prints error message - "fatal: > 'refs/heads/master' - not a valid ref", however the clonning completes > normally. Each my

Re: Git does not handle changing inode numbers well

2012-08-08 Thread Junio C Hamano
Matthijs Kooijman writes: > So, it seems that git just doesn't cope well with changing inode numbers > because it checks the content in a first pass in refresh_index, but only > checks the stat info in the second pass in run_diff_files. The reason it > does work for regular files is EC_UPTODATE o

Re: merging confusion and question

2012-08-08 Thread Rich Pixley
Thank you. I think the work flow here needs some work, but reset --hard gets me running again. That should probably be mentioned in the error message. --rich On 8/7/12 18:43 , Junio C Hamano wrote: Rich Pixley writes: I'm confused. What is the intended work flow here? Ie, aside from tr

[PATCH v2] Documentation: list git-credential in plumbing commands

2012-08-08 Thread Matthieu Moy
Commit e30b2feb1b (Jun 24 2012, add 'git credential' plumbing command) forgot to add git-credential to command-list.txt, hence the command was not appearing in the documentation, making it hard for users to discover it. While we're there, capitalize the description line for git-crendential for con

Re: [PATCH/RFC v3 06/13] Read index-v5

2012-08-08 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: >> +struct index_ops v5_ops = { >> + match_stat_basic, >> + verify_hdr, >> + read_index_v5, >> + NULL >> +}; > > If you do it right, putting write_index_v2 here should work because > in-core structure is not changed (except that write_index_v2

Re: [PATCH] add test for 'git rebase --keep-empty'

2012-08-08 Thread Neil Horman
On Wed, Aug 08, 2012 at 09:48:18AM -0700, Martin von Zweigbergk wrote: > Signed-off-by: Martin von Zweigbergk > --- > > While trying to use patch-id instead of > --ignore-if-in-upstream/--cherry-pick/cherry/etc, I noticed that > patch-id ignores empty patches and I was surprised that tests still

Re: [PATCH] Documentation: list git-credential in plumbing commands

2012-08-08 Thread Junio C Hamano
Matthieu Moy writes: > Commit e30b2feb1b (Jun 24 2012, add 'git credential' plumbing command) > forgot to add git-credential to command-list.txt, hence the command was > not appearing in the documentation, making it hard for users to discover > it. > > While we're there, capitalize the descriptio

Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-08 Thread Junio C Hamano
Thomas Gummerer writes: >> > + name = (char *)mmap + *dir_offset; >> > + beginning = mmap + *dir_table_offset; >> >> Notice how you computed name with pointer arithmetic by first >> casting mmap (which is "void *") and when computing beginning, you >> forgot to cast mmap and attempted pointer

[PATCH] add test for 'git rebase --keep-empty'

2012-08-08 Thread Martin von Zweigbergk
Signed-off-by: Martin von Zweigbergk --- While trying to use patch-id instead of --ignore-if-in-upstream/--cherry-pick/cherry/etc, I noticed that patch-id ignores empty patches and I was surprised that tests still pass. This test case would be useful to protect --keep-empty. t/t3401-rebase-part

Re: [PATCH/RFC v2 0/16] Introduce index file format version 5

2012-08-08 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: > OK how about this. The general idea is preserve/extend current flat > index API and add a new (tree-based) one. Index users can use either. > They can even mix them up (which they do because we can't just flip > the API in one day for about 200 source files). > > Th

Git does not handle changing inode numbers well

2012-08-08 Thread Matthijs Kooijman
(Please CC me, I'm not on the list) Hi folks, I've spent some time debugging an issue and I'd like to share the results. The conclusion of my debugging is that git does not currently handle changing inode numbers on files well. I have a custom Fuse filesystem, and fuse dynamically allocates inod

Re: Sync production with Git

2012-08-08 Thread Matthieu Moy
kiranpyati writes: > We want a way to seamlessly sync production and Git. You should be aware that Git was not designed for this scenario. The usual flow with Git (and actually with most revision control systems), is to do the development with Git, then use your build system to generate a packag

Re: [PATCH] Enable HAVE_DEV_TTY for Solaris

2012-08-08 Thread Erik Faye-Lund
On Tue, Aug 7, 2012 at 6:10 AM, Jeff King wrote: > Subject: [PATCH] terminal: seek when switching between reading and writing > > When a stdio stream is opened in update mode (e.g., "w+"), > the C standard forbids switching between reading or writing > without an intervening positioning function.

Re: [PATCH/RFC v2 0/16] Introduce index file format version 5

2012-08-08 Thread Nguyen Thai Ngoc Duy
On Wed, Aug 8, 2012 at 8:38 AM, Junio C Hamano wrote: > If the workload we _care_ about is served better by using an API > that works over an in-core tree-shaped index data structure, I do > not think it is unreasonable to read the v2 on-disk format and > represent it as a tree-shaped index while

Sync production with Git

2012-08-08 Thread kiranpyati
I am new to github, Earlier we used to manually upload files on the production through FTP although git was present on the production. Due to this now git status shows many modified and untrack files. To sync that with git we have downloaded all files from production and committed to git. Now git

Bug Report: Git sometimes "locks" file when running "git difftool"

2012-08-08 Thread Ben Blamey
Hi, I'm using git for windows, PortableGit-1.7.11-preview20120710 (I've just upgraded from PortableGit-1.7.6-preview20110709, which also had the problem), on windows 7 (SP1). I find it handy when running "git difftool" to make changes to the file in the difftool (I personally use diffmerge http://

Re: [PATCH/RFC v3 06/13] Read index-v5

2012-08-08 Thread Johannes Sixt
Am 8/8/2012 14:05, schrieb Nguyen Thai Ngoc Duy: > uOn Wed, Aug 8, 2012 at 6:17 PM, Thomas Gummerer wrote: >> +static struct cache_entry *read_entry(struct directory_entry *de, >> + unsigned long *entry_offset, >> + void **mmap, >> +

Re: [PATCH/RFC v3 06/13] Read index-v5

2012-08-08 Thread Nguyen Thai Ngoc Duy
uOn Wed, Aug 8, 2012 at 6:17 PM, Thomas Gummerer wrote: > +static struct cache_entry *read_entry(struct directory_entry *de, > + unsigned long *entry_offset, > + void **mmap, > + unsigned long mmap_size, > + un

Re: [PATCH/RFC v3 01/13] Move index v2 specific functions to their own file

2012-08-08 Thread Nguyen Thai Ngoc Duy
On Wed, Aug 8, 2012 at 6:17 PM, Thomas Gummerer wrote: > Move index version 2 specific functions to their own file, > to prepare for the addition of a new index file format. With > the split into two files we have the non-index specific > functions in read-cache.c and the index-v2 specific functio

[PATCH/RFC v3 09/13] Write index-v5

2012-08-08 Thread Thomas Gummerer
Write the index version 5 file format to disk. This version doesn't write the cache-tree data and resolve-undo data to the file. The main work is done when filtering out the directories from the current in-memory format, where in the same turn also the conflicts and the file data is calculated. H

[PATCH/RFC v3 12/13] update-index.c: always rewrite the index when index-version is given

2012-08-08 Thread Thomas Gummerer
Make git update-index always rewrite the index, if a index-version is given. This is used for performance testing, to have a reader and writer for the whole index. Signed-off-by: Thomas Gummerer --- builtin/update-index.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/

[PATCH/RFC v3 11/13] Write resolve-undo data for index-v5

2012-08-08 Thread Thomas Gummerer
Write the resolve undo data to the ondisk format, by joining the data in the resolve-undo string-list with the already existing conflicts that were compiled before, when searching the directories and add them to the corresponding directory entries. Helped-by: Thomas Rast Signed-off-by: Thomas Gum

[PATCH/RFC v3 07/13] Read resolve-undo data

2012-08-08 Thread Thomas Gummerer
Make git read the resolve-undo data from the index. Since the resolve-undo data is joined with the conflicts in the ondisk format of the index file version 5, conflicts and resolved data is read at the same time, and the resolve-undo data is then converted to the in-memory format. Helped-by: Thom

[PATCH/RFC v3 01/13] Move index v2 specific functions to their own file

2012-08-08 Thread Thomas Gummerer
Move index version 2 specific functions to their own file, to prepare for the addition of a new index file format. With the split into two files we have the non-index specific functions in read-cache.c and the index-v2 specific functions in read-cache-v2.c Helped-by: Nguyen Thai Ngoc Duy Signed-o

[PATCH/RFC v3 03/13] t3700: Avoid interfering with the racy code

2012-08-08 Thread Thomas Gummerer
The new git racy code uses the mtime of cache-entries as smudge marker for racily clean entries. The work of checking the file-system if the entry really changed is offloaded to the reader. This interferes with this test, because the entry is racily smudged and thus has mtime 0. To avoid interferi

[PATCH/RFC v3 04/13] Add documentation of the index-v5 file format

2012-08-08 Thread Thomas Gummerer
Add a documentation of the index file format version 5 to Documentation/technical. Helped-by: Michael Haggerty Helped-by: Junio C Hamano Helped-by: Thomas Rast Helped-by: Nguyen Thai Ngoc Duy Helped-by: Robin Rosenberg Signed-off-by: Thomas Gummerer --- Documentation/technical/index-file-fo

[PATCH/RFC v3 10/13] Write index-v5 cache-tree data

2012-08-08 Thread Thomas Gummerer
Write the cache-tree data for the index version 5 file format. The in-memory cache-tree data is converted to the ondisk format, by adding it to the directory entries, that were compiled from the cache-entries in the step before. Signed-off-by: Thomas Gummerer --- cache-tree.c | 52

[PATCH/RFC v3 08/13] Read cache-tree in index-v5

2012-08-08 Thread Thomas Gummerer
Since the cache-tree data is saved as part of the directory data, we already read it at the beginning of the index. The cache-tree is only converted from this directory data. The cache-tree data is arranged in a tree, with the children sorted by pathlen at each node, while the ondisk format is sor

[PATCH/RFC v3 06/13] Read index-v5

2012-08-08 Thread Thomas Gummerer
Make git read the index file version 5 without complaining. This version of the reader doesn't read neither the cache-tree nor the resolve undo data, but doesn't choke on an index that includes such data. Helped-by: Nguyen Thai Ngoc Duy Helped-by: Thomas Rast Signed-off-by: Thomas Gummerer ---

[PATCH/RFC v3 13/13] p0002-index.sh: add perf test for the index formats

2012-08-08 Thread Thomas Gummerer
From: Thomas Rast Add a performance test for index version [23]/4/5 by using git update-index --update-index=[345], thus testing both the reader and the writer speed of all index formats. Signed-off-by: Thomas Rast Signed-off-by: Thomas Gummerer --- t/perf/p0002-index.sh | 33 ++

[PATCH/RFC v3 02/13] t2104: Don't fail for index versions other than [23]

2012-08-08 Thread Thomas Gummerer
t2104 currently checks for the exact index version 2 or 3, depending if there is a skip-worktree flag or not. Other index versions do not use extended flags and thus cannot be tested for version changes. Make this test update the index to version 2 at the beginning of the test. Testing the skip-wo

[PATCH/RFC v3 0/13] Introduce index file format version 5

2012-08-08 Thread Thomas Gummerer
Previous rounds of this series were on $gmane/202752 and $gmane/202923. This round includes a major change, as it is splitting up read-cache.c into read-cache.c, read-cache-v2.c and read-cache-v5.c. It uses index->ops to call the specific functions as suggested by Duy. It also changes the index

[PATCH/RFC v3 05/13] Make in-memory format aware of stat_crc

2012-08-08 Thread Thomas Gummerer
Make the in-memory format aware of the stat_crc used by index-v5. It is simply ignored by index version prior to v5. Signed-off-by: Thomas Gummerer --- cache.h |1 + read-cache.c | 25 + 2 files changed, 26 insertions(+) diff --git a/cache.h b/cache.h index c7

Re: [PATCH 2/2] Add index-v5

2012-08-08 Thread Thomas Gummerer
On 08/07, Robin Rosenberg wrote: > Nguyễn Thái Ngọc Duy skrev 2012-08-06 16.36: > > >+++ b/read-cache-v5.c > >@@ -0,0 +1,1170 @@ > >+#include "cache.h" > >+#include "read-cache.h" > >+#include "resolve-undo.h" > >+#include "cache-tree.h" > >+ > >+struct cache_header_v5 { > >+unsigned int hdr

Re: [PATCH/RFC v2 0/16] Introduce index file format version 5

2012-08-08 Thread Nguyen Thai Ngoc Duy
On Wed, Aug 8, 2012 at 5:31 AM, Thomas Rast wrote: > Thomas and me -- it was mostly my bad idea -- spent some time going > through all the loops that iterate over the index. You can get some > taste of it with 'git grep ce_stage', mostly because many of them either > skip unmerged entries or spec

Re: [PATCH/RFC v2 0/16] Introduce index file format version 5

2012-08-08 Thread Thomas Rast
Junio C Hamano writes: > Thomas Rast writes: > >> I like the general idea, too, but I think there is a long way ahead, and >> we shouldn't hold up v5 on this. > > We shouldn't rush, only to keep some deadline, and regret it later > that we butchered the index format without thinking things throu

[PATCH] Documentation: list git-credential in plumbing commands

2012-08-08 Thread Matthieu Moy
Commit e30b2feb1b (Jun 24 2012, add 'git credential' plumbing command) forgot to add git-credential to command-list.txt, hence the command was not appearing in the documentation, making it hard for users to discover it. While we're there, capitalize the description line for git-crendential for con

Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-08 Thread Thomas Gummerer
On 08/05, Junio C Hamano wrote: > Thomas Gummerer writes: > > > +static struct directory_entry *read_directories_v5(unsigned int > > *dir_offset, > > + unsigned int *dir_table_offset, > > + void *mmap, > > + int mmap_s

Re: [PATCH/RFC v2 15/16] update-index.c: add a force-rewrite option

2012-08-08 Thread Thomas Gummerer
On 08/05, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Add a force-rewrite option to update-index, which allows the user > > to rewrite the index, even if there are no changes. This can be used > > to do performance tests of both the reader and the writer. > > > > Signed-off-by: Thomas G