* Re: BUG: git-svn does not escape literal backslashes in author names.
From: Eric Wong @ 2007-11-17 20:43 UTC (permalink / raw)
To: Adrian Wilkins; +Cc: git
In-Reply-To: <1213a9470711120628l4ccab632n17635295ec897a2@mail.gmail.com>
Adrian Wilkins <adrian.wilkins@gmail.com> wrote:
> Recently converted a large (11,000+ revisions) repository.
>
> We authenticate against the NT domain controller, so all our revision
> authors are of the form "domain\user". (You can switch off mod_sspi
> reporting the domain part, but I didn't know about this at the time,
> so it continues for historical reasons.)
>
> git-svn treats the literal backslashes in the author names as escapes.
> This leads to authors like
>
> domainkevin
> domain\
> ichard
>
> I know, I should have read the manual and used my "authors" file. Bah.
>
> I'm sure that part of the revision hash in git includes the author
> name... so I guess I'm looking at another multi-day conversion. :-(
git-filter-branch should be able to take care of it. If you find
an invocation that's useful to others, it'd be great to post it
on the list as well :)
> Can I suggest that you make the authors file compulsory by default as well?
Not going to happen. I personally _hate_ having to track down author
information and make an authors file, and I suspect many others feel the
same. I've never used this feature in git-svn on any real repository.
--
Eric Wong
^ permalink raw reply
* What's cooking in git.git (topics)
From: Junio C Hamano @ 2007-11-17 20:51 UTC (permalink / raw)
To: git
In-Reply-To: <7vfxz89x9q.fsf@gitster.siamese.dyndns.org>
Here are the topics that have been cooking. Commits prefixed
with '-' are only in 'pu' while commits prefixed with '+' are
in 'next'. The topics list the commits in reverse chronological
order.
----------------------------------------------------------------
[New Topics]
* jc/move-gitk (Sat Nov 17 10:51:16 2007 -0800) 1 commit
- Move gitk to its own subdirectory
----------------------------------------------------------------
[Will cook further in 'next' and then merge to 'master' soon]
* sh/p4 (Thu Nov 15 10:38:45 2007 +0100) 1 commit
+ git-p4: Fix direct import from perforce after fetching changes
through git from origin
* lt/rev-list-interactive (Mon Nov 12 23:16:08 2007 -0800) 5 commits
+ Fix parent rewriting in --early-output
+ revision walker: mini clean-up
+ Enhance --early-output format
+ Add "--early-output" log flag for interactive GUI use
+ Simplify topo-sort logic
* lt/rev-list-gitlink (Sun Nov 11 23:35:23 2007 +0000) 1 commit
+ Fix rev-list when showing objects involving submodules
This fix from Dscho and Linus will need to be cherry-picked to
'maint' as well.
* ds/checkout-upper (Fri Nov 9 20:12:28 2007 +1100) 2 commits
+ git-checkout: Test for relative path use.
+ git-checkout: Support relative paths containing "..".
This will allow you to stay in a subdirectory and check out
paths in directories outside. With Dscho's "git status" that
shows relatives paths (in kh/commit series), this would make
cutting and pasting paths you forgot to "git add" easier.
* ph/parseopt-sh (Mon Nov 12 12:07:40 2007 +0000) 17 commits
+ git-quiltimport.sh fix --patches handling
+ git-am: -i does not take a string parameter.
+ sh-setup: don't let eval output to be shell-expanded.
+ git-sh-setup: fix parseopt `eval` string underquoting
+ Give git-am back the ability to add Signed-off-by lines.
+ git-rev-parse --parseopt
+ scripts: Add placeholders for OPTIONS_SPEC
+ Migrate git-repack.sh to use git-rev-parse --parseopt
+ Migrate git-quiltimport.sh to use git-rev-parse --parseopt
+ Migrate git-checkout.sh to use git-rev-parse --parseopt --keep-
dashdash
+ Migrate git-instaweb.sh to use git-rev-parse --parseopt
+ Migrate git-merge.sh to use git-rev-parse --parseopt
+ Migrate git-am.sh to use git-rev-parse --parseopt
+ Migrate git-clone to use git-rev-parse --parseopt
+ Migrate git-clean.sh to use git-rev-parse --parseopt.
+ Update git-sh-setup(1) to allow transparent use of git-rev-parse -
-parseopt
+ Add a parseopt mode to git-rev-parse to bring parse-options to
shell scripts.
The rate of incoming fix with this topic has slowed down, which
is a good indication that this is getting ready.
* js/mingw-fallouts (Thu Nov 15 12:24:17 2007 -0500) 12 commits
+ rehabilitate some t5302 tests on 32-bit off_t machines
+ Allow ETC_GITCONFIG to be a relative path.
+ Introduce git_etc_gitconfig() that encapsulates access of
ETC_GITCONFIG.
+ Allow a relative builtin template directory.
+ Close files opened by lock_file() before unlinking.
+ builtin run_command: do not exit with -1.
+ Move #include <sys/select.h> and <sys/ioctl.h> to git-compat-
util.h.
+ Use is_absolute_path() in sha1_file.c.
+ Skip t3902-quoted.sh if the file system does not support funny
names.
+ t5302-pack-index: Skip tests of 64-bit offsets if necessary.
+ t7501-commit.sh: Not all seds understand option -i
+ t5300-pack-object.sh: Split the big verify-pack test into smaller
parts.
A set of good general clean-up patches.
* ph/diffopts (Wed Nov 7 11:20:32 2007 +0100) 6 commits
+ Reorder diff_opt_parse options more logically per topics.
+ Make the diff_options bitfields be an unsigned with explicit
masks.
+ Use OPT_BIT in builtin-pack-refs
+ Use OPT_BIT in builtin-for-each-ref
+ Use OPT_SET_INT and OPT_BIT in builtin-branch
+ parse-options new features.
Further code clean-ups.
* cc/bisect (Sat Nov 17 14:35:25 2007 +0100) 5 commits
+ Bisect visualize: use "for-each-ref" to list all good refs.
+ git-bisect: modernize branch shuffling hack
+ git-bisect: use update-ref to mark good/bad commits
+ git-bisect: war on "sed"
+ Bisect reset: remove bisect refs that may have been packed.
----------------------------------------------------------------
[Actively cooking]
* jk/send-pack (Sat Nov 17 07:56:03 2007 -0500) 24 commits
+ send-pack: assign remote errors to each ref
+ send-pack: check ref->status before updating tracking refs
+ send-pack: track errors for each ref
+ Merge branch 'aw/mirror-push' into jk/send-pack
+ Merge branch 'ar/send-pack-remote-track' into jk/send-pack
+ Merge branch 'db/remote-builtin' into jk/send-pack
+ git-push: add documentation for the newly added --mirror mode
+ Add tests for git push'es mirror mode
+ Update the tracking references only if they were succesfully
updated on remote
+ Add a test checking if send-pack updated local tracking branches
correctly
+ git-push: plumb in --mirror mode
+ Teach send-pack a mirror mode
+ Merge master into aw/mirror-push
+ Merge branch 'jk/terse-push' into aw/mirror-push
+ send-pack: segfault fix on forced push
+ Reteach builtin-ls-remote to understand remotes
+ send-pack: require --verbose to show update of tracking refs
+ receive-pack: don't mention successful updates
+ more terse push output
+ Build in ls-remote
+ Build-in send-pack, with an API for other programs to call.
+ Use built-in send-pack.
+ Build-in peek-remote, using transport infrastructure.
+ Miscellaneous const changes and utilities
Looking good.
* jc/spht (Fri Nov 2 17:46:55 2007 -0700) 3 commits
+ core.whitespace: add test for diff whitespace error highlighting
+ git-diff: complain about >=8 consecutive spaces in initial indent
+ War on whitespace: first, a bit of retreat.
Teaching "git apply --whitespace=[warn|strip]" to honor the same
configuration would be a good addition, but this could go to
'master' as is.
* js/reflog-delete (Wed Oct 17 02:50:45 2007 +0100) 1 commit
+ Teach "git reflog" a subcommand to delete single entries
* tt/help (Sun Nov 11 19:57:57 2007 -0500) 2 commits
+ Remove hint to use "git help -a"
+ Make the list of common commands more exclusive
Some people on the list may find the exact list of commands
somewhat debatable. We can fine-tune that in-tree ('pu' does
not count as "in-tree").
----------------------------------------------------------------
[Approaching 'next']
* kh/commit (Sat Nov 17 00:46:33 2007 -0800) 16 commits
- PARK: cruft next-index clean-up
- Replace "runstatus" with "status" in the tests
- t7501-commit: Add test for git commit <file> with dirty index.
- builtin-commit: Clean up an unused variable and a debug fprintf().
- Call refresh_cache() when updating the user index for --only
commits.
- builtin-commit: Add newline when showing which commit was created
- builtin-commit: resurrect behavior for multiple -m options
- builtin-commit --s: add a newline if the last line was not a S-o-b
- builtin-commit: fix --signoff
- git status: show relative paths when run in a subdirectory
- builtin-commit: Refresh cache after adding files.
- builtin-commit: fix reflog message generation
- launch_editor(): read the file, even when EDITOR=:
- Port git commit to C.
- Export launch_editor() and make it accept ':' as a no-op editor.
- Add testcase for amending and fixing author in git commit.
Dscho fixed a few obvious glitches, but indicated he has a
handful more issues with the series. Partial commit is
seriously broken.
* sp/refspec-match (Sun Nov 11 15:01:48 2007 +0100) 4 commits
- refactor fetch's ref matching to use refname_match()
- push: use same rules as git-rev-parse to resolve refspecs
- add refname_match()
- push: support pushing HEAD to real branch name
This changes the semantics slightly but I think it is a move in
the right direction.
* sb/clean (Wed Nov 14 23:00:54 2007 -0600) 3 commits
- Teach git clean to use setup_standard_excludes()
- git-clean: Fix error message if clean.requireForce is not set.
- Make git-clean a builtin
It has a subtle change in behaviour but it does not quite
qualify as a regression. Will merge to "next" shortly. We can
fix the corner case semantics in-tree. I also adjusted the
error message to match the fix from Hannes on 'master'.
----------------------------------------------------------------
[Stalled]
* mh/rebase-skip-hard (Thu Nov 8 08:03:06 2007 +0100) 1 commit
- Do git reset --hard HEAD when using git rebase --skip
Some people on the list may find this debatable. Opinions?
* cr/tag-options (Fri Nov 9 14:42:56 2007 +0100) 1 commit
- Make builtin-tag.c use parse_options.
This changes the handling of multiple -m options without much
good reason. It should be a simple fix, once we know what we
want. I think the existing behaviour of refusing multiple -m
is probably the most sane at this point.
* dz/color-addi (Sat Nov 10 18:03:44 2007 -0600) 3 commits
- Added diff hunk coloring to git-add--interactive
- Let git-add--interactive read colors from .gitconfig
- Added basic color support to git add --interactive
This series has improved quite a bit since the last round, but
another round was requested from the list. Waiting for
refinements.
* nd/maint-work-tree-fix (Sat Nov 3 20:18:06 2007 +0700) 1 commit
+ Add missing inside_work_tree setting in setup_git_directory_gently
There was an additional patch, which still had issues Dscho
pointed out. Waiting for refinements.
* ss/dirty-rebase (Thu Nov 1 22:30:24 2007 +0100) 3 commits
- Make git-svn rebase --dirty pass along --dirty to git-rebase.
- Implement --dirty for git-rebase--interactive.
- Introduce --dirty option to git-rebase, allowing you to start from
a dirty state.
This seems to be optimized for the --dirty case too much. I'd
prefer an implementation that make rebases without --dirty to
pay no penalty (if that is possible, otherwise "as little as
possible").
----------------------------------------------------------------
[Others]
* jc/branch-contains (Wed Nov 7 14:58:09 2007 -0800) 1 commit
- git-branch --with=commit
I did this just for my own fun. --contains might be more
consistent with git-describe but --with is shorter to type ;-)
Besides, it needs documentation and tests.
* jc/maint-format-patch-encoding (Fri Nov 2 17:55:31 2007 -0700) 2 commits
- test format-patch -s: make sure MIME content type is shown as
needed
- format-patch -s: add MIME encoding header if signer's name
requires so
This is to apply to 'maint' later; the equivalent fix is already
in 'master'.
* lt/maint-rev-list-gitlink (Sun Nov 11 23:35:23 2007 +0000) 1 commit
- Fix rev-list when showing objects involving submodules
This is to apply to 'maint' later; the equivalent fix is already
in 'next' and will be merged to 'master' soon.
* jc/pathspec (Thu Sep 13 13:38:19 2007 -0700) 3 commits
- pathspec_can_match(): move it from builtin-ls-tree.c to tree.c
- ls-tree.c: refactor show_recursive() and rename it.
- tree-diff.c: split out a function to match a single pattern.
* jk/rename (Tue Oct 30 00:24:42 2007 -0400) 3 commits
- handle renames using similarity engine
- introduce generic similarity library
- change hash table calling conventions
* jc/cherry-pick (Tue Nov 13 12:38:51 2007 -0800) 1 commit
- revert/cherry-pick: start refactoring call to merge_recursive
* jc/nu (Sun Oct 14 22:07:34 2007 -0700) 3 commits
- merge-nu: a new merge backend without using unpack_trees()
- read_tree: take an explicit index structure
- gcc 4.2.1 -Werror -Wall -ansi -pedantic -std=c99: minimum fix
^ permalink raw reply
* Re: [PATCH] git-svn: prevent dcommitting if the index is dirty.
From: Eric Wong @ 2007-11-17 20:52 UTC (permalink / raw)
To: Benoit Sigoure; +Cc: git
In-Reply-To: <F711CC72-4A91-4B69-B26A-31B0FB6621B0@lrde.epita.fr>
Benoit Sigoure <tsuna@lrde.epita.fr> wrote:
> On Nov 12, 2007, at 3:28 AM, Eric Wong wrote:
> >We use tabs for indentation, and spaces for alignment.
>
> Yes, sorry again, would you consider to add `# vi: set noexpandtab:'
> at the end of the file so that ViM users (like me) don't have to
> think about it? (it tells ViM to NOT expand tabs to series of spaces)
No, there are still too many cases where the modelines won't apply:
non-VIM users, VIM-users with modelines disabled.
Instead, you can try this in your .vimrc:
augroup filetype
au BufRead git-svn.perl set noexpandtab
augroup END
--
Eric Wong
^ permalink raw reply
* Re: [PATCH 1/3] send-pack: track errors for each ref
From: Junio C Hamano @ 2007-11-17 20:53 UTC (permalink / raw)
To: Jeff King; +Cc: git, Alex Riesen, Pierre Habouzit, Daniel Barkalow
In-Reply-To: <20071117125426.GA23186@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Instead of keeping the 'ret' variable, we instead have a
> status flag for each ref that tracks what happened to it.
> We then print the ref status after all of the refs have
> been examined.
>
> This paves the way for three improvements:
> - updating tracking refs only for non-error refs
> - incorporating remote rejection into the printed status
> - printing errors in a different order than we processed
> (e.g., consolidating non-ff errors near the end with
> a special message)
Looks good.
Except that
> @@ -218,15 +219,105 @@ static const char *prettify_ref(const char *name)
>
> #define SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)
>
> +static void print_ref_status(char flag, const char *summary, struct ref *to, struct ref *from, const char *msg)
> +{
> + fprintf(stderr, " %c %-*s ", flag, SUMMARY_WIDTH, summary);
> + if (from)
> + fprintf(stderr, "%s -> %s", prettify_ref(from), prettify_ref(to));
> + else
> + fputs(prettify_ref(to), stderr);
> + if (msg) {
> + fputs(" (", stderr);
> + fputs(msg, stderr);
> + fputc(')', stderr);
> + }
> + fputc('\n', stderr);
> +}
msg is parenthesized here, so...
> +static void print_ok_ref_status(struct ref *ref)
> +{
> + if (ref->deletion)
> + print_ref_status('-', "[deleted]", ref, NULL, NULL);
> + else if (is_null_sha1(ref->old_sha1))
> + print_ref_status('*',
> + (!prefixcmp(ref->name, "refs/tags/") ? "[new tag]" :
> + "[new branch]"),
> + ref, ref->peer_ref, NULL);
> + else {
> + char quickref[83];
> + char type;
> + const char *msg;
> +
> + strcpy(quickref, status_abbrev(ref->old_sha1));
> + if (ref->nonfastforward) {
> + strcat(quickref, "...");
> + type = '+';
> + msg = " (forced update)";
... you do not need the " (" and ")" here.
All merged to 'next'. Thanks.
^ permalink raw reply
* What's in git.git (stable)
From: Junio C Hamano @ 2007-11-17 21:00 UTC (permalink / raw)
To: git
In-Reply-To: <7vabpg9x5k.fsf@gitster.siamese.dyndns.org>
* The 'maint' branch has these fixes since the last announcement.
There are a few candidate fixes for back-porting from the
development series (see "What's cooking" message). I will
include them in 1.5.3.6, probably on or around 20th of this
month.
David Symonds (1):
Improve accuracy of check for presence of deflateBound.
Jeff King (1):
git-send-email: add charset header if we add encoded 'From'
Junio C Hamano (3):
core.excludesfile clean-up
Fix per-directory exclude handing for "git add"
Update draft release notes for 1.5.3.6
Wincent Colaiuta (1):
Fix t9101 test failure caused by Subversion "auto-props"
* The 'master' branch has these since the last announcement
in addition to the above.
Guido Ostkamp (1):
Remove unreachable statements
Jeff King (1):
git-ls-files: add --exclude-standard
Johannes Sixt (1):
refs.c: Remove unused get_ref_sha1()
Junio C Hamano (2):
Fix per-directory exclude handing for "git add"
Update draft release notes for 1.5.4
Mike Hommey (1):
Fix and improve t7004 (git-tag tests)
Sergei Organov (3):
Documentation: customize diff-options depending on particular
command
user-manual.txt: minor clarification.
Documentation: fix git-clone manpage not to refer to itself
^ permalink raw reply
* Re: Trivial patch to git-svn
From: Eric Wong @ 2007-11-17 21:12 UTC (permalink / raw)
To: David Reiss; +Cc: git
In-Reply-To: <473A1D9F.4030103@facebook.com>
David Reiss <dreiss@facebook.com> wrote:
> From d9f93dc1c503c5f42b27485b2c35b38e8c9bca44 Mon Sep 17 00:00:00 2001
> From: David Reiss <dreiss@dreiss-vmware.(none)>
> Date: Tue, 13 Nov 2007 13:47:26 -0800
> Subject: [PATCH] Fix a typo and add a comma in an error message in git-svn
>
> Signed-off-by: David Reiss <dreiss@facebook.com>
> ---
> git-svn.perl | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/git-svn.perl b/git-svn.perl
> index e3e00fd..981cdd6 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -391,7 +391,7 @@ sub cmd_set_tree {
> sub cmd_dcommit {
> my $head = shift;
> git_cmd_try { command_oneline(qw/diff-index --quiet HEAD/) }
> - 'Cannot dcommit with a dirty index. Commit your changes
> first'
> + 'Cannot dcommit with a dirty index. Commit your changes
> first, '
> . "or stash them with `git stash'.\n";
> $head ||= 'HEAD';
> my @refs;
I am not an English expert, but both seem acceptable to me. Anybody else
agree/disagree?
--
Eric Wong
^ permalink raw reply
* What's not in git.git
From: Junio C Hamano @ 2007-11-17 21:12 UTC (permalink / raw)
To: git
A list of recent issues discussed without any patch landing in
my tree.
* git-revert <path>
As discussed, I am in favor of the above command, only when
<path> cannot be interpreted as a valid commit object name and
<path> appears in the index, to run "git-checkout -- <path>".
Also, I am in favor of making "git-revert <commit> -- <path>"
and "git-cherry-pick <commit> -- <path>" create a commit that
reverts or cherry-picks the effect of named commit but only
on named paths, as proposed by Dscho.
Before the latter materializes, however, I think it is
possible to implement the former.
- "git-revert [--] <path>" runs "git-checkout -- <path>"
without complaining (only when unambiguous if no -- is
given);
- "git-cherry-pick [--] <path>" errors out, as it does not
make any sense.
- "git-(revert|cherry-pick) <commit> [--] <path>" gives
"unimplemented yet" error message;
* "Why a merge is more difficult to bisect" document.
I think the last text with rewording suggestion on the list
was good. Should I take that directly, or pull through
Bruce?
* "Batch mode of git-cat-file" aka git-fast-export.
I think the idea is sound.
http://thread.gmane.org/gmane.comp.version-control.git/65053/focus=65057
http://thread.gmane.org/gmane.comp.version-control.git/62295/focus=62441
* Solaris portability improvements and clean-up.
Test patches sent for git-compat-util.h and Makefile on
FLEX_ARRAY and mkdtemp() but they haven't resulted in any
appliable patch yet.
^ permalink raw reply
* Re: git-svn fetch failure: index.lock file exists
From: Eric Wong @ 2007-11-17 21:15 UTC (permalink / raw)
To: Ollie Wild; +Cc: git
In-Reply-To: <65dd6fd50711151607x50639232w6d79322129c3d82@mail.gmail.com>
Ollie Wild <aaw@google.com> wrote:
> Hi,
>
> I've been using git-svn for a while now to work on gcc. Last night, I did a
>
> git svn fetch
>
> and got the following failure:
>
> Found possible branch point: svn+ssh://aaw@gcc.gnu.org/svn/gcc/trunk =>
> svn+ssh://aaw@gcc.gnu.org/svn/gcc/tags/libbid-last-merge, 128810
> Found branch parent: (tags/libbid-last-merge)
> 789aa951bbc6a49f791bf5109136335fc33222c5
> fatal: unable to create
> '.git/svn/tags/libbid-last-merge/index.lock': File exists
> read-tree 789aa951bbc6a49f791bf5109136335fc33222c5:
> command returned error: 128
>
> Naively, it looks to me like I've just got a stale lock file from a
> previous run. However, I have no idea what the correct recovery
> strategy is. Can I just delete the lock file? Do I need to do some
> sort of data validation?
>
> I'm using git version 1.5.2.5 with subversion version 1.4.5 (r25188).
Did you interrupt git-svn in a previous run? But you should be able to
just remove it; git-svn should verify that the index is in a consistent
state before it attempts to fetch again.
--
Eric Wong
^ permalink raw reply
* Re: [PATCH] git-svn's dcommit must use subversion's config
From: Eric Wong @ 2007-11-17 21:22 UTC (permalink / raw)
To: Konstantin V. Arkhipov; +Cc: git, Junio C Hamano
In-Reply-To: <200711140352.02978.voxus@onphp.org>
"Konstantin V. Arkhipov" <voxus@onphp.org> wrote:
> When doing dcommit git-svn must use subversion's config or newly created
> files will not include svn's properties
> (defined in [auto-props] with 'enable-auto-props = yes').
>
> Signed-off-by: Konstantin V. Arkhipov <voxus@onphp.org>
> ---
> --- git-svn 2007-11-02 18:41:32.000000000 +0300
> +++ git-svn 2007-11-12 19:35:44.000000000 +0300
Thanks Konstantin,
I needed to add '.perl' to the filenames above to get the patch to
apply. But otherwise,
Acked-by: Eric Wong <normalperson@yhbt.net>
> @@ -406,6 +406,9 @@ sub cmd_dcommit {
> my %ed_opts = ( r => $last_rev,
> log => get_commit_entry($d)->{log},
> ra => Git::SVN::Ra->new($gs->full_url),
> + config => SVN::Core::config_get_config(
> + $Git::SVN::Ra::config_dir
> + ),
> tree_a => "$d~1",
> tree_b => $d,
> editor_cb => sub {
--
Eric Wong
^ permalink raw reply
* Re: Trivial patch to git-svn
From: Adam Roben @ 2007-11-17 21:26 UTC (permalink / raw)
To: Eric Wong; +Cc: David Reiss, git
In-Reply-To: <20071117211253.GB31598@mayonaise>
Eric Wong wrote:
> David Reiss <dreiss@facebook.com> wrote:
>
>> From d9f93dc1c503c5f42b27485b2c35b38e8c9bca44 Mon Sep 17 00:00:00 2001
>> From: David Reiss <dreiss@dreiss-vmware.(none)>
>> Date: Tue, 13 Nov 2007 13:47:26 -0800
>> Subject: [PATCH] Fix a typo and add a comma in an error message in git-svn
>>
>> Signed-off-by: David Reiss <dreiss@facebook.com>
>> ---
>> git-svn.perl | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/git-svn.perl b/git-svn.perl
>> index e3e00fd..981cdd6 100755
>> --- a/git-svn.perl
>> +++ b/git-svn.perl
>> @@ -391,7 +391,7 @@ sub cmd_set_tree {
>> sub cmd_dcommit {
>> my $head = shift;
>> git_cmd_try { command_oneline(qw/diff-index --quiet HEAD/) }
>> - 'Cannot dcommit with a dirty index. Commit your changes
>> first'
>> + 'Cannot dcommit with a dirty index. Commit your changes
>> first, '
>> . "or stash them with `git stash'.\n";
>> $head ||= 'HEAD';
>> my @refs;
>>
>
> I am not an English expert, but both seem acceptable to me. Anybody else
> agree/disagree?
>
I don't think the comma matters very much, but having a space between
"first" and "or" is pretty important. :-)
-Adam
^ permalink raw reply
* Re: git-cvsimport bug with dates
From: Jan Hudec @ 2007-11-17 21:36 UTC (permalink / raw)
To: Elijah Newren; +Cc: Robin Rosenberg, Junio C Hamano, git
In-Reply-To: <51419b2c0711170739p1a2bf6c7g87f615676f72aedf@mail.gmail.com>
On Sat, Nov 17, 2007 at 08:39:08 -0700, Elijah Newren wrote:
> Okay...so I guess my suggestion could be translated as: don't worry
> about when the commit entered; instead make git-cvsimport mark the
> refs as changed as of the CVS date mentioned instead of as of the
> import time.
>
> I guess there would be reluctance to do this whenever git-cvsimport
> would be used for incremental commits on a repository that also had
> local commits? Sounds like the issue is deeper than I first realized
> and this probably isn't worth the effort it'd take.
Actually local commits don't need to be involved at all. Incremental import
is enough.
One good reason to use reflog is when you notice something does not work and
recall, that it worked yesterday evening. Than you need to know what you were
looking at at that time, not at what was latest, because you didn't
necessarily have to be up-to-date.
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
^ permalink raw reply
* Re: [PATCH 3/3 v2] git-svn log: handle unreachable revisions like "svn log"
From: Eric Wong @ 2007-11-17 21:47 UTC (permalink / raw)
To: David D Kilzer; +Cc: git, gitster
In-Reply-To: <1194850612-6907-1-git-send-email-ddkilzer@kilzer.net>
David D Kilzer <ddkilzer@kilzer.net> wrote:
> When unreachable revisions are given to "svn log", it displays all commit
> logs in the given range that exist in the current tree. (If no commit
> logs are found in the current tree, it simply prints a single commit log
> separator.) This patch makes "git-svn log" behave the same way.
>
> Ten tests added to t/t9116-git-svn-log.sh.
>
> Signed-off-by: David D Kilzer <ddkilzer@kilzer.net>
> ---
>
> No changes were needed to parts 1 and 2 of this series, so I am not
> reposting them.
>
> Updated this patch based on feedback from Benoit Sigoure and Eric Wong:
>
> - Commented find_rev_before() and find_rev_after().
> - Changed commit_log_separator() into a constant.
> - Made return statement safer by adding another check in git_svn_log_cmd().
> - Changed echo statement to printf in t/t9116-git-svn-log.sh.
>
> All tests pass on maint branch.
Thanks,
Acked and pushed out to http://git.bogomips.org/git-svn.git
David D Kilzer (3):
git-svn log: fix ascending revision ranges
git-svn log: include commit log for the smallest revision in a range
git-svn log: handle unreachable revisions like "svn log"
David Reiss (1):
git-svn: Fix a typo and add a comma in an error message in git-svn
Eric Wong (1):
git-svn: add tests for command-line usage of init and clone commands
Konstantin V. Arkhipov (1):
git-svn's dcommit must use subversion's config
--
Eric Wong
^ permalink raw reply
* Re: Trivial patch to git-svn
From: Eric Wong @ 2007-11-17 21:54 UTC (permalink / raw)
To: Adam Roben; +Cc: David Reiss, git
In-Reply-To: <473F5C75.3040707@apple.com>
Adam Roben <aroben@apple.com> wrote:
> Eric Wong wrote:
> >David Reiss <dreiss@facebook.com> wrote:
> >
> >>From d9f93dc1c503c5f42b27485b2c35b38e8c9bca44 Mon Sep 17 00:00:00 2001
> >>From: David Reiss <dreiss@dreiss-vmware.(none)>
> >>Date: Tue, 13 Nov 2007 13:47:26 -0800
> >>Subject: [PATCH] Fix a typo and add a comma in an error message in
> >>git-svn
> >>
> >>Signed-off-by: David Reiss <dreiss@facebook.com>
> >>---
> >> git-svn.perl | 2 +-
> >> 1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >>diff --git a/git-svn.perl b/git-svn.perl
> >>index e3e00fd..981cdd6 100755
> >>--- a/git-svn.perl
> >>+++ b/git-svn.perl
> >>@@ -391,7 +391,7 @@ sub cmd_set_tree {
> >> sub cmd_dcommit {
> >> my $head = shift;
> >> git_cmd_try { command_oneline(qw/diff-index --quiet HEAD/) }
> >>- 'Cannot dcommit with a dirty index. Commit your changes
> >>first'
> >>+ 'Cannot dcommit with a dirty index. Commit your changes
> >>first, '
> >> . "or stash them with `git stash'.\n";
> >> $head ||= 'HEAD';
> >> my @refs;
> >>
> >
> >I am not an English expert, but both seem acceptable to me. Anybody else
> >agree/disagree?
> >
>
> I don't think the comma matters very much, but having a space between
> "first" and "or" is pretty important. :-)
Good eyes, thanks Adam.
Acked-by: Eric Wong <normalperson@yhbt.net>
Pushed out to http://git.bogomips.org/git-svn.git
Along with several other changes
(http://article.gmane.org/gmane.comp.version-control.git/65314)
--
Eric Wong
^ permalink raw reply
* [PATCH] fetch-pack: Prepare for a side-band demultiplexer in a thread.
From: Johannes Sixt @ 2007-11-17 22:09 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
get_pack() receives a pair of file descriptors that communicate with
upload-pack at the remote end. In order to support the case where the
side-band demultiplexer runs in a thread, and, hence, in the same process
as the main routine, we must not close the readable file descriptor early.
The handling of the readable fd is changed in the case where upload-pack
supports side-band communication: The old code closed the fd after it was
inherited to the side-band demultiplexer process. Now we do not close it.
The caller (do_fetch_pack) will close it later anyway. The demultiplexer
is the only reader, it does not matter that the fd remains open in the
main process as well as in unpack-objects/index-pack, which inherits it.
The writable fd is not needed in get_pack(), hence, the old code closed
the fd. For symmetry with the readable fd, we now do not close it; the
caller (do_fetch_pack) will close it later anyway. Therefore, the new
behavior is that the channel now remains open during the entire
conversation, but this has no ill effects because upload-pack does not read
from it once it has begun to send the pack data. For the same reason it
does not matter that the writable fd is now inherited to the demultiplexer
and unpack-objects/index-pack processes.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
This change again originates from the MinGW port. Since we don't
have fork(2) on Windows, we must run the sideband demultiplexer
in a thread.
-- Hannes
builtin-fetch-pack.c | 42 ++++++++++++++++--------------------------
1 files changed, 16 insertions(+), 26 deletions(-)
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index bb1742f..807fa93 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -462,34 +462,12 @@ static int sideband_demux(int fd, void *data)
{
int *xd = data;
- close(xd[1]);
return recv_sideband("fetch-pack", xd[0], fd, 2);
}
-static void setup_sideband(int fd[2], int xd[2], struct async *demux)
-{
- if (!use_sideband) {
- fd[0] = xd[0];
- fd[1] = xd[1];
- return;
- }
- /* xd[] is talking with upload-pack; subprocess reads from
- * xd[0], spits out band#2 to stderr, and feeds us band#1
- * through demux->out.
- */
- demux->proc = sideband_demux;
- demux->data = xd;
- if (start_async(demux))
- die("fetch-pack: unable to fork off sideband demultiplexer");
- close(xd[0]);
- fd[0] = demux->out;
- fd[1] = xd[1];
-}
-
static int get_pack(int xd[2], char **pack_lockfile)
{
struct async demux;
- int fd[2];
const char *argv[20];
char keep_arg[256];
char hdr_arg[256];
@@ -497,7 +475,20 @@ static int get_pack(int xd[2], char **pack_lockfile)
int do_keep = args.keep_pack;
struct child_process cmd;
- setup_sideband(fd, xd, &demux);
+ memset(&demux, 0, sizeof(demux));
+ if (use_sideband) {
+ /* xd[] is talking with upload-pack; subprocess reads from
+ * xd[0], spits out band#2 to stderr, and feeds us band#1
+ * through demux->out.
+ */
+ demux.proc = sideband_demux;
+ demux.data = xd;
+ if (start_async(&demux))
+ die("fetch-pack: unable to fork off sideband"
+ " demultiplexer");
+ }
+ else
+ demux.out = xd[0];
memset(&cmd, 0, sizeof(cmd));
cmd.argv = argv;
@@ -506,7 +497,7 @@ static int get_pack(int xd[2], char **pack_lockfile)
if (!args.keep_pack && unpack_limit) {
struct pack_header header;
- if (read_pack_header(fd[0], &header))
+ if (read_pack_header(demux.out, &header))
die("protocol error: bad pack header");
snprintf(hdr_arg, sizeof(hdr_arg), "--pack_header=%u,%u",
ntohl(header.hdr_version), ntohl(header.hdr_entries));
@@ -542,11 +533,10 @@ static int get_pack(int xd[2], char **pack_lockfile)
*av++ = hdr_arg;
*av++ = NULL;
- cmd.in = fd[0];
+ cmd.in = demux.out;
cmd.git_cmd = 1;
if (start_command(&cmd))
die("fetch-pack: unable to fork off %s", argv[0]);
- close(fd[1]);
if (do_keep && pack_lockfile)
*pack_lockfile = index_pack_lockfile(cmd.out);
--
1.5.3.5.721.g039b-dirty
^ permalink raw reply related
* Re: [RFC PATCH] git-svn info: implement info command
From: Eric Wong @ 2007-11-17 22:54 UTC (permalink / raw)
To: David D. Kilzer; +Cc: git
In-Reply-To: <1194884349-11504-1-git-send-email-ddkilzer@kilzer.net>
"David D. Kilzer" <ddkilzer@kilzer.net> wrote:
> Implement "git-svn info" for files and directories based on the "svn info"
> command. Note that the -r/--revision argument is not supported yet.
>
> Added 18 tests in t/t9117-git-svn-info.sh.
>
> Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
> ---
>
> Looking for feedback on this patch. Specifically, I'm looking for insight
> for the two FIXME comments in the cmd_info() function added to git-svn.
> (I can't help but think I'm missing a plumbing command or a basic concept.
> Pointers to code, web pages or man pages are welcome.)
>
> Note that I've tried to cover all the bases that "svn info" does (by using
> tests), except supporting the -r/--revision argument.
Hi David,
Wow. I can honestly say I've never even noticed the "Schedule:" field
in `svn info'. I would've been perfectly happy to accept an
implementation of `git svn info' without that :)
> I've also tried to be aggressive in extracting common code into functions.
I like it, but this should be a separate patch.
> +sub canonicalize_path {
> + my ($path) = @_;
> + my $dotSlashAdded = 0;
camelCase variables requires more time for the brain to parse (they're
easier to write, but take more time to read), please use snake_case like
the rest of git-svn (and git).
> +sub cmd_info {
> + my $path = canonicalize_path(shift or ".");
> + unless (scalar(@_) == 0) {
> + die "Too many arguments specified\n";
> + }
> +
> + # FIXME: We use a combination of git-diff, git-ls-files and git-cat-file
> + # to divine the state and type of object that was passed in as $path.
> + # There has to be a better way. Note that only $diffStatus is used
> + # beyond setting $isDirectory below.
I agree it's pretty ugly. You can probably expand git-runstatus to do
this. git-commit.sh used to use something like this until git-runstatus
was added. On the other hand, I'd be content if we dropped support
for this info entirely since `git-status' is perfectly good.
IMNSHO, "URL:" and "Repository Root:" and occasionally "Revision:" (on the
top-level directory) would be the only useful things this command would
have to offer.
Being able to run something like `git svn info --url <path>'
to get something like http://svn.foo.org/project/trunk/<path> would be
nice, too.
> +
> + my $diffStatus = (split(' ', command_oneline(qw(diff --cached --name-status --), $path) || ""))[0] || "";
Please wrap lines at 80 characters. I have a hard time following long
lines.
> + my $checksum;
> + # FIXME: We fail to generate the correct checksum for deleted
> + # symlinks here. How do we know if a deleted file was a symlin
git ls-tree HEAD <filename> will show the mode of a deleted file
> @@ -0,0 +1,236 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2007 David D. Kilzer
> +
> +test_description='git-svn info'
> +
> +. ./lib-git-svn.sh
> +
> +test_expect_success 'setup repository and import' "
> + rm -rf info gitwc svnwc &&
All git tests should start you off on a clean trash/ directory...
> + mkdir info &&
> + cd info &&
> + echo one > file &&
> + ln -s file symlink-file &&
> + mkdir directory &&
> + touch directory/.placeholder &&
> + ln -s directory symlink-directory &&
> + svn import -m 'initial' . $svnrepo &&
> + cd .. &&
> + mkdir gitwc &&
> + cd gitwc &&
> + git-svn init $svnrepo &&
> + git-svn fetch &&
> + cd .. &&
> + svn co $svnrepo svnwc &&
> + touch -c -r svnwc/file gitwc/file &&
> + touch -c -r svnwc/directory gitwc/directory &&
> + touch -c -r svnwc/symlink-file gitwc/symlink-file &&
> + touch -c -r svnwc/symlink-directory gitwc/symlink-directory
Are -r and -c portable? I remember writing test-chmtime to workaround
some arguments for touch not being portable.
> +test_expect_success 'info no arguments' "
> + (cd svnwc; svn info) > expected.info-no-arguments &&
> + (cd gitwc; git-svn info) > actual.info-no-arguments &&
> + diff -u expected.info-no-arguments actual.info-no-arguments
> + "
Can we expect the output of "svn info" to not change between
versions? I know "svn status" has changed between versions of
svn. I'd prefer if we keep the expected.* files hard-coded
in a test directory and compare those instead. Maybe use sed
to substitute placeholders for timestamps..
Also, git-diff can be used against arbitrary files nowadays, no
need to rely on a working diff command in the system :)
> +test_expect_success 'info added-file' "
> + echo two > gitwc/added-file &&
> + cd gitwc &&
> + git add added-file &&
> + cd .. &&
> + cp -p gitwc/added-file svnwc/added-file &&
I can't remember if cp -p is portable, either...
--
Eric Wong
^ permalink raw reply
* Re: BUG: git-svn does not escape literal backslashes in author names.
From: Andreas Ericsson @ 2007-11-17 23:17 UTC (permalink / raw)
To: Eric Wong; +Cc: Adrian Wilkins, git
In-Reply-To: <20071117204348.GA16333@muzzle>
Eric Wong wrote:
> Adrian Wilkins <adrian.wilkins@gmail.com> wrote:
>
>> Can I suggest that you make the authors file compulsory by default as well?
>
> Not going to happen. I personally _hate_ having to track down author
> information and make an authors file, and I suspect many others feel the
> same. I've never used this feature in git-svn on any real repository.
>
I wholeheartedly agree. One thing that could be improved in this area though
is to do what git-cvsimport does, and stash the authors file in $GIT_DIR and
re-read it on every invocation. I've forgotten to add that -A switch numerous
times when fetching incrementally and it always annoys me enormously.
Something like this, perhaps? It needs checking. My perl is.. well, you can
see for yourselves, and unfortunately I have no possibility to test this
until monday when I'm back on a sane link. It should work as a starting
point though. It applies cleanly on top of current next.
---%<---%<---%<---
From: Andreas Ericsson <ae@op5.se>
Subject: git svn: Cache author info in $GIT_DIR/author-cache
git-cvsimport does it, so it's reasonable that git-svn users
expect the same functionality. It's also damn convenient.
Signed-off-by: Andreas Ericsson <ae@op5.se>
---
Documentation/git-svn.txt | 3 +++
git-svn.perl | 25 +++++++++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 488e4b1..446a7d7 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -276,6 +276,9 @@ committer name that does not exist in the authors-file, git-svn
will abort operation. The user will then have to add the
appropriate entry. Re-running the previous git-svn command
after the authors-file is modified should continue operation.
+For convenience, this data is saved to $GIT_DIR/author-cache
+each time the '-A' option is provided and read from that same
+file each time git-svn is run.
config key: svn.authorsfile
diff --git a/git-svn.perl b/git-svn.perl
index e3e00fd..0a989ed 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -14,6 +14,7 @@ my $cmd_dir_prefix = eval {
command_oneline([qw/rev-parse --show-prefix/], STDERR => 0)
} || '';
+my $author_cache;
my $git_dir_user_set = 1 if defined $ENV{GIT_DIR};
$ENV{GIT_DIR} ||= '.git';
$Git::SVN::default_repo_id = 'svn';
@@ -203,7 +204,6 @@ exit 1 if (!$rv && $cmd && $cmd ne 'log');
usage(0) if $_help;
version() if $_version;
usage(1) unless defined $cmd;
-load_authors() if $_authors;
# make sure we're always running
unless ($cmd =~ /(?:clone|init|multi-init)$/) {
@@ -226,6 +226,14 @@ unless ($cmd =~ /(?:clone|init|multi-init)$/) {
$ENV{GIT_DIR} = $git_dir;
}
}
+
+$author_cache = $ENV{GIT_DIR} . "/author-cache";
+load_authors($_authors) if $_authors;
+unless ($cmd =~ /(?:clone|init|multi-init)$/) {
+ -f $author_cache and load_authors($author_cache);
+ write_author_cache();
+}
+
unless ($cmd =~ /^(?:clone|init|multi-init|commit-diff)$/) {
Git::SVN::Migration::migration_check();
}
@@ -297,6 +305,8 @@ sub do_git_init_db {
command_noisy('config', "$pfx.$i", $icv{$i});
$set = $i;
}
+
+ write_author_cache() if %users;
}
sub init_subdir {
@@ -900,7 +910,8 @@ sub file_to_s {
# '<svn username> = real-name <email address>' mapping based on git-svnimport:
sub load_authors {
- open my $authors, '<', $_authors or die "Can't open $_authors $!\n";
+ my ($file) = @_;
+ open my $authors, '<', $file or die "Can't open $file $!\n";
my $log = $cmd eq 'log';
while (<$authors>) {
chomp;
@@ -915,6 +926,16 @@ sub load_authors {
close $authors or croak $!;
}
+sub write_author_cache {
+ open my $f, '>', $author_cache
+ or die "Can't open author cache $author_cache for writing: $!\n";
+ foreach (keys %users) {
+ print $f "$_=$users{$_}[0] <$users{$_}[1]>\n";
+ }
+
+ close $f or croak $!;
+}
+
# convert GetOpt::Long specs for use by git-config
sub read_repo_config {
return unless -d $ENV{GIT_DIR};
--
1.5.3.5.1527.g6161
---%<---%<---%<---
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply related
* Re: [Advance Warning PATCH] Move gitk to its own subdirectory
From: Alex Riesen @ 2007-11-17 23:25 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vsl34u1iv.fsf@gitster.siamese.dyndns.org>
Junio C Hamano, Sat, Nov 17, 2007 20:15:20 +0100:
> The plan is to stop merging gitk.git as a single file project
> into git.git but instead use the subtree merge strategy into its
> own subdirectory of git.git. We can use subproject support in
> the future, but once _a_ subproject is used that means the
> project's history is not pullable with subproject unaware
> versions of git anymore, so I'd avoid it for now.
You made it part of "all" target, which we will have to change if gitk
is to become a subproject: Makefile better handle absence of the
Makefile under gitk-git, and continue build.
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> Makefile | 14 +++-----------
> gitk-git/Makefile | 29 +++++++++++++++++++++++++++++
> gitk => gitk-git/gitk | 0
> 3 files changed, 32 insertions(+), 11 deletions(-)
> create mode 100644 gitk-git/Makefile
> rename gitk => gitk-git/gitk (100%)
> mode change 100755 => 100644
...
> all::
> ifndef NO_TCLTK
> $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
> + $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
maybe "git-gitk" instead of "gitk-git"? As "git-gui" and "gitweb"...
Maybe even shorter: "gui", "web" and "k" :)
^ permalink raw reply
* Re: What's not in git.git
From: J. Bruce Fields @ 2007-11-17 23:27 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vlk8wshii.fsf@gitster.siamese.dyndns.org>
On Sat, Nov 17, 2007 at 01:12:53PM -0800, Junio C Hamano wrote:
> * "Why a merge is more difficult to bisect" document.
>
> I think the last text with rewording suggestion on the list
> was good. Should I take that directly, or pull through
> Bruce?
I can take a look tonight or tommorow (Sunday) morning. I'll also skim
back through my inbox for other user-manual and related patches (I know
I've been neglecting it for a while...), but if people know of anything
that's been overlooked they could resend.
--b.
^ permalink raw reply
* Re: What's cooking in git.git (topics)
From: Alex Riesen @ 2007-11-17 23:42 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vabpctx3b.fsf@gitster.siamese.dyndns.org>
Junio C Hamano, Sat, Nov 17, 2007 21:51:04 +0100:
> * mh/rebase-skip-hard (Thu Nov 8 08:03:06 2007 +0100) 1 commit
> - Do git reset --hard HEAD when using git rebase --skip
>
> Some people on the list may find this debatable. Opinions?
I like it (and didn't like the previous behaviour). Anyway, it is not
obvious what to do when --skip refuses to continue rebase because of
dirty index.
^ permalink raw reply
* Re: [PATCH 3/3] send-pack: assign remote errors to each ref
From: Jeff King @ 2007-11-18 0:03 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: Junio C Hamano, git, Alex Riesen, Pierre Habouzit
In-Reply-To: <Pine.LNX.4.64.0711171258000.12193@iabervon.org>
On Sat, Nov 17, 2007 at 01:05:29PM -0500, Daniel Barkalow wrote:
> Maybe this should take both the full list and the hint and do both passes
> internally? IMHO, the logic in receive_status() looks like it might be
> setting the error twice or not at all, unless you read very carefully.
Not unreasonable, though I started in that direction and it ended up
being less readable (which isn't to say that it's not possible). But it
looks like Junio has merged to next, so I think it is best to leave it
as-is.
-Peff
^ permalink raw reply
* Re: [PATCH 1/3] send-pack: track errors for each ref
From: Jeff King @ 2007-11-18 0:13 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: Junio C Hamano, git, Alex Riesen, Pierre Habouzit
In-Reply-To: <Pine.LNX.4.64.0711171217200.12193@iabervon.org>
On Sat, Nov 17, 2007 at 01:05:35PM -0500, Daniel Barkalow wrote:
> > +static void print_ref_status(char flag, const char *summary, struct ref *to, struct ref *from, const char *msg)
>
> Isn't "from" always "to->peer_ref"? It'd be nice to make this function
> unable to print something different from what we actually did. (Actually
> it might be "to->deletion ? NULL : to->peer_ref", but that would also be
> better to have as an explicit feature of how you display "to", rather than
> implicit in the set of callers.
Yes, I also considered changing "from" to "show peer" which might have
been nicer. I am not opposed to such a cleanup, but again, not sure if
it worth it now that we are merged.
> > +static const char *status_abbrev(unsigned char sha1[20])
> > +{
> > + const char *abbrev;
> > + abbrev = find_unique_abbrev(sha1, DEFAULT_ABBREV);
> > + return abbrev ? abbrev : sha1_to_hex(sha1);
> > +}
>
> Maybe we should have a find_unique_abbrev()-like function that doesn't
> mind if the requested object doesn't exist?
I agree, though I don't feel qualified to comment on what other places
that should be used (I was a bit surprised to find out that
find_unique_abbrev ever returned NULL, but changing the semantics at
this point is probably going to cause some subtle bug).
> > + char quickref[83];
> Shouldn't this be 40 + 3 + 40 + 1?
Oops, yes. I think it should be hard to trigger (both commits would have
to either not be in your db, or not be unique to 40 digits). But clearly
it should be fixed, and it looks like Junio did.
It was a stupid cut-and-paste from Nicolas' fetch code, but it looks
like he correctly allocates 84 bytes for the "..." case.
> > + char type;
> > + const char *msg;
> > +
> > + strcpy(quickref, status_abbrev(ref->old_sha1));
> > + if (ref->nonfastforward) {
> > + strcat(quickref, "...");
> > + type = '+';
> > + msg = " (forced update)";
> > + }
> > + else {
>
> Coding style, IIRC.
Sorry, I don't see the style nit you're mentioning here.
-Peff
^ permalink raw reply
* Re: [PATCH 1/3] send-pack: track errors for each ref
From: Jeff King @ 2007-11-18 0:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Alex Riesen, Pierre Habouzit, Daniel Barkalow
In-Reply-To: <7v6400twzp.fsf@gitster.siamese.dyndns.org>
On Sat, Nov 17, 2007 at 12:53:14PM -0800, Junio C Hamano wrote:
> > + strcpy(quickref, status_abbrev(ref->old_sha1));
> > + if (ref->nonfastforward) {
> > + strcat(quickref, "...");
> > + type = '+';
> > + msg = " (forced update)";
>
> ... you do not need the " (" and ")" here.
Oops, good catch.
> All merged to 'next'. Thanks.
I see you fixed up the off-by-one buffer, too. Thanks.
-Peff
^ permalink raw reply
* Re: Cloning empty repositories, was Re: What is the idea for bare repositories?
From: Jeff King @ 2007-11-18 0:25 UTC (permalink / raw)
To: Junio C Hamano
Cc: Sergei Organov, Matthieu Moy, Johannes Schindelin, Bill Lear,
Jan Wielemaker, git
In-Reply-To: <7vfxz8hbcf.fsf@gitster.siamese.dyndns.org>
Junio, can I get an ACK or NAK on the patch below? There doesn't seem to
be a patch for making cloning empty repos work on the horizon, but can
we at least improve the error message?
-- >8 --
git-clone: print an error message when trying to clone empty repo
Previously, cloning an empty repository looked like this:
$ (mkdir parent && cd parent && git --bare init)
$ git-clone parent child
Initialized empty Git repository in /home/peff/clone/child/.git/
$ cd child
-bash: cd: child: No such file or directory
$ echo 'wtf?' | mail git@vger.kernel.org
Now we at least report that the clone was not successful.
---
diff --git a/git-clone.sh b/git-clone.sh
index 18003ab..e2b7a9c 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -278,7 +278,8 @@ yes)
find objects -type f -print | sed -e 1q)
# objects directory should not be empty because
# we are cloning!
- test -f "$repo/$sample_file" || exit
+ test -f "$repo/$sample_file" ||
+ die "fatal: cannot clone empty repository"
if ln "$repo/$sample_file" "$GIT_DIR/objects/sample" 2>/dev/null
then
rm -f "$GIT_DIR/objects/sample"
^ permalink raw reply related
* Re: [PATCH 3/3 v2] git-svn log: handle unreachable revisions like "svn log"
From: Junio C Hamano @ 2007-11-18 0:36 UTC (permalink / raw)
To: Eric Wong; +Cc: David D Kilzer, git, gitster
In-Reply-To: <20071117214738.GB22835@soma>
Eric Wong <normalperson@yhbt.net> writes:
> Acked and pushed out to http://git.bogomips.org/git-svn.git
Ok, will pull to 'master' but from git://git.bogomips.org/git-svn.git/.
Thanks.
> David D Kilzer (3):
> git-svn log: fix ascending revision ranges
> git-svn log: include commit log for the smallest revision in a range
> git-svn log: handle unreachable revisions like "svn log"
>
> David Reiss (1):
> git-svn: Fix a typo and add a comma in an error message in git-svn
>
> Eric Wong (1):
> git-svn: add tests for command-line usage of init and clone commands
>
> Konstantin V. Arkhipov (1):
> git-svn's dcommit must use subversion's config
^ permalink raw reply
* Re: [PATCH] fetch-pack: Prepare for a side-band demultiplexer in a thread.
From: Junio C Hamano @ 2007-11-18 0:42 UTC (permalink / raw)
To: Johannes Sixt; +Cc: git
In-Reply-To: <200711172309.28364.johannes.sixt@telecom.at>
Johannes Sixt <johannes.sixt@telecom.at> writes:
> This change again originates from the MinGW port. Since we don't
> have fork(2) on Windows, we must run the sideband demultiplexer
> in a thread.
If the rationale was "running in a thread is more natural on the
platform", I would understand it.
But "_must_ run because there is no fork(2)" solicits a "Huh?
How does Cygwin does it then?" from me.
^ permalink raw reply
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