How to recursively clean only those untracked files that are not ignored?

2014-04-19 Thread Ilya Basin
According to the help, without -x option git clean should let alone the ignored files, but it doesn't. [il@reallin test]$ cat .gitignore *.sar [il@reallin test]$ mkdir -p conf/sar touch conf/sar/aaa.sar [il@reallin test]$ git status # On branch master nothing to commit,

What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?

2012-10-17 Thread Ilya Basin
The filter-branch command, the contents of ~/.gitconfig and the tree are the same. The command succeeds on cygwin, but fails on Solaris due to unset GIT_AUTHOR_NAME and GIT_COMMITTER_NAME : $ git filter-branch --tree-filter env | grep GIT_ ; $CMD b416b9bfc5e71531f2f05af4c396bb0ba7560741..HEAD

Re[2]: What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?

2012-10-17 Thread Ilya Basin
s/.*/GIT_AUTHOR_DATE=''; export GIT_AUTHOR_DATE/p q } SED STDIN BEGIN tree 969f563d319049bb6dabc12054d67671499a6f55 parent c4734950e37c09ca7d3e3088f6f31d866dbb5077 author Ilya Basin basini...@gmail.com 1350401059 +0400 committer Ilya Basin basini

Re[3]: What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?

2012-10-17 Thread Ilya Basin
JS Most likely, your sed has problems with a sed script in function JS get_author_ident_from_commit. I tested it like this: JS $ sh -c '. $(git --exec-path)/git-sh-setup; JS get_author_ident_from_commit HEAD' JS GIT_AUTHOR_NAME='Johannes Sixt' JS GIT_AUTHOR_EMAIL='j...@kdbg.org'

Re[4]: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-05-28 Thread Ilya Basin
IB * I think git-svn doesn't handle the case, when a tag is deleted. IB I expected it to rename the ref from tags/tagname to IB tags/tagname@rev, but that doesn't happen. IB If a tag is replaced, there's no way to tell what was the previous IB state of that tag: git-svn just rewrites the

git cvsexportcommit: error patch does not apply

2012-08-03 Thread Ilya Basin
Hi. Here's what I'm trying to do: In gitcvs: [il@basin documentation]$ git mv SIC_SAP1_0_ADM_dv1_1.doc SIC_SAP1_0_ADM_dv1_2.doc (edit the file) [il@basin documentation]$ git commit ... SIC_SAP1_0_ADM_dv1_2.doc ... $ git log --stat -n 1 commit

Re: git cvsexportcommit: error patch does not apply

2012-08-04 Thread Ilya Basin
IB $ git cvsexportcommit -w ../../cvs/SAP -u -p -k -c b04fa43c9f1374cf0ea5f9bf88024282414b0a0c IB Checking if patch will apply IB cvs update: nothing known about `documentation/SIC_SAP1_0_ADM_dv1_2.doc' IB cvs status: nothing known about `documentation/SIC_SAP1_0_ADM_dv1_2.doc' IB

Re[2]: git cvsimport: new tags not imported on second cvsimport

2012-08-04 Thread Ilya Basin
AS Ilya Basin basini...@gmail.com writes: I made the initial import: git cvsimport -d :pserver:user@blackbird:10010/data/cvs/webgui -C SAP -r cvs -k SAP edited .git/config: [cvsimport] module = SAP r = cvs d = :pserver:user@blackbird:10010

cvsps: bad usage: invalid argument --norc

2013-04-14 Thread Ilya Basin
Hi esr. In cvsps 3.10 the flag --norc was removed. It broke 'git cvsimport'. Please give the option back and write something in the man page like: This option has no effect; it is present for compatibility -- To unsubscribe from this list: send the line unsubscribe git in the body of a

Re: cvsps: bad usage: invalid argument --norc

2013-04-14 Thread Ilya Basin
IB Hi esr. IB In cvsps 3.10 the flag --norc was removed. It broke 'git cvsimport'. IB Please give the option back and write something in the man page like: IB This option has no effect; it is present for compatibility Looks like the tool is completely different. I think I'll have to

Re: State of CVS-to-git conversion tools (Was: Re: cvsps: bad usage: invalid argument --norc)

