Git development
 help / color / mirror / Atom feed
From: Martin Schlemmer <azarah@nosferatu.za.org>
To: GIT Mailing Lists <git@vger.kernel.org>
Cc: Petr Baudis <pasky@ucw.cz>
Subject: Re: [patch pasky] update gitcancel.sh to handle modes as well
Date: Fri, 15 Apr 2005 01:04:50 +0200	[thread overview]
Message-ID: <1113519890.23299.129.camel@nosferatu.lan> (raw)
In-Reply-To: <1113519445.23299.119.camel@nosferatu.lan>


[-- Attachment #1.1: Type: text/plain, Size: 1784 bytes --]

On Fri, 2005-04-15 at 00:57 +0200, Martin Schlemmer wrote:
> Hi,
> 
> gitcancel.sh do not handle mode changes:
> 
> ----
> $ chmod -x Makefile
> $ git cancel
> patch: **** Only garbage was found in the patch input.
> ----
> 
> Rather use checkout-cache to sync our tree, as should do the right thing
> instead of diffing (cancel imply just blow away everything).
> 
> Signed-off-by: Martin Schlemmer <azarah@nosferatu.za.org>
> 
> gittrack.sh:  03d6db1fb3a70605ef249c632c04e542457f0808
> --- 03d6db1fb3a70605ef249c632c04e542457f0808/gittrack.sh
> +++ uncommitted/gittrack.sh
> @@ -51,6 +51,7 @@
> 
>         read-tree $(tree-id "$name")
>         gitdiff.sh local "$name" | gitapply.sh
> +       update-cache --refresh
> 
>  else
>         [ "$tracking" ] || \
> @@ -61,6 +62,7 @@
>         if [ -s ".git/HEAD.local" ]; then
>                 gitdiff.sh "$tracking" local | gitapply.sh
>                 read-tree $(tree-id local)
> +               update-cache --refresh
> 
>                 head=$(cat .git/HEAD)
>                 branchhead=$(cat .git/heads/$tracking)

Yes, I am an idiot, and its past 1am already here.

Rather use checkout-cache to sync our tree, as should do the right thing
instead of diffing (cancel imply just blow away everything).

Signed-off-by: Martin Schlemmer <azarah@nosferatu.za.org>

gitcancel.sh:  839b3c58f20f6eb8412f499a891e007e2e67d114
--- 839b3c58f20f6eb8412f499a891e007e2e67d114/gitcancel.sh
+++ uncommitted/gitcancel.sh
@@ -10,9 +10,8 @@
 #
 # Takes no arguments. Takes the evil changes from the tree.

-# FIXME: Does not revert mode changes!

-show-diff | patch -p0 -R
 rm -f .git/add-queue .git/rm-queue
+checkout-cache -q -f -a

 update-cache --refresh


-- 
Martin Schlemmer


[-- Attachment #1.2: git-full-cancel.patch --]
[-- Type: text/x-patch, Size: 396 bytes --]

gitcancel.sh:  839b3c58f20f6eb8412f499a891e007e2e67d114
--- 839b3c58f20f6eb8412f499a891e007e2e67d114/gitcancel.sh
+++ uncommitted/gitcancel.sh
@@ -10,9 +10,8 @@
 #
 # Takes no arguments. Takes the evil changes from the tree.
 
-# FIXME: Does not revert mode changes!
 
-show-diff | patch -p0 -R
 rm -f .git/add-queue .git/rm-queue
+checkout-cache -q -f -a
 
 update-cache --refresh

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2005-04-14 23:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14 22:57 [patch pasky] update gitcancel.sh to handle modes as well Martin Schlemmer
2005-04-14 22:57 ` Petr Baudis
2005-04-14 23:04 ` Martin Schlemmer [this message]
2005-04-14 23:07   ` Re: [patch pasky] " Petr Baudis
2005-04-14 23:14     ` Martin Schlemmer
     [not found]   ` <20050414231558.GW22699@pasky.ji.cz>
2005-04-14 23:39     ` Martin Schlemmer
2005-04-14 23:49       ` Petr Baudis

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=1113519890.23299.129.camel@nosferatu.lan \
    --to=azarah@nosferatu.za.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    /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