Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Creating diffs

From: Rocco Rutte <hidden>
Date: 2016-06-15 22:42:35

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!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help