2013-04-15 Thread Ilya Basin
Hi Eric. I tried --fast-export. It's 2 times faster. The first thing that differs: in cvsps2 commits with adjacent timestamps were joined into one (see the attached files). Do you know the reason? Does this --fast-export thing support what John mentioned, the incremental import support? Does

put THEIR commits AFTER my commits with a single rebase command

2013-04-17 Thread Ilya Basin
I asked this on stackoverflow, but no reply. http://stackoverflow.com/questions/15971244/git-put-their-commits-after-my-commits-with-a-single-rebase-command Suppose master and origin/master diverged. I'm on master and I want to put the commits from origin/master after my commits and then push

Re[2]: put THEIR commits AFTER my commits with a single rebase command

2013-04-18 Thread Ilya Basin
JH git cherry-pick master..origin/master Thanks Johan. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re[2]: put THEIR commits AFTER my commits with a single rebase command

2013-04-18 Thread Ilya Basin
JS Perhaps this one: JSgit merge origin/master JSgit rebase ORIG_HEAD JS -- Hannes Wouldn't I have to resolve conflicts twice? BTW, during the rebase, can I tell git to rewrite a different branch upon rebase success or abort? git branch -f tmp origin/master git rebase --onto

Does git fast-import support deltas?

2013-04-18 Thread Ilya Basin
Hi list. Here's what I mean: 1) a created a git repo from a foreign source using git fast-import 2) new commits were added to the foreign source Can I create a fast-import input stream not containing the commits already existing in my git repo and import it? I tried to create such streams with:

Re[2]: State of CVS-to-git conversion tools (Was: Re: cvsps: bad usage: invalid argument --norc)

2013-04-20 Thread Ilya Basin
Hi Eric. ESR cvs-fast-export does not have incremental-import support. ESR Whether git-cvs-import has it depend on which version you have ESR and what backend it it is using. I don't maintain that wrapper. Did you mean git-fast-import? Or do you know any wrapper that already uses cvsps3

git svn dcommit doesn't work with useSvnsyncProps

2013-04-23 Thread Ilya Basin
Hi list. Things often go wrong with git svn. Often you have to try different svn layouts and path ignores. This is why I prefer to do the long lasting svn mirror once and then clone the mirror to git with --use-svnsync-props. Why use this option at all? Because without it the commits have

Re[2]: State of CVS-to-git conversion tools (Was: Re: cvsps: bad usage: invalid argument --norc)

2013-04-23 Thread Ilya Basin
But if the branch is new, but it's parent commit is already imported, I guess, the only way to refer it is by its SHA-1 Eric, what parent information can cvsps provide for the first commit in a branch, when invoked with the '-d' flag? ESR At the moment it doesn't provide any at all. That

Re[2]: State of CVS-to-git conversion tools (Was: Re: cvsps: bad usage: invalid argument --norc)

2013-04-23 Thread Ilya Basin
ESR Ilya Basin basini...@gmail.com: For new branches the 'from' command can refer the common ancestor in an existing branch. For example: /--E thebranch / A---B---C---D master Commit E is newer than D; we already imported D; thebranch is new. Instead

git-svn --preserve-empty-dirs: Failed to strip path

2013-04-27 Thread Ilya Basin
Hi. I ran 'git svn init', then git config svn-remote.svn.preserve-empty-dirs true git config svn-remote.svn.placeholder-filename .gitignore then 'git svn fetch' and I get this: ... r897 = dc26a4628a0e1fb79452a3f1953fbdc1feae69d1 (refs/remotes/svn/trunk) M pom.xml

Re: git-svn --preserve-empty-dirs: Failed to strip path

2013-04-27 Thread Ilya Basin
Small test script: rm -rf testrepo.svn testrepo.gitsvn svnadmin create testrepo.svn url=file://`pwd`/testrepo.svn svn mkdir -m $url/trunk $url/branches $url/tags rm -rf testrepo svn co $url testrepo cd testrepo/trunk mkdir -p foo/bar/ svn add foo/ svn

Possible meaningless block in perl/Git/SVN/Fetcher.pm: sub find_empty_directories

2013-04-27 Thread Ilya Basin
Hi list, Hi Ray. Ray Chen who coded this part didn't show up in this list since 2011, so I'm asking everyone else. Also, I don't know perl. Excuse me, if the question is stupid. Here's the function. It's supposed to return a list of directories that became empty during this commit. The returned

