git-diff on touched files: bug or feature?

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

 



Hi,

When a file is "touched" (ie. stat information not matching the index,
but the content still matching), git-status doesn't report the file as
modified (as expected), but git-diff does (with an empty diff):

$ git st
# On branch master
nothing to commit (working directory clean)
$ ls       
bar
$ touch bar
$ git diff
diff --git a/bar b/bar         <--- here ---<
$ git status
# On branch master
nothing to commit (working directory clean)
$ git diff                     <--- status updated
                                    the stat in the index.

Is this intended, or just that the code that reconciles the file and
the index has been written for status, but not used in diff?

Thanks,

-- 
Matthieu
-
To unsubscribe from this list: 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]

  Powered by Linux