~ubuntu-branches/ubuntu/intrepid/git-core/intrepid-security

« back to all changes in this revision

Viewing changes to debian/diff/0004-git-cvsimport-force-checkout-of-working-tree-after-i.diff

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-10-04 08:27:01 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20071004082701-rsd058ontoqz4i30
Tags: 1:1.5.3.4-1
new upstream point release (closes: #445188).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From d5903b6989f91e3d8a6ee73d5ea540a91a48c516 Mon Sep 17 00:00:00 2001
2
 
From: Gerrit Pape <pape@smarden.org>
3
 
Date: Fri, 29 Jun 2007 12:35:53 +0000
4
 
Subject: [PATCH] git-cvsimport: force checkout of working tree after initial import
5
 
 
6
 
When creating a brand new git repository through git-cvsimport (not
7
 
incremental import), force a checkout of HEAD of master as working tree
8
 
after successful import using the -f switch to git checkout.  Otherwise
9
 
the working tree is empty, and all files are reported as 'deleted' by
10
 
git status.
11
 
 
12
 
This was noticed and reported by Cameron Dale through
13
 
 http://bugs.debian.org/430903
14
 
 
15
 
Signed-off-by: Gerrit Pape <pape@smarden.org>
16
 
---
17
 
 git-cvsimport.perl |    2 +-
18
 
 1 files changed, 1 insertions(+), 1 deletions(-)
19
 
 
20
 
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
21
 
index 4e6c9c6..c5c897f 100755
22
 
--- a/git-cvsimport.perl
23
 
+++ b/git-cvsimport.perl
24
 
@@ -1020,7 +1020,7 @@ if ($orig_branch) {
25
 
                unless -f "$git_dir/refs/heads/master";
26
 
        system('git-update-ref', 'HEAD', "$orig_branch");
27
 
        unless ($opt_i) {
28
 
-               system('git checkout');
29
 
+               system('git checkout -f');
30
 
                die "checkout failed: $?\n" if $?;
31
 
        }
32
 
 }
33
 
1.5.2.3
34