git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Santi Béjar" <sbejar@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: [COGITO PATCH] fetch_local -d behaves different from other fetch_*
Date: Wed, 01 Jun 2005 12:55:28 +0200	[thread overview]
Message-ID: <87psv6ibxb.fsf@ifae.es> (raw)
In-Reply-To: <87is0zginw.fsf@ifae.es> ( Santi Béjar's message of "Wed, 01 Jun 2005 00:00:35 +0200")


"fetch_local -d src dst" does not respect the dst directory name 
if both have different names. So

fetch_local -d /path/to/some/src /path/to/dst

copies to /path/to/src.

In fact this way it's never used in the current cogito so it's not
really affected but it's needed in the case where the heads and tags
are in directories.

Signed-off-by: "Santi Béjar" <sbejar@gmail.com>

 cg-pull |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cg-pull b/cg-pull
--- a/cg-pull
+++ b/cg-pull
@@ -223,15 +223,15 @@ fetch_local () {
 		shift
 	fi
 
-	cut_last=
+	dirs=
 	if [ "$1" = "-d" ]; then
-		cut_last=1
+		dirs=1
 		shift
 	fi
 
 	src="$1"
 	dest="$2"
-	[ "$cut_last" ] && dest=${dest%/*}
+	[ "$dirs" ] && src="${src%/}/."
 
 	cp $cp_flags_l "$src" "$dest"
 }


  reply	other threads:[~2005-06-01 10:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-31 22:00 [COGITO PATCH] Heads and tags in subdirectories Santi Béjar
2005-06-01 10:55 ` Santi Béjar [this message]
2005-06-01 12:59 ` Santi Béjar
2005-06-01 16:17   ` Santi Béjar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87psv6ibxb.fsf@ifae.es \
    --to=sbejar@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).