[PATCH 1/2] git-svn: fix occasional Failed to strip path error on fetch next commit

2013-04-28 Thread Ilya Basin
When --stdlayout and --preserve-empty-dirs flags are used and a directory becomes empty, sometimes no empty dir placeholder file created. Then on fetch next commit git-svn dies with Failed to strip path error. Test script: rm -rf testrepo.svn testrepo.gitsvn svnadmin create testrepo.svn

[PATCH 2/2] git-svn: fix svn fetch erroneously recreating empty dir placeholder deleted earlier

2013-04-28 Thread Ilya Basin
The Fetcher accumulates deleted paths in an array and doesn't reset the array on next commit. This causes different results when interrupting and resuming the fetch. When --preserve-empty-dirs flag is used, a path in the array can be erroneously treated as just deleted, although it was deleted in

[PATCH 1/3] git-svn: fix occasional Failed to strip path error on fetch next commit, try #2

2013-04-28 Thread Ilya Basin
When --stdlayout and --preserve-empty-dirs flags are used and a directory becomes empty, two things happen: Sometimes find_empty_directories() returns empty list and no empty dir placeholder file created. This happens, because find_empty_directories() marks all directories as non-empty, if at

[PATCH 2/3] git-svn-test: don't test for possible bug Failed to strip path, try #2

2013-04-28 Thread Ilya Basin
In the previous commit a showcase was added to t9160-git-svn-preserve-empty-dirs.sh for the Failed to strip path bug. Now the flag --stdlayout should be enough. --- t/t9160-git-svn-preserve-empty-dirs.sh | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git

[PATCH 3/3] git-svn: fix svn fetch erroneously recreating empty dir placeholder deleted earlier, try #2

2013-04-28 Thread Ilya Basin
The Fetcher accumulates deleted paths in an array and doesn't reset the array on next commit. This causes different results when interrupting and resuming the fetch. When --preserve-empty-dirs flag is used, a path in the array can be erroneously treated as just deleted (although it was deleted in

git-svn: problem with svn cp trunk/subdir tags/subdir_1.0

2013-04-29 Thread Ilya Basin
After fixing --preserve-empty-dirs plus --stdlayout a new problem arised: When creating a tag or branch from a subdir, a disjoint branch is created. Then git-svn re-imports the commits using this dir as strip path. Why? I would instead keep the current commit as parent, delete everything except

Re: git-svn: problem with svn cp trunk/subdir tags/subdir_1.0

2013-04-29 Thread Ilya Basin
IB After fixing --preserve-empty-dirs plus --stdlayout a new problem IB arised: IB When creating a tag or branch from a subdir, a disjoint branch IB is created. Then git-svn re-imports the commits using this dir as IB strip path. IB Why? I would instead keep the current commit as parent, delete

[PATCH 1/5] git-svn: fix occasional Failed to strip path error on fetch next commit, try #3

2013-04-30 Thread Ilya Basin
When --stdlayout and --preserve-empty-dirs flags are used and a directory becomes empty, two things happen: Sometimes find_empty_directories() returns empty list and no empty dir placeholder file created. This happens, because find_empty_directories() marks all directories as non-empty, if at

[PATCH 2/5] git-svn-test: don't test for possible bug Failed to strip path, try #3

2013-04-30 Thread Ilya Basin
In the previous commit a showcase was added to t9160-git-svn-preserve-empty-dirs.sh for the Failed to strip path bug. Now the flag --stdlayout should be enough. --- t/t9160-git-svn-preserve-empty-dirs.sh | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git

[PATCH 3/5] git-svn: fix fetch erroneously recreating empty dir placeholder deleted earlier, try #3

2013-04-30 Thread Ilya Basin
The Fetcher accumulates deleted paths in an array and doesn't reset the array on next commit. This causes different results when interrupting and resuming the fetch. When --preserve-empty-dirs flag is used, a path in the array can be erroneously treated as just deleted (although it was deleted in

[PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-04-30 Thread Ilya Basin
.git/config is written on each commit. It's slow --- perl/Git/SVN/Fetcher.pm | 77 +++-- 1 file changed, 49 insertions(+), 28 deletions(-) diff --git a/perl/Git/SVN/Fetcher.pm b/perl/Git/SVN/Fetcher.pm index e658889..a5ad4cd 100644 ---

[PATCH 5/5] git-svn: fix empty dir tracking in branches

2013-04-30 Thread Ilya Basin
- When creating a tag or branch from a subdir, a disjoint branch is created. Then git-svn re-imports the commits using this dir as strip path. During this re-import the variable %added_placeholder is not up to date. Because the branch is disjoint, this variable should be empty

Re[2]: [PATCH 1/5] git-svn: fix occasional Failed to strip path error on fetch next commit, try #3

2013-04-30 Thread Ilya Basin
} @@ -458,9 +459,12 @@ sub find_empty_directories { my $skip_added = 0; foreach my $t (qw/dir_prop file_prop/) { foreach my $path (keys %{ $self-{$t} }) { - if (exists $self-{$t}-{dirname($path)}) { -

Re: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-04-30 Thread Ilya Basin
IB + return undef if (!keys $self-{_save_ph}); Correct is: return undef if (!keys %{$self-{_save_ph}}); In my repo the placeholders change too often (in 1/4 commits). I'm thinking of using: 'git config --unset svn-remote.$repo_id.added-placeholder path_regex' instead of full rewrite. -- To

Re[2]: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-05-01 Thread Ilya Basin
IB In my repo the placeholders change too often (in 1/4 commits). I'm IB thinking of using: IB 'git config --unset svn-remote.$repo_id.added-placeholder path_regex' IB instead of full rewrite. I need your help. There are still problems: $ grep define MAX_MATCHES ~/builds/git/git-git/config.c

Re[2]: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-05-01 Thread Ilya Basin
JCH ...and you want to perform a merge on the JCH Git side of that branch with another Git branch that does have real JCH contents in that directory, you would want the result to say This JCH directory no longer is just for a placeholder, but you cannot say JCH that globally by updating the config

Re[2]: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-05-01 Thread Ilya Basin
EW My personal philosophy has always been: git svn users should leave EW no trace or indication they're using a non-standard SVN client. Placeholders aren't pushed back to svn. -- -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re[2]: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-05-02 Thread Ilya Basin
Hi. I won't send you updated patches until I import and test my huge repo. Everything will be here: https://github.com/basinilya/git/commits/v1.8.2.2-git-svn-fixes At the moment I've decided not to implement the Junio's proposal: JCH comment line # added by git-svn only to keep the directory

Re: git-svn: problem with svn cp trunk/subdir tags/subdir_1.0

2013-05-02 Thread Ilya Basin
IB When creating a tag or branch from a subdir, a disjoint branch IB is created. Then git-svn re-imports the commits using this dir as IB strip path. IB Why? I would instead keep the current commit as parent, delete IB everything except the subdir and move its contents to root directory. Even

Re[2]: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-05-02 Thread Ilya Basin
EW Ilya Basin basini...@gmail.com wrote: Hi. I won't send you updated patches until I import and test my huge repo. Everything will be here: https://github.com/basinilya/git/commits/v1.8.2.2-git-svn-fixes At the moment I've decided not to implement the Junio's proposal: JCH comment line

Re[3]: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-05-03 Thread Ilya Basin
EW Ilya Basin basini...@gmail.com wrote: Hi. I won't send you updated patches until I import and test my huge repo. Everything will be here: https://github.com/basinilya/git/commits/v1.8.2.2-git-svn-fixes At the moment I've decided not to implement the Junio's proposal: JCH comment line

Re[4]: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-05-06 Thread Ilya Basin
The last error I encountered is: r7009 = 39805bb078983e34f2fc8d2c8c02d695d00d11c0 (refs/remotes/DMC4_Basic) Too many open files: Can't open file '/home/il/builds/sicap/gitsvn/prd_dmc4.svn/db/revs/0/786': Too many open files at

Re[3]: [PATCH 4/5] git-svn: fix bottleneck in stash_placeholder_list()

2013-05-06 Thread Ilya Basin
Hi Eric. I'm out of spare time and I still unable to import my repo. The code of SVN.pm is too complex. Please help me. Here's the list of my issues: * I think git-svn doesn't handle the case, when a tag is deleted. I expected it to rename the ref from tags/tagname to tags/tagname@rev, but