Creating diffs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]