Git development
 help / color / mirror / Atom feed
From: Rocco Rutte <pdmef@gmx.net>
To: git@vger.kernel.org
Subject: Creating diffs
Date: Thu, 3 Aug 2006 12:29:37 +0000	[thread overview]
Message-ID: <20060803122937.GI5016@robert.daprodeges.fqdn.th-h.de> (raw)

Hi,

when creating a diff between two branches, one particular file needs a 
manually created/modified diff (the file contains just 1 line). As I 
cannot exclude files from the diff and create the missing one manually, 
I tried using the opposite approach: include all wanted.

However, when I do:

   $ git diff source:file dest:file

I get:

   --- a/source:file
   +++ b/source:file

But I'd like to drop the branchname. Can I do that without filtering 
everything through sed(1)?

Also, I think the diffs are reversed:

   $ git diff master:builtin-rm.c appname:builtin-rm.c
   diff --git a/master:builtin-rm.c b/master:builtin-rm.c
   index 735f3db..92d205a 100644
   --- a/master:builtin-rm.c
   +++ b/master:builtin-rm.c
   @@ -50,7 +50,6 @@ int cmd_rm(int argc, const char **argv, 
           const char **pathspec;
           char *seen;
   
   -       git_set_appname("git-rm");
           git_config(git_default_config);
   
           newfd = hold_lock_file_for_update(&lock_file, get_index_file());

since the appname branch contains the change while master doesn't.

Git version is 1.4.2.rc2 but both "bugs" happen with unpatched 1.3, too.

   bye, Rocco
-- 
:wq!

             reply	other threads:[~2006-08-03 12:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-03 12:29 Rocco Rutte [this message]
2006-08-03 12:39 ` Creating diffs Jakub Narebski
2006-08-03 14:47   ` Jakub Narebski
2006-08-03 14:58     ` Rocco Rutte
2006-08-03 18:45   ` Junio C Hamano
2006-08-03 18:22 ` Junio C Hamano

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=20060803122937.GI5016@robert.daprodeges.fqdn.th-h.de \
    --to=pdmef@gmx.net \
    